From 7c69fb312fe8200a12469f4e9cf302c9f821f8d5 Mon Sep 17 00:00:00 2001 From: Logan Williams Date: Tue, 24 Mar 2026 15:41:26 -0400 Subject: [PATCH] Updates --- .../{index-a99b4a7d.js => index-278b063c.js} | 64 +++++++++---------- index.html | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) rename assets/{index-a99b4a7d.js => index-278b063c.js} (90%) diff --git a/assets/index-a99b4a7d.js b/assets/index-278b063c.js similarity index 90% rename from assets/index-a99b4a7d.js rename to assets/index-278b063c.js index cc953e8..5094ad7 100644 --- a/assets/index-a99b4a7d.js +++ b/assets/index-278b063c.js @@ -1,4 +1,4 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function BC(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var kb={exports:{}},zu={},Cb={exports:{}},Ie={};/** +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function UC(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var kb={exports:{}},zu={},Cb={exports:{}},Ie={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ta=Symbol.for("react.element"),UC=Symbol.for("react.portal"),HC=Symbol.for("react.fragment"),VC=Symbol.for("react.strict_mode"),WC=Symbol.for("react.profiler"),qC=Symbol.for("react.provider"),ZC=Symbol.for("react.context"),GC=Symbol.for("react.forward_ref"),YC=Symbol.for("react.suspense"),KC=Symbol.for("react.memo"),XC=Symbol.for("react.lazy"),my=Symbol.iterator;function QC(e){return e===null||typeof e!="object"?null:(e=my&&e[my]||e["@@iterator"],typeof e=="function"?e:null)}var Ab={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pb=Object.assign,Lb={};function Zo(e,t,n){this.props=e,this.context=t,this.refs=Lb,this.updater=n||Ab}Zo.prototype.isReactComponent={};Zo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Zo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rb(){}Rb.prototype=Zo.prototype;function Bp(e,t,n){this.props=e,this.context=t,this.refs=Lb,this.updater=n||Ab}var Up=Bp.prototype=new Rb;Up.constructor=Bp;Pb(Up,Zo.prototype);Up.isPureReactComponent=!0;var gy=Array.isArray,Ib=Object.prototype.hasOwnProperty,Hp={current:null},Nb={key:!0,ref:!0,__self:!0,__source:!0};function Ob(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)Ib.call(t,r)&&!Nb.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,oe=V[J];if(0>>1;Ji(de,G))uei(be,de)?(V[J]=be,V[ue]=G,J=ue):(V[J]=de,V[fe]=G,J=fe);else if(uei(be,G))V[J]=be,V[ue]=G,J=ue;else break e}}return Y}function i(V,Y){var G=V.sortIndex-Y.sortIndex;return G!==0?G:V.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var d=[],y=[],_=1,c=null,f=3,w=!1,v=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(V){for(var Y=n(y);Y!==null;){if(Y.callback===null)r(y);else if(Y.startTime<=V)r(y),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(y)}}function T(V){if(m=!1,h(V),!v)if(n(d)!==null)v=!0,H(x);else{var Y=n(y);Y!==null&&B(T,Y.startTime-V)}}function x(V,Y){v=!1,m&&(m=!1,g(E),E=-1),w=!0;var G=f;try{for(h(Y),c=n(d);c!==null&&(!(c.expirationTime>Y)||V&&!N());){var J=c.callback;if(typeof J=="function"){c.callback=null,f=c.priorityLevel;var oe=J(c.expirationTime<=Y);Y=e.unstable_now(),typeof oe=="function"?c.callback=oe:c===n(d)&&r(d),h(Y)}else r(d);c=n(d)}if(c!==null)var ce=!0;else{var fe=n(y);fe!==null&&B(T,fe.startTime-Y),ce=!1}return ce}finally{c=null,f=G,w=!1}}var k=!1,P=null,E=-1,A=5,C=-1;function N(){return!(e.unstable_now()-CV||125J?(V.sortIndex=G,t(y,V),n(d)===null&&V===n(y)&&(m?(g(E),E=-1):m=!0,B(T,G-J))):(V.sortIndex=oe,t(d,V),v||w||(v=!0,H(x))),V},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(V){var Y=f;return function(){var G=f;f=Y;try{return V.apply(this,arguments)}finally{f=G}}}})(Fb);$b.exports=Fb;var uA=$b.exports;/** + */(function(e){function t(V,Y){var G=V.length;V.push(Y);e:for(;0>>1,oe=V[J];if(0>>1;Ji(de,G))uei(be,de)?(V[J]=be,V[ue]=G,J=ue):(V[J]=de,V[fe]=G,J=fe);else if(uei(be,G))V[J]=be,V[ue]=G,J=ue;else break e}}return Y}function i(V,Y){var G=V.sortIndex-Y.sortIndex;return G!==0?G:V.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var d=[],y=[],_=1,c=null,f=3,w=!1,v=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(V){for(var Y=n(y);Y!==null;){if(Y.callback===null)r(y);else if(Y.startTime<=V)r(y),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(y)}}function T(V){if(m=!1,h(V),!v)if(n(d)!==null)v=!0,H(x);else{var Y=n(y);Y!==null&&U(T,Y.startTime-V)}}function x(V,Y){v=!1,m&&(m=!1,g(E),E=-1),w=!0;var G=f;try{for(h(Y),c=n(d);c!==null&&(!(c.expirationTime>Y)||V&&!N());){var J=c.callback;if(typeof J=="function"){c.callback=null,f=c.priorityLevel;var oe=J(c.expirationTime<=Y);Y=e.unstable_now(),typeof oe=="function"?c.callback=oe:c===n(d)&&r(d),h(Y)}else r(d);c=n(d)}if(c!==null)var ce=!0;else{var fe=n(y);fe!==null&&U(T,fe.startTime-Y),ce=!1}return ce}finally{c=null,f=G,w=!1}}var k=!1,P=null,E=-1,A=5,C=-1;function N(){return!(e.unstable_now()-CV||125J?(V.sortIndex=G,t(y,V),n(d)===null&&V===n(y)&&(m?(g(E),E=-1):m=!0,U(T,G-J))):(V.sortIndex=oe,t(d,V),v||w||(v=!0,H(x))),V},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(V){var Y=f;return function(){var G=f;f=Y;try{return V.apply(this,arguments)}finally{f=G}}}})(Fb);$b.exports=Fb;var uA=$b.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var jb=te,gn=uA;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kh=Object.prototype.hasOwnProperty,cA=/^[: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]*$/,yy={},_y={};function dA(e){return kh.call(_y,e)?!0:kh.call(yy,e)?!1:cA.test(e)?_y[e]=!0:(yy[e]=!0,!1)}function fA(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hA(e,t,n,r){if(t===null||typeof t>"u"||fA(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Jt(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ut[e]=new Jt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ut[t]=new Jt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ut[e]=new Jt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ut[e]=new Jt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ut[e]=new Jt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ut[e]=new Jt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ut[e]=new Jt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ut[e]=new Jt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ut[e]=new Jt(e,5,!1,e.toLowerCase(),null,!1,!1)});var qp=/[\-:]([a-z])/g;function Zp(e){return e[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(e){var t=e.replace(qp,Zp);Ut[t]=new Jt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qp,Zp);Ut[t]=new Jt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qp,Zp);Ut[t]=new Jt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ut[e]=new Jt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ut.xlinkHref=new Jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ut[e]=new Jt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gp(e,t,n,r){var i=Ut.hasOwnProperty(t)?Ut[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kh=Object.prototype.hasOwnProperty,cA=/^[: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]*$/,yy={},_y={};function dA(e){return kh.call(_y,e)?!0:kh.call(yy,e)?!1:cA.test(e)?_y[e]=!0:(yy[e]=!0,!1)}function fA(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hA(e,t,n,r){if(t===null||typeof t>"u"||fA(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qt(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ut[e]=new Qt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ut[t]=new Qt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ut[e]=new Qt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ut[e]=new Qt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ut[e]=new Qt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ut[e]=new Qt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ut[e]=new Qt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ut[e]=new Qt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ut[e]=new Qt(e,5,!1,e.toLowerCase(),null,!1,!1)});var qp=/[\-:]([a-z])/g;function Zp(e){return e[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(e){var t=e.replace(qp,Zp);Ut[t]=new Qt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qp,Zp);Ut[t]=new Qt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qp,Zp);Ut[t]=new Qt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ut[e]=new Qt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ut.xlinkHref=new Qt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ut[e]=new Qt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gp(e,t,n,r){var i=Ut.hasOwnProperty(t)?Ut[t]:null;(i!==null?i.type!==0:r||!(2l||i[a]!==s[l]){var d=` -`+i[a].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=a&&0<=l);break}}}finally{Sd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ls(e):""}function pA(e){switch(e.tag){case 5:return Ls(e.type);case 16:return Ls("Lazy");case 13:return Ls("Suspense");case 19:return Ls("SuspenseList");case 0:case 2:case 15:return e=Ed(e.type,!1),e;case 11:return e=Ed(e.type.render,!1),e;case 1:return e=Ed(e.type,!0),e;default:return""}}function Lh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fo:return"Fragment";case co:return"Portal";case Ch:return"Profiler";case Yp:return"StrictMode";case Ah:return"Suspense";case Ph:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ub:return(e.displayName||"Context")+".Consumer";case Bb:return(e._context.displayName||"Context")+".Provider";case Kp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xp:return t=e.displayName||null,t!==null?t:Lh(e.type)||"Memo";case qr:t=e._payload,e=e._init;try{return Lh(e(t))}catch{}}return null}function mA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lh(t);case 8:return t===Yp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gA(e){var t=Vb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rl(e){e._valueTracker||(e._valueTracker=gA(e))}function Wb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Xl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Rh(e,t){var n=t.checked;return ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function by(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qb(e,t){t=t.checked,t!=null&&Gp(e,"checked",t,!1)}function Ih(e,t){qb(e,t);var n=ui(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Nh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Nh(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ty(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Nh(e,t,n){(t!=="number"||Xl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rs=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=il.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var js={animationIterationCount:!0,aspectRatio:!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},vA=["Webkit","ms","Moz","O"];Object.keys(js).forEach(function(e){vA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),js[t]=js[e]})});function Kb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||js.hasOwnProperty(e)&&js[e]?(""+t).trim():t+"px"}function Xb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Kb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yA=ct({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 Dh(e,t){if(t){if(yA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function $h(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Fh=null;function Qp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jh=null,xo=null,ko=null;function xy(e){if(e=xa(e)){if(typeof jh!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Wu(t),jh(e.stateNode,e.type,t))}}function Qb(e){xo?ko?ko.push(e):ko=[e]:xo=e}function Jb(){if(xo){var e=xo,t=ko;if(ko=xo=null,xy(e),t)for(e=0;e>>=0,e===0?32:31-(PA(e)/LA|0)|0}var ol=64,sl=4194304;function Is(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=Is(l):(s&=a,s!==0&&(r=Is(s)))}else a=n&~i,a!==0?r=Is(a):s!==0&&(r=Is(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Sa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vn(t),e[t]=n}function OA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Bs),Oy=String.fromCharCode(32),My=!1;function _1(e,t){switch(e){case"keyup":return lP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ho=!1;function cP(e,t){switch(e){case"compositionend":return w1(t);case"keypress":return t.which!==32?null:(My=!0,Oy);case"textInput":return e=t.data,e===Oy&&My?null:e;default:return null}}function dP(e,t){if(ho)return e==="compositionend"||!sm&&_1(e,t)?(e=v1(),Il=rm=Qr=null,ho=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jy(n)}}function E1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?E1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x1(){for(var e=window,t=Xl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xl(e.document)}return t}function am(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wP(e){var t=x1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&E1(n.ownerDocument.documentElement,n)){if(r!==null&&am(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=zy(n,s);var a=zy(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,po=null,Wh=null,Hs=null,qh=!1;function By(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qh||po==null||po!==Xl(r)||(r=po,"selectionStart"in r&&am(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hs&&ra(Hs,r)||(Hs=r,r=iu(Wh,"onSelect"),0vo||(e.current=Qh[vo],Qh[vo]=null,vo--)}function Xe(e,t){vo++,Qh[vo]=e.current,e.current=t}var ci={},Gt=fi(ci),sn=fi(!1),$i=ci;function Do(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function an(e){return e=e.childContextTypes,e!=null}function su(){tt(sn),tt(Gt)}function Gy(e,t,n){if(Gt.current!==ci)throw Error(ae(168));Xe(Gt,t),Xe(sn,n)}function O1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,mA(e)||"Unknown",i));return ct({},n,r)}function au(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,$i=Gt.current,Xe(Gt,e),Xe(sn,sn.current),!0}function Yy(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=O1(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,tt(sn),tt(Gt),Xe(Gt,e)):tt(sn),Xe(sn,n)}var br=null,qu=!1,Fd=!1;function M1(e){br===null?br=[e]:br.push(e)}function IP(e){qu=!0,M1(e)}function hi(){if(!Fd&&br!==null){Fd=!0;var e=0,t=He;try{var n=br;for(He=1;e>=a,i-=a,Er=1<<32-Vn(t)+i|n<E?(A=P,P=null):A=P.sibling;var C=f(g,P,h[E],T);if(C===null){P===null&&(P=A);break}e&&P&&C.alternate===null&&t(g,P),p=s(C,p,E),k===null?x=C:k.sibling=C,k=C,P=A}if(E===h.length)return n(g,P),rt&&ki(g,E),x;if(P===null){for(;EE?(A=P,P=null):A=P.sibling;var N=f(g,P,C.value,T);if(N===null){P===null&&(P=A);break}e&&P&&N.alternate===null&&t(g,P),p=s(N,p,E),k===null?x=N:k.sibling=N,k=N,P=A}if(C.done)return n(g,P),rt&&ki(g,E),x;if(P===null){for(;!C.done;E++,C=h.next())C=c(g,C.value,T),C!==null&&(p=s(C,p,E),k===null?x=C:k.sibling=C,k=C);return rt&&ki(g,E),x}for(P=r(g,P);!C.done;E++,C=h.next())C=w(P,g,E,C.value,T),C!==null&&(e&&C.alternate!==null&&P.delete(C.key===null?E:C.key),p=s(C,p,E),k===null?x=C:k.sibling=C,k=C);return e&&P.forEach(function($){return t(g,$)}),rt&&ki(g,E),x}function b(g,p,h,T){if(typeof h=="object"&&h!==null&&h.type===fo&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case nl:e:{for(var x=h.key,k=p;k!==null;){if(k.key===x){if(x=h.type,x===fo){if(k.tag===7){n(g,k.sibling),p=i(k,h.props.children),p.return=g,g=p;break e}}else if(k.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===qr&&n_(x)===k.type){n(g,k.sibling),p=i(k,h.props),p.ref=ws(g,k,h),p.return=g,g=p;break e}n(g,k);break}else t(g,k);k=k.sibling}h.type===fo?(p=Mi(h.props.children,g.mode,T,h.key),p.return=g,g=p):(T=zl(h.type,h.key,h.props,null,g.mode,T),T.ref=ws(g,p,h),T.return=g,g=T)}return a(g);case co:e:{for(k=h.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(g,p.sibling),p=i(p,h.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=qd(h,g.mode,T),p.return=g,g=p}return a(g);case qr:return k=h._init,b(g,p,k(h._payload),T)}if(Rs(h))return v(g,p,h,T);if(ms(h))return m(g,p,h,T);hl(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(g,p.sibling),p=i(p,h),p.return=g,g=p):(n(g,p),p=Wd(h,g.mode,T),p.return=g,g=p),a(g)):n(g,p)}return b}var Fo=H1(!0),V1=H1(!1),ka={},ur=fi(ka),aa=fi(ka),la=fi(ka);function Ri(e){if(e===ka)throw Error(ae(174));return e}function gm(e,t){switch(Xe(la,t),Xe(aa,e),Xe(ur,ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mh(t,e)}tt(ur),Xe(ur,t)}function jo(){tt(ur),tt(aa),tt(la)}function W1(e){Ri(la.current);var t=Ri(ur.current),n=Mh(t,e.type);t!==n&&(Xe(aa,e),Xe(ur,n))}function vm(e){aa.current===e&&(tt(ur),tt(aa))}var lt=fi(0);function hu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jd=[];function ym(){for(var e=0;en?n:4,e(!0);var r=zd.transition;zd.transition={};try{e(!1),t()}finally{He=n,zd.transition=r}}function aT(){return In().memoizedState}function DP(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lT(e))uT(t,n);else if(n=j1(e,t,n,r),n!==null){var i=Xt();Wn(n,e,r,i),cT(n,t,r)}}function $P(e,t,n){var r=ai(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lT(e))uT(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.hasEagerState=!0,i.eagerState=l,Gn(l,a)){var d=t.interleaved;d===null?(i.next=i,pm(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=j1(e,t,i,r),n!==null&&(i=Xt(),Wn(n,e,r,i),cT(n,t,r))}}function lT(e){var t=e.alternate;return e===ut||t!==null&&t===ut}function uT(e,t){Vs=pu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cT(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,em(e,n)}}var mu={readContext:Rn,useCallback:Ht,useContext:Ht,useEffect:Ht,useImperativeHandle:Ht,useInsertionEffect:Ht,useLayoutEffect:Ht,useMemo:Ht,useReducer:Ht,useRef:Ht,useState:Ht,useDebugValue:Ht,useDeferredValue:Ht,useTransition:Ht,useMutableSource:Ht,useSyncExternalStore:Ht,useId:Ht,unstable_isNewReconciler:!1},FP={readContext:Rn,useCallback:function(e,t){return or().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:i_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dl(4194308,4,nT.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var n=or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=or();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=DP.bind(null,ut,e),[r.memoizedState,e]},useRef:function(e){var t=or();return e={current:e},t.memoizedState=e},useState:r_,useDebugValue:Sm,useDeferredValue:function(e){return or().memoizedState=e},useTransition:function(){var e=r_(!1),t=e[0];return e=MP.bind(null,e[1]),or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ut,i=or();if(rt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Ot===null)throw Error(ae(349));ji&30||G1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,i_(K1.bind(null,r,s,e),[e]),r.flags|=2048,da(9,Y1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=or(),t=Ot.identifierPrefix;if(rt){var n=xr,r=Er;n=(r&~(1<<32-Vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ua++,0")&&(d=d.replace("",e.displayName)),d}while(1<=a&&0<=l);break}}}finally{Sd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ls(e):""}function pA(e){switch(e.tag){case 5:return Ls(e.type);case 16:return Ls("Lazy");case 13:return Ls("Suspense");case 19:return Ls("SuspenseList");case 0:case 2:case 15:return e=Ed(e.type,!1),e;case 11:return e=Ed(e.type.render,!1),e;case 1:return e=Ed(e.type,!0),e;default:return""}}function Lh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fo:return"Fragment";case co:return"Portal";case Ch:return"Profiler";case Yp:return"StrictMode";case Ah:return"Suspense";case Ph:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bb:return(e.displayName||"Context")+".Consumer";case Ub:return(e._context.displayName||"Context")+".Provider";case Kp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xp:return t=e.displayName||null,t!==null?t:Lh(e.type)||"Memo";case qr:t=e._payload,e=e._init;try{return Lh(e(t))}catch{}}return null}function mA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lh(t);case 8:return t===Yp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gA(e){var t=Vb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rl(e){e._valueTracker||(e._valueTracker=gA(e))}function Wb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Xl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Rh(e,t){var n=t.checked;return ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function by(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qb(e,t){t=t.checked,t!=null&&Gp(e,"checked",t,!1)}function Ih(e,t){qb(e,t);var n=ui(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Nh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Nh(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ty(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Nh(e,t,n){(t!=="number"||Xl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rs=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=il.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var js={animationIterationCount:!0,aspectRatio:!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},vA=["Webkit","ms","Moz","O"];Object.keys(js).forEach(function(e){vA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),js[t]=js[e]})});function Kb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||js.hasOwnProperty(e)&&js[e]?(""+t).trim():t+"px"}function Xb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Kb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yA=ct({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 Dh(e,t){if(t){if(yA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function $h(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Fh=null;function Qp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jh=null,xo=null,ko=null;function xy(e){if(e=xa(e)){if(typeof jh!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Wu(t),jh(e.stateNode,e.type,t))}}function Qb(e){xo?ko?ko.push(e):ko=[e]:xo=e}function Jb(){if(xo){var e=xo,t=ko;if(ko=xo=null,xy(e),t)for(e=0;e>>=0,e===0?32:31-(PA(e)/LA|0)|0}var ol=64,sl=4194304;function Is(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=Is(l):(s&=a,s!==0&&(r=Is(s)))}else a=n&~i,a!==0?r=Is(a):s!==0&&(r=Is(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Sa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vn(t),e[t]=n}function OA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Us),Oy=String.fromCharCode(32),My=!1;function _1(e,t){switch(e){case"keyup":return lP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ho=!1;function cP(e,t){switch(e){case"compositionend":return w1(t);case"keypress":return t.which!==32?null:(My=!0,Oy);case"textInput":return e=t.data,e===Oy&&My?null:e;default:return null}}function dP(e,t){if(ho)return e==="compositionend"||!sm&&_1(e,t)?(e=v1(),Il=rm=Qr=null,ho=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jy(n)}}function E1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?E1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x1(){for(var e=window,t=Xl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xl(e.document)}return t}function am(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wP(e){var t=x1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&E1(n.ownerDocument.documentElement,n)){if(r!==null&&am(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=zy(n,s);var a=zy(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,po=null,Wh=null,Hs=null,qh=!1;function Uy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qh||po==null||po!==Xl(r)||(r=po,"selectionStart"in r&&am(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hs&&ra(Hs,r)||(Hs=r,r=iu(Wh,"onSelect"),0vo||(e.current=Qh[vo],Qh[vo]=null,vo--)}function Xe(e,t){vo++,Qh[vo]=e.current,e.current=t}var ci={},Zt=fi(ci),sn=fi(!1),$i=ci;function Do(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function an(e){return e=e.childContextTypes,e!=null}function su(){tt(sn),tt(Zt)}function Gy(e,t,n){if(Zt.current!==ci)throw Error(ae(168));Xe(Zt,t),Xe(sn,n)}function O1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,mA(e)||"Unknown",i));return ct({},n,r)}function au(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,$i=Zt.current,Xe(Zt,e),Xe(sn,sn.current),!0}function Yy(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=O1(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,tt(sn),tt(Zt),Xe(Zt,e)):tt(sn),Xe(sn,n)}var br=null,qu=!1,Fd=!1;function M1(e){br===null?br=[e]:br.push(e)}function IP(e){qu=!0,M1(e)}function hi(){if(!Fd&&br!==null){Fd=!0;var e=0,t=He;try{var n=br;for(He=1;e>=a,i-=a,Er=1<<32-Vn(t)+i|n<E?(A=P,P=null):A=P.sibling;var C=f(g,P,h[E],T);if(C===null){P===null&&(P=A);break}e&&P&&C.alternate===null&&t(g,P),p=s(C,p,E),k===null?x=C:k.sibling=C,k=C,P=A}if(E===h.length)return n(g,P),rt&&ki(g,E),x;if(P===null){for(;EE?(A=P,P=null):A=P.sibling;var N=f(g,P,C.value,T);if(N===null){P===null&&(P=A);break}e&&P&&N.alternate===null&&t(g,P),p=s(N,p,E),k===null?x=N:k.sibling=N,k=N,P=A}if(C.done)return n(g,P),rt&&ki(g,E),x;if(P===null){for(;!C.done;E++,C=h.next())C=c(g,C.value,T),C!==null&&(p=s(C,p,E),k===null?x=C:k.sibling=C,k=C);return rt&&ki(g,E),x}for(P=r(g,P);!C.done;E++,C=h.next())C=w(P,g,E,C.value,T),C!==null&&(e&&C.alternate!==null&&P.delete(C.key===null?E:C.key),p=s(C,p,E),k===null?x=C:k.sibling=C,k=C);return e&&P.forEach(function($){return t(g,$)}),rt&&ki(g,E),x}function b(g,p,h,T){if(typeof h=="object"&&h!==null&&h.type===fo&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case nl:e:{for(var x=h.key,k=p;k!==null;){if(k.key===x){if(x=h.type,x===fo){if(k.tag===7){n(g,k.sibling),p=i(k,h.props.children),p.return=g,g=p;break e}}else if(k.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===qr&&n_(x)===k.type){n(g,k.sibling),p=i(k,h.props),p.ref=ws(g,k,h),p.return=g,g=p;break e}n(g,k);break}else t(g,k);k=k.sibling}h.type===fo?(p=Mi(h.props.children,g.mode,T,h.key),p.return=g,g=p):(T=zl(h.type,h.key,h.props,null,g.mode,T),T.ref=ws(g,p,h),T.return=g,g=T)}return a(g);case co:e:{for(k=h.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(g,p.sibling),p=i(p,h.children||[]),p.return=g,g=p;break e}else{n(g,p);break}else t(g,p);p=p.sibling}p=qd(h,g.mode,T),p.return=g,g=p}return a(g);case qr:return k=h._init,b(g,p,k(h._payload),T)}if(Rs(h))return v(g,p,h,T);if(ms(h))return m(g,p,h,T);hl(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(g,p.sibling),p=i(p,h),p.return=g,g=p):(n(g,p),p=Wd(h,g.mode,T),p.return=g,g=p),a(g)):n(g,p)}return b}var Fo=H1(!0),V1=H1(!1),ka={},ur=fi(ka),aa=fi(ka),la=fi(ka);function Ri(e){if(e===ka)throw Error(ae(174));return e}function gm(e,t){switch(Xe(la,t),Xe(aa,e),Xe(ur,ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mh(t,e)}tt(ur),Xe(ur,t)}function jo(){tt(ur),tt(aa),tt(la)}function W1(e){Ri(la.current);var t=Ri(ur.current),n=Mh(t,e.type);t!==n&&(Xe(aa,e),Xe(ur,n))}function vm(e){aa.current===e&&(tt(ur),tt(aa))}var lt=fi(0);function hu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jd=[];function ym(){for(var e=0;en?n:4,e(!0);var r=zd.transition;zd.transition={};try{e(!1),t()}finally{He=n,zd.transition=r}}function aT(){return In().memoizedState}function DP(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lT(e))uT(t,n);else if(n=j1(e,t,n,r),n!==null){var i=Kt();Wn(n,e,r,i),cT(n,t,r)}}function $P(e,t,n){var r=ai(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lT(e))uT(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.hasEagerState=!0,i.eagerState=l,Gn(l,a)){var d=t.interleaved;d===null?(i.next=i,pm(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=j1(e,t,i,r),n!==null&&(i=Kt(),Wn(n,e,r,i),cT(n,t,r))}}function lT(e){var t=e.alternate;return e===ut||t!==null&&t===ut}function uT(e,t){Vs=pu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cT(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,em(e,n)}}var mu={readContext:Rn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},FP={readContext:Rn,useCallback:function(e,t){return or().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:i_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dl(4194308,4,nT.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var n=or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=or();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=DP.bind(null,ut,e),[r.memoizedState,e]},useRef:function(e){var t=or();return e={current:e},t.memoizedState=e},useState:r_,useDebugValue:Sm,useDeferredValue:function(e){return or().memoizedState=e},useTransition:function(){var e=r_(!1),t=e[0];return e=MP.bind(null,e[1]),or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ut,i=or();if(rt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Nt===null)throw Error(ae(349));ji&30||G1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,i_(K1.bind(null,r,s,e),[e]),r.flags|=2048,da(9,Y1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=or(),t=Nt.identifierPrefix;if(rt){var n=xr,r=Er;n=(r&~(1<<32-Vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ua++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[sr]=t,e[sa]=r,_T(e,t,!1,!1),t.stateNode=e;e:{switch(a=$h(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;iBo&&(t.flags|=128,r=!0,bs(s,!1),t.lanes=4194304)}else{if(!r)if(e=hu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!rt)return Vt(t),null}else 2*bt()-s.renderingStartTime>Bo&&n!==1073741824&&(t.flags|=128,r=!0,bs(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=bt(),t.sibling=null,n=lt.current,Xe(lt,r?n&1|2:n&1),t):(Vt(t),null);case 22:case 23:return Pm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hn&1073741824&&(Vt(t),t.subtreeFlags&6&&(t.flags|=8192)):Vt(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function qP(e,t){switch(um(t),t.tag){case 1:return an(t.type)&&su(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),tt(sn),tt(Gt),ym(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return vm(t),null;case 13:if(tt(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));$o()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(lt),null;case 4:return jo(),null;case 10:return hm(t.type._context),null;case 22:case 23:return Pm(),null;case 24:return null;default:return null}}var ml=!1,qt=!1,ZP=typeof WeakSet=="function"?WeakSet:Set,pe=null;function bo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pt(e,t,r)}else n.current=null}function cp(e,t,n){try{n()}catch(r){pt(e,t,r)}}var h_=!1;function GP(e,t){if(Zh=nu,e=x1(),am(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,l=-1,d=-1,y=0,_=0,c=e,f=null;t:for(;;){for(var w;c!==n||i!==0&&c.nodeType!==3||(l=a+i),c!==s||r!==0&&c.nodeType!==3||(d=a+r),c.nodeType===3&&(a+=c.nodeValue.length),(w=c.firstChild)!==null;)f=c,c=w;for(;;){if(c===e)break t;if(f===n&&++y===i&&(l=a),f===s&&++_===r&&(d=a),(w=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=w}n=l===-1||d===-1?null:{start:l,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gh={focusedElem:e,selectionRange:n},nu=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,b=v.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:jn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(T){pt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return v=h_,h_=!1,v}function Ws(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&cp(t,n,s)}i=i.next}while(i!==r)}}function Yu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function dp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function TT(e){var t=e.alternate;t!==null&&(e.alternate=null,TT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[sr],delete t[sa],delete t[Xh],delete t[LP],delete t[RP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ST(e){return e.tag===5||e.tag===3||e.tag===4}function p_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ST(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ou));else if(r!==4&&(e=e.child,e!==null))for(fp(e,t,n),e=e.sibling;e!==null;)fp(e,t,n),e=e.sibling}function hp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(hp(e,t,n),e=e.sibling;e!==null;)hp(e,t,n),e=e.sibling}var Ft=null,zn=!1;function Hr(e,t,n){for(n=n.child;n!==null;)ET(e,t,n),n=n.sibling}function ET(e,t,n){if(lr&&typeof lr.onCommitFiberUnmount=="function")try{lr.onCommitFiberUnmount(Bu,n)}catch{}switch(n.tag){case 5:qt||bo(n,t);case 6:var r=Ft,i=zn;Ft=null,Hr(e,t,n),Ft=r,zn=i,Ft!==null&&(zn?(e=Ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ft.removeChild(n.stateNode));break;case 18:Ft!==null&&(zn?(e=Ft,n=n.stateNode,e.nodeType===8?$d(e.parentNode,n):e.nodeType===1&&$d(e,n),ta(e)):$d(Ft,n.stateNode));break;case 4:r=Ft,i=zn,Ft=n.stateNode.containerInfo,zn=!0,Hr(e,t,n),Ft=r,zn=i;break;case 0:case 11:case 14:case 15:if(!qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&cp(n,t,a),i=i.next}while(i!==r)}Hr(e,t,n);break;case 1:if(!qt&&(bo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){pt(n,t,l)}Hr(e,t,n);break;case 21:Hr(e,t,n);break;case 22:n.mode&1?(qt=(r=qt)||n.memoizedState!==null,Hr(e,t,n),qt=r):Hr(e,t,n);break;default:Hr(e,t,n)}}function m_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZP),t.forEach(function(r){var i=rL.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $n(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~s}if(r=i,r=bt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KP(r/1960))-r,10e?16:e,Jr===null)var r=!1;else{if(e=Jr,Jr=null,yu=0,Me&6)throw Error(ae(331));var i=Me;for(Me|=4,pe=e.current;pe!==null;){var s=pe,a=s.child;if(pe.flags&16){var l=s.deletions;if(l!==null){for(var d=0;dbt()-Cm?Oi(e,0):km|=n),ln(e,t)}function IT(e,t){t===0&&(e.mode&1?(t=sl,sl<<=1,!(sl&130023424)&&(sl=4194304)):t=1);var n=Xt();e=Ir(e,t),e!==null&&(Sa(e,t,n),ln(e,n))}function nL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),IT(e,n)}function rL(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),IT(e,n)}var NT;NT=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rn=!1,VP(e,t,n);rn=!!(e.flags&131072)}else rn=!1,rt&&t.flags&1048576&&D1(t,uu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var i=Do(t,Gt.current);Ao(t,n),i=wm(null,t,r,e,i,n);var s=bm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,an(r)?(s=!0,au(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mm(t),i.updater=Zu,t.stateNode=i,i._reactInternals=t,rp(t,r,e,n),t=sp(null,t,r,!0,s,n)):(t.tag=0,rt&&s&&lm(t),Kt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=oL(r),e=jn(r,e),i){case 0:t=op(null,t,r,e,n);break e;case 1:t=c_(null,t,r,e,n);break e;case 11:t=l_(null,t,r,e,n);break e;case 14:t=u_(null,t,r,jn(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),op(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),c_(e,t,r,i,n);case 3:e:{if(gT(t),e===null)throw Error(ae(387));r=t.pendingProps,s=t.memoizedState,i=s.element,z1(e,t),fu(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=zo(Error(ae(423)),t),t=d_(e,t,r,n,i);break e}else if(r!==i){i=zo(Error(ae(424)),t),t=d_(e,t,r,n,i);break e}else for(pn=ii(t.stateNode.containerInfo.firstChild),mn=t,rt=!0,Bn=null,n=V1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($o(),r===i){t=Nr(e,t,n);break e}Kt(e,t,r,n)}t=t.child}return t;case 5:return W1(t),e===null&&ep(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Yh(r,i)?a=null:s!==null&&Yh(r,s)&&(t.flags|=32),mT(e,t),Kt(e,t,a,n),t.child;case 6:return e===null&&ep(t),null;case 13:return vT(e,t,n);case 4:return gm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fo(t,null,r,n):Kt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),l_(e,t,r,i,n);case 7:return Kt(e,t,t.pendingProps,n),t.child;case 8:return Kt(e,t,t.pendingProps.children,n),t.child;case 12:return Kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Xe(cu,r._currentValue),r._currentValue=a,s!==null)if(Gn(s.value,a)){if(s.children===i.children&&!sn.current){t=Nr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var d=l.firstContext;d!==null;){if(d.context===r){if(s.tag===1){d=Ar(-1,n&-n),d.tag=2;var y=s.updateQueue;if(y!==null){y=y.shared;var _=y.pending;_===null?d.next=d:(d.next=_.next,_.next=d),y.pending=d}}s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),tp(s.return,n,t),l.lanes|=n;break}d=d.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(ae(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),tp(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Kt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ao(t,n),i=Rn(i),r=r(i),t.flags|=1,Kt(e,t,r,n),t.child;case 14:return r=t.type,i=jn(r,t.pendingProps),i=jn(r.type,i),u_(e,t,r,i,n);case 15:return hT(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),$l(e,t),t.tag=1,an(r)?(e=!0,au(t)):e=!1,Ao(t,n),U1(t,r,i),rp(t,r,i,n),sp(null,t,r,!0,e,n);case 19:return yT(e,t,n);case 22:return pT(e,t,n)}throw Error(ae(156,t.tag))};function OT(e,t){return s1(e,t)}function iL(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(e,t,n,r){return new iL(e,t,n,r)}function Rm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oL(e){if(typeof e=="function")return Rm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kp)return 11;if(e===Xp)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zl(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")Rm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case fo:return Mi(n.children,i,s,t);case Yp:a=8,i|=8;break;case Ch:return e=Cn(12,n,t,i|2),e.elementType=Ch,e.lanes=s,e;case Ah:return e=Cn(13,n,t,i),e.elementType=Ah,e.lanes=s,e;case Ph:return e=Cn(19,n,t,i),e.elementType=Ph,e.lanes=s,e;case Hb:return Xu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bb:a=10;break e;case Ub:a=9;break e;case Kp:a=11;break e;case Xp:a=14;break e;case qr:a=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Cn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Mi(e,t,n,r){return e=Cn(7,e,r,t),e.lanes=n,e}function Xu(e,t,n,r){return e=Cn(22,e,r,t),e.elementType=Hb,e.lanes=n,e.stateNode={isHidden:!1},e}function Wd(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function qd(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sL(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kd(0),this.expirationTimes=kd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Im(e,t,n,r,i,s,a,l,d){return e=new sL(e,t,n,l,d),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Cn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mm(s),e}function aL(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FT)}catch(e){console.error(e)}}FT(),Db.exports=yn;var nc=Db.exports;const fL=Kn(nc);var S_=nc;xh.createRoot=S_.createRoot,xh.hydrateRoot=S_.hydrateRoot;var jT={exports:{}},zT={};/** +`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Hd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ip(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UP=typeof WeakMap=="function"?WeakMap:Map;function dT(e,t,n){n=Ar(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){vu||(vu=!0,pp=r),ip(e,t)},n}function fT(e,t,n){n=Ar(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ip(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ip(e,t),typeof r!="function"&&(si===null?si=new Set([this]):si.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function o_(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UP;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=tL.bind(null,e,t,n),t.then(e,e))}function s_(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function a_(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ar(-1,1),t.tag=2,oi(n,t,1))),n.lanes|=1),e)}var BP=Fr.ReactCurrentOwner,nn=!1;function Yt(e,t,n,r){t.child=e===null?V1(t,null,n,r):Fo(t,e.child,n,r)}function l_(e,t,n,r,i){n=n.render;var s=t.ref;return Ao(t,i),r=wm(e,t,n,r,s,i),n=bm(),e!==null&&!nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Nr(e,t,i)):(rt&&n&&lm(t),t.flags|=1,Yt(e,t,r,i),t.child)}function u_(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Rm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,hT(e,t,s,r,i)):(e=zl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:ra,n(a,r)&&e.ref===t.ref)return Nr(e,t,i)}return t.flags|=1,e=li(s,r),e.ref=t.ref,e.return=t,t.child=e}function hT(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ra(s,r)&&e.ref===t.ref)if(nn=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(nn=!0);else return t.lanes=e.lanes,Nr(e,t,i)}return op(e,t,n,r,i)}function pT(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(To,hn),hn|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xe(To,hn),hn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Xe(To,hn),hn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Xe(To,hn),hn|=r;return Yt(e,t,i,n),t.child}function mT(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function op(e,t,n,r,i){var s=an(n)?$i:Zt.current;return s=Do(t,s),Ao(t,i),n=wm(e,t,n,r,s,i),r=bm(),e!==null&&!nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Nr(e,t,i)):(rt&&r&&lm(t),t.flags|=1,Yt(e,t,n,i),t.child)}function c_(e,t,n,r,i){if(an(n)){var s=!0;au(t)}else s=!1;if(Ao(t,i),t.stateNode===null)$l(e,t),B1(t,n,r),rp(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var d=a.context,y=n.contextType;typeof y=="object"&&y!==null?y=Rn(y):(y=an(n)?$i:Zt.current,y=Do(t,y));var _=n.getDerivedStateFromProps,c=typeof _=="function"||typeof a.getSnapshotBeforeUpdate=="function";c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||d!==y)&&t_(t,a,r,y),Zr=!1;var f=t.memoizedState;a.state=f,fu(t,r,a,i),d=t.memoizedState,l!==r||f!==d||sn.current||Zr?(typeof _=="function"&&(np(t,n,_,r),d=t.memoizedState),(l=Zr||e_(t,n,l,r,f,d,y))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=y,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,z1(e,t),l=t.memoizedProps,y=t.type===t.elementType?l:jn(t.type,l),a.props=y,c=t.pendingProps,f=a.context,d=n.contextType,typeof d=="object"&&d!==null?d=Rn(d):(d=an(n)?$i:Zt.current,d=Do(t,d));var w=n.getDerivedStateFromProps;(_=typeof w=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==c||f!==d)&&t_(t,a,r,d),Zr=!1,f=t.memoizedState,a.state=f,fu(t,r,a,i);var v=t.memoizedState;l!==c||f!==v||sn.current||Zr?(typeof w=="function"&&(np(t,n,w,r),v=t.memoizedState),(y=Zr||e_(t,n,y,r,f,v,d)||!1)?(_||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,d),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,d)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=d,r=y):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return sp(e,t,n,r,s,i)}function sp(e,t,n,r,i,s){mT(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Yy(t,n,!1),Nr(e,t,s);r=t.stateNode,BP.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Fo(t,e.child,null,s),t.child=Fo(t,null,l,s)):Yt(e,t,l,s),t.memoizedState=r.state,i&&Yy(t,n,!0),t.child}function gT(e){var t=e.stateNode;t.pendingContext?Gy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Gy(e,t.context,!1),gm(e,t.containerInfo)}function d_(e,t,n,r,i){return $o(),cm(i),t.flags|=256,Yt(e,t,n,r),t.child}var ap={dehydrated:null,treeContext:null,retryLane:0};function lp(e){return{baseLanes:e,cachePool:null,transitions:null}}function vT(e,t,n){var r=t.pendingProps,i=lt.current,s=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xe(lt,i&1),e===null)return ep(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Xu(a,r,0,null),e=Mi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=lp(n),t.memoizedState=ap,e):Em(t,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return HP(e,t,a,r,l,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,l=i.sibling;var d={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=d,t.deletions=null):(r=li(i,d),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=li(l,s):(s=Mi(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?lp(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=ap,r}return s=e.child,e=s.sibling,r=li(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Em(e,t){return t=Xu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pl(e,t,n,r){return r!==null&&cm(r),Fo(t,e.child,null,n),e=Em(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HP(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=Hd(Error(ae(422))),pl(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Xu({mode:"visible",children:r.children},i,0,null),s=Mi(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Fo(t,e.child,null,a),t.child.memoizedState=lp(a),t.memoizedState=ap,s);if(!(t.mode&1))return pl(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(ae(419)),r=Hd(s,r,void 0),pl(e,t,a,r)}if(l=(a&e.childLanes)!==0,nn||l){if(r=Nt,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Ir(e,i),Wn(r,e,i,-1))}return Lm(),r=Hd(Error(ae(421))),pl(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=nL.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,pn=ii(i.nextSibling),mn=t,rt=!0,Un=null,e!==null&&(xn[kn++]=Er,xn[kn++]=xr,xn[kn++]=Fi,Er=e.id,xr=e.overflow,Fi=t),t=Em(t,r.children),t.flags|=4096,t)}function f_(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),tp(e.return,t,n)}function Vd(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function yT(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Yt(e,t,r.children,n),r=lt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&f_(e,n,t);else if(e.tag===19)f_(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Xe(lt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&hu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vd(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&hu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vd(t,!0,n,null,s);break;case"together":Vd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $l(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function VP(e,t,n){switch(t.tag){case 3:gT(t),$o();break;case 5:W1(t);break;case 1:an(t.type)&&au(t);break;case 4:gm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xe(cu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Xe(lt,lt.current&1),t.flags|=128,null):n&t.child.childLanes?vT(e,t,n):(Xe(lt,lt.current&1),e=Nr(e,t,n),e!==null?e.sibling:null);Xe(lt,lt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yT(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(lt,lt.current),r)break;return null;case 22:case 23:return t.lanes=0,pT(e,t,n)}return Nr(e,t,n)}var _T,up,wT,bT;_T=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};up=function(){};wT=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ri(ur.current);var s=null;switch(n){case"input":i=Rh(e,i),r=Rh(e,r),s=[];break;case"select":i=ct({},i,{value:void 0}),r=ct({},r,{value:void 0}),s=[];break;case"textarea":i=Oh(e,i),r=Oh(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ou)}Dh(n,r);var a;n=null;for(y in i)if(!r.hasOwnProperty(y)&&i.hasOwnProperty(y)&&i[y]!=null)if(y==="style"){var l=i[y];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else y!=="dangerouslySetInnerHTML"&&y!=="children"&&y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(Ks.hasOwnProperty(y)?s||(s=[]):(s=s||[]).push(y,null));for(y in r){var d=r[y];if(l=i!=null?i[y]:void 0,r.hasOwnProperty(y)&&d!==l&&(d!=null||l!=null))if(y==="style")if(l){for(a in l)!l.hasOwnProperty(a)||d&&d.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in d)d.hasOwnProperty(a)&&l[a]!==d[a]&&(n||(n={}),n[a]=d[a])}else n||(s||(s=[]),s.push(y,n)),n=d;else y==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,l=l?l.__html:void 0,d!=null&&l!==d&&(s=s||[]).push(y,d)):y==="children"?typeof d!="string"&&typeof d!="number"||(s=s||[]).push(y,""+d):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&(Ks.hasOwnProperty(y)?(d!=null&&y==="onScroll"&&et("scroll",e),s||l===d||(s=[])):(s=s||[]).push(y,d))}n&&(s=s||[]).push("style",n);var y=s;(t.updateQueue=y)&&(t.flags|=4)}};bT=function(e,t,n,r){n!==r&&(t.flags|=4)};function bs(e,t){if(!rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WP(e,t,n){var r=t.pendingProps;switch(um(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(t),null;case 1:return an(t.type)&&su(),Ht(t),null;case 3:return r=t.stateNode,jo(),tt(sn),tt(Zt),ym(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Un!==null&&(vp(Un),Un=null))),up(e,t),Ht(t),null;case 5:vm(t);var i=Ri(la.current);if(n=t.type,e!==null&&t.stateNode!=null)wT(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return Ht(t),null}if(e=Ri(ur.current),fl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[sr]=t,r[sa]=s,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[sr]=t,e[sa]=r,_T(e,t,!1,!1),t.stateNode=e;e:{switch(a=$h(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;iUo&&(t.flags|=128,r=!0,bs(s,!1),t.lanes=4194304)}else{if(!r)if(e=hu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!rt)return Ht(t),null}else 2*bt()-s.renderingStartTime>Uo&&n!==1073741824&&(t.flags|=128,r=!0,bs(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=bt(),t.sibling=null,n=lt.current,Xe(lt,r?n&1|2:n&1),t):(Ht(t),null);case 22:case 23:return Pm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hn&1073741824&&(Ht(t),t.subtreeFlags&6&&(t.flags|=8192)):Ht(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function qP(e,t){switch(um(t),t.tag){case 1:return an(t.type)&&su(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),tt(sn),tt(Zt),ym(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return vm(t),null;case 13:if(tt(lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));$o()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(lt),null;case 4:return jo(),null;case 10:return hm(t.type._context),null;case 22:case 23:return Pm(),null;case 24:return null;default:return null}}var ml=!1,Wt=!1,ZP=typeof WeakSet=="function"?WeakSet:Set,pe=null;function bo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pt(e,t,r)}else n.current=null}function cp(e,t,n){try{n()}catch(r){pt(e,t,r)}}var h_=!1;function GP(e,t){if(Zh=nu,e=x1(),am(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,l=-1,d=-1,y=0,_=0,c=e,f=null;t:for(;;){for(var w;c!==n||i!==0&&c.nodeType!==3||(l=a+i),c!==s||r!==0&&c.nodeType!==3||(d=a+r),c.nodeType===3&&(a+=c.nodeValue.length),(w=c.firstChild)!==null;)f=c,c=w;for(;;){if(c===e)break t;if(f===n&&++y===i&&(l=a),f===s&&++_===r&&(d=a),(w=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=w}n=l===-1||d===-1?null:{start:l,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gh={focusedElem:e,selectionRange:n},nu=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,b=v.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:jn(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(T){pt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return v=h_,h_=!1,v}function Ws(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&cp(t,n,s)}i=i.next}while(i!==r)}}function Yu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function dp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function TT(e){var t=e.alternate;t!==null&&(e.alternate=null,TT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[sr],delete t[sa],delete t[Xh],delete t[LP],delete t[RP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ST(e){return e.tag===5||e.tag===3||e.tag===4}function p_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ST(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ou));else if(r!==4&&(e=e.child,e!==null))for(fp(e,t,n),e=e.sibling;e!==null;)fp(e,t,n),e=e.sibling}function hp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(hp(e,t,n),e=e.sibling;e!==null;)hp(e,t,n),e=e.sibling}var $t=null,zn=!1;function Hr(e,t,n){for(n=n.child;n!==null;)ET(e,t,n),n=n.sibling}function ET(e,t,n){if(lr&&typeof lr.onCommitFiberUnmount=="function")try{lr.onCommitFiberUnmount(Uu,n)}catch{}switch(n.tag){case 5:Wt||bo(n,t);case 6:var r=$t,i=zn;$t=null,Hr(e,t,n),$t=r,zn=i,$t!==null&&(zn?(e=$t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$t.removeChild(n.stateNode));break;case 18:$t!==null&&(zn?(e=$t,n=n.stateNode,e.nodeType===8?$d(e.parentNode,n):e.nodeType===1&&$d(e,n),ta(e)):$d($t,n.stateNode));break;case 4:r=$t,i=zn,$t=n.stateNode.containerInfo,zn=!0,Hr(e,t,n),$t=r,zn=i;break;case 0:case 11:case 14:case 15:if(!Wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&cp(n,t,a),i=i.next}while(i!==r)}Hr(e,t,n);break;case 1:if(!Wt&&(bo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){pt(n,t,l)}Hr(e,t,n);break;case 21:Hr(e,t,n);break;case 22:n.mode&1?(Wt=(r=Wt)||n.memoizedState!==null,Hr(e,t,n),Wt=r):Hr(e,t,n);break;default:Hr(e,t,n)}}function m_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZP),t.forEach(function(r){var i=rL.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $n(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~s}if(r=i,r=bt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KP(r/1960))-r,10e?16:e,Jr===null)var r=!1;else{if(e=Jr,Jr=null,yu=0,Me&6)throw Error(ae(331));var i=Me;for(Me|=4,pe=e.current;pe!==null;){var s=pe,a=s.child;if(pe.flags&16){var l=s.deletions;if(l!==null){for(var d=0;dbt()-Cm?Oi(e,0):km|=n),ln(e,t)}function IT(e,t){t===0&&(e.mode&1?(t=sl,sl<<=1,!(sl&130023424)&&(sl=4194304)):t=1);var n=Kt();e=Ir(e,t),e!==null&&(Sa(e,t,n),ln(e,n))}function nL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),IT(e,n)}function rL(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),IT(e,n)}var NT;NT=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)nn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nn=!1,VP(e,t,n);nn=!!(e.flags&131072)}else nn=!1,rt&&t.flags&1048576&&D1(t,uu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var i=Do(t,Zt.current);Ao(t,n),i=wm(null,t,r,e,i,n);var s=bm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,an(r)?(s=!0,au(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mm(t),i.updater=Zu,t.stateNode=i,i._reactInternals=t,rp(t,r,e,n),t=sp(null,t,r,!0,s,n)):(t.tag=0,rt&&s&&lm(t),Yt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=oL(r),e=jn(r,e),i){case 0:t=op(null,t,r,e,n);break e;case 1:t=c_(null,t,r,e,n);break e;case 11:t=l_(null,t,r,e,n);break e;case 14:t=u_(null,t,r,jn(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),op(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),c_(e,t,r,i,n);case 3:e:{if(gT(t),e===null)throw Error(ae(387));r=t.pendingProps,s=t.memoizedState,i=s.element,z1(e,t),fu(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=zo(Error(ae(423)),t),t=d_(e,t,r,n,i);break e}else if(r!==i){i=zo(Error(ae(424)),t),t=d_(e,t,r,n,i);break e}else for(pn=ii(t.stateNode.containerInfo.firstChild),mn=t,rt=!0,Un=null,n=V1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($o(),r===i){t=Nr(e,t,n);break e}Yt(e,t,r,n)}t=t.child}return t;case 5:return W1(t),e===null&&ep(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Yh(r,i)?a=null:s!==null&&Yh(r,s)&&(t.flags|=32),mT(e,t),Yt(e,t,a,n),t.child;case 6:return e===null&&ep(t),null;case 13:return vT(e,t,n);case 4:return gm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fo(t,null,r,n):Yt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),l_(e,t,r,i,n);case 7:return Yt(e,t,t.pendingProps,n),t.child;case 8:return Yt(e,t,t.pendingProps.children,n),t.child;case 12:return Yt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Xe(cu,r._currentValue),r._currentValue=a,s!==null)if(Gn(s.value,a)){if(s.children===i.children&&!sn.current){t=Nr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var d=l.firstContext;d!==null;){if(d.context===r){if(s.tag===1){d=Ar(-1,n&-n),d.tag=2;var y=s.updateQueue;if(y!==null){y=y.shared;var _=y.pending;_===null?d.next=d:(d.next=_.next,_.next=d),y.pending=d}}s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),tp(s.return,n,t),l.lanes|=n;break}d=d.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(ae(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),tp(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Yt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ao(t,n),i=Rn(i),r=r(i),t.flags|=1,Yt(e,t,r,n),t.child;case 14:return r=t.type,i=jn(r,t.pendingProps),i=jn(r.type,i),u_(e,t,r,i,n);case 15:return hT(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),$l(e,t),t.tag=1,an(r)?(e=!0,au(t)):e=!1,Ao(t,n),B1(t,r,i),rp(t,r,i,n),sp(null,t,r,!0,e,n);case 19:return yT(e,t,n);case 22:return pT(e,t,n)}throw Error(ae(156,t.tag))};function OT(e,t){return s1(e,t)}function iL(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(e,t,n,r){return new iL(e,t,n,r)}function Rm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oL(e){if(typeof e=="function")return Rm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kp)return 11;if(e===Xp)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zl(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")Rm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case fo:return Mi(n.children,i,s,t);case Yp:a=8,i|=8;break;case Ch:return e=Cn(12,n,t,i|2),e.elementType=Ch,e.lanes=s,e;case Ah:return e=Cn(13,n,t,i),e.elementType=Ah,e.lanes=s,e;case Ph:return e=Cn(19,n,t,i),e.elementType=Ph,e.lanes=s,e;case Hb:return Xu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ub:a=10;break e;case Bb:a=9;break e;case Kp:a=11;break e;case Xp:a=14;break e;case qr:a=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Cn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Mi(e,t,n,r){return e=Cn(7,e,r,t),e.lanes=n,e}function Xu(e,t,n,r){return e=Cn(22,e,r,t),e.elementType=Hb,e.lanes=n,e.stateNode={isHidden:!1},e}function Wd(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function qd(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sL(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kd(0),this.expirationTimes=kd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Im(e,t,n,r,i,s,a,l,d){return e=new sL(e,t,n,l,d),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Cn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mm(s),e}function aL(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FT)}catch(e){console.error(e)}}FT(),Db.exports=yn;var nc=Db.exports;const fL=Kn(nc);var S_=nc;xh.createRoot=S_.createRoot,xh.hydrateRoot=S_.hydrateRoot;var jT={exports:{}},zT={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,7 +45,7 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Uo=te;function hL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pL=typeof Object.is=="function"?Object.is:hL,mL=Uo.useState,gL=Uo.useEffect,vL=Uo.useLayoutEffect,yL=Uo.useDebugValue;function _L(e,t){var n=t(),r=mL({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return vL(function(){i.value=n,i.getSnapshot=t,Zd(i)&&s({inst:i})},[e,n,t]),gL(function(){return Zd(i)&&s({inst:i}),e(function(){Zd(i)&&s({inst:i})})},[e]),yL(n),n}function Zd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pL(e,n)}catch{return!0}}function wL(e,t){return t()}var bL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wL:_L;zT.useSyncExternalStore=Uo.useSyncExternalStore!==void 0?Uo.useSyncExternalStore:bL;jT.exports=zT;var BT=jT.exports,TL={};/** + */var Bo=te;function hL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pL=typeof Object.is=="function"?Object.is:hL,mL=Bo.useState,gL=Bo.useEffect,vL=Bo.useLayoutEffect,yL=Bo.useDebugValue;function _L(e,t){var n=t(),r=mL({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return vL(function(){i.value=n,i.getSnapshot=t,Zd(i)&&s({inst:i})},[e,n,t]),gL(function(){return Zd(i)&&s({inst:i}),e(function(){Zd(i)&&s({inst:i})})},[e]),yL(n),n}function Zd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pL(e,n)}catch{return!0}}function wL(e,t){return t()}var bL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wL:_L;zT.useSyncExternalStore=Bo.useSyncExternalStore!==void 0?Bo.useSyncExternalStore:bL;jT.exports=zT;var UT=jT.exports,TL={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -53,14 +53,14 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var rc=te,SL=BT;function EL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xL=typeof Object.is=="function"?Object.is:EL,kL=SL.useSyncExternalStore,CL=rc.useRef,AL=rc.useEffect,PL=rc.useMemo,LL=rc.useDebugValue;TL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=CL(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=PL(function(){function d(w){if(!y){if(y=!0,_=w,w=r(w),i!==void 0&&a.hasValue){var v=a.value;if(i(v,w))return c=v}return c=w}if(v=c,xL(_,w))return v;var m=r(w);return i!==void 0&&i(v,m)?v:(_=w,c=m)}var y=!1,_,c,f=n===void 0?null:n;return[function(){return d(t())},f===null?void 0:function(){return d(f())}]},[t,n,r,i]);var l=kL(e,s[0],s[1]);return AL(function(){a.hasValue=!0,a.value=l},[l]),LL(l),l};function RL(e){e()}let UT=RL;const IL=e=>UT=e,NL=()=>UT,HT=te.createContext(null),OL=()=>{throw new Error("uSES not initialized!")};function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var VT={exports:{}},Ve={};/** @license React v16.13.1 + */var rc=te,SL=UT;function EL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xL=typeof Object.is=="function"?Object.is:EL,kL=SL.useSyncExternalStore,CL=rc.useRef,AL=rc.useEffect,PL=rc.useMemo,LL=rc.useDebugValue;TL.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=CL(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=PL(function(){function d(w){if(!y){if(y=!0,_=w,w=r(w),i!==void 0&&a.hasValue){var v=a.value;if(i(v,w))return c=v}return c=w}if(v=c,xL(_,w))return v;var m=r(w);return i!==void 0&&i(v,m)?v:(_=w,c=m)}var y=!1,_,c,f=n===void 0?null:n;return[function(){return d(t())},f===null?void 0:function(){return d(f())}]},[t,n,r,i]);var l=kL(e,s[0],s[1]);return AL(function(){a.hasValue=!0,a.value=l},[l]),LL(l),l};function RL(e){e()}let BT=RL;const IL=e=>BT=e,NL=()=>BT,HT=te.createContext(null),OL=()=>{throw new Error("uSES not initialized!")};function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var VT={exports:{}},Ve={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Mt=typeof Symbol=="function"&&Symbol.for,$m=Mt?Symbol.for("react.element"):60103,Fm=Mt?Symbol.for("react.portal"):60106,ic=Mt?Symbol.for("react.fragment"):60107,oc=Mt?Symbol.for("react.strict_mode"):60108,sc=Mt?Symbol.for("react.profiler"):60114,ac=Mt?Symbol.for("react.provider"):60109,lc=Mt?Symbol.for("react.context"):60110,jm=Mt?Symbol.for("react.async_mode"):60111,uc=Mt?Symbol.for("react.concurrent_mode"):60111,cc=Mt?Symbol.for("react.forward_ref"):60112,dc=Mt?Symbol.for("react.suspense"):60113,ML=Mt?Symbol.for("react.suspense_list"):60120,fc=Mt?Symbol.for("react.memo"):60115,hc=Mt?Symbol.for("react.lazy"):60116,DL=Mt?Symbol.for("react.block"):60121,$L=Mt?Symbol.for("react.fundamental"):60117,FL=Mt?Symbol.for("react.responder"):60118,jL=Mt?Symbol.for("react.scope"):60119;function wn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case $m:switch(e=e.type,e){case jm:case uc:case ic:case sc:case oc:case dc:return e;default:switch(e=e&&e.$$typeof,e){case lc:case cc:case hc:case fc:case ac:return e;default:return t}}case Fm:return t}}}function WT(e){return wn(e)===uc}Ve.AsyncMode=jm;Ve.ConcurrentMode=uc;Ve.ContextConsumer=lc;Ve.ContextProvider=ac;Ve.Element=$m;Ve.ForwardRef=cc;Ve.Fragment=ic;Ve.Lazy=hc;Ve.Memo=fc;Ve.Portal=Fm;Ve.Profiler=sc;Ve.StrictMode=oc;Ve.Suspense=dc;Ve.isAsyncMode=function(e){return WT(e)||wn(e)===jm};Ve.isConcurrentMode=WT;Ve.isContextConsumer=function(e){return wn(e)===lc};Ve.isContextProvider=function(e){return wn(e)===ac};Ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===$m};Ve.isForwardRef=function(e){return wn(e)===cc};Ve.isFragment=function(e){return wn(e)===ic};Ve.isLazy=function(e){return wn(e)===hc};Ve.isMemo=function(e){return wn(e)===fc};Ve.isPortal=function(e){return wn(e)===Fm};Ve.isProfiler=function(e){return wn(e)===sc};Ve.isStrictMode=function(e){return wn(e)===oc};Ve.isSuspense=function(e){return wn(e)===dc};Ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ic||e===uc||e===sc||e===oc||e===dc||e===ML||typeof e=="object"&&e!==null&&(e.$$typeof===hc||e.$$typeof===fc||e.$$typeof===ac||e.$$typeof===lc||e.$$typeof===cc||e.$$typeof===$L||e.$$typeof===FL||e.$$typeof===jL||e.$$typeof===DL)};Ve.typeOf=wn;VT.exports=Ve;var zL=VT.exports,zm=zL,BL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},UL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},HL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Bm={};Bm[zm.ForwardRef]=HL;Bm[zm.Memo]=qT;function E_(e){return zm.isMemo(e)?qT:Bm[e.$$typeof]||BL}var VL=Object.defineProperty,WL=Object.getOwnPropertyNames,x_=Object.getOwnPropertySymbols,qL=Object.getOwnPropertyDescriptor,ZL=Object.getPrototypeOf,k_=Object.prototype;function ZT(e,t,n){if(typeof t!="string"){if(k_){var r=ZL(t);r&&r!==k_&&ZT(e,r,n)}var i=WL(t);x_&&(i=i.concat(x_(t)));for(var s=E_(e),a=E_(t),l=0;lt(i(...s)))}return n}function yp(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function A_(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function KT(e,t){return function(r,{displayName:i}){const s=function(l,d){return s.dependsOnOwnProps?s.mapToProps(l,d):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,d){s.mapToProps=e,s.dependsOnOwnProps=A_(e);let y=s(l,d);return typeof y=="function"&&(s.mapToProps=y,s.dependsOnOwnProps=A_(y),y=s(l,d)),y},s}}function Vm(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function n2(e){return e&&typeof e=="object"?yp(t=>t2(e,t)):e?typeof e=="function"?KT(e):Vm(e,"mapDispatchToProps"):yp(t=>({dispatch:t}))}function r2(e){return e?typeof e=="function"?KT(e):Vm(e,"mapStateToProps"):yp(()=>({}))}function i2(e,t,n){return Lo({},n,e,t)}function o2(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let s=!1,a;return function(d,y,_){const c=e(d,y,_);return s?i(c,a)||(a=c):(s=!0,a=c),a}}}function s2(e){return e?typeof e=="function"?o2(e):Vm(e,"mergeProps"):()=>i2}function a2(){const e=NL();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,s=n={callback:r,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!i||t===null||(i=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}const P_={notify(){},get:()=>[]};function XT(e,t){let n,r=P_;function i(c){return d(),r.subscribe(c)}function s(){r.notify()}function a(){_.onStateChange&&_.onStateChange()}function l(){return!!n}function d(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=a2())}function y(){n&&(n(),n=void 0,r.clear(),r=P_)}const _={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:a,isSubscribed:l,trySubscribe:d,tryUnsubscribe:y,getListeners:()=>r};return _}const l2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bu=l2?te.useLayoutEffect:te.useEffect;function L_(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Gd(e,t){if(L_(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{QT=e},d2=[null,null];function f2(e,t,n){bu(()=>e(...t),n)}function h2(e,t,n,r,i,s){e.current=r,n.current=!1,i.current&&(i.current=null,s())}function p2(e,t,n,r,i,s,a,l,d,y,_){if(!e)return()=>{};let c=!1,f=null;const w=()=>{if(c||!l.current)return;const m=t.getState();let b,g;try{b=r(m,i.current)}catch(p){g=p,f=p}g||(f=null),b===s.current?a.current||y():(s.current=b,d.current=b,a.current=!0,_())};return n.onStateChange=w,n.trySubscribe(),w(),()=>{if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function m2(e,t){return e===t}function pi(e,t,n,{pure:r,areStatesEqual:i=m2,areOwnPropsEqual:s=Gd,areStatePropsEqual:a=Gd,areMergedPropsEqual:l=Gd,forwardRef:d=!1,context:y=HT}={}){const _=y,c=r2(e),f=n2(t),w=s2(n),v=!!e;return b=>{const g=b.displayName||b.name||"Component",p=`Connect(${g})`,h={shouldHandleStateChanges:v,displayName:p,wrappedComponentName:g,WrappedComponent:b,initMapStateToProps:c,initMapDispatchToProps:f,initMergeProps:w,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function T(P){const[E,A,C]=te.useMemo(()=>{const{reactReduxForwardedRef:Z}=P,Q=Dm(P,u2);return[P.context,Z,Q]},[P]),N=te.useMemo(()=>E&&E.Consumer&&XL.isContextConsumer(wt.createElement(E.Consumer,null))?E:_,[E,_]),$=te.useContext(N),F=!!P.store&&!!P.store.getState&&!!P.store.dispatch,z=!!$&&!!$.store,U=F?P.store:$.store,H=z?$.getServerState:U.getState,B=te.useMemo(()=>e2(U.dispatch,h),[U]),[V,Y]=te.useMemo(()=>{if(!v)return d2;const Z=XT(U,F?void 0:$.subscription),Q=Z.notifyNestedSubs.bind(Z);return[Z,Q]},[U,F,$]),G=te.useMemo(()=>F?$:Lo({},$,{subscription:V}),[F,$,V]),J=te.useRef(),oe=te.useRef(C),ce=te.useRef(),fe=te.useRef(!1);te.useRef(!1);const de=te.useRef(!1),ue=te.useRef();bu(()=>(de.current=!0,()=>{de.current=!1}),[]);const be=te.useMemo(()=>()=>ce.current&&C===oe.current?ce.current:B(U.getState(),C),[U,C]),ne=te.useMemo(()=>Q=>V?p2(v,U,V,B,oe,J,fe,de,ce,Y,Q):()=>{},[V]);f2(h2,[oe,J,fe,C,ce,Y]);let O;try{O=QT(ne,be,H?()=>B(H(),C):be)}catch(Z){throw ue.current&&(Z.message+=` + */var Bm=Symbol.for("react.element"),Hm=Symbol.for("react.portal"),pc=Symbol.for("react.fragment"),mc=Symbol.for("react.strict_mode"),gc=Symbol.for("react.profiler"),vc=Symbol.for("react.provider"),yc=Symbol.for("react.context"),YL=Symbol.for("react.server_context"),_c=Symbol.for("react.forward_ref"),wc=Symbol.for("react.suspense"),bc=Symbol.for("react.suspense_list"),Tc=Symbol.for("react.memo"),Sc=Symbol.for("react.lazy"),KL=Symbol.for("react.offscreen"),YT;YT=Symbol.for("react.module.reference");function Nn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Bm:switch(e=e.type,e){case pc:case gc:case mc:case wc:case bc:return e;default:switch(e=e&&e.$$typeof,e){case YL:case yc:case _c:case Sc:case Tc:case vc:return e;default:return t}}case Hm:return t}}}We.ContextConsumer=yc;We.ContextProvider=vc;We.Element=Bm;We.ForwardRef=_c;We.Fragment=pc;We.Lazy=Sc;We.Memo=Tc;We.Portal=Hm;We.Profiler=gc;We.StrictMode=mc;We.Suspense=wc;We.SuspenseList=bc;We.isAsyncMode=function(){return!1};We.isConcurrentMode=function(){return!1};We.isContextConsumer=function(e){return Nn(e)===yc};We.isContextProvider=function(e){return Nn(e)===vc};We.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bm};We.isForwardRef=function(e){return Nn(e)===_c};We.isFragment=function(e){return Nn(e)===pc};We.isLazy=function(e){return Nn(e)===Sc};We.isMemo=function(e){return Nn(e)===Tc};We.isPortal=function(e){return Nn(e)===Hm};We.isProfiler=function(e){return Nn(e)===gc};We.isStrictMode=function(e){return Nn(e)===mc};We.isSuspense=function(e){return Nn(e)===wc};We.isSuspenseList=function(e){return Nn(e)===bc};We.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pc||e===gc||e===mc||e===wc||e===bc||e===KL||typeof e=="object"&&e!==null&&(e.$$typeof===Sc||e.$$typeof===Tc||e.$$typeof===vc||e.$$typeof===yc||e.$$typeof===_c||e.$$typeof===YT||e.getModuleId!==void 0)};We.typeOf=Nn;GT.exports=We;var XL=GT.exports;const QL=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function JL(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:s,areStatePropsEqual:a}){let l=!1,d,y,_,c,f;function w(p,h){return d=p,y=h,_=e(d,y),c=t(r,y),f=n(_,c,y),l=!0,f}function v(){return _=e(d,y),t.dependsOnOwnProps&&(c=t(r,y)),f=n(_,c,y),f}function m(){return e.dependsOnOwnProps&&(_=e(d,y)),t.dependsOnOwnProps&&(c=t(r,y)),f=n(_,c,y),f}function b(){const p=e(d,y),h=!a(p,_);return _=p,h&&(f=n(_,c,y)),f}function g(p,h){const T=!s(h,y),x=!i(p,d,h,y);return d=p,y=h,T&&x?v():T?m():x?b():f}return function(h,T){return l?g(h,T):w(h,T)}}function e2(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,s=Dm(t,QL);const a=n(e,s),l=r(e,s),d=i(e,s);return JL(a,l,d,e,s)}function t2(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...s)=>t(i(...s)))}return n}function yp(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function A_(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function KT(e,t){return function(r,{displayName:i}){const s=function(l,d){return s.dependsOnOwnProps?s.mapToProps(l,d):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,d){s.mapToProps=e,s.dependsOnOwnProps=A_(e);let y=s(l,d);return typeof y=="function"&&(s.mapToProps=y,s.dependsOnOwnProps=A_(y),y=s(l,d)),y},s}}function Vm(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function n2(e){return e&&typeof e=="object"?yp(t=>t2(e,t)):e?typeof e=="function"?KT(e):Vm(e,"mapDispatchToProps"):yp(t=>({dispatch:t}))}function r2(e){return e?typeof e=="function"?KT(e):Vm(e,"mapStateToProps"):yp(()=>({}))}function i2(e,t,n){return Lo({},n,e,t)}function o2(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let s=!1,a;return function(d,y,_){const c=e(d,y,_);return s?i(c,a)||(a=c):(s=!0,a=c),a}}}function s2(e){return e?typeof e=="function"?o2(e):Vm(e,"mergeProps"):()=>i2}function a2(){const e=NL();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,s=n={callback:r,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!i||t===null||(i=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}const P_={notify(){},get:()=>[]};function XT(e,t){let n,r=P_;function i(c){return d(),r.subscribe(c)}function s(){r.notify()}function a(){_.onStateChange&&_.onStateChange()}function l(){return!!n}function d(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=a2())}function y(){n&&(n(),n=void 0,r.clear(),r=P_)}const _={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:a,isSubscribed:l,trySubscribe:d,tryUnsubscribe:y,getListeners:()=>r};return _}const l2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bu=l2?te.useLayoutEffect:te.useEffect;function L_(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Gd(e,t){if(L_(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{QT=e},d2=[null,null];function f2(e,t,n){bu(()=>e(...t),n)}function h2(e,t,n,r,i,s){e.current=r,n.current=!1,i.current&&(i.current=null,s())}function p2(e,t,n,r,i,s,a,l,d,y,_){if(!e)return()=>{};let c=!1,f=null;const w=()=>{if(c||!l.current)return;const m=t.getState();let b,g;try{b=r(m,i.current)}catch(p){g=p,f=p}g||(f=null),b===s.current?a.current||y():(s.current=b,d.current=b,a.current=!0,_())};return n.onStateChange=w,n.trySubscribe(),w(),()=>{if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function m2(e,t){return e===t}function pi(e,t,n,{pure:r,areStatesEqual:i=m2,areOwnPropsEqual:s=Gd,areStatePropsEqual:a=Gd,areMergedPropsEqual:l=Gd,forwardRef:d=!1,context:y=HT}={}){const _=y,c=r2(e),f=n2(t),w=s2(n),v=!!e;return b=>{const g=b.displayName||b.name||"Component",p=`Connect(${g})`,h={shouldHandleStateChanges:v,displayName:p,wrappedComponentName:g,WrappedComponent:b,initMapStateToProps:c,initMapDispatchToProps:f,initMergeProps:w,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function T(P){const[E,A,C]=te.useMemo(()=>{const{reactReduxForwardedRef:Z}=P,Q=Dm(P,u2);return[P.context,Z,Q]},[P]),N=te.useMemo(()=>E&&E.Consumer&&XL.isContextConsumer(wt.createElement(E.Consumer,null))?E:_,[E,_]),$=te.useContext(N),F=!!P.store&&!!P.store.getState&&!!P.store.dispatch,z=!!$&&!!$.store,B=F?P.store:$.store,H=z?$.getServerState:B.getState,U=te.useMemo(()=>e2(B.dispatch,h),[B]),[V,Y]=te.useMemo(()=>{if(!v)return d2;const Z=XT(B,F?void 0:$.subscription),Q=Z.notifyNestedSubs.bind(Z);return[Z,Q]},[B,F,$]),G=te.useMemo(()=>F?$:Lo({},$,{subscription:V}),[F,$,V]),J=te.useRef(),oe=te.useRef(C),ce=te.useRef(),fe=te.useRef(!1);te.useRef(!1);const de=te.useRef(!1),ue=te.useRef();bu(()=>(de.current=!0,()=>{de.current=!1}),[]);const be=te.useMemo(()=>()=>ce.current&&C===oe.current?ce.current:U(B.getState(),C),[B,C]),ne=te.useMemo(()=>Q=>V?p2(v,B,V,U,oe,J,fe,de,ce,Y,Q):()=>{},[V]);f2(h2,[oe,J,fe,C,ce,Y]);let O;try{O=QT(ne,be,H?()=>U(H(),C):be)}catch(Z){throw ue.current&&(Z.message+=` The error may be correlated with this previous error: ${ue.current.stack} -`),Z}bu(()=>{ue.current=void 0,ce.current=void 0,J.current=O});const j=te.useMemo(()=>wt.createElement(b,Lo({},O,{ref:A})),[A,b,O]);return te.useMemo(()=>v?wt.createElement(N.Provider,{value:G},j):j,[N,j,G])}const k=wt.memo(T);if(k.WrappedComponent=b,k.displayName=T.displayName=p,d){const E=wt.forwardRef(function(C,N){return wt.createElement(k,Lo({},C,{reactReduxForwardedRef:N}))});return E.displayName=p,E.WrappedComponent=b,C_(E,b)}return C_(k,b)}}function g2({store:e,context:t,children:n,serverState:r}){const i=te.useMemo(()=>{const l=XT(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0}},[e,r]),s=te.useMemo(()=>e.getState(),[e]);bu(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]);const a=t||HT;return wt.createElement(a.Provider,{value:i},n)}c2(BT.useSyncExternalStore);IL(nc.unstable_batchedUpdates);function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function v2(e,t){if(ha(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ha(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y2(e){var t=v2(e,"string");return ha(t)==="symbol"?t:String(t)}function _2(e,t,n){return t=y2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function I_(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(jt(1));return n(Ec)(e,t)}if(typeof e!="function")throw new Error(jt(2));var i=e,s=t,a=[],l=a,d=!1;function y(){l===a&&(l=a.slice())}function _(){if(d)throw new Error(jt(3));return s}function c(m){if(typeof m!="function")throw new Error(jt(4));if(d)throw new Error(jt(5));var b=!0;return y(),l.push(m),function(){if(b){if(d)throw new Error(jt(6));b=!1,y();var p=l.indexOf(m);l.splice(p,1),a=null}}}function f(m){if(!w2(m))throw new Error(jt(7));if(typeof m.type>"u")throw new Error(jt(8));if(d)throw new Error(jt(9));try{d=!0,s=i(s,m)}finally{d=!1}for(var b=a=l,g=0;g"u")throw new Error(jt(12));if(typeof n(void 0,{type:pa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(jt(13))})}function JT(e){for(var t=Object.keys(e),n={},r=0;r"u")throw y&&y.type,new Error(jt(14));c[w]=b,_=_||b!==m}return _=_||s.length!==Object.keys(d).length,_?c:d}}function O_(e,t){return function(){return t(e.apply(this,arguments))}}function Ko(e,t){if(typeof e=="function")return O_(e,t);if(typeof e!="object"||e===null)throw new Error(jt(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=O_(i,t))}return n}function Wm(){for(var e=arguments.length,t=new Array(e),n=0;n
Image: Vyacheslav Madiyevskyy/Reuters
Image: Järva Teataja/Scanpix Baltics via Reuters
','This map plots out and highlights incidents that have resulted in potential civilian impact or harm since Russia began its invasion of Ukraine. The incidents detailed have been collected by Bellingcat researchers. Included in the map are instances where civilian areas and infrastructure have been damaged or destroyed, where the presence of civilian injuries are visible and/or there is the presence of immobile civilian bodies. Collection for the incidences contained in this map began on February 24, 2022. Users can explore incidents by date and location. We intend this to be a living project that will continue to be updated as long as the conflict persists. For more detailed information about the entries included in this map, please refer to our methodology and explainer article which can be read here.',"

Editor's note: An error in our archiving system between October 21 and November 7 led to some incidents being published on our TimeMap before they were fully verified. We have fixed this issue and are working to verify all extra incidents.

"],flags:{isInfopoup:!1,isCover:!1},cover:{title:"About and Methodology",exploreButton:"BACK TO THE PLATFORM",description:["## Scope of Research","This database, organised on Forensic Architecture's [TimeMap](https://github.com/forensic-architecture/timemap) platform and customised for this project, is focused on incidents in Ukraine that have resulted in potential civilian harm. These include: incidents where rockets or missiles struck civilian areas, where attacks have resulted in the destruction of civilian infrastructure, where the presence of civilian injuries are visible and/or the presence of immobile civilian bodies. This database began collection on February 24, 2022 and intends to be a living document that will continue to be updated as long as the conflict persists. While we are attempting to collect as many incidents as possible, we cannot possibly guarantee to collect them all nor will we be able to corroborate the locations of all the incidents we collect. Those we do not corroborate the originality or exact location of will not be shown on the map. Therefore, this map is not an exhaustive list of civilian harm in Ukraine but rather a representation of all incidents which we have been able to collect and of which we have been able to determine the exact locations. ","## Open Source Footage","The links in this map are all open source, meaning they are connected to an open link posted online. These sources were collected by Bellingcat researchers and placed in a database from where they are also being archived locally. After collection, our Global Authentication Project members have determined the location of each of these events (you can read more about the Global Authentication Project and its makeup below). Bellingcat staff then cross-referenced these coordinates to ensure their accuracy. The resolution of these geolocations is within 150 metres of where the incident occurred but the public coordinates viewable on the map have been slightly obscured in order to protect the identity of the creators. Because this footage is open source, the users who uploaded the content are not directly affiliated to Bellingcat or our partners. Any opinions that may be contained within the posts are therefore not those of Bellingcat or our partners. Any claims contained within the posts have also not necessarily been confirmed or verified by Bellingcat, particularly in relation to which party may have been responsible for the incidents detailed.","## Verification Level","The data being collected is checked for originality, basic manipulation, and location by Bellingcat investigators. This level of verification is intended to indicate where incidents took place, when and where there are reasonable visual indications of civilian harm. Our investigation plan for the collection of this material and its uses are informed by the [Berkeley Protocol on Digital Open Source Investigations](https://www.ohchr.org/en/publications/policy-and-methodological-publications/berkeley-protocol-digital-open-source). These incidents are also being collected and archived at a [forensic level](https://mnemonic.org/en/our-work) for potential evidentiary use in the future. That level of in-depth analysis and verification will take many months and our goal with this map is to transparently report on the current situation in Ukraine, as it is happening, for public interest. To be clear, these two processes will be separate.","## Descriptions","Each incident is accompanied with source links, the exact location determined by our Global Authentication Project and Bellingcat researchers, as well as a brief description of the incident based on what is visually present. The descriptions indicate what is clearly visible but do not attempt to make assumptions about the exact number of casualties or which party to the conflict is responsible due to those factors being difficult to fully determine from short, visual imagery alone.","## Filters","On the left hand side of the map, a user can toggle between different kinds of areas impacted. We are characterising the areas as residential, industrial, administrative, healthcare, school/childcare, military, commercial, religious, or undefined. Decisions on these classifications are based on visual evidence in the footage and what the area is reportedly used as. We cannot fully exclude or exhaustively search for the potential of military use in some of these areas.","## Source Links/Embedding","We have chosen to embed the social media links directly onto the platform. Should any be deleted by the uploader, they will still be visible on the map, but data on the post, user and footage will no longer be presented publicly. Where sensitive footage posted by individuals might allow them or their location to be identified, we have sought to preemptively take steps to anonymise these users.","## Privacy concerns and respect for the dead ","This footage is graphic and contains distressing scenes of war and conflict. Many of the areas represented are, at time of writing, also under attack both physically and through online attempts to discredit or harm users posting this content. For these reasons, we have chosen not to share certain posts that might indicate the direct identity of any of the persons filming. We have also filtered out posts that contain images where an immobile body is closely filmed and their identity might be ascertained out of respect for them and their close ones.","## A Note on Bellingcat's Global Authentication Project","The Global Authentication Project consists of a wide community of open source researchers assisting in Bellingcat research through structured tasks and feedback. Our aim is to authenticate events taking place around the world and fill in the gaps of knowledge that exist, particularly in situations where there are vast quantities of data. In creating a community for those interested in open source research, we are fostering Bellingcat's original aim of solving problems **together**, to diversify our investigations and promote the use of these skills. For this dataset, we are working with many individuals who have Ukrainian language skills and others with local contextual knowledge of the events and places seen on the map. Other participants include individuals skilled in geolocation and chronolocation, with all contributions being vetted by Bellingcat researchers. As we expand the Global Authentication Project in the coming months, more information will be available on our website and Twitter.","## Feedback","This map will continue to change and be updated for the duration of this conflict. We welcome feedback on our methodology, data collection and take transparency seriously. Should you have any direct feedback about the platform, please indicate it on this [form](https://forms.gle/cV2YAojBoh6h4T3XA)."]},toolbar:{panels:{categories:{}}},spotlights:{}},ui:{coloring:{mode:"STATIC",maxNumOfColors:9,defaultColor:"#dfdfdf",colors:["#7E57C2","#F57C00","#FFEB3B","#D34F73","#08B2E3","#A1887F","#90A4AE","#E57373","#80CBC4"]},card:{layout:{template:"sourced"}},carto:{eventRadius:8},timeline:{eventRadius:9},tiles:{current:"bellingcat-mapbox/cl0qnou2y003m15s8ieuyhgsy",default:"bellingcat-mapbox/cl0qnou2y003m15s8ieuyhgsy",satellite:"bellingcat-mapbox/cl1win2vp003914pdhateva6p"}},features:{USE_CATEGORIES:!1,CATEGORIES_AS_FILTERS:!1,COLOR_BY_CATEGORY:!1,COLOR_BY_ASSOCIATION:!0,USE_ASSOCIATIONS:!0,USE_FULLSCREEN:!0,USE_DOWNLOAD:!0,USE_SOURCES:!0,USE_SPOTLIGHTS:!1,USE_SHAPES:!1,USE_COVER:!0,USE_INTRO:!1,USE_SATELLITE_OVERLAY_TOGGLE:!0,USE_SEARCH:!1,USE_SITES:!1,ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK:yl,FETCH_EXTERNAL_MEDIA:!1,USE_MEDIA_CACHE:!1,GRAPH_NONLOCATED:!1,NARRATIVE_STEP_STYLES:!1,CUSTOM_EVENT_FIELDS:[]}}};var nS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xr,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},d=function(m){return(m=+m)+(m>68?1900:2e3)},y=function(m){return function(b){this[m]=+b}},_=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var g=b.match(/([+-]|\d\d)/g),p=60*g[1]+(+g[2]||0);return p===0?0:g[0]==="+"?-p:p}(m)}],c=function(m){var b=l[m];return b&&(b.indexOf?b:b.s.concat(b.f))},f=function(m,b){var g,p=l.meridiem;if(p){for(var h=1;h<=24;h+=1)if(m.indexOf(p(h,0,b))>-1){g=h>12;break}}else g=m===(b?"pm":"PM");return g},w={A:[a,function(m){this.afternoon=f(m,!1)}],a:[a,function(m){this.afternoon=f(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[s,y("seconds")],ss:[s,y("seconds")],m:[s,y("minutes")],mm:[s,y("minutes")],H:[s,y("hours")],h:[s,y("hours")],HH:[s,y("hours")],hh:[s,y("hours")],D:[s,y("day")],DD:[i,y("day")],Do:[a,function(m){var b=l.ordinal,g=m.match(/\d+/);if(this.day=g[0],b)for(var p=1;p<=31;p+=1)b(p).replace(/\[|\]/g,"")===m&&(this.day=p)}],M:[s,y("month")],MM:[i,y("month")],MMM:[a,function(m){var b=c("months"),g=(c("monthsShort")||b.map(function(p){return p.slice(0,3)})).indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[a,function(m){var b=c("months").indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,y("year")],YY:[i,function(m){this.year=d(m)}],YYYY:[/\d{4}/,y("year")],Z:_,ZZ:_};function v(m){var b,g;b=m,g=l&&l.formats;for(var p=(m=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,C,N){var $=N&&N.toUpperCase();return C||g[N]||n[N]||g[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,U){return z||U.slice(1)})})).match(r),h=p.length,T=0;T-1)return new Date((B==="X"?1e3:1)*H);var Y=v(B)(H),G=Y.year,J=Y.month,oe=Y.day,ce=Y.hours,fe=Y.minutes,de=Y.seconds,ue=Y.milliseconds,be=Y.zone,ne=new Date,O=oe||(G||J?1:ne.getDate()),j=G||ne.getFullYear(),W=0;G&&!J||(W=J>0?J-1:ne.getMonth());var Z=ce||0,Q=fe||0,ee=de||0,ve=ue||0;return be?new Date(Date.UTC(j,W,O,Z,Q,ee,ve+60*be.offset*1e3)):V?new Date(Date.UTC(j,W,O,Z,Q,ee,ve)):new Date(j,W,O,Z,Q,ee,ve)}catch{return new Date("")}}(x,E,k),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&x!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var F=E.length,z=1;z<=F;z+=1){P[1]=E[z-1];var U=g.apply(this,P);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}z===F&&(this.$d=new Date(""))}else h.call(this,T)}}})})(nS);var x2=nS.exports;const k2=Kn(x2);var rS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",y="day",_="week",c="month",f="quarter",w="year",v="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var z=["th","st","nd","rd"],U=F%100;return"["+F+(z[(U-20)%10]||z[U]||z[0])+"]"}},h=function(F,z,U){var H=String(F);return!H||H.length>=z?F:""+Array(z+1-H.length).join(U)+F},T={s:h,z:function(F){var z=-F.utcOffset(),U=Math.abs(z),H=Math.floor(U/60),B=U%60;return(z<=0?"+":"-")+h(H,2,"0")+":"+h(B,2,"0")},m:function F(z,U){if(z.date()1)return F(Y[0])}else{var G=z.name;k[G]=z,B=G}return!H&&B&&(x=B),B||!H&&x},A=function(F,z){if(P(F))return F.clone();var U=typeof z=="object"?z:{};return U.date=F,U.args=arguments,new N(U)},C=T;C.l=E,C.i=P,C.w=function(F,z){return A(F,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var N=function(){function F(U){this.$L=E(U.locale,null,!0),this.parse(U)}var z=F.prototype;return z.parse=function(U){this.$d=function(H){var B=H.date,V=H.utc;if(B===null)return new Date(NaN);if(C.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(b);if(Y){var G=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return V?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(B)}(U),this.$x=U.x||{},this.init()},z.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},z.$utils=function(){return C},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(U,H){var B=A(U);return this.startOf(H)<=B&&B<=this.endOf(H)},z.isAfter=function(U,H){return A(U){ue.current=void 0,ce.current=void 0,J.current=O});const j=te.useMemo(()=>wt.createElement(b,Lo({},O,{ref:A})),[A,b,O]);return te.useMemo(()=>v?wt.createElement(N.Provider,{value:G},j):j,[N,j,G])}const k=wt.memo(T);if(k.WrappedComponent=b,k.displayName=T.displayName=p,d){const E=wt.forwardRef(function(C,N){return wt.createElement(k,Lo({},C,{reactReduxForwardedRef:N}))});return E.displayName=p,E.WrappedComponent=b,C_(E,b)}return C_(k,b)}}function g2({store:e,context:t,children:n,serverState:r}){const i=te.useMemo(()=>{const l=XT(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0}},[e,r]),s=te.useMemo(()=>e.getState(),[e]);bu(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]);const a=t||HT;return wt.createElement(a.Provider,{value:i},n)}c2(UT.useSyncExternalStore);IL(nc.unstable_batchedUpdates);function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function v2(e,t){if(ha(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ha(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y2(e){var t=v2(e,"string");return ha(t)==="symbol"?t:String(t)}function _2(e,t,n){return t=y2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function I_(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ft(1));return n(Ec)(e,t)}if(typeof e!="function")throw new Error(Ft(2));var i=e,s=t,a=[],l=a,d=!1;function y(){l===a&&(l=a.slice())}function _(){if(d)throw new Error(Ft(3));return s}function c(m){if(typeof m!="function")throw new Error(Ft(4));if(d)throw new Error(Ft(5));var b=!0;return y(),l.push(m),function(){if(b){if(d)throw new Error(Ft(6));b=!1,y();var p=l.indexOf(m);l.splice(p,1),a=null}}}function f(m){if(!w2(m))throw new Error(Ft(7));if(typeof m.type>"u")throw new Error(Ft(8));if(d)throw new Error(Ft(9));try{d=!0,s=i(s,m)}finally{d=!1}for(var b=a=l,g=0;g"u")throw new Error(Ft(12));if(typeof n(void 0,{type:pa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function JT(e){for(var t=Object.keys(e),n={},r=0;r"u")throw y&&y.type,new Error(Ft(14));c[w]=b,_=_||b!==m}return _=_||s.length!==Object.keys(d).length,_?c:d}}function O_(e,t){return function(){return t(e.apply(this,arguments))}}function Ko(e,t){if(typeof e=="function")return O_(e,t);if(typeof e!="object"||e===null)throw new Error(Ft(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=O_(i,t))}return n}function Wm(){for(var e=arguments.length,t=new Array(e),n=0;n
Image: Vyacheslav Madiyevskyy/Reuters
Image: Järva Teataja/Scanpix Baltics via Reuters
','This map plots out and highlights incidents that have resulted in potential civilian impact or harm since Russia began its invasion of Ukraine. The incidents detailed have been collected by Bellingcat researchers. Included in the map are instances where civilian areas and infrastructure have been damaged or destroyed, where the presence of civilian injuries are visible and/or there is the presence of immobile civilian bodies. Collection for the incidences contained in this map began on February 24, 2022. Users can explore incidents by date and location. We intend this to be a living project that will continue to be updated as long as the conflict persists. For more detailed information about the entries included in this map, please refer to our methodology and explainer article which can be read here.',"

Editor's note: An error in our archiving system between October 21 and November 7 led to some incidents being published on our TimeMap before they were fully verified. We have fixed this issue and are working to verify all extra incidents.

"],flags:{isInfopoup:!1,isCover:!1},cover:{title:"About and Methodology",exploreButton:"BACK TO THE PLATFORM",description:["## Scope of Research","This database, organised on Forensic Architecture's [TimeMap](https://github.com/forensic-architecture/timemap) platform and customised for this project, is focused on incidents in Ukraine that have resulted in potential civilian harm. These include: incidents where rockets or missiles struck civilian areas, where attacks have resulted in the destruction of civilian infrastructure, where the presence of civilian injuries are visible and/or the presence of immobile civilian bodies. This database began collection on February 24, 2022 and intends to be a living document that will continue to be updated as long as the conflict persists. While we are attempting to collect as many incidents as possible, we cannot possibly guarantee to collect them all nor will we be able to corroborate the locations of all the incidents we collect. Those we do not corroborate the originality or exact location of will not be shown on the map. Therefore, this map is not an exhaustive list of civilian harm in Ukraine but rather a representation of all incidents which we have been able to collect and of which we have been able to determine the exact locations. ","## Open Source Footage","The links in this map are all open source, meaning they are connected to an open link posted online. These sources were collected by Bellingcat researchers and placed in a database from where they are also being archived locally. After collection, our Global Authentication Project members have determined the location of each of these events (you can read more about the Global Authentication Project and its makeup below). Bellingcat staff then cross-referenced these coordinates to ensure their accuracy. The resolution of these geolocations is within 150 metres of where the incident occurred but the public coordinates viewable on the map have been slightly obscured in order to protect the identity of the creators. Because this footage is open source, the users who uploaded the content are not directly affiliated to Bellingcat or our partners. Any opinions that may be contained within the posts are therefore not those of Bellingcat or our partners. Any claims contained within the posts have also not necessarily been confirmed or verified by Bellingcat, particularly in relation to which party may have been responsible for the incidents detailed.","## Verification Level","The data being collected is checked for originality, basic manipulation, and location by Bellingcat investigators. This level of verification is intended to indicate where incidents took place, when and where there are reasonable visual indications of civilian harm. Our investigation plan for the collection of this material and its uses are informed by the [Berkeley Protocol on Digital Open Source Investigations](https://www.ohchr.org/en/publications/policy-and-methodological-publications/berkeley-protocol-digital-open-source). These incidents are also being collected and archived at a [forensic level](https://mnemonic.org/en/our-work) for potential evidentiary use in the future. That level of in-depth analysis and verification will take many months and our goal with this map is to transparently report on the current situation in Ukraine, as it is happening, for public interest. To be clear, these two processes will be separate.","## Descriptions","Each incident is accompanied with source links, the exact location determined by our Global Authentication Project and Bellingcat researchers, as well as a brief description of the incident based on what is visually present. The descriptions indicate what is clearly visible but do not attempt to make assumptions about the exact number of casualties or which party to the conflict is responsible due to those factors being difficult to fully determine from short, visual imagery alone.","## Filters","On the left hand side of the map, a user can toggle between different kinds of areas impacted. We are characterising the areas as residential, industrial, administrative, healthcare, school/childcare, military, commercial, religious, or undefined. Decisions on these classifications are based on visual evidence in the footage and what the area is reportedly used as. We cannot fully exclude or exhaustively search for the potential of military use in some of these areas.","## Source Links/Embedding","We have chosen to embed the social media links directly onto the platform. Should any be deleted by the uploader, they will still be visible on the map, but data on the post, user and footage will no longer be presented publicly. Where sensitive footage posted by individuals might allow them or their location to be identified, we have sought to preemptively take steps to anonymise these users.","## Privacy concerns and respect for the dead ","This footage is graphic and contains distressing scenes of war and conflict. Many of the areas represented are, at time of writing, also under attack both physically and through online attempts to discredit or harm users posting this content. For these reasons, we have chosen not to share certain posts that might indicate the direct identity of any of the persons filming. We have also filtered out posts that contain images where an immobile body is closely filmed and their identity might be ascertained out of respect for them and their close ones.","## A Note on Bellingcat's Global Authentication Project","The Global Authentication Project consists of a wide community of open source researchers assisting in Bellingcat research through structured tasks and feedback. Our aim is to authenticate events taking place around the world and fill in the gaps of knowledge that exist, particularly in situations where there are vast quantities of data. In creating a community for those interested in open source research, we are fostering Bellingcat's original aim of solving problems **together**, to diversify our investigations and promote the use of these skills. For this dataset, we are working with many individuals who have Ukrainian language skills and others with local contextual knowledge of the events and places seen on the map. Other participants include individuals skilled in geolocation and chronolocation, with all contributions being vetted by Bellingcat researchers. As we expand the Global Authentication Project in the coming months, more information will be available on our website and Twitter.","## Feedback","This map will continue to change and be updated for the duration of this conflict. We welcome feedback on our methodology, data collection and take transparency seriously. Should you have any direct feedback about the platform, please indicate it on this [form](https://forms.gle/cV2YAojBoh6h4T3XA)."]},toolbar:{panels:{categories:{}}},spotlights:{}},ui:{coloring:{mode:"STATIC",maxNumOfColors:9,defaultColor:"#dfdfdf",colors:["#7E57C2","#F57C00","#FFEB3B","#D34F73","#08B2E3","#A1887F","#90A4AE","#E57373","#80CBC4"]},card:{layout:{template:"sourced"}},carto:{eventRadius:8},timeline:{eventRadius:9},tiles:{current:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",default:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",satellite:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"}},features:{USE_CATEGORIES:!1,CATEGORIES_AS_FILTERS:!1,COLOR_BY_CATEGORY:!1,COLOR_BY_ASSOCIATION:!0,USE_ASSOCIATIONS:!0,USE_FULLSCREEN:!0,USE_DOWNLOAD:!0,USE_SOURCES:!0,USE_SPOTLIGHTS:!1,USE_SHAPES:!1,USE_COVER:!0,USE_INTRO:!1,USE_SATELLITE_OVERLAY_TOGGLE:!0,USE_SEARCH:!1,USE_SITES:!1,ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK:yl,FETCH_EXTERNAL_MEDIA:!1,USE_MEDIA_CACHE:!1,GRAPH_NONLOCATED:!1,NARRATIVE_STEP_STYLES:!1,CUSTOM_EVENT_FIELDS:[]}}};var nS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xr,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},d=function(m){return(m=+m)+(m>68?1900:2e3)},y=function(m){return function(b){this[m]=+b}},_=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var g=b.match(/([+-]|\d\d)/g),p=60*g[1]+(+g[2]||0);return p===0?0:g[0]==="+"?-p:p}(m)}],c=function(m){var b=l[m];return b&&(b.indexOf?b:b.s.concat(b.f))},f=function(m,b){var g,p=l.meridiem;if(p){for(var h=1;h<=24;h+=1)if(m.indexOf(p(h,0,b))>-1){g=h>12;break}}else g=m===(b?"pm":"PM");return g},w={A:[a,function(m){this.afternoon=f(m,!1)}],a:[a,function(m){this.afternoon=f(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[s,y("seconds")],ss:[s,y("seconds")],m:[s,y("minutes")],mm:[s,y("minutes")],H:[s,y("hours")],h:[s,y("hours")],HH:[s,y("hours")],hh:[s,y("hours")],D:[s,y("day")],DD:[i,y("day")],Do:[a,function(m){var b=l.ordinal,g=m.match(/\d+/);if(this.day=g[0],b)for(var p=1;p<=31;p+=1)b(p).replace(/\[|\]/g,"")===m&&(this.day=p)}],M:[s,y("month")],MM:[i,y("month")],MMM:[a,function(m){var b=c("months"),g=(c("monthsShort")||b.map(function(p){return p.slice(0,3)})).indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[a,function(m){var b=c("months").indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,y("year")],YY:[i,function(m){this.year=d(m)}],YYYY:[/\d{4}/,y("year")],Z:_,ZZ:_};function v(m){var b,g;b=m,g=l&&l.formats;for(var p=(m=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,C,N){var $=N&&N.toUpperCase();return C||g[N]||n[N]||g[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,B){return z||B.slice(1)})})).match(r),h=p.length,T=0;T-1)return new Date((U==="X"?1e3:1)*H);var Y=v(U)(H),G=Y.year,J=Y.month,oe=Y.day,ce=Y.hours,fe=Y.minutes,de=Y.seconds,ue=Y.milliseconds,be=Y.zone,ne=new Date,O=oe||(G||J?1:ne.getDate()),j=G||ne.getFullYear(),W=0;G&&!J||(W=J>0?J-1:ne.getMonth());var Z=ce||0,Q=fe||0,ee=de||0,ve=ue||0;return be?new Date(Date.UTC(j,W,O,Z,Q,ee,ve+60*be.offset*1e3)):V?new Date(Date.UTC(j,W,O,Z,Q,ee,ve)):new Date(j,W,O,Z,Q,ee,ve)}catch{return new Date("")}}(x,E,k),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&x!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var F=E.length,z=1;z<=F;z+=1){P[1]=E[z-1];var B=g.apply(this,P);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}z===F&&(this.$d=new Date(""))}else h.call(this,T)}}})})(nS);var x2=nS.exports;const k2=Kn(x2);var rS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",y="day",_="week",c="month",f="quarter",w="year",v="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var z=["th","st","nd","rd"],B=F%100;return"["+F+(z[(B-20)%10]||z[B]||z[0])+"]"}},h=function(F,z,B){var H=String(F);return!H||H.length>=z?F:""+Array(z+1-H.length).join(B)+F},T={s:h,z:function(F){var z=-F.utcOffset(),B=Math.abs(z),H=Math.floor(B/60),U=B%60;return(z<=0?"+":"-")+h(H,2,"0")+":"+h(U,2,"0")},m:function F(z,B){if(z.date()1)return F(Y[0])}else{var G=z.name;k[G]=z,U=G}return!H&&U&&(x=U),U||!H&&x},A=function(F,z){if(P(F))return F.clone();var B=typeof z=="object"?z:{};return B.date=F,B.args=arguments,new N(B)},C=T;C.l=E,C.i=P,C.w=function(F,z){return A(F,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var N=function(){function F(B){this.$L=E(B.locale,null,!0),this.parse(B)}var z=F.prototype;return z.parse=function(B){this.$d=function(H){var U=H.date,V=H.utc;if(U===null)return new Date(NaN);if(C.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var Y=U.match(b);if(Y){var G=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return V?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(U)}(B),this.$x=B.x||{},this.init()},z.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},z.$utils=function(){return C},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(B,H){var U=A(B);return this.startOf(H)<=U&&U<=this.endOf(H)},z.isAfter=function(B,H){return A(B)>16),U((65280&C)>>8),U(255&C);return N==2?U(255&(C=P(E.charAt(A))<<2|P(E.charAt(A+1))>>4)):N==1&&(U((C=P(E.charAt(A))<<10|P(E.charAt(A+1))<<4|P(E.charAt(A+2))>>2)>>8&255),U(255&C)),$},v.fromByteArray=function(E){var A,C,N,$,F=E.length%3,z="";function U(H){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(H)}for(A=0,N=E.length-F;A>18&63)+U($>>12&63)+U($>>6&63)+U(63&$);switch(F){case 1:z=(z+=U((C=E[E.length-1])>>2))+U(C<<4&63)+"==";break;case 2:z=(z=(z+=U((C=(E[E.length-2]<<8)+E[E.length-1])>>10))+U(C>>4&63))+U(C<<2&63)+"="}return z}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(s,a,b,d,y,_,c,f,w){var v=n("base64-js"),m=n("ieee754");function b(O,j,W){if(!(this instanceof b))return new b(O,j,W);var Z,Q,ee,ve,se=typeof O;if(j==="base64"&&se=="string")for(O=(ve=O).trim?ve.trim():ve.replace(/^\s+|\s+$/g,"");O.length%4!=0;)O+="=";if(se=="number")Z=V(O);else if(se=="string")Z=b.byteLength(O,j);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");Z=V(O.length)}if(b._useTypedArrays?Q=b._augment(new Uint8Array(Z)):((Q=this).length=Z,Q._isBuffer=!0),b._useTypedArrays&&typeof O.byteLength=="number")Q._set(O);else if(Y(ve=O)||b.isBuffer(ve)||ve&&typeof ve=="object"&&typeof ve.length=="number")for(ee=0;ee>8,ve=ve%256,se.push(ve),se.push(ee);return se}(j),O,W,Z)}function h(O,j,W){var Z="";W=Math.min(O.length,W);for(var Q=j;Q>>0)):(j+1>>0),Q}function k(O,j,W,Z){if(Z||(ne(typeof W=="boolean","missing or invalid endian"),ne(j!=null,"missing offset"),ne(j+1>>8*(Z?ee:1-ee)}function N(O,j,W,Z,Q){if(Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(W!=null,"missing offset"),ne(W+3>>8*(Z?ee:3-ee)&255}function $(O,j,W,Z,Q){Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(W!=null,"missing offset"),ne(W+1this.length&&(Z=this.length);var Q=(Z=O.length-j=this.length))return this[O]},b.prototype.readUInt16LE=function(O,j){return T(this,O,!0,j)},b.prototype.readUInt16BE=function(O,j){return T(this,O,!1,j)},b.prototype.readUInt32LE=function(O,j){return x(this,O,!0,j)},b.prototype.readUInt32BE=function(O,j){return x(this,O,!1,j)},b.prototype.readInt8=function(O,j){if(j||(ne(O!=null,"missing offset"),ne(O=this.length))return 128&this[O]?-1*(255-this[O]+1):this[O]},b.prototype.readInt16LE=function(O,j){return k(this,O,!0,j)},b.prototype.readInt16BE=function(O,j){return k(this,O,!1,j)},b.prototype.readInt32LE=function(O,j){return P(this,O,!0,j)},b.prototype.readInt32BE=function(O,j){return P(this,O,!1,j)},b.prototype.readFloatLE=function(O,j){return E(this,O,!0,j)},b.prototype.readFloatBE=function(O,j){return E(this,O,!1,j)},b.prototype.readDoubleLE=function(O,j){return A(this,O,!0,j)},b.prototype.readDoubleBE=function(O,j){return A(this,O,!1,j)},b.prototype.writeUInt8=function(O,j,W){W||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(this[j]=O)},b.prototype.writeUInt16LE=function(O,j,W){C(this,O,j,!0,W)},b.prototype.writeUInt16BE=function(O,j,W){C(this,O,j,!1,W)},b.prototype.writeUInt32LE=function(O,j,W){N(this,O,j,!0,W)},b.prototype.writeUInt32BE=function(O,j,W){N(this,O,j,!1,W)},b.prototype.writeInt8=function(O,j,W){W||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(0<=O?this.writeUInt8(O,j,W):this.writeUInt8(255+O+1,j,W))},b.prototype.writeInt16LE=function(O,j,W){$(this,O,j,!0,W)},b.prototype.writeInt16BE=function(O,j,W){$(this,O,j,!1,W)},b.prototype.writeInt32LE=function(O,j,W){F(this,O,j,!0,W)},b.prototype.writeInt32BE=function(O,j,W){F(this,O,j,!1,W)},b.prototype.writeFloatLE=function(O,j,W){z(this,O,j,!0,W)},b.prototype.writeFloatBE=function(O,j,W){z(this,O,j,!1,W)},b.prototype.writeDoubleLE=function(O,j,W){U(this,O,j,!0,W)},b.prototype.writeDoubleBE=function(O,j,W){U(this,O,j,!1,W)},b.prototype.fill=function(O,j,W){if(j=j||0,W=W||this.length,ne(typeof(O=typeof(O=O||0)=="string"?O.charCodeAt(0):O)=="number"&&!isNaN(O),"value is not a number"),ne(j<=W,"end < start"),W!==j&&this.length!==0){ne(0<=j&&j"},b.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(b._useTypedArrays)return new b(this).buffer;for(var O=new Uint8Array(this.length),j=0,W=O.length;j=j.length||Q>=O.length);Q++)j[Q+W]=O[Q];return Q}function fe(O){try{return decodeURIComponent(O)}catch{return String.fromCharCode(65533)}}function de(O,j){ne(typeof O=="number","cannot write a non-number as a number"),ne(0<=O,"specified a negative value for writing an unsigned value"),ne(O<=j,"value is larger than maximum value for type"),ne(Math.floor(O)===O,"value has a fractional component")}function ue(O,j,W){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(W<=O,"value smaller than minimum allowed value"),ne(Math.floor(O)===O,"value has a fractional component")}function be(O,j,W){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(W<=O,"value smaller than minimum allowed value")}function ne(O,j){if(!O)throw new Error(j||"Failed assertion")}b._augment=function(O){return O._isBuffer=!0,O._get=O.get,O._set=O.set,O.get=H.get,O.set=H.set,O.write=H.write,O.toString=H.toString,O.toLocaleString=H.toString,O.toJSON=H.toJSON,O.copy=H.copy,O.slice=H.slice,O.readUInt8=H.readUInt8,O.readUInt16LE=H.readUInt16LE,O.readUInt16BE=H.readUInt16BE,O.readUInt32LE=H.readUInt32LE,O.readUInt32BE=H.readUInt32BE,O.readInt8=H.readInt8,O.readInt16LE=H.readInt16LE,O.readInt16BE=H.readInt16BE,O.readInt32LE=H.readInt32LE,O.readInt32BE=H.readInt32BE,O.readFloatLE=H.readFloatLE,O.readFloatBE=H.readFloatBE,O.readDoubleLE=H.readDoubleLE,O.readDoubleBE=H.readDoubleBE,O.writeUInt8=H.writeUInt8,O.writeUInt16LE=H.writeUInt16LE,O.writeUInt16BE=H.writeUInt16BE,O.writeUInt32LE=H.writeUInt32LE,O.writeUInt32BE=H.writeUInt32BE,O.writeInt8=H.writeInt8,O.writeInt16LE=H.writeInt16LE,O.writeInt16BE=H.writeInt16BE,O.writeInt32LE=H.writeInt32LE,O.writeInt32BE=H.writeInt32BE,O.writeFloatLE=H.writeFloatLE,O.writeFloatBE=H.writeFloatBE,O.writeDoubleLE=H.writeDoubleLE,O.writeDoubleBE=H.writeDoubleBE,O.fill=H.fill,O.inspect=H.inspect,O.toArrayBuffer=H.toArrayBuffer,O}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(s,a,v,d,y,_,c,f,w){var v=n("buffer").Buffer,m=4,b=new v(m);b.fill(0),r.exports={hash:function(g,p,h,T){for(var x=p(function(C,N){C.length%m!=0&&($=C.length+(m-C.length%m),C=v.concat([C,b],$));for(var $,F=[],z=N?C.readInt32BE:C.readInt32LE,U=0;Uh?B=H(B):B.length>5]|=128<>>9<<4)]=P;for(var E=1732584193,A=-271733879,C=-1732584194,N=271733878,$=0;$>>32-C,E)}function g(k,P,E,A,C,N,$){return b(P&E|~P&A,k,P,C,N,$)}function p(k,P,E,A,C,N,$){return b(P&A|E&~A,k,P,C,N,$)}function h(k,P,E,A,C,N,$){return b(P^E^A,k,P,C,N,$)}function T(k,P,E,A,C,N,$){return b(E^(P|~A),k,P,C,N,$)}function x(k,P){var E=(65535&k)+(65535&P);return(k>>16)+(P>>16)+(E>>16)<<16|65535&E}r.exports=function(k){return v.hash(k,m,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){r.exports=function(v){for(var m,b=new Array(v),g=0;g>>((3&g)<<3)&255;return b}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){var v=n("./helpers");function m(p,h){p[h>>5]|=128<<24-h%32,p[15+(h+64>>9<<4)]=h;for(var T,x,k,P=Array(80),E=1732584193,A=-271733879,C=-1732584194,N=271733878,$=-1009589776,F=0;F>16)+(h>>16)+(T>>16)<<16|65535&T}function g(p,h){return p<>>32-h}r.exports=function(p){return v.hash(p,m,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){function v(h,T){var x=(65535&h)+(65535&T);return(h>>16)+(T>>16)+(x>>16)<<16|65535&x}function m(h,T){var x,k=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),P=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);h[T>>5]|=128<<24-T%32,h[15+(T+64>>9<<4)]=T;for(var A,C,N=0;N>>T|h<<32-T},p=function(h,T){return h>>>T};r.exports=function(h){return b.hash(h,m,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){i.read=function(v,m,b,g,N){var h,T,x=8*N-g-1,k=(1<>1,E=-7,A=b?N-1:0,C=b?-1:1,N=v[m+A];for(A+=C,h=N&(1<<-E)-1,N>>=-E,E+=x;0>=-E,E+=g;0>1,A=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=g?0:$-1,N=g?1:-1,$=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(x=isNaN(m)?1:0,T=P):(T=Math.floor(Math.log(m)/Math.LN2),m*(g=Math.pow(2,-T))<1&&(T--,g*=2),2<=(m+=1<=T+E?A/g:A*Math.pow(2,1-E))*g&&(T++,g/=2),P<=T+E?(x=0,T=P):1<=T+E?(x=(m*g-1)*Math.pow(2,p),T+=E):(x=m*Math.pow(2,E-1)*Math.pow(2,p),T=0));8<=p;v[b+C]=255&x,C+=N,x/=256,p-=8);for(T=T<t?1:e>=t?0:NaN}function P2(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function qm(e){let t,n,r;e.length!==2?(t=Bl,n=(l,d)=>Bl(e(l),d),r=(l,d)=>e(l)-d):(t=e===Bl||e===P2?e:L2,n=e,r=e);function i(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<0?y=c+1:_=c}while(y<_)}return y}function s(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<=0?y=c+1:_=c}while(y<_)}return y}function a(l,d,y=0,_=l.length){const c=i(l,d,y,_-1);return c>y&&r(l[c-1],d)>-r(l[c],d)?c-1:c}return{left:i,center:a,right:s}}function L2(){return 0}function R2(e){return e===null?NaN:+e}const I2=qm(Bl),N2=I2.right;qm(R2).center;const O2=N2;var M2=Math.sqrt(50),D2=Math.sqrt(10),$2=Math.sqrt(2);function M_(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),s=r/i;return s>=M2?i*=10:s>=D2?i*=5:s>=$2&&(i*=2),t+e(t)}function U2(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function H2(){return!this.__axis}function V2(e,t){var n=[],r=null,i=null,s=6,a=6,l=3,d=typeof window<"u"&&window.devicePixelRatio>1?0:.5,y=e===Kd||e===wl?-1:1,_=e===wl||e===Xd?"x":"y",c=e===Kd||e===wp?j2:z2;function f(w){var v=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):F2),b=Math.max(s,0)+l,g=t.range(),p=+g[0]+d,h=+g[g.length-1]+d,T=(t.bandwidth?U2:B2)(t.copy(),d),x=w.selection?w.selection():w,k=x.selectAll(".domain").data([null]),P=x.selectAll(".tick").data(v,t).order(),E=P.exit(),A=P.enter().append("g").attr("class","tick"),C=P.select("line"),N=P.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(A),C=C.merge(A.append("line").attr("stroke","currentColor").attr(_+"2",y*s)),N=N.merge(A.append("text").attr("fill","currentColor").attr(_,y*b).attr("dy",e===Kd?"0em":e===wp?"0.71em":"0.32em")),w!==x&&(k=k.transition(w),P=P.transition(w),C=C.transition(w),N=N.transition(w),E=E.transition(w).attr("opacity",D_).attr("transform",function($){return isFinite($=T($))?c($+d):this.getAttribute("transform")}),A.attr("opacity",D_).attr("transform",function($){var F=this.parentNode.__axis;return c((F&&isFinite(F=F($))?F:T($))+d)})),E.remove(),k.attr("d",e===wl||e===Xd?a?"M"+y*a+","+p+"H"+d+"V"+h+"H"+y*a:"M"+d+","+p+"V"+h:a?"M"+p+","+y*a+"V"+d+"H"+h+"V"+y*a:"M"+p+","+d+"H"+h),P.attr("opacity",1).attr("transform",function($){return c(T($)+d)}),C.attr(_+"2",y*s),N.attr(_,y*b).text(m),x.filter(H2).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Xd?"start":e===wl?"end":"middle"),x.each(function(){this.__axis=T})}return f.scale=function(w){return arguments.length?(t=w,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(w){return arguments.length?(n=w==null?[]:Array.from(w),f):n.slice()},f.tickValues=function(w){return arguments.length?(r=w==null?null:Array.from(w),f):r&&r.slice()},f.tickFormat=function(w){return arguments.length?(i=w,f):i},f.tickSize=function(w){return arguments.length?(s=a=+w,f):s},f.tickSizeInner=function(w){return arguments.length?(s=+w,f):s},f.tickSizeOuter=function(w){return arguments.length?(a=+w,f):a},f.tickPadding=function(w){return arguments.length?(l=+w,f):l},f.offset=function(w){return arguments.length?(d=+w,f):d},f}function $_(e){return V2(wp,e)}var W2={value:()=>{}};function Zm(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ul.prototype=Zm.prototype={constructor:Ul,on:function(e,t){var n=this._,r=q2(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),r=0,i,s;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),j_.hasOwnProperty(t)?{space:j_[t],local:e}:e}function G2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bp&&t.documentElement.namespaceURI===bp?t.createElement(e):t.createElementNS(n,e)}}function Y2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function oS(e){var t=kc(e);return(t.local?Y2:G2)(t)}function K2(){}function Gm(e){return e==null?K2:function(){return this.querySelector(e)}}function X2(e){typeof e!="function"&&(e=Gm(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=h&&(h=p+1);!(x=b[h])&&++h=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function TR(e){e||(e=SR);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;st?1:e>=t?0:NaN}function ER(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xR(){return Array.from(this)}function kR(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?$R:typeof t=="function"?jR:FR)(e,t,n??"")):Ho(this.node(),e)}function Ho(e,t){return e.style.getPropertyValue(t)||cS(e).getComputedStyle(e,null).getPropertyValue(t)}function BR(e){return function(){delete this[e]}}function UR(e,t){return function(){this[e]=t}}function HR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function VR(e,t){return arguments.length>1?this.each((t==null?BR:typeof t=="function"?HR:UR)(e,t)):this.node()[e]}function dS(e){return e.trim().split(/^|\s+/)}function Ym(e){return e.classList||new fS(e)}function fS(e){this._node=e,this._names=dS(e.getAttribute("class")||"")}fS.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function hS(e,t){for(var n=Ym(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function yI(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n()=>e;function Tp(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:a,y:l,dx:d,dy:y,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:_}})}Tp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LI(e){return!e.ctrlKey&&!e.button}function RI(){return this.parentNode}function II(e,t){return t??{x:e.x,y:e.y}}function NI(){return navigator.maxTouchPoints||"ontouchstart"in this}function OI(){var e=LI,t=RI,n=II,r=NI,i={},s=Zm("start","drag","end"),a=0,l,d,y,_,c=0;function f(T){T.on("mousedown.drag",w).filter(r).on("touchstart.drag",b).on("touchmove.drag",g,CI).on("touchend.drag touchcancel.drag",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(T,x){if(!(_||!e.call(this,T,x))){var k=h(this,t.call(this,T,x),T,x,"mouse");k&&(Ui(T.view).on("mousemove.drag",v,ma).on("mouseup.drag",m,ma),AI(T.view),Qd(T),y=!1,l=T.clientX,d=T.clientY,k("start",T))}}function v(T){if(Ro(T),!y){var x=T.clientX-l,k=T.clientY-d;y=x*x+k*k>c}i.mouse("drag",T)}function m(T){Ui(T.view).on("mousemove.drag mouseup.drag",null),PI(T.view,y),Ro(T),i.mouse("end",T)}function b(T,x){if(e.call(this,T,x)){var k=T.changedTouches,P=t.call(this,T,x),E=k.length,A,C;for(A=0;A>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=DI.exec(e))?new on(t[1],t[2],t[3],1):(t=$I.exec(e))?new on(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FI.exec(e))?Tl(t[1],t[2],t[3],t[4]):(t=jI.exec(e))?Tl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zI.exec(e))?Z_(t[1],t[2]/100,t[3]/100,1):(t=BI.exec(e))?Z_(t[1],t[2]/100,t[3]/100,t[4]):B_.hasOwnProperty(e)?V_(B_[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function V_(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Tl(e,t,n,r){return r<=0&&(e=t=n=NaN),new on(e,t,n,r)}function VI(e){return e instanceof Aa||(e=Hi(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function Sp(e,t,n,r){return arguments.length===1?VI(e):new on(e,t,n,r??1)}function on(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Km(on,Sp,vS(Aa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ga:Math.pow(ga,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new on(Di(this.r),Di(this.g),Di(this.b),Eu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:W_,formatHex:W_,formatHex8:WI,formatRgb:q_,toString:q_}));function W_(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function WI(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function q_(){const e=Eu(this.opacity);return`${e===1?"rgb(":"rgba("}${Di(this.r)}, ${Di(this.g)}, ${Di(this.b)}${e===1?")":`, ${e})`}`}function Eu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Di(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Di(e),(e<16?"0":"")+e.toString(16)}function Z_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hn(e,t,n,r)}function yS(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);if(e instanceof Aa||(e=Hi(e)),!e)return new Hn;if(e instanceof Hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,l=s-i,d=(s+i)/2;return l?(t===s?a=(n-r)/l+(n0&&d<1?0:a,new Hn(a,l,d,e.opacity)}function qI(e,t,n,r){return arguments.length===1?yS(e):new Hn(e,t,n,r??1)}function Hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Km(Hn,qI,vS(Aa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ga:Math.pow(ga,e),new Hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new on(Jd(e>=240?e-240:e+120,i,r),Jd(e,i,r),Jd(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Hn(G_(this.h),Sl(this.s),Sl(this.l),Eu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Eu(this.opacity);return`${e===1?"hsl(":"hsla("}${G_(this.h)}, ${Sl(this.s)*100}%, ${Sl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function G_(e){return e=(e||0)%360,e<0?e+360:e}function Sl(e){return Math.max(0,Math.min(1,e||0))}function Jd(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Xm=e=>()=>e;function ZI(e,t){return function(n){return e+n*t}}function GI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function YI(e){return(e=+e)==1?_S:function(t,n){return n-t?GI(t,n,e):Xm(isNaN(t)?n:t)}}function _S(e,t){var n=t-e;return n?ZI(e,n):Xm(isNaN(e)?t:e)}const xu=function e(t){var n=YI(t);function r(i,s){var a=n((i=Sp(i)).r,(s=Sp(s)).r),l=n(i.g,s.g),d=n(i.b,s.b),y=_S(i.opacity,s.opacity);return function(_){return i.r=a(_),i.g=l(_),i.b=d(_),i.opacity=y(_),i+""}}return r.gamma=e,r}(1);function KI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(r=r[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,d.push({i:a,x:Un(r,i)})),n=ef.lastIndex;return n180?_+=360:_-y>180&&(y+=360),f.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Un(y,_)})):_&&c.push(i(c)+"rotate("+_+r)}function l(y,_,c,f){y!==_?f.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Un(y,_)}):_&&c.push(i(c)+"skewX("+_+r)}function d(y,_,c,f,w,v){if(y!==c||_!==f){var m=w.push(i(w)+"scale(",null,",",null,")");v.push({i:m-4,x:Un(y,c)},{i:m-2,x:Un(_,f)})}else(c!==1||f!==1)&&w.push(i(w)+"scale("+c+","+f+")")}return function(y,_){var c=[],f=[];return y=e(y),_=e(_),s(y.translateX,y.translateY,_.translateX,_.translateY,c,f),a(y.rotate,_.rotate,c,f),l(y.skewX,_.skewX,c,f),d(y.scaleX,y.scaleY,_.scaleX,_.scaleY,c,f),y=_=null,function(w){for(var v=-1,m=f.length,b;++v=0&&e._call.call(void 0,t),e=e._next;--Vo}function K_(){Vi=(Cu=ya.now())+Cc,Vo=Os=0;try{uN()}finally{Vo=0,dN(),Vi=0}}function cN(){var e=ya.now(),t=e-Cu;t>SS&&(Cc-=t,Cu=e)}function dN(){for(var e,t=ku,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ku=n);Ms=e,kp(r)}function kp(e){if(!Vo){Os&&(Os=clearTimeout(Os));var t=e-Vi;t>24?(e<1/0&&(Os=setTimeout(K_,e-ya.now()-Cc)),Ss&&(Ss=clearInterval(Ss))):(Ss||(Cu=ya.now(),Ss=setInterval(cN,SS)),Vo=1,ES(K_))}}function X_(e,t,n){var r=new Au;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var fN=Zm("start","end","cancel","interrupt"),hN=[],kS=0,Q_=1,Cp=2,Hl=3,J_=4,Ap=5,Vl=6;function Ac(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;pN(e,n,{name:t,index:r,group:i,on:fN,tween:hN,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:kS})}function eg(e,t){var n=Xn(e,t);if(n.state>kS)throw new Error("too late; already scheduled");return n}function fr(e,t){var n=Xn(e,t);if(n.state>Hl)throw new Error("too late; already running");return n}function Xn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function pN(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=xS(s,0,n.time);function s(y){n.state=Q_,n.timer.restart(a,n.delay,n.time),n.delay<=y&&a(y-n.delay)}function a(y){var _,c,f,w;if(n.state!==Q_)return d();for(_ in r)if(w=r[_],w.name===n.name){if(w.state===Hl)return X_(a);w.state===J_?(w.state=Vl,w.timer.stop(),w.on.call("interrupt",e,e.__data__,w.index,w.group),delete r[_]):+_Cp&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function WN(e,t,n){var r,i,s=VN(t)?eg:fr;return function(){var a=s(this,e),l=a.on;l!==r&&(i=(r=l).copy()).on(t,n),a.on=i}}function qN(e,t){var n=this._id;return arguments.length<2?Xn(this.node(),n).on.on(e):this.each(WN(n,e,t))}function ZN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function GN(){return this.on("end.remove",ZN(this._id))}function YN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Gm(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;at&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function EO(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i2?xO:EO,d=y=null,c}function c(f){return f==null||isNaN(f=+f)?s:(d||(d=l(e.map(r),t,n)))(r(a(f)))}return c.invert=function(f){return a(i((y||(y=l(t,e.map(r),Un)))(f)))},c.domain=function(f){return arguments.length?(e=Array.from(f,TO),_()):e.slice()},c.range=function(f){return arguments.length?(t=Array.from(f),_()):t.slice()},c.rangeRound=function(f){return t=Array.from(f),n=rN,_()},c.clamp=function(f){return arguments.length?(a=f?!0:So,_()):a!==So},c.interpolate=function(f){return arguments.length?(n=f,_()):n},c.unknown=function(f){return arguments.length?(s=f,c):s},function(f,w){return r=f,i=w,_()}}function AO(){return CO()(So,So)}function PO(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),l=i.ceil(s);return s-a(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,l)=>{const d=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s0))return d;let y;do d.push(y=new Date(+s)),t(s,l),e(s);while(yPt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!s(a););else for(;--l>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(tf.setTime(+s),nf.setTime(+a),e(tf),e(nf),Math.floor(n(tf,nf))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Pu=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Pu);Pu.range;const kr=1e3,An=kr*60,Cr=An*60,Mr=Cr*24,ng=Mr*7,t0=Mr*30,rf=Mr*365,ei=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*kr)},(e,t)=>(t-e)/kr,e=>e.getUTCSeconds());ei.range;const en=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*kr)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getMinutes());en.range;const LO=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getUTCMinutes());LO.range;const rg=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*kr-e.getMinutes()*An)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getHours());rg.range;const RO=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getUTCHours());RO.range;const Pa=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*An)/Mr,e=>e.getDate()-1);Pa.range;const ig=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Mr,e=>e.getUTCDate()-1);ig.range;const IO=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Mr,e=>Math.floor(e/Mr));IO.range;function Ki(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*An)/ng)}const Pc=Ki(0),Lu=Ki(1),NO=Ki(2),OO=Ki(3),Wo=Ki(4),MO=Ki(5),DO=Ki(6);Pc.range;Lu.range;NO.range;OO.range;Wo.range;MO.range;DO.range;function Xi(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ng)}const LS=Xi(0),Ru=Xi(1),$O=Xi(2),FO=Xi(3),qo=Xi(4),jO=Xi(5),zO=Xi(6);LS.range;Ru.range;$O.range;FO.range;qo.range;jO.range;zO.range;const og=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());og.range;const BO=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());BO.range;const Dr=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Dr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Dr.range;const Wi=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Wi.range;function UO(e,t,n,r,i,s){const a=[[ei,1,kr],[ei,5,5*kr],[ei,15,15*kr],[ei,30,30*kr],[s,1,An],[s,5,5*An],[s,15,15*An],[s,30,30*An],[i,1,Cr],[i,3,3*Cr],[i,6,6*Cr],[i,12,12*Cr],[r,1,Mr],[r,2,2*Mr],[n,1,ng],[t,1,t0],[t,3,3*t0],[e,1,rf]];function l(y,_,c){const f=_b).right(a,f);if(w===a.length)return e.every(M_(y/rf,_/rf,c));if(w===0)return Pu.every(Math.max(M_(y,_,c),1));const[v,m]=a[f/a[w-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(ee=sf(Es(Z.y,0,1)),ve=ee.getUTCDay(),ee=ve>4||ve===0?Ru.ceil(ee):Ru(ee),ee=ig.offset(ee,(Z.V-1)*7),Z.y=ee.getUTCFullYear(),Z.m=ee.getUTCMonth(),Z.d=ee.getUTCDate()+(Z.w+6)%7):(ee=of(Es(Z.y,0,1)),ve=ee.getDay(),ee=ve>4||ve===0?Lu.ceil(ee):Lu(ee),ee=Pa.offset(ee,(Z.V-1)*7),Z.y=ee.getFullYear(),Z.m=ee.getMonth(),Z.d=ee.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),ve="Z"in Z?sf(Es(Z.y,0,1)).getUTCDay():of(Es(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(ve+5)%7:Z.w+Z.U*7-(ve+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,sf(Z)):of(Z)}}function E(O,j,W,Z){for(var Q=0,ee=j.length,ve=W.length,se,$e;Q=ve)return-1;if(se=j.charCodeAt(Q++),se===37){if(se=j.charAt(Q++),$e=x[se in n0?j.charAt(Q++):se],!$e||(Z=$e(O,W,Z))<0)return-1}else if(se!=W.charCodeAt(Z++))return-1}return Z}function A(O,j,W){var Z=y.exec(j.slice(W));return Z?(O.p=_.get(Z[0].toLowerCase()),W+Z[0].length):-1}function C(O,j,W){var Z=w.exec(j.slice(W));return Z?(O.w=v.get(Z[0].toLowerCase()),W+Z[0].length):-1}function N(O,j,W){var Z=c.exec(j.slice(W));return Z?(O.w=f.get(Z[0].toLowerCase()),W+Z[0].length):-1}function $(O,j,W){var Z=g.exec(j.slice(W));return Z?(O.m=p.get(Z[0].toLowerCase()),W+Z[0].length):-1}function F(O,j,W){var Z=m.exec(j.slice(W));return Z?(O.m=b.get(Z[0].toLowerCase()),W+Z[0].length):-1}function z(O,j,W){return E(O,t,j,W)}function U(O,j,W){return E(O,n,j,W)}function H(O,j,W){return E(O,r,j,W)}function B(O){return a[O.getDay()]}function V(O){return s[O.getDay()]}function Y(O){return d[O.getMonth()]}function G(O){return l[O.getMonth()]}function J(O){return i[+(O.getHours()>=12)]}function oe(O){return 1+~~(O.getMonth()/3)}function ce(O){return a[O.getUTCDay()]}function fe(O){return s[O.getUTCDay()]}function de(O){return d[O.getUTCMonth()]}function ue(O){return l[O.getUTCMonth()]}function be(O){return i[+(O.getUTCHours()>=12)]}function ne(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var j=k(O+="",h);return j.toString=function(){return O},j},parse:function(O){var j=P(O+="",!1);return j.toString=function(){return O},j},utcFormat:function(O){var j=k(O+="",T);return j.toString=function(){return O},j},utcParse:function(O){var j=P(O+="",!0);return j.toString=function(){return O},j}}}var n0={"-":"",_:" ",0:"0"},Dt=/^\s*\d+/,qO=/^%/,ZO=/[\\^$*+?|[\]().{}]/g;function je(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s[t.toLowerCase(),n]))}function YO(e,t,n){var r=Dt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function KO(e,t,n){var r=Dt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function XO(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function QO(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function JO(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function r0(e,t,n){var r=Dt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function i0(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function eM(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tM(e,t,n){var r=Dt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function nM(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function o0(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function rM(e,t,n){var r=Dt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function s0(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function iM(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function oM(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sM(e,t,n){var r=Dt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function aM(e,t,n){var r=Dt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lM(e,t,n){var r=qO.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uM(e,t,n){var r=Dt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function cM(e,t,n){var r=Dt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function a0(e,t){return je(e.getDate(),t,2)}function dM(e,t){return je(e.getHours(),t,2)}function fM(e,t){return je(e.getHours()%12||12,t,2)}function hM(e,t){return je(1+Pa.count(Dr(e),e),t,3)}function RS(e,t){return je(e.getMilliseconds(),t,3)}function pM(e,t){return RS(e,t)+"000"}function mM(e,t){return je(e.getMonth()+1,t,2)}function gM(e,t){return je(e.getMinutes(),t,2)}function vM(e,t){return je(e.getSeconds(),t,2)}function yM(e){var t=e.getDay();return t===0?7:t}function _M(e,t){return je(Pc.count(Dr(e)-1,e),t,2)}function IS(e){var t=e.getDay();return t>=4||t===0?Wo(e):Wo.ceil(e)}function wM(e,t){return e=IS(e),je(Wo.count(Dr(e),e)+(Dr(e).getDay()===4),t,2)}function bM(e){return e.getDay()}function TM(e,t){return je(Lu.count(Dr(e)-1,e),t,2)}function SM(e,t){return je(e.getFullYear()%100,t,2)}function EM(e,t){return e=IS(e),je(e.getFullYear()%100,t,2)}function xM(e,t){return je(e.getFullYear()%1e4,t,4)}function kM(e,t){var n=e.getDay();return e=n>=4||n===0?Wo(e):Wo.ceil(e),je(e.getFullYear()%1e4,t,4)}function CM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+je(t/60|0,"0",2)+je(t%60,"0",2)}function l0(e,t){return je(e.getUTCDate(),t,2)}function AM(e,t){return je(e.getUTCHours(),t,2)}function PM(e,t){return je(e.getUTCHours()%12||12,t,2)}function LM(e,t){return je(1+ig.count(Wi(e),e),t,3)}function NS(e,t){return je(e.getUTCMilliseconds(),t,3)}function RM(e,t){return NS(e,t)+"000"}function IM(e,t){return je(e.getUTCMonth()+1,t,2)}function NM(e,t){return je(e.getUTCMinutes(),t,2)}function OM(e,t){return je(e.getUTCSeconds(),t,2)}function MM(e){var t=e.getUTCDay();return t===0?7:t}function DM(e,t){return je(LS.count(Wi(e)-1,e),t,2)}function OS(e){var t=e.getUTCDay();return t>=4||t===0?qo(e):qo.ceil(e)}function $M(e,t){return e=OS(e),je(qo.count(Wi(e),e)+(Wi(e).getUTCDay()===4),t,2)}function FM(e){return e.getUTCDay()}function jM(e,t){return je(Ru.count(Wi(e)-1,e),t,2)}function zM(e,t){return je(e.getUTCFullYear()%100,t,2)}function BM(e,t){return e=OS(e),je(e.getUTCFullYear()%100,t,2)}function UM(e,t){return je(e.getUTCFullYear()%1e4,t,4)}function HM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?qo(e):qo.ceil(e),je(e.getUTCFullYear()%1e4,t,4)}function VM(){return"+0000"}function u0(){return"%"}function c0(e){return+e}function d0(e){return Math.floor(+e/1e3)}var uo,Iu;MS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function MS(e){return uo=WO(e),Iu=uo.format,uo.parse,uo.utcFormat,uo.utcParse,uo}function WM(e){return new Date(e)}function qM(e){return e instanceof Date?+e:+new Date(+e)}function DS(e,t,n,r,i,s,a,l,d,y){var _=AO(),c=_.invert,f=_.domain,w=y(".%L"),v=y(":%S"),m=y("%I:%M"),b=y("%I %p"),g=y("%a %d"),p=y("%b %d"),h=y("%B"),T=y("%Y");function x(k){return(d(k)(n[e[i]]=r,n),{})}function aD(e){return typeof e<"u"&&e!==null}function p0(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lD(e,t){return e.length>t?e.substring(0,120)+"...":e}function jS(e){function t(i={},[s,...a],l){const d=Object.keys(i).find(_=>FS(_)===s);l.push(s);const y=l.join("/");return d||(i[y]={}),a.length>0&&t(i[y],a,l),i}const n=[];return e.forEach(i=>n.push(i.filter_paths)),n.reduce((i,s)=>t(i,s,[]),{})}function sg(e){const t=e.split("/"),n=[];return t.forEach((r,i)=>{const s=t.slice(0,i+1).join("/");n.push(s)}),n.pop(),n}function uD(e){const t=sg(e);return t[t.length-1]}function cD(e,t,n){function r(l,d){if(d.length===0||l==={})return{};const y=d.shift();if(Object.keys(l).includes(y)){const _=l[y];return d.length===0?_:r(_,d)}}const i=jS(e),s=sg(n),a=r(i,s);return Object.keys(a).filter(l=>l!==n)}function dD(e,t){const n=e.flatMap(i=>i),r=t.filter(i=>n.indexOf(i)===-1);return[...e,r]}function fD(e,t){return e.map(r=>r.filter(i=>!t.includes(i))).filter(r=>r.length!==0)}function zS(e,t){return e.associations.filter(r=>r.mode===Yn.CATEGORY).reduce((r,i)=>{const s=t.find(a=>a===i.title);return s&&r.push(s),r},[])}function Lc(e){return e.filter_paths.join("/")}function ag(e){return t=>{let n;return t.sources?n=t.sources.map(r=>e.hasOwnProperty(r)?e[r]:null):n=[],{...t,sources:n}}}const m0=Nt.SERVER_ROOT;function Xo(e){return Nt[e]?Array.isArray(Nt[e])?Nt[e].map(t=>`${m0}${t}`):[`${m0}${Nt[e]}`]:null}function Qi(e){return t=>({...t,flags:{...t.flags,[e]:!t.flags[e]}})}function BS(e){let t;switch(e=e.trim(),!0){case/\.((png)|(jpg)|(jpeg))$/.test(e):t="Image";break;case/\.(mp4)$/.test(e):t="Video";break;case/\.(md)$/.test(e):t="Text";break;case/\.(pdf)$/.test(e):t="Document";break;case/.+(twitter\.com).+/.test(e):t="Tweet";break;case/.+(t\.me).+/.test(e):t="Telegram";break;default:t="Unknown";break}return t}function hD(e,t){return{type:BS(e),path:e,poster:t}}function xl(e,t){return nn(e)===nn(t)}function lg(e){return(e>=1?.9:0)+Math.min(.5,.08*(e-1))}function pD(e,t){return Math.min(.85,.08+e/t*50)}function US(e,t){const n=t>60?60:35;return Math.min(n,10+e/t*100)}function HS(e){return e.reduce((t,n)=>(n&&n.properties&&n.properties.cluster&&(t+=n.properties.point_count),t),0)}function La(e){return!!e&&isFinite(e)&&Math.abs(e)<=90}function Ra(e){return!!e&&isFinite(e)&&Math.abs(e)<=180}function g0(e,t){return e.reduce((n,r)=>{const i=t.find(s=>s.label===r.properties.id);return i&&n.push(i),n},[])}function wa(e,t){if(t.length===0)return[1];const n={};for(const[s,a]of t.entries())for(const l of a)n[l]=s;const r=new Array(t.length);r.fill(0);let i=0;return e.forEach(s=>{let a="events"in s?s.events:s;Array.isArray(a)||(a=[a]),a.forEach(l=>{l.associations.forEach(d=>{const y=n[Lc(d)];!y&&y!==0||(r[y]+=1,i+=1)})})}),i===0?[1]:r.map(s=>s/i)}function VS(e,t){let n=-1;return t.map((r,i)=>(r.indexOf(e)!==-1&&(n=i),null)),n}const mD=function(){return Array.prototype.slice.call(arguments).reduce(function(e,t){return et?e:t})};function vD(e,t,n){let r=0,i=e.length-1;for(;r<=i;){const s=i+r>>1,a=n(t,e[s]);if(a>0)r=s+1;else if(a<0)i=s-1;else return s}return-r-1}function Lp(e){if(e===null)return null;const t=new Intl.DateTimeFormat(ht,{year:"numeric",month:"long",day:"2-digit"}),[{value:n},,{value:r},,{value:i}]=t.formatToParts(e);return`${r} ${n}, ${i}`}function yD(){const e={"es-MX":nD};ht!=="es-US"&&e[ht]&&MS(e[ht])}function _D(e,t){return e.map(r=>{const{colour:i,shape:s,id:a}=r,l={checkboxStyles:{background:t.includes(a)?i:"black",border:"none",clipPath:f0[s]},containerStyles:{background:i,clipPath:f0[s]}};return r.styles=l,r})}function wD(e,t){const n=e.reduce((i,s)=>{const a=s.filter_paths[0];return a in i||(i[a]=[]),i[a].push(s),i},{});return t.length>1?n:{default:e}}function bD(e,t){let n=t;return(e.length>1?e.filter(i=>i!=="default"):e).reduce((i,s)=>(i[s]=n,n+=1,i),{})}function TD(e,t,n){return e&&!t?1:!e&&t?n:e&&t?n+1:0}function v0(e,t){let n=document.createElement("a");n.setAttribute("href",`data:application/octet-stream;charset=utf-8,${encodeURIComponent(t)}`),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}const y0=e=>e.length===0;function SD(e){return e==null||typeof e=="object"&&!Object.keys(e).length}const ED=Xo("EVENTS_EXT"),_0=Xo("ASSOCIATIONS_EXT"),Nu=Xo("SOURCES_EXT"),xD=Xo("SITES_EXT"),kD=Xo("REGIONS_EXT"),CD=Xo("SHAPES_EXT"),As=e=>`Something went wrong fetching ${e}. Check the URL or try disabling them in the config file.`;function AD(){const e=[];function t(n){return e.push({message:n,type:"error"}),[]}return(n,r)=>{const i=r().features;n(Wl());const s=Promise.all(ED.map(c=>fetch(c).then(f=>f.json()).catch(()=>t("events")))).then(c=>c.flatMap(f=>f));let a=Promise.resolve([]);i.USE_ASSOCIATIONS&&(_0?a=fetch(_0).then(c=>c.json()).catch(()=>t(As("associations"))):a=Promise.resolve(t("USE_ASSOCIATIONS is true, but you have not provided a ASSOCIATIONS_EXT")));let l=Promise.resolve([]);i.USE_SOURCES&&(Nu?l=fetch(Nu).then(c=>c.json()).catch(()=>t(As("sources"))):l=Promise.resolve(t("USE_SOURCES is true, but you have not provided a SOURCES_EXT")));let d=Promise.resolve([]);i.USE_SITES&&(d=fetch(xD).then(c=>c.json()).catch(()=>t(As("sites"))));let y=Promise.resolve([]);i.USE_REGIONS&&(y=fetch(kD).then(c=>c.json()).catch(()=>t(As("regions"))));let _=Promise.resolve([]);return i.USE_SHAPES&&(_=fetch(CD).then(c=>c.json()).catch(()=>t(As("shapes")))),Promise.all([s,a,l,d,y,_]).then(c=>{const f={events:c[0],associations:c[1],sources:c[2],sites:c[3],regions:c[4],shapes:c[5],notifications:e};if(Object.values(f).some(w=>w.hasOwnProperty("error")))throw new Error("Some URLs returned negative. If you are in development, check the server is running");return n(Wl()),n(YS(f.associations)),n(KS(f.shapes)),f}).catch(c=>{n(WS(c.message)),n(Wl()),alert(c.message)})}}const ug="FETCH_ERROR";function WS(e){return{type:ug,message:e}}const cg="UPDATE_DOMAIN";function PD(e){return{type:cg,payload:e}}function LD(e){return t=>{Nu?(t(Rp()),fetch(`${Nu}`).then(n=>{if(n.ok)return n.json();throw new Error("No sources are available at the URL specified in the config specified.")}).catch(n=>{t(Ip(n.message)),t(Rp())})):t(Ip("No source extension specified."))}}const dg="UPDATE_HIGHLIGHTED";function RD(e){return{type:dg,highlighted:e}}const Rc="UPDATE_SELECTED";function ID(e){return{type:Rc,selected:e}}const qS="UPDATE_DISTRICT";function ND(e){return{type:qS,district:e}}const fg="CLEAR_FILTER";function OD(e){return{type:fg,filter:e}}const Ic="TOGGLE_ASSOCIATIONS";function MD(e,t,n){return{type:Ic,association:e,value:t,shouldColor:n}}const hg="TOGGLE_SHAPES";function DD(e){return{type:hg,shape:e}}const pg="SET_LOADING";function ZS(){return{type:pg}}const mg="SET_NOT_LOADING";function GS(){return{type:mg}}const gg="SET_INITIAL_CATEGORIES";function YS(e){return{type:gg,values:e}}const vg="SET_INITIAL_SHAPES";function KS(e){return{type:vg,values:e}}const Nc="UPDATE_TIMERANGE";function $D(e){return{type:Nc,timerange:e}}const yg="UPDATE_DIMENSIONS";function FD(e){return{type:yg,dims:e}}const _g="UPDATE_NARRATIVE";function jD(e){return{type:_g,narrative:e}}const wg="UPDATE_NARRATIVE_STEP_IDX";function zD(e){return{type:wg,idx:e}}const bg="UPDATE_SOURCE";function BD(e){return{type:bg,source:e}}const Oc="UPDATE_COLORING_SET";function UD(e){return{type:Oc,coloringSet:e}}const Tg="UPDATE_TICKS";function XS(e){return{type:Tg,ticks:e}}const Sg="TOGGLE_SITES";function HD(){return{type:Sg}}const Eg="TOGGLE_FETCHING_DOMAIN";function Wl(){return{type:Eg}}const xg="TOGGLE_FETCHING_SOURCES";function Rp(){return{type:xg}}const kg="TOGGLE_LANGUAGE";function VD(e){return{type:kg,language:e}}const QS="CLOSE_TOOLBAR";function WD(){return{type:QS}}const Cg="TOGGLE_INFOPOPUP";function qD(){return{type:Cg}}const Ag="TOGGLE_INTROPOPUP";function ZD(){return{type:Ag}}const Pg="TOGGLE_NOTIFICATIONS";function GD(){return{type:Pg}}const Lg="MARK_NOTIFICATIONS_READ";function YD(){return{type:Lg}}const Rg="TOGGLE_COVER";function KD(){return{type:Rg}}const Ig="TOGGLE_TILE_OVERLAY";function XD(){return{type:Ig}}const Ng="UPDATE_SEARCH_QUERY";function QD(e){return{type:Ng,searchQuery:e}}const Og="FETCH_SOURCE_ERROR";function Ip(e){return{type:Og,msg:e}}const JS="TOGGLE_SATELLITE_VIEW";function JD(){return{type:JS}}const Mg="REHYDRATE_STATE";function e$(){return{type:Mg}}const No="UPDATE_MAP_VIEW";function t$(e,t,n){return{type:No,lat:e,lng:t,zoom:n}}const Mc=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_FILTER:fg,CLOSE_TOOLBAR:QS,FETCH_ERROR:ug,FETCH_SOURCE_ERROR:Og,MARK_NOTIFICATIONS_READ:Lg,REHYDRATE_STATE:Mg,SET_INITIAL_CATEGORIES:gg,SET_INITIAL_SHAPES:vg,SET_LOADING:pg,SET_NOT_LOADING:mg,TOGGLE_ASSOCIATIONS:Ic,TOGGLE_COVER:Rg,TOGGLE_FETCHING_DOMAIN:Eg,TOGGLE_FETCHING_SOURCES:xg,TOGGLE_INFOPOPUP:Cg,TOGGLE_INTROPOPUP:Ag,TOGGLE_LANGUAGE:kg,TOGGLE_NOTIFICATIONS:Pg,TOGGLE_SATELLITE_VIEW:JS,TOGGLE_SHAPES:hg,TOGGLE_SITES:Sg,TOGGLE_TILE_OVERLAY:Ig,UPDATE_COLORING_SET:Oc,UPDATE_DIMENSIONS:yg,UPDATE_DISTRICT:qS,UPDATE_DOMAIN:cg,UPDATE_HIGHLIGHTED:dg,UPDATE_MAP_VIEW:No,UPDATE_NARRATIVE:_g,UPDATE_NARRATIVE_STEP_IDX:wg,UPDATE_SEARCH_QUERY:Ng,UPDATE_SELECTED:Rc,UPDATE_SOURCE:bg,UPDATE_TICKS:Tg,UPDATE_TIMERANGE:Nc,clearFilter:OD,closeToolbar:WD,fetchDomain:AD,fetchError:WS,fetchSource:LD,fetchSourceError:Ip,markNotificationsRead:YD,rehydrateState:e$,setInitialCategories:YS,setInitialShapes:KS,setLoading:ZS,setNotLoading:GS,toggleAssociations:MD,toggleCover:KD,toggleFetchingDomain:Wl,toggleFetchingSources:Rp,toggleInfoPopup:qD,toggleIntroPopup:ZD,toggleLanguage:VD,toggleNotifications:GD,toggleSatelliteView:JD,toggleShapes:DD,toggleSites:HD,toggleTileOverlay:XD,updateColoringSet:UD,updateDimensions:FD,updateDistrict:ND,updateDomain:PD,updateHighlighted:RD,updateMapView:t$,updateNarrative:jD,updateNarrativeStepIdx:zD,updateSearchQuery:QD,updateSelected:ID,updateSource:BD,updateTicks:XS,updateTimeRange:$D},Symbol.toStringTag,{value:"Module"}));var Ou="NOT_FOUND";function n$(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Ou},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function r$(e,t){var n=[];function r(l){var d=n.findIndex(function(_){return t(l,_.key)});if(d>-1){var y=n[d];return d>0&&(n.splice(d,1),n.unshift(y)),y.value}return Ou}function i(l,d){r(l)===Ou&&(n.unshift({key:l,value:d}),n.length>e&&n.pop())}function s(){return n}function a(){n=[]}return{get:r,put:i,getEntries:s,clear:a}}var i$=function(t,n){return t===n};function o$(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,s=0;s1?t-1:0),r=1;re.domain.events,tE=e=>e.domain.associations.filter(t=>t.mode===Yn.CATEGORY),c$=e=>e.domain.associations.filter(t=>t.mode===Yn.NARRATIVE),nE=e=>e.app.associations.narrative,Dg=e=>e.app.selected,d$=e=>e.domain.sites,$g=e=>e.domain.sources,f$=e=>e.domain.regions,h$=e=>e.domain.shapes,rE=e=>e.domain.associations.filter(t=>t.mode===Yn.FILTER),Fg=e=>e.app.associations.filters,jg=e=>e.app.associations.categories,iE=e=>e.app.shapes,p$=e=>e.app.associations.coloringSet,oE=e=>e.app.timeline.range,m$=e=>e.app.timeline.dimensions,hr=e=>e.features,g$=e=>e.ui.eventRadius,v$=e=>e.ui.tiles.current,y$=e=>e.ui.tiles.current===e.ui.tiles.satellite,_$=e=>e.app.map.anchor[0],w$=e=>e.app.map.anchor[1],b$=e=>e.app.map.startZoom,T$=Lt([d$,hr],(e,t)=>t.USE_SITES?e.filter(n=>!!+n.enabled):[]);Lt([$g,hr],(e,t)=>t.USE_SOURCES?e:{});const S$=Lt([f$,hr],(e,t)=>t.USE_REGIONS?e:[]),E$=e=>e.app.timeline.range.initial,x$=e=>e.app.timeline.range.initialDaysShown,zg=Lt([oE,E$,x$],(e,t,n)=>{let r,i;return e=e.current,Array.isArray(e)&&e.length===2?[r,i]=e:Array.isArray(t)&&t.length===2?[r,i]=t:(i=new Date,r=new Date(i.getTime()-n*24*60*60*1e3)),[new Date(r),new Date(i)]}),k$=e=>e.app.timeline.range.limits,sE=Lt(k$,e=>[new Date(e.lower),new Date(e.upper||Date.now())]),Bg=Lt([eE,Fg,jg,iE,zg,hr],(e,t,n,r,i,s)=>e.reduce((a,l)=>{const y=l.associations&&l.associations.filter(w=>w.mode===Yn.FILTER).map(w=>t.includes(Lc(w))).some(w=>w)||t.length===0||t.length===0,_=l.associations&&l.associations.filter(w=>w.mode===Yn.CATEGORY).map(w=>n.includes(w.title)).some(w=>w)||n.length===0;let c=u$(l,i);c=s.GRAPH_NONLOCATED&&!l.latitude&&!l.longitude||c;const f=l.shape&&r.includes(l.shape.id);return l.type===$S?f&&_&&c&&(a[l.id]={...l}):y&&_&&c&&(a[l.id]={...l}),a},[])),C$=Lt([Bg],(e,t)=>e.reduce(n=>n+1,0)),Ug=Lt([eE,c$,$g,hr],(e,t,n,r)=>{if(Array.isArray(t)&&t.length===0)return[];const i={},s=a=>({id:a,steps:[]});return e.forEach(a=>{a.associations.forEach(l=>{const d=t.find(y=>y.id===l);if(d){const{id:y}=d;i[y]||(i[y]=s(y)),i[y].steps.push(ag(n)(a))}})}),Object.keys(i).forEach(a=>{i[a].steps.sort((y,_)=>y.datetime-_.datetime);const d=t.find(y=>y.id===a);d&&(i[a]={...d,...i[a]})}),t.map(a=>i[a.id]).filter(a=>a)}),aE=Lt([Dg,nE],(e,t)=>{if(t===null)return-1;const n=e[0];let r;return t.steps.forEach((i,s)=>{n.id===i.id&&(r=s)}),r}),lE=Lt([nE,aE],(e,t)=>e?{...e,current:t}:null),A$=Lt([Bg],e=>{const t={};return e.forEach(n=>{const{latitude:r,longitude:i}=n;if(!La(r)||!Ra(i))return;const s=`${n.location}$_${n.latitude}_${n.longitude}`;t[s]?t[s].events.push(n):t[s]={label:s,events:[n],id:n.id,latitude:n.latitude,longitude:n.longitude}}),Object.values(t)}),uE=Lt([Bg,hr,g$],(e,t,n)=>{if(!t.GRAPH_NONLOCATED)return[e,[]];const r=2*n,i=t.GRAPH_NONLOCATED.projectIdx||0,s=_=>_.filters[i],a={};e=e.reduce((_,c)=>{const f=c.filters.length>=1&&!c.latitude&&!c.longitude?s(c):null;return f!==null&&(a.hasOwnProperty(f)?(a[f].start=mD(a[f].start,c.datetime),a[f].end=gD(a[f].end,c.datetime)):a[f]={start:c.datetime,end:c.datetime,key:f,category:c.category}),_.push({...c,project:f}),_},[]);const l=Object.values(a);l.sort((_,c)=>_.start-c.start);const d=Object.keys(a).map((_,c)=>null),y=l.reduce((_,c,f)=>{d.forEach((v,m)=>{v!==null&&a[v].ende[0]),L$=Lt([uE,hr],(e,t)=>t.GRAPH_NONLOCATED?e[1]:[]),Hg=Lt([Dg,$g],(e,t)=>e.length===0?[]:e.map(ag(t))),Np=Lt([m$],e=>({...e,trackHeight:e.contentHeight-50})),cE=Lt([rE],e=>e.reduce((t,n)=>(t[Lc(n)]=n.id,t),{})),R$=Lt([p$,cE],(e,t)=>e.map(n=>dE(n,t).join(","))),I$=Lt([Fg,cE],(e,t)=>dE(e,t));function dE(e,t){return e.reduce((n,r)=>{const i=t[r];return i&&n.push(i),n},[])}const Et={NUMBER:"NUMBER",NUMBER_ARRAY:"NUMBER_ARRAY",STRING:"STRING",STRING_ARRAY:"STRING_ARRAY",DATE:"DATE",DATE_ARRAY:"DATE_ARRAY"};function w0(e){return[Et.DATE_ARRAY,Et.NUMBER_ARRAY,Et.STRING_ARRAY].includes(e.type)}const Vg=Object.freeze({id:{key:"id",trigger:Rc,type:Et.STRING_ARRAY,dehydrate(e){return Dg(e).map(({civId:t})=>t)},rehydrate(e,{id:t}){t!=null&&t.length&&(e.app.selected=t.reduce((n,r)=>{const i=e.domain.events.find(s=>s.civId===r);return i?n.push(i):console.warn(`event ${r} could not be rehydrated. reason: not present.`),n},[]))}},hid:{key:"hid",trigger:null,type:Et.STRING_ARRAY,dehydrate(){return[]},rehydrate(e,{hid:t}){t!=null&&t.length&&(e.app.highlighted=t)}},range:{key:"range",trigger:Nc,type:Et.DATE_ARRAY,dehydrate(e){return oE(e)},rehydrate(e,{range:t}){if((t==null?void 0:t.length)===2){const n=Array.from(t);n.sort((r,i)=>new Date(r)-new Date(i)),e.app.timeline={...e.app.timeline,range:{...e.app.timeline.range,current:n}}}}},filter:{key:"filter",trigger:Ic,type:Et.STRING_ARRAY,dehydrate(e){return I$(e)},rehydrate(e,{filter:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=b0(n);e.app.associations.filters=t.map(i=>r[i])}}},color:{key:"color",trigger:Oc,type:Et.STRING_ARRAY,dehydrate(e){return R$(e)},rehydrate(e,{color:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=b0(n);e.app.associations.coloringSet=t.map(i=>i.split(",").map(s=>r[s]))}}},lat:{key:"lat",trigger:No,type:Et.NUMBER,dehydrate(e){return _$(e)},rehydrate(e,{lat:t}){t!=null&&e.app.map&&(e.app.map={...e.app.map,anchor:[t,e.app.map.anchor[1]]})}},lng:{key:"lng",trigger:No,type:Et.NUMBER,dehydrate(e){return w$(e)},rehydrate(e,{lng:t}){t!=null&&e.app.map&&(e.app.map={...e.app.map,anchor:[e.app.map.anchor[0],t]})}},zoom:{key:"zoom",trigger:No,type:Et.NUMBER,dehydrate(e){return b$(e)},rehydrate(e,{zoom:t}){t!=null&&e.app.map&&(e.app.map={...e.app.map,startZoom:t})}}});function b0(e){return e.reduce((t,n)=>(t[n.id]=Lc(n),t),{})}class fE{constructor(){this.url=new URL(window.location),this.schema=Vg}delete(t){this.url.searchParams.delete(t)}set(t,n){const r=this.schema[t];if(r)if(this.delete(t),r.type===Et.DATE_ARRAY)n.current.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else if(w0(r))n.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else{const i=this._encode(r,n);i&&this.url.searchParams.set(t,i)}}serialize(){window.history.replaceState(null,"",this.url)}deserialize(){const t={};return this.url.searchParams.forEach((n,r)=>{if(t[r]!=null)return;const i=this.schema[r];i&&(t[r]=w0(i)?this.url.searchParams.getAll(r).map(s=>this._decode(i,s)):this._decode(i,this.url.searchParams.get(r)))}),t}_decode(t,n){switch(t.type){case Et.NUMBER_ARRAY:case Et.NUMBER:return+n;case Et.DATE:case Et.DATE_ARRAY:return new Date(n);default:return n==="null"||n==="undefined"?void 0:n}}_encode(t,n){switch(t.type){case Et.NUMBER_ARRAY:case Et.NUMBER:return n.toString();case Et.DATE:case Et.DATE_ARRAY:return xc(n).format("YYYY-MM-DD");default:return n}}}function N$(e){const t=new fE().deserialize();if(SD(t))return e;const n={...e};return Object.values(Vg).forEach(r=>{try{r.rehydrate(n,t)}catch(i){console.error(i)}}),n}function O$(e){return t=>n=>{const r=t(n);try{const i=Object.values(Vg).filter(s=>s.trigger===n.type);if(i.length){const s=new fE,a=e.getState();i.forEach(l=>{s.set(l.key,l.dehydrate(a))}),s.serialize()}}catch(i){console.error("error serializing url state",i)}return r}}function M$(e={},t){switch(t.type){case Mg:return N$(e);default:return e}}function at(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ni(e){return function t(n){return arguments.length===0||at(n)?t:e.apply(this,arguments)}}function Ai(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return at(n)?t:Ni(function(i){return e(n,i)});default:return at(n)&&at(r)?t:at(n)?Ni(function(i){return e(i,r)}):at(r)?Ni(function(i){return e(n,i)}):e(n,r)}}}function hE(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return at(n)?t:Ai(function(s,a){return e(n,s,a)});case 2:return at(n)&&at(r)?t:at(n)?Ai(function(s,a){return e(s,r,a)}):at(r)?Ai(function(s,a){return e(n,s,a)}):Ni(function(s){return e(n,r,s)});default:return at(n)&&at(r)&&at(i)?t:at(n)&&at(r)?Ai(function(s,a){return e(s,a,i)}):at(n)&&at(i)?Ai(function(s,a){return e(s,r,a)}):at(r)&&at(i)?Ai(function(s,a){return e(n,s,a)}):at(n)?Ni(function(s){return e(s,r,i)}):at(r)?Ni(function(s){return e(n,s,i)}):at(i)?Ni(function(s){return e(n,r,s)}):e(n,r,i)}}}function kl(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function T0(e){return Object.prototype.toString.call(e)==="[object Object]"}var D$=hE(function(t,n,r){var i={},s;for(s in n)kl(s,n)&&(i[s]=kl(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)kl(s,r)&&!kl(s,i)&&(i[s]=r[s]);return i}),$$=hE(function e(t,n,r){return D$(function(i,s,a){return T0(s)&&T0(a)?e(t,s,a):t(i,s,a)},n,r)}),F$=Ai(function(t,n){return $$(function(r,i,s){return i},t,n)});const Wg=F$,$s={fa_red:"#eb443e",yellow:"#ffd800",black:"#000",white:"#fff"},qn={fallbackEventColor:$s.fa_red,darkBackground:$s.black,primaryHighlight:$s.fa_red,secondaryHighlight:$s.white},ze={"es-MX":{tiles:{default:"Mapa",satellite:"Sat"},loading:"Cargando...",legend:{view2d:{paragraphs:["Seleccionando una serie de filtros verá aparecer eventos en el mapa y en la línea del tiempo.","Cada evento estará coloreado según la persona que dio el testimonio del evento."],colors:[{class:"category_group00",label:"Categoría Grupo 00"},{class:"category_group01",label:"Categoría Grupo 01"},{class:"category_group02",label:"Categoría Grupo 02"},{class:"category_group03",label:"Categoría Grupo 03"},{class:"other",label:"Otras categorías"}]},default:{header:"Ayudas para explorar la plataforma",intro:["Cada **punto** representa un **evento en los datos** (o cada incidente). Al hacer clic en cada punto se ven los detalles del evento. Pero si le da clic en un **grupo** de puntos, verá cuantos eventos hay en ese grupo.","Puede acercarse en el mapa *(zoom)* haciendo *scroll* con el ratón o haciendo clic en un grupo de puntos.","Puede usar **filtros** para segmentar los datos. En el mapa sólo vemos los puntos relacionados con cada filtro seleccionado. Cuando no hay filtros seleccionados, vemos todos los puntos de la base de datos en el mapa.","Al seleccionar más de un filtro se introducen diferentes colores para diferenciarlos. Esto permite comparar los tipos de incidentes tanto en el mapa, como en la línea de tiempo. Esto sirve con un máximo de 6 filtros-colores.","Con el teclado puede usar las flechas de la derecha e izquierda para moverse entre eventos. También puede hacer clic y arrastrar la línea de tiempo hacia los lados para modificar el rango de tiempo."],notation:"Cuando un circulo combina colores significa que hay varios eventos en esa misma ubicación.",arrows:"Usar las flechas izquierda/derecha en el teclado para moverse entre eventos cronológicamente."}},toolbar:{title:"Título",filters:"Filtros",explore_by_filter__title:"Explorar por filtros",explore_by_filter__description:"Al seleccionar filtros, puede ver los eventos que tienen esa categoria. Para ver todos los eventos puede quitar todas las selecciones (o seleccionarlos todos).",panels:{mentions:{title:"Personas",overview:"Seleccionar los nombres de personas mostrará eventos en los que esta persona o organización ha sido mencionada, incluyendo el propio testimonio. Entre paréntesis encontrará el número de menciones. Ej. (34)."},categories:{title:"Testimonios",overview:"Seleccionar el nombre de una persona mostrará los eventos descritos por su testimonio. Entre paréntesis encontrará el número de eventos descritos. Ej. (34)."},search:{title:"Directorio de etiquetas",placeholder:"Búsqueda"}}},timeline:{zoomLevels:[{label:"20 años",duration:10512e3},{label:"2 años",duration:1051200},{label:"3 meses",duration:129600},{label:"3 días",duration:4320},{label:"12 horas",duration:720},{label:"1 hora",duration:60}],labels_title:"Testimonios",labels:["Testimonio Grupo 00","Testimonio Grupo 01","Testimonio Grupo 02","Testimonio Grupo 03","Otras categorias"],info:"%n eventos ocurridos entre",default_categories_label:"Eventos"},cardstack:{date_title:"Fecha incidente",location_title:"Ubicación",summary_title:"Resumen",header:"eventos seleccionados",unknown_location:"Ubicación desconocida",unknown_time:"Día y hora desconocida",timestamp:"Día y hora",estimated:"aproximado",location:"Ubicación",incident_type:"Tipo de acción",description:"Hechos",people:"Personas en el evento",sources:"Fuentes",category:"Según el testimonio de",communication:"Comunicación",transmitter:"Transmisor",receiver:"Receptor",warning:"(!) HECHOS CUESTIONADOS"}},"en-US":{tiles:{default:"Map",satellite:"Sat"},loading:"Loading...",legend:{view2d:{paragraphs:["Selecting a series of filters, you will be able to explore events on the map of Iguala and on the timeline.","Each event is colored according the person that gave category of the event."],colors:[{class:"category_group00",label:"Category Group 00"},{class:"category_group01",label:"Category Group 01"},{class:"category_group02",label:"Category Group 02"},{class:"category_group03",label:"Category Group 03"},{class:"other",label:"Other categories"}]},default:{header:"Navigating the Platform",intro:["Each small **dot** represents a **datapoint**, or incident. Click on a dot to see details. Hover over a larger ‘**cluster**’ dot to see how many events it represents.","Zoom in either with a mouse-scroll or by clicking a ‘cluster’ dot.","Use **filters** and **categories** to segment the data. Selecting certain filters and categories will show only the datapoints that relate to them. If no filters or categories are selected, all the datapoints are displayed.","Selecting more than one filter will introduce colour-coded datapoints, which allow you to compare types of incident across time and space. This feature works up to a maximum of six filters.","Once you have clicked on an event, use the left and right arrows to move back and forward day by day. You can also click and drag anywhere on the timeline. Use the handles on the right to select a date range."],notation:"Combinations of colours within a circle indicate multiple events in a single location.",arrows:"Use the left/right arrows on the keboard to move back and forth between events in time."}},toolbar:{title:"TITLE",panels:{mentions:{title:"Mentions",overview:"Selecting the names of people/organisation will show events in which these have been mentioned in their own testimony and by others. The number in the parentheses shows how many events contain a mention of a person or organisation, e.g. (34)"},categories:{title:"Testimonies",overview:"Selecting the name of a person will show the events only according to a person’s category or category. The number in the parentheses show how many events are contained in each category, e.g. (34)."},search:{title:"Directory of filters",placeholder:"Search"}},narratives:"Narratives",narratives_label:"Narratives",explore_by_narrative__title:"Explore events by narrative",explore_by_narrative__description:"Follow a path through the data, from one key event to the next.",filters:"Filters",filters_label:"Filters",explore_by_filter__title:"Explore by filter",explore_by_filter__description:"'Filters' refer to the types of incident. Select multiple filters to introduce colour-coding, up to a maximum of four filters.

If no filters are selected, all datapoints are displayed.",categories:"Categories",categories_label:"Categories",explore_by_category__title:"Explore events by category",explore_by_category__description:"",shapes:"Shapes",shapes_label:"Shapes",explore_by_shapes__title:"Explore events by shape breakdown",explore_by_shape__description:"Shapes map to a given type of event that appears on the timeline.

Select the shape marker to toggle this type of event on / off",fullscreen_enter:"Fullscreen",fullscreen_exit:"Exit Fullscreen",download:{button:"Download",panel:{title:"Download events",description:"Export the most recent available events in different formats.",formats:{api:{label:"API",description:"An API endpoint where you can always fetch the entire dataset in JSON format with tools like curl. Useful for integrating the data in other services and visualizaitons."},csv:{label:"CSV",description:"CSV file where sources and filters are concatenated into a single column each due to data structure limitations."},json:{label:"JSON",description:"JSON file where each event is a structured object containing nested arrays of sources and filters."}}}}},timeline:{labels_title:"Testimonies",labels:["Testimony Group 00","Testimony Group 01","Testimony Group 02","Testimony Group 03","Other"],info:"Showing %n events that occurred between",reset:"reset dates",default_categories_label:""},cardstack:{header:"selected events",timestamp:"Day and time",unknown_location:"Unknown location",estimated:"estimated",unknown_time:"Unknown time",location:"Localization",incident_type:"Type of action",description:"Summary",filters:"Filters",nofilters:"No known filters for this event.",sources:"Sources",unknown_source:"The information for this source could not be retrieved.",category:"Category",communication:"Communication",transmitter:"Transmitter",receiver:"Receiver",warning:"(!) Highly questioned"}}},af=window.innerHeight<800,j$={anchor:[31.356397,34.784818],startZoom:11,minZoom:2,maxZoom:16,bounds:null,maxBounds:[[180,-180],[-180,180]]},z$={},S0={domain:{events:[],categories:[],associations:[],sources:{},sites:[],shapes:[],regions:[],notifications:[]},app:{debug:!0,errors:{source:!1},highlighted:[],selected:[],source:null,associations:{coloringSet:[],filters:[],narrative:null,categories:[],views:{events:!0,routes:!1,sites:!0}},shapes:[],language:"en-US",cluster:{radius:30,minZoom:2,maxZoom:16},timeline:{dimensions:{ticks:15,height:af?170:250,width:0,marginLeft:20,marginTop:af?5:10,marginBottom:60,contentHeight:af?160:200,width_controls:100},range:{current:null},zoomLevels:ze[ht].timeline.zoomLevels||[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}]},flags:{isFetchingDomain:!1,isFetchingSources:!1,isCover:!0,isCardstack:!0,isInfopopup:!1,isIntropopup:!1,isShowingSites:!0},cover:{title:"project title",description:`A description of the project goes here. +`)},_domwindow:function(){return A("domwindow")},_bigint:function(C){return A("bigint:"+C.toString())},_process:function(){return A("process")},_timer:function(){return A("timer")},_pipe:function(){return A("pipe")},_tcp:function(){return A("tcp")},_udp:function(){return A("udp")},_tty:function(){return A("tty")},_statwatcher:function(){return A("statwatcher")},_securecontext:function(){return A("securecontext")},_connection:function(){return A("connection")},_zlib:function(){return A("zlib")},_context:function(){return A("context")},_nodescript:function(){return A("nodescript")},_httpparser:function(){return A("httpparser")},_dataview:function(){return A("dataview")},_signal:function(){return A("signal")},_fsevent:function(){return A("fsevent")},_tlswrap:function(){return A("tlswrap")}}}function x(){return{buf:"",write:function(k){this.buf+=k},end:function(k){this.buf+=k},read:function(){return this.buf}}}i.writeToStream=function(k,P,E){return E===void 0&&(E=P,P={}),T(P=p(k,P),E).dispatch(k)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){(function(v){var m=typeof Uint8Array<"u"?Uint8Array:Array,b="+".charCodeAt(0),g="/".charCodeAt(0),p="0".charCodeAt(0),h="a".charCodeAt(0),T="A".charCodeAt(0),x="-".charCodeAt(0),k="_".charCodeAt(0);function P(E){return E=E.charCodeAt(0),E===b||E===x?62:E===g||E===k?63:E>16),B((65280&C)>>8),B(255&C);return N==2?B(255&(C=P(E.charAt(A))<<2|P(E.charAt(A+1))>>4)):N==1&&(B((C=P(E.charAt(A))<<10|P(E.charAt(A+1))<<4|P(E.charAt(A+2))>>2)>>8&255),B(255&C)),$},v.fromByteArray=function(E){var A,C,N,$,F=E.length%3,z="";function B(H){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(H)}for(A=0,N=E.length-F;A>18&63)+B($>>12&63)+B($>>6&63)+B(63&$);switch(F){case 1:z=(z+=B((C=E[E.length-1])>>2))+B(C<<4&63)+"==";break;case 2:z=(z=(z+=B((C=(E[E.length-2]<<8)+E[E.length-1])>>10))+B(C>>4&63))+B(C<<2&63)+"="}return z}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(s,a,b,d,y,_,c,f,w){var v=n("base64-js"),m=n("ieee754");function b(O,j,W){if(!(this instanceof b))return new b(O,j,W);var Z,Q,ee,ve,se=typeof O;if(j==="base64"&&se=="string")for(O=(ve=O).trim?ve.trim():ve.replace(/^\s+|\s+$/g,"");O.length%4!=0;)O+="=";if(se=="number")Z=V(O);else if(se=="string")Z=b.byteLength(O,j);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");Z=V(O.length)}if(b._useTypedArrays?Q=b._augment(new Uint8Array(Z)):((Q=this).length=Z,Q._isBuffer=!0),b._useTypedArrays&&typeof O.byteLength=="number")Q._set(O);else if(Y(ve=O)||b.isBuffer(ve)||ve&&typeof ve=="object"&&typeof ve.length=="number")for(ee=0;ee>8,ve=ve%256,se.push(ve),se.push(ee);return se}(j),O,W,Z)}function h(O,j,W){var Z="";W=Math.min(O.length,W);for(var Q=j;Q>>0)):(j+1>>0),Q}function k(O,j,W,Z){if(Z||(ne(typeof W=="boolean","missing or invalid endian"),ne(j!=null,"missing offset"),ne(j+1>>8*(Z?ee:1-ee)}function N(O,j,W,Z,Q){if(Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(W!=null,"missing offset"),ne(W+3>>8*(Z?ee:3-ee)&255}function $(O,j,W,Z,Q){Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(W!=null,"missing offset"),ne(W+1this.length&&(Z=this.length);var Q=(Z=O.length-j=this.length))return this[O]},b.prototype.readUInt16LE=function(O,j){return T(this,O,!0,j)},b.prototype.readUInt16BE=function(O,j){return T(this,O,!1,j)},b.prototype.readUInt32LE=function(O,j){return x(this,O,!0,j)},b.prototype.readUInt32BE=function(O,j){return x(this,O,!1,j)},b.prototype.readInt8=function(O,j){if(j||(ne(O!=null,"missing offset"),ne(O=this.length))return 128&this[O]?-1*(255-this[O]+1):this[O]},b.prototype.readInt16LE=function(O,j){return k(this,O,!0,j)},b.prototype.readInt16BE=function(O,j){return k(this,O,!1,j)},b.prototype.readInt32LE=function(O,j){return P(this,O,!0,j)},b.prototype.readInt32BE=function(O,j){return P(this,O,!1,j)},b.prototype.readFloatLE=function(O,j){return E(this,O,!0,j)},b.prototype.readFloatBE=function(O,j){return E(this,O,!1,j)},b.prototype.readDoubleLE=function(O,j){return A(this,O,!0,j)},b.prototype.readDoubleBE=function(O,j){return A(this,O,!1,j)},b.prototype.writeUInt8=function(O,j,W){W||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(this[j]=O)},b.prototype.writeUInt16LE=function(O,j,W){C(this,O,j,!0,W)},b.prototype.writeUInt16BE=function(O,j,W){C(this,O,j,!1,W)},b.prototype.writeUInt32LE=function(O,j,W){N(this,O,j,!0,W)},b.prototype.writeUInt32BE=function(O,j,W){N(this,O,j,!1,W)},b.prototype.writeInt8=function(O,j,W){W||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(0<=O?this.writeUInt8(O,j,W):this.writeUInt8(255+O+1,j,W))},b.prototype.writeInt16LE=function(O,j,W){$(this,O,j,!0,W)},b.prototype.writeInt16BE=function(O,j,W){$(this,O,j,!1,W)},b.prototype.writeInt32LE=function(O,j,W){F(this,O,j,!0,W)},b.prototype.writeInt32BE=function(O,j,W){F(this,O,j,!1,W)},b.prototype.writeFloatLE=function(O,j,W){z(this,O,j,!0,W)},b.prototype.writeFloatBE=function(O,j,W){z(this,O,j,!1,W)},b.prototype.writeDoubleLE=function(O,j,W){B(this,O,j,!0,W)},b.prototype.writeDoubleBE=function(O,j,W){B(this,O,j,!1,W)},b.prototype.fill=function(O,j,W){if(j=j||0,W=W||this.length,ne(typeof(O=typeof(O=O||0)=="string"?O.charCodeAt(0):O)=="number"&&!isNaN(O),"value is not a number"),ne(j<=W,"end < start"),W!==j&&this.length!==0){ne(0<=j&&j"},b.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(b._useTypedArrays)return new b(this).buffer;for(var O=new Uint8Array(this.length),j=0,W=O.length;j=j.length||Q>=O.length);Q++)j[Q+W]=O[Q];return Q}function fe(O){try{return decodeURIComponent(O)}catch{return String.fromCharCode(65533)}}function de(O,j){ne(typeof O=="number","cannot write a non-number as a number"),ne(0<=O,"specified a negative value for writing an unsigned value"),ne(O<=j,"value is larger than maximum value for type"),ne(Math.floor(O)===O,"value has a fractional component")}function ue(O,j,W){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(W<=O,"value smaller than minimum allowed value"),ne(Math.floor(O)===O,"value has a fractional component")}function be(O,j,W){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(W<=O,"value smaller than minimum allowed value")}function ne(O,j){if(!O)throw new Error(j||"Failed assertion")}b._augment=function(O){return O._isBuffer=!0,O._get=O.get,O._set=O.set,O.get=H.get,O.set=H.set,O.write=H.write,O.toString=H.toString,O.toLocaleString=H.toString,O.toJSON=H.toJSON,O.copy=H.copy,O.slice=H.slice,O.readUInt8=H.readUInt8,O.readUInt16LE=H.readUInt16LE,O.readUInt16BE=H.readUInt16BE,O.readUInt32LE=H.readUInt32LE,O.readUInt32BE=H.readUInt32BE,O.readInt8=H.readInt8,O.readInt16LE=H.readInt16LE,O.readInt16BE=H.readInt16BE,O.readInt32LE=H.readInt32LE,O.readInt32BE=H.readInt32BE,O.readFloatLE=H.readFloatLE,O.readFloatBE=H.readFloatBE,O.readDoubleLE=H.readDoubleLE,O.readDoubleBE=H.readDoubleBE,O.writeUInt8=H.writeUInt8,O.writeUInt16LE=H.writeUInt16LE,O.writeUInt16BE=H.writeUInt16BE,O.writeUInt32LE=H.writeUInt32LE,O.writeUInt32BE=H.writeUInt32BE,O.writeInt8=H.writeInt8,O.writeInt16LE=H.writeInt16LE,O.writeInt16BE=H.writeInt16BE,O.writeInt32LE=H.writeInt32LE,O.writeInt32BE=H.writeInt32BE,O.writeFloatLE=H.writeFloatLE,O.writeFloatBE=H.writeFloatBE,O.writeDoubleLE=H.writeDoubleLE,O.writeDoubleBE=H.writeDoubleBE,O.fill=H.fill,O.inspect=H.inspect,O.toArrayBuffer=H.toArrayBuffer,O}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(s,a,v,d,y,_,c,f,w){var v=n("buffer").Buffer,m=4,b=new v(m);b.fill(0),r.exports={hash:function(g,p,h,T){for(var x=p(function(C,N){C.length%m!=0&&($=C.length+(m-C.length%m),C=v.concat([C,b],$));for(var $,F=[],z=N?C.readInt32BE:C.readInt32LE,B=0;Bh?U=H(U):U.length>5]|=128<>>9<<4)]=P;for(var E=1732584193,A=-271733879,C=-1732584194,N=271733878,$=0;$>>32-C,E)}function g(k,P,E,A,C,N,$){return b(P&E|~P&A,k,P,C,N,$)}function p(k,P,E,A,C,N,$){return b(P&A|E&~A,k,P,C,N,$)}function h(k,P,E,A,C,N,$){return b(P^E^A,k,P,C,N,$)}function T(k,P,E,A,C,N,$){return b(E^(P|~A),k,P,C,N,$)}function x(k,P){var E=(65535&k)+(65535&P);return(k>>16)+(P>>16)+(E>>16)<<16|65535&E}r.exports=function(k){return v.hash(k,m,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){r.exports=function(v){for(var m,b=new Array(v),g=0;g>>((3&g)<<3)&255;return b}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){var v=n("./helpers");function m(p,h){p[h>>5]|=128<<24-h%32,p[15+(h+64>>9<<4)]=h;for(var T,x,k,P=Array(80),E=1732584193,A=-271733879,C=-1732584194,N=271733878,$=-1009589776,F=0;F>16)+(h>>16)+(T>>16)<<16|65535&T}function g(p,h){return p<>>32-h}r.exports=function(p){return v.hash(p,m,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){function v(h,T){var x=(65535&h)+(65535&T);return(h>>16)+(T>>16)+(x>>16)<<16|65535&x}function m(h,T){var x,k=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),P=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);h[T>>5]|=128<<24-T%32,h[15+(T+64>>9<<4)]=T;for(var A,C,N=0;N>>T|h<<32-T},p=function(h,T){return h>>>T};r.exports=function(h){return b.hash(h,m,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){i.read=function(v,m,b,g,N){var h,T,x=8*N-g-1,k=(1<>1,E=-7,A=b?N-1:0,C=b?-1:1,N=v[m+A];for(A+=C,h=N&(1<<-E)-1,N>>=-E,E+=x;0>=-E,E+=g;0>1,A=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=g?0:$-1,N=g?1:-1,$=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(x=isNaN(m)?1:0,T=P):(T=Math.floor(Math.log(m)/Math.LN2),m*(g=Math.pow(2,-T))<1&&(T--,g*=2),2<=(m+=1<=T+E?A/g:A*Math.pow(2,1-E))*g&&(T++,g/=2),P<=T+E?(x=0,T=P):1<=T+E?(x=(m*g-1)*Math.pow(2,p),T+=E):(x=m*Math.pow(2,E-1)*Math.pow(2,p),T=0));8<=p;v[b+C]=255&x,C+=N,x/=256,p-=8);for(T=T<t?1:e>=t?0:NaN}function P2(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function qm(e){let t,n,r;e.length!==2?(t=Ul,n=(l,d)=>Ul(e(l),d),r=(l,d)=>e(l)-d):(t=e===Ul||e===P2?e:L2,n=e,r=e);function i(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<0?y=c+1:_=c}while(y<_)}return y}function s(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<=0?y=c+1:_=c}while(y<_)}return y}function a(l,d,y=0,_=l.length){const c=i(l,d,y,_-1);return c>y&&r(l[c-1],d)>-r(l[c],d)?c-1:c}return{left:i,center:a,right:s}}function L2(){return 0}function R2(e){return e===null?NaN:+e}const I2=qm(Ul),N2=I2.right;qm(R2).center;const O2=N2;var M2=Math.sqrt(50),D2=Math.sqrt(10),$2=Math.sqrt(2);function M_(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),s=r/i;return s>=M2?i*=10:s>=D2?i*=5:s>=$2&&(i*=2),t+e(t)}function B2(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function H2(){return!this.__axis}function V2(e,t){var n=[],r=null,i=null,s=6,a=6,l=3,d=typeof window<"u"&&window.devicePixelRatio>1?0:.5,y=e===Kd||e===wl?-1:1,_=e===wl||e===Xd?"x":"y",c=e===Kd||e===wp?j2:z2;function f(w){var v=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):F2),b=Math.max(s,0)+l,g=t.range(),p=+g[0]+d,h=+g[g.length-1]+d,T=(t.bandwidth?B2:U2)(t.copy(),d),x=w.selection?w.selection():w,k=x.selectAll(".domain").data([null]),P=x.selectAll(".tick").data(v,t).order(),E=P.exit(),A=P.enter().append("g").attr("class","tick"),C=P.select("line"),N=P.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(A),C=C.merge(A.append("line").attr("stroke","currentColor").attr(_+"2",y*s)),N=N.merge(A.append("text").attr("fill","currentColor").attr(_,y*b).attr("dy",e===Kd?"0em":e===wp?"0.71em":"0.32em")),w!==x&&(k=k.transition(w),P=P.transition(w),C=C.transition(w),N=N.transition(w),E=E.transition(w).attr("opacity",D_).attr("transform",function($){return isFinite($=T($))?c($+d):this.getAttribute("transform")}),A.attr("opacity",D_).attr("transform",function($){var F=this.parentNode.__axis;return c((F&&isFinite(F=F($))?F:T($))+d)})),E.remove(),k.attr("d",e===wl||e===Xd?a?"M"+y*a+","+p+"H"+d+"V"+h+"H"+y*a:"M"+d+","+p+"V"+h:a?"M"+p+","+y*a+"V"+d+"H"+h+"V"+y*a:"M"+p+","+d+"H"+h),P.attr("opacity",1).attr("transform",function($){return c(T($)+d)}),C.attr(_+"2",y*s),N.attr(_,y*b).text(m),x.filter(H2).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Xd?"start":e===wl?"end":"middle"),x.each(function(){this.__axis=T})}return f.scale=function(w){return arguments.length?(t=w,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(w){return arguments.length?(n=w==null?[]:Array.from(w),f):n.slice()},f.tickValues=function(w){return arguments.length?(r=w==null?null:Array.from(w),f):r&&r.slice()},f.tickFormat=function(w){return arguments.length?(i=w,f):i},f.tickSize=function(w){return arguments.length?(s=a=+w,f):s},f.tickSizeInner=function(w){return arguments.length?(s=+w,f):s},f.tickSizeOuter=function(w){return arguments.length?(a=+w,f):a},f.tickPadding=function(w){return arguments.length?(l=+w,f):l},f.offset=function(w){return arguments.length?(d=+w,f):d},f}function $_(e){return V2(wp,e)}var W2={value:()=>{}};function Zm(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Bl.prototype=Zm.prototype={constructor:Bl,on:function(e,t){var n=this._,r=q2(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),r=0,i,s;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),j_.hasOwnProperty(t)?{space:j_[t],local:e}:e}function G2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bp&&t.documentElement.namespaceURI===bp?t.createElement(e):t.createElementNS(n,e)}}function Y2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function oS(e){var t=kc(e);return(t.local?Y2:G2)(t)}function K2(){}function Gm(e){return e==null?K2:function(){return this.querySelector(e)}}function X2(e){typeof e!="function"&&(e=Gm(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=h&&(h=p+1);!(x=b[h])&&++h=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function TR(e){e||(e=SR);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;st?1:e>=t?0:NaN}function ER(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xR(){return Array.from(this)}function kR(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?$R:typeof t=="function"?jR:FR)(e,t,n??"")):Ho(this.node(),e)}function Ho(e,t){return e.style.getPropertyValue(t)||cS(e).getComputedStyle(e,null).getPropertyValue(t)}function UR(e){return function(){delete this[e]}}function BR(e,t){return function(){this[e]=t}}function HR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function VR(e,t){return arguments.length>1?this.each((t==null?UR:typeof t=="function"?HR:BR)(e,t)):this.node()[e]}function dS(e){return e.trim().split(/^|\s+/)}function Ym(e){return e.classList||new fS(e)}function fS(e){this._node=e,this._names=dS(e.getAttribute("class")||"")}fS.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function hS(e,t){for(var n=Ym(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function yI(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n()=>e;function Tp(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:a,y:l,dx:d,dy:y,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:_}})}Tp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LI(e){return!e.ctrlKey&&!e.button}function RI(){return this.parentNode}function II(e,t){return t??{x:e.x,y:e.y}}function NI(){return navigator.maxTouchPoints||"ontouchstart"in this}function OI(){var e=LI,t=RI,n=II,r=NI,i={},s=Zm("start","drag","end"),a=0,l,d,y,_,c=0;function f(T){T.on("mousedown.drag",w).filter(r).on("touchstart.drag",b).on("touchmove.drag",g,CI).on("touchend.drag touchcancel.drag",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(T,x){if(!(_||!e.call(this,T,x))){var k=h(this,t.call(this,T,x),T,x,"mouse");k&&(Bi(T.view).on("mousemove.drag",v,ma).on("mouseup.drag",m,ma),AI(T.view),Qd(T),y=!1,l=T.clientX,d=T.clientY,k("start",T))}}function v(T){if(Ro(T),!y){var x=T.clientX-l,k=T.clientY-d;y=x*x+k*k>c}i.mouse("drag",T)}function m(T){Bi(T.view).on("mousemove.drag mouseup.drag",null),PI(T.view,y),Ro(T),i.mouse("end",T)}function b(T,x){if(e.call(this,T,x)){var k=T.changedTouches,P=t.call(this,T,x),E=k.length,A,C;for(A=0;A>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=DI.exec(e))?new on(t[1],t[2],t[3],1):(t=$I.exec(e))?new on(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FI.exec(e))?Tl(t[1],t[2],t[3],t[4]):(t=jI.exec(e))?Tl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zI.exec(e))?Z_(t[1],t[2]/100,t[3]/100,1):(t=UI.exec(e))?Z_(t[1],t[2]/100,t[3]/100,t[4]):U_.hasOwnProperty(e)?V_(U_[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function V_(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Tl(e,t,n,r){return r<=0&&(e=t=n=NaN),new on(e,t,n,r)}function VI(e){return e instanceof Aa||(e=Hi(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function Sp(e,t,n,r){return arguments.length===1?VI(e):new on(e,t,n,r??1)}function on(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Km(on,Sp,vS(Aa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ga:Math.pow(ga,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new on(Di(this.r),Di(this.g),Di(this.b),Eu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:W_,formatHex:W_,formatHex8:WI,formatRgb:q_,toString:q_}));function W_(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function WI(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function q_(){const e=Eu(this.opacity);return`${e===1?"rgb(":"rgba("}${Di(this.r)}, ${Di(this.g)}, ${Di(this.b)}${e===1?")":`, ${e})`}`}function Eu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Di(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Di(e),(e<16?"0":"")+e.toString(16)}function Z_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hn(e,t,n,r)}function yS(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);if(e instanceof Aa||(e=Hi(e)),!e)return new Hn;if(e instanceof Hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,l=s-i,d=(s+i)/2;return l?(t===s?a=(n-r)/l+(n0&&d<1?0:a,new Hn(a,l,d,e.opacity)}function qI(e,t,n,r){return arguments.length===1?yS(e):new Hn(e,t,n,r??1)}function Hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Km(Hn,qI,vS(Aa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ga:Math.pow(ga,e),new Hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new on(Jd(e>=240?e-240:e+120,i,r),Jd(e,i,r),Jd(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Hn(G_(this.h),Sl(this.s),Sl(this.l),Eu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Eu(this.opacity);return`${e===1?"hsl(":"hsla("}${G_(this.h)}, ${Sl(this.s)*100}%, ${Sl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function G_(e){return e=(e||0)%360,e<0?e+360:e}function Sl(e){return Math.max(0,Math.min(1,e||0))}function Jd(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Xm=e=>()=>e;function ZI(e,t){return function(n){return e+n*t}}function GI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function YI(e){return(e=+e)==1?_S:function(t,n){return n-t?GI(t,n,e):Xm(isNaN(t)?n:t)}}function _S(e,t){var n=t-e;return n?ZI(e,n):Xm(isNaN(e)?t:e)}const xu=function e(t){var n=YI(t);function r(i,s){var a=n((i=Sp(i)).r,(s=Sp(s)).r),l=n(i.g,s.g),d=n(i.b,s.b),y=_S(i.opacity,s.opacity);return function(_){return i.r=a(_),i.g=l(_),i.b=d(_),i.opacity=y(_),i+""}}return r.gamma=e,r}(1);function KI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(r=r[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,d.push({i:a,x:Bn(r,i)})),n=ef.lastIndex;return n180?_+=360:_-y>180&&(y+=360),f.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Bn(y,_)})):_&&c.push(i(c)+"rotate("+_+r)}function l(y,_,c,f){y!==_?f.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Bn(y,_)}):_&&c.push(i(c)+"skewX("+_+r)}function d(y,_,c,f,w,v){if(y!==c||_!==f){var m=w.push(i(w)+"scale(",null,",",null,")");v.push({i:m-4,x:Bn(y,c)},{i:m-2,x:Bn(_,f)})}else(c!==1||f!==1)&&w.push(i(w)+"scale("+c+","+f+")")}return function(y,_){var c=[],f=[];return y=e(y),_=e(_),s(y.translateX,y.translateY,_.translateX,_.translateY,c,f),a(y.rotate,_.rotate,c,f),l(y.skewX,_.skewX,c,f),d(y.scaleX,y.scaleY,_.scaleX,_.scaleY,c,f),y=_=null,function(w){for(var v=-1,m=f.length,b;++v=0&&e._call.call(void 0,t),e=e._next;--Vo}function K_(){Vi=(Cu=ya.now())+Cc,Vo=Os=0;try{uN()}finally{Vo=0,dN(),Vi=0}}function cN(){var e=ya.now(),t=e-Cu;t>SS&&(Cc-=t,Cu=e)}function dN(){for(var e,t=ku,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ku=n);Ms=e,kp(r)}function kp(e){if(!Vo){Os&&(Os=clearTimeout(Os));var t=e-Vi;t>24?(e<1/0&&(Os=setTimeout(K_,e-ya.now()-Cc)),Ss&&(Ss=clearInterval(Ss))):(Ss||(Cu=ya.now(),Ss=setInterval(cN,SS)),Vo=1,ES(K_))}}function X_(e,t,n){var r=new Au;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var fN=Zm("start","end","cancel","interrupt"),hN=[],kS=0,Q_=1,Cp=2,Hl=3,J_=4,Ap=5,Vl=6;function Ac(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;pN(e,n,{name:t,index:r,group:i,on:fN,tween:hN,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:kS})}function eg(e,t){var n=Xn(e,t);if(n.state>kS)throw new Error("too late; already scheduled");return n}function fr(e,t){var n=Xn(e,t);if(n.state>Hl)throw new Error("too late; already running");return n}function Xn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function pN(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=xS(s,0,n.time);function s(y){n.state=Q_,n.timer.restart(a,n.delay,n.time),n.delay<=y&&a(y-n.delay)}function a(y){var _,c,f,w;if(n.state!==Q_)return d();for(_ in r)if(w=r[_],w.name===n.name){if(w.state===Hl)return X_(a);w.state===J_?(w.state=Vl,w.timer.stop(),w.on.call("interrupt",e,e.__data__,w.index,w.group),delete r[_]):+_Cp&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function WN(e,t,n){var r,i,s=VN(t)?eg:fr;return function(){var a=s(this,e),l=a.on;l!==r&&(i=(r=l).copy()).on(t,n),a.on=i}}function qN(e,t){var n=this._id;return arguments.length<2?Xn(this.node(),n).on.on(e):this.each(WN(n,e,t))}function ZN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function GN(){return this.on("end.remove",ZN(this._id))}function YN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Gm(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;at&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function EO(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i2?xO:EO,d=y=null,c}function c(f){return f==null||isNaN(f=+f)?s:(d||(d=l(e.map(r),t,n)))(r(a(f)))}return c.invert=function(f){return a(i((y||(y=l(t,e.map(r),Bn)))(f)))},c.domain=function(f){return arguments.length?(e=Array.from(f,TO),_()):e.slice()},c.range=function(f){return arguments.length?(t=Array.from(f),_()):t.slice()},c.rangeRound=function(f){return t=Array.from(f),n=rN,_()},c.clamp=function(f){return arguments.length?(a=f?!0:So,_()):a!==So},c.interpolate=function(f){return arguments.length?(n=f,_()):n},c.unknown=function(f){return arguments.length?(s=f,c):s},function(f,w){return r=f,i=w,_()}}function AO(){return CO()(So,So)}function PO(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),l=i.ceil(s);return s-a(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,l)=>{const d=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s0))return d;let y;do d.push(y=new Date(+s)),t(s,l),e(s);while(yPt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!s(a););else for(;--l>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(tf.setTime(+s),nf.setTime(+a),e(tf),e(nf),Math.floor(n(tf,nf))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Pu=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Pu);Pu.range;const kr=1e3,An=kr*60,Cr=An*60,Mr=Cr*24,ng=Mr*7,t0=Mr*30,rf=Mr*365,ei=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*kr)},(e,t)=>(t-e)/kr,e=>e.getUTCSeconds());ei.range;const Jt=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*kr)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getMinutes());Jt.range;const LO=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getUTCMinutes());LO.range;const rg=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*kr-e.getMinutes()*An)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getHours());rg.range;const RO=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getUTCHours());RO.range;const Pa=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*An)/Mr,e=>e.getDate()-1);Pa.range;const ig=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Mr,e=>e.getUTCDate()-1);ig.range;const IO=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Mr,e=>Math.floor(e/Mr));IO.range;function Ki(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*An)/ng)}const Pc=Ki(0),Lu=Ki(1),NO=Ki(2),OO=Ki(3),Wo=Ki(4),MO=Ki(5),DO=Ki(6);Pc.range;Lu.range;NO.range;OO.range;Wo.range;MO.range;DO.range;function Xi(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ng)}const LS=Xi(0),Ru=Xi(1),$O=Xi(2),FO=Xi(3),qo=Xi(4),jO=Xi(5),zO=Xi(6);LS.range;Ru.range;$O.range;FO.range;qo.range;jO.range;zO.range;const og=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());og.range;const UO=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());UO.range;const Dr=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Dr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Dr.range;const Wi=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Wi.range;function BO(e,t,n,r,i,s){const a=[[ei,1,kr],[ei,5,5*kr],[ei,15,15*kr],[ei,30,30*kr],[s,1,An],[s,5,5*An],[s,15,15*An],[s,30,30*An],[i,1,Cr],[i,3,3*Cr],[i,6,6*Cr],[i,12,12*Cr],[r,1,Mr],[r,2,2*Mr],[n,1,ng],[t,1,t0],[t,3,3*t0],[e,1,rf]];function l(y,_,c){const f=_b).right(a,f);if(w===a.length)return e.every(M_(y/rf,_/rf,c));if(w===0)return Pu.every(Math.max(M_(y,_,c),1));const[v,m]=a[f/a[w-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(ee=sf(Es(Z.y,0,1)),ve=ee.getUTCDay(),ee=ve>4||ve===0?Ru.ceil(ee):Ru(ee),ee=ig.offset(ee,(Z.V-1)*7),Z.y=ee.getUTCFullYear(),Z.m=ee.getUTCMonth(),Z.d=ee.getUTCDate()+(Z.w+6)%7):(ee=of(Es(Z.y,0,1)),ve=ee.getDay(),ee=ve>4||ve===0?Lu.ceil(ee):Lu(ee),ee=Pa.offset(ee,(Z.V-1)*7),Z.y=ee.getFullYear(),Z.m=ee.getMonth(),Z.d=ee.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),ve="Z"in Z?sf(Es(Z.y,0,1)).getUTCDay():of(Es(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(ve+5)%7:Z.w+Z.U*7-(ve+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,sf(Z)):of(Z)}}function E(O,j,W,Z){for(var Q=0,ee=j.length,ve=W.length,se,$e;Q=ve)return-1;if(se=j.charCodeAt(Q++),se===37){if(se=j.charAt(Q++),$e=x[se in n0?j.charAt(Q++):se],!$e||(Z=$e(O,W,Z))<0)return-1}else if(se!=W.charCodeAt(Z++))return-1}return Z}function A(O,j,W){var Z=y.exec(j.slice(W));return Z?(O.p=_.get(Z[0].toLowerCase()),W+Z[0].length):-1}function C(O,j,W){var Z=w.exec(j.slice(W));return Z?(O.w=v.get(Z[0].toLowerCase()),W+Z[0].length):-1}function N(O,j,W){var Z=c.exec(j.slice(W));return Z?(O.w=f.get(Z[0].toLowerCase()),W+Z[0].length):-1}function $(O,j,W){var Z=g.exec(j.slice(W));return Z?(O.m=p.get(Z[0].toLowerCase()),W+Z[0].length):-1}function F(O,j,W){var Z=m.exec(j.slice(W));return Z?(O.m=b.get(Z[0].toLowerCase()),W+Z[0].length):-1}function z(O,j,W){return E(O,t,j,W)}function B(O,j,W){return E(O,n,j,W)}function H(O,j,W){return E(O,r,j,W)}function U(O){return a[O.getDay()]}function V(O){return s[O.getDay()]}function Y(O){return d[O.getMonth()]}function G(O){return l[O.getMonth()]}function J(O){return i[+(O.getHours()>=12)]}function oe(O){return 1+~~(O.getMonth()/3)}function ce(O){return a[O.getUTCDay()]}function fe(O){return s[O.getUTCDay()]}function de(O){return d[O.getUTCMonth()]}function ue(O){return l[O.getUTCMonth()]}function be(O){return i[+(O.getUTCHours()>=12)]}function ne(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var j=k(O+="",h);return j.toString=function(){return O},j},parse:function(O){var j=P(O+="",!1);return j.toString=function(){return O},j},utcFormat:function(O){var j=k(O+="",T);return j.toString=function(){return O},j},utcParse:function(O){var j=P(O+="",!0);return j.toString=function(){return O},j}}}var n0={"-":"",_:" ",0:"0"},Mt=/^\s*\d+/,qO=/^%/,ZO=/[\\^$*+?|[\]().{}]/g;function je(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s[t.toLowerCase(),n]))}function YO(e,t,n){var r=Mt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function KO(e,t,n){var r=Mt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function XO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function QO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function JO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function r0(e,t,n){var r=Mt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function i0(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function eM(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tM(e,t,n){var r=Mt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function nM(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function o0(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function rM(e,t,n){var r=Mt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function s0(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function iM(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function oM(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sM(e,t,n){var r=Mt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function aM(e,t,n){var r=Mt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lM(e,t,n){var r=qO.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uM(e,t,n){var r=Mt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function cM(e,t,n){var r=Mt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function a0(e,t){return je(e.getDate(),t,2)}function dM(e,t){return je(e.getHours(),t,2)}function fM(e,t){return je(e.getHours()%12||12,t,2)}function hM(e,t){return je(1+Pa.count(Dr(e),e),t,3)}function RS(e,t){return je(e.getMilliseconds(),t,3)}function pM(e,t){return RS(e,t)+"000"}function mM(e,t){return je(e.getMonth()+1,t,2)}function gM(e,t){return je(e.getMinutes(),t,2)}function vM(e,t){return je(e.getSeconds(),t,2)}function yM(e){var t=e.getDay();return t===0?7:t}function _M(e,t){return je(Pc.count(Dr(e)-1,e),t,2)}function IS(e){var t=e.getDay();return t>=4||t===0?Wo(e):Wo.ceil(e)}function wM(e,t){return e=IS(e),je(Wo.count(Dr(e),e)+(Dr(e).getDay()===4),t,2)}function bM(e){return e.getDay()}function TM(e,t){return je(Lu.count(Dr(e)-1,e),t,2)}function SM(e,t){return je(e.getFullYear()%100,t,2)}function EM(e,t){return e=IS(e),je(e.getFullYear()%100,t,2)}function xM(e,t){return je(e.getFullYear()%1e4,t,4)}function kM(e,t){var n=e.getDay();return e=n>=4||n===0?Wo(e):Wo.ceil(e),je(e.getFullYear()%1e4,t,4)}function CM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+je(t/60|0,"0",2)+je(t%60,"0",2)}function l0(e,t){return je(e.getUTCDate(),t,2)}function AM(e,t){return je(e.getUTCHours(),t,2)}function PM(e,t){return je(e.getUTCHours()%12||12,t,2)}function LM(e,t){return je(1+ig.count(Wi(e),e),t,3)}function NS(e,t){return je(e.getUTCMilliseconds(),t,3)}function RM(e,t){return NS(e,t)+"000"}function IM(e,t){return je(e.getUTCMonth()+1,t,2)}function NM(e,t){return je(e.getUTCMinutes(),t,2)}function OM(e,t){return je(e.getUTCSeconds(),t,2)}function MM(e){var t=e.getUTCDay();return t===0?7:t}function DM(e,t){return je(LS.count(Wi(e)-1,e),t,2)}function OS(e){var t=e.getUTCDay();return t>=4||t===0?qo(e):qo.ceil(e)}function $M(e,t){return e=OS(e),je(qo.count(Wi(e),e)+(Wi(e).getUTCDay()===4),t,2)}function FM(e){return e.getUTCDay()}function jM(e,t){return je(Ru.count(Wi(e)-1,e),t,2)}function zM(e,t){return je(e.getUTCFullYear()%100,t,2)}function UM(e,t){return e=OS(e),je(e.getUTCFullYear()%100,t,2)}function BM(e,t){return je(e.getUTCFullYear()%1e4,t,4)}function HM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?qo(e):qo.ceil(e),je(e.getUTCFullYear()%1e4,t,4)}function VM(){return"+0000"}function u0(){return"%"}function c0(e){return+e}function d0(e){return Math.floor(+e/1e3)}var uo,Iu;MS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function MS(e){return uo=WO(e),Iu=uo.format,uo.parse,uo.utcFormat,uo.utcParse,uo}function WM(e){return new Date(e)}function qM(e){return e instanceof Date?+e:+new Date(+e)}function DS(e,t,n,r,i,s,a,l,d,y){var _=AO(),c=_.invert,f=_.domain,w=y(".%L"),v=y(":%S"),m=y("%I:%M"),b=y("%I %p"),g=y("%a %d"),p=y("%b %d"),h=y("%B"),T=y("%Y");function x(k){return(d(k)(n[e[i]]=r,n),{})}function aD(e){return typeof e<"u"&&e!==null}function p0(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lD(e,t){return e.length>t?e.substring(0,120)+"...":e}function jS(e){function t(i={},[s,...a],l){const d=Object.keys(i).find(_=>FS(_)===s);l.push(s);const y=l.join("/");return d||(i[y]={}),a.length>0&&t(i[y],a,l),i}const n=[];return e.forEach(i=>n.push(i.filter_paths)),n.reduce((i,s)=>t(i,s,[]),{})}function sg(e){const t=e.split("/"),n=[];return t.forEach((r,i)=>{const s=t.slice(0,i+1).join("/");n.push(s)}),n.pop(),n}function uD(e){const t=sg(e);return t[t.length-1]}function cD(e,t,n){function r(l,d){if(d.length===0||l==={})return{};const y=d.shift();if(Object.keys(l).includes(y)){const _=l[y];return d.length===0?_:r(_,d)}}const i=jS(e),s=sg(n),a=r(i,s);return Object.keys(a).filter(l=>l!==n)}function dD(e,t){const n=e.flatMap(i=>i),r=t.filter(i=>n.indexOf(i)===-1);return[...e,r]}function fD(e,t){return e.map(r=>r.filter(i=>!t.includes(i))).filter(r=>r.length!==0)}function zS(e,t){return e.associations.filter(r=>r.mode===Yn.CATEGORY).reduce((r,i)=>{const s=t.find(a=>a===i.title);return s&&r.push(s),r},[])}function Lc(e){return e.filter_paths.join("/")}function ag(e){return t=>{let n;return t.sources?n=t.sources.map(r=>e.hasOwnProperty(r)?e[r]:null):n=[],{...t,sources:n}}}const m0=rn.SERVER_ROOT;function Xo(e){return rn[e]?Array.isArray(rn[e])?rn[e].map(t=>`${m0}${t}`):[`${m0}${rn[e]}`]:null}function Qi(e){return t=>({...t,flags:{...t.flags,[e]:!t.flags[e]}})}function US(e){let t;switch(e=e.trim(),!0){case/\.((png)|(jpg)|(jpeg))$/.test(e):t="Image";break;case/\.(mp4)$/.test(e):t="Video";break;case/\.(md)$/.test(e):t="Text";break;case/\.(pdf)$/.test(e):t="Document";break;case/.+(twitter\.com).+/.test(e):t="Tweet";break;case/.+(t\.me).+/.test(e):t="Telegram";break;default:t="Unknown";break}return t}function hD(e,t){return{type:US(e),path:e,poster:t}}function xl(e,t){return tn(e)===tn(t)}function lg(e){return(e>=1?.9:0)+Math.min(.5,.08*(e-1))}function pD(e,t){return Math.min(.85,.08+e/t*50)}function BS(e,t){const n=t>60?60:35;return Math.min(n,10+e/t*100)}function HS(e){return e.reduce((t,n)=>(n&&n.properties&&n.properties.cluster&&(t+=n.properties.point_count),t),0)}function La(e){return!!e&&isFinite(e)&&Math.abs(e)<=90}function Ra(e){return!!e&&isFinite(e)&&Math.abs(e)<=180}function g0(e,t){return e.reduce((n,r)=>{const i=t.find(s=>s.label===r.properties.id);return i&&n.push(i),n},[])}function wa(e,t){if(t.length===0)return[1];const n={};for(const[s,a]of t.entries())for(const l of a)n[l]=s;const r=new Array(t.length);r.fill(0);let i=0;return e.forEach(s=>{let a="events"in s?s.events:s;Array.isArray(a)||(a=[a]),a.forEach(l=>{l.associations.forEach(d=>{const y=n[Lc(d)];!y&&y!==0||(r[y]+=1,i+=1)})})}),i===0?[1]:r.map(s=>s/i)}function VS(e,t){let n=-1;return t.map((r,i)=>(r.indexOf(e)!==-1&&(n=i),null)),n}const mD=function(){return Array.prototype.slice.call(arguments).reduce(function(e,t){return et?e:t})};function vD(e,t,n){let r=0,i=e.length-1;for(;r<=i;){const s=i+r>>1,a=n(t,e[s]);if(a>0)r=s+1;else if(a<0)i=s-1;else return s}return-r-1}function Lp(e){if(e===null)return null;const t=new Intl.DateTimeFormat(ht,{year:"numeric",month:"long",day:"2-digit"}),[{value:n},,{value:r},,{value:i}]=t.formatToParts(e);return`${r} ${n}, ${i}`}function yD(){const e={"es-MX":nD};ht!=="es-US"&&e[ht]&&MS(e[ht])}function _D(e,t){return e.map(r=>{const{colour:i,shape:s,id:a}=r,l={checkboxStyles:{background:t.includes(a)?i:"black",border:"none",clipPath:f0[s]},containerStyles:{background:i,clipPath:f0[s]}};return r.styles=l,r})}function wD(e,t){const n=e.reduce((i,s)=>{const a=s.filter_paths[0];return a in i||(i[a]=[]),i[a].push(s),i},{});return t.length>1?n:{default:e}}function bD(e,t){let n=t;return(e.length>1?e.filter(i=>i!=="default"):e).reduce((i,s)=>(i[s]=n,n+=1,i),{})}function TD(e,t,n){return e&&!t?1:!e&&t?n:e&&t?n+1:0}function v0(e,t){let n=document.createElement("a");n.setAttribute("href",`data:application/octet-stream;charset=utf-8,${encodeURIComponent(t)}`),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}const y0=e=>e.length===0;function SD(e){return e==null||typeof e=="object"&&!Object.keys(e).length}const ED=Xo("EVENTS_EXT"),_0=Xo("ASSOCIATIONS_EXT"),Nu=Xo("SOURCES_EXT"),xD=Xo("SITES_EXT"),kD=Xo("REGIONS_EXT"),CD=Xo("SHAPES_EXT"),As=e=>`Something went wrong fetching ${e}. Check the URL or try disabling them in the config file.`;function AD(){const e=[];function t(n){return e.push({message:n,type:"error"}),[]}return(n,r)=>{const i=r().features;n(Wl());const s=Promise.all(ED.map(c=>fetch(c).then(f=>f.json()).catch(()=>t("events")))).then(c=>c.flatMap(f=>f));let a=Promise.resolve([]);i.USE_ASSOCIATIONS&&(_0?a=fetch(_0).then(c=>c.json()).catch(()=>t(As("associations"))):a=Promise.resolve(t("USE_ASSOCIATIONS is true, but you have not provided a ASSOCIATIONS_EXT")));let l=Promise.resolve([]);i.USE_SOURCES&&(Nu?l=fetch(Nu).then(c=>c.json()).catch(()=>t(As("sources"))):l=Promise.resolve(t("USE_SOURCES is true, but you have not provided a SOURCES_EXT")));let d=Promise.resolve([]);i.USE_SITES&&(d=fetch(xD).then(c=>c.json()).catch(()=>t(As("sites"))));let y=Promise.resolve([]);i.USE_REGIONS&&(y=fetch(kD).then(c=>c.json()).catch(()=>t(As("regions"))));let _=Promise.resolve([]);return i.USE_SHAPES&&(_=fetch(CD).then(c=>c.json()).catch(()=>t(As("shapes")))),Promise.all([s,a,l,d,y,_]).then(c=>{const f={events:c[0],associations:c[1],sources:c[2],sites:c[3],regions:c[4],shapes:c[5],notifications:e};if(Object.values(f).some(w=>w.hasOwnProperty("error")))throw new Error("Some URLs returned negative. If you are in development, check the server is running");return n(Wl()),n(YS(f.associations)),n(KS(f.shapes)),f}).catch(c=>{n(WS(c.message)),n(Wl()),alert(c.message)})}}const ug="FETCH_ERROR";function WS(e){return{type:ug,message:e}}const cg="UPDATE_DOMAIN";function PD(e){return{type:cg,payload:e}}function LD(e){return t=>{Nu?(t(Rp()),fetch(`${Nu}`).then(n=>{if(n.ok)return n.json();throw new Error("No sources are available at the URL specified in the config specified.")}).catch(n=>{t(Ip(n.message)),t(Rp())})):t(Ip("No source extension specified."))}}const dg="UPDATE_HIGHLIGHTED";function RD(e){return{type:dg,highlighted:e}}const Rc="UPDATE_SELECTED";function ID(e){return{type:Rc,selected:e}}const qS="UPDATE_DISTRICT";function ND(e){return{type:qS,district:e}}const fg="CLEAR_FILTER";function OD(e){return{type:fg,filter:e}}const Ic="TOGGLE_ASSOCIATIONS";function MD(e,t,n){return{type:Ic,association:e,value:t,shouldColor:n}}const hg="TOGGLE_SHAPES";function DD(e){return{type:hg,shape:e}}const pg="SET_LOADING";function ZS(){return{type:pg}}const mg="SET_NOT_LOADING";function GS(){return{type:mg}}const gg="SET_INITIAL_CATEGORIES";function YS(e){return{type:gg,values:e}}const vg="SET_INITIAL_SHAPES";function KS(e){return{type:vg,values:e}}const Nc="UPDATE_TIMERANGE";function $D(e){return{type:Nc,timerange:e}}const yg="UPDATE_DIMENSIONS";function FD(e){return{type:yg,dims:e}}const _g="UPDATE_NARRATIVE";function jD(e){return{type:_g,narrative:e}}const wg="UPDATE_NARRATIVE_STEP_IDX";function zD(e){return{type:wg,idx:e}}const bg="UPDATE_SOURCE";function UD(e){return{type:bg,source:e}}const Oc="UPDATE_COLORING_SET";function BD(e){return{type:Oc,coloringSet:e}}const Tg="UPDATE_TICKS";function XS(e){return{type:Tg,ticks:e}}const Sg="TOGGLE_SITES";function HD(){return{type:Sg}}const Eg="TOGGLE_FETCHING_DOMAIN";function Wl(){return{type:Eg}}const xg="TOGGLE_FETCHING_SOURCES";function Rp(){return{type:xg}}const kg="TOGGLE_LANGUAGE";function VD(e){return{type:kg,language:e}}const QS="CLOSE_TOOLBAR";function WD(){return{type:QS}}const Cg="TOGGLE_INFOPOPUP";function qD(){return{type:Cg}}const Ag="TOGGLE_INTROPOPUP";function ZD(){return{type:Ag}}const Pg="TOGGLE_NOTIFICATIONS";function GD(){return{type:Pg}}const Lg="MARK_NOTIFICATIONS_READ";function YD(){return{type:Lg}}const Rg="TOGGLE_COVER";function KD(){return{type:Rg}}const Ig="TOGGLE_TILE_OVERLAY";function XD(){return{type:Ig}}const Ng="UPDATE_SEARCH_QUERY";function QD(e){return{type:Ng,searchQuery:e}}const Og="FETCH_SOURCE_ERROR";function Ip(e){return{type:Og,msg:e}}const JS="TOGGLE_SATELLITE_VIEW";function JD(){return{type:JS}}const Mg="REHYDRATE_STATE";function e$(){return{type:Mg}}const No="UPDATE_MAP_VIEW";function t$(e,t,n){return{type:No,lat:e,lng:t,zoom:n}}const Mc=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_FILTER:fg,CLOSE_TOOLBAR:QS,FETCH_ERROR:ug,FETCH_SOURCE_ERROR:Og,MARK_NOTIFICATIONS_READ:Lg,REHYDRATE_STATE:Mg,SET_INITIAL_CATEGORIES:gg,SET_INITIAL_SHAPES:vg,SET_LOADING:pg,SET_NOT_LOADING:mg,TOGGLE_ASSOCIATIONS:Ic,TOGGLE_COVER:Rg,TOGGLE_FETCHING_DOMAIN:Eg,TOGGLE_FETCHING_SOURCES:xg,TOGGLE_INFOPOPUP:Cg,TOGGLE_INTROPOPUP:Ag,TOGGLE_LANGUAGE:kg,TOGGLE_NOTIFICATIONS:Pg,TOGGLE_SATELLITE_VIEW:JS,TOGGLE_SHAPES:hg,TOGGLE_SITES:Sg,TOGGLE_TILE_OVERLAY:Ig,UPDATE_COLORING_SET:Oc,UPDATE_DIMENSIONS:yg,UPDATE_DISTRICT:qS,UPDATE_DOMAIN:cg,UPDATE_HIGHLIGHTED:dg,UPDATE_MAP_VIEW:No,UPDATE_NARRATIVE:_g,UPDATE_NARRATIVE_STEP_IDX:wg,UPDATE_SEARCH_QUERY:Ng,UPDATE_SELECTED:Rc,UPDATE_SOURCE:bg,UPDATE_TICKS:Tg,UPDATE_TIMERANGE:Nc,clearFilter:OD,closeToolbar:WD,fetchDomain:AD,fetchError:WS,fetchSource:LD,fetchSourceError:Ip,markNotificationsRead:YD,rehydrateState:e$,setInitialCategories:YS,setInitialShapes:KS,setLoading:ZS,setNotLoading:GS,toggleAssociations:MD,toggleCover:KD,toggleFetchingDomain:Wl,toggleFetchingSources:Rp,toggleInfoPopup:qD,toggleIntroPopup:ZD,toggleLanguage:VD,toggleNotifications:GD,toggleSatelliteView:JD,toggleShapes:DD,toggleSites:HD,toggleTileOverlay:XD,updateColoringSet:BD,updateDimensions:FD,updateDistrict:ND,updateDomain:PD,updateHighlighted:RD,updateMapView:t$,updateNarrative:jD,updateNarrativeStepIdx:zD,updateSearchQuery:QD,updateSelected:ID,updateSource:UD,updateTicks:XS,updateTimeRange:$D},Symbol.toStringTag,{value:"Module"}));var Ou="NOT_FOUND";function n$(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Ou},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function r$(e,t){var n=[];function r(l){var d=n.findIndex(function(_){return t(l,_.key)});if(d>-1){var y=n[d];return d>0&&(n.splice(d,1),n.unshift(y)),y.value}return Ou}function i(l,d){r(l)===Ou&&(n.unshift({key:l,value:d}),n.length>e&&n.pop())}function s(){return n}function a(){n=[]}return{get:r,put:i,getEntries:s,clear:a}}var i$=function(t,n){return t===n};function o$(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,s=0;s1?t-1:0),r=1;re.domain.events,tE=e=>e.domain.associations.filter(t=>t.mode===Yn.CATEGORY),c$=e=>e.domain.associations.filter(t=>t.mode===Yn.NARRATIVE),nE=e=>e.app.associations.narrative,Dg=e=>e.app.selected,d$=e=>e.domain.sites,$g=e=>e.domain.sources,f$=e=>e.domain.regions,h$=e=>e.domain.shapes,rE=e=>e.domain.associations.filter(t=>t.mode===Yn.FILTER),Fg=e=>e.app.associations.filters,jg=e=>e.app.associations.categories,iE=e=>e.app.shapes,p$=e=>e.app.associations.coloringSet,oE=e=>e.app.timeline.range,m$=e=>e.app.timeline.dimensions,hr=e=>e.features,g$=e=>e.ui.eventRadius,v$=e=>e.ui.tiles.current,y$=e=>e.ui.tiles.current===e.ui.tiles.satellite,_$=e=>e.app.map.anchor[0],w$=e=>e.app.map.anchor[1],b$=e=>e.app.map.startZoom,T$=Lt([d$,hr],(e,t)=>t.USE_SITES?e.filter(n=>!!+n.enabled):[]);Lt([$g,hr],(e,t)=>t.USE_SOURCES?e:{});const S$=Lt([f$,hr],(e,t)=>t.USE_REGIONS?e:[]),E$=e=>e.app.timeline.range.initial,x$=e=>e.app.timeline.range.initialDaysShown,zg=Lt([oE,E$,x$],(e,t,n)=>{let r,i;return e=e.current,Array.isArray(e)&&e.length===2?[r,i]=e:Array.isArray(t)&&t.length===2?[r,i]=t:(i=new Date,r=new Date(i.getTime()-n*24*60*60*1e3)),[new Date(r),new Date(i)]}),k$=e=>e.app.timeline.range.limits,sE=Lt(k$,e=>[new Date(e.lower),new Date(e.upper||Date.now())]),Ug=Lt([eE,Fg,jg,iE,zg,hr],(e,t,n,r,i,s)=>e.reduce((a,l)=>{const y=l.associations&&l.associations.filter(w=>w.mode===Yn.FILTER).map(w=>t.includes(Lc(w))).some(w=>w)||t.length===0||t.length===0,_=l.associations&&l.associations.filter(w=>w.mode===Yn.CATEGORY).map(w=>n.includes(w.title)).some(w=>w)||n.length===0;let c=u$(l,i);c=s.GRAPH_NONLOCATED&&!l.latitude&&!l.longitude||c;const f=l.shape&&r.includes(l.shape.id);return l.type===$S?f&&_&&c&&(a[l.id]={...l}):y&&_&&c&&(a[l.id]={...l}),a},[])),C$=Lt([Ug],(e,t)=>e.reduce(n=>n+1,0)),Bg=Lt([eE,c$,$g,hr],(e,t,n,r)=>{if(Array.isArray(t)&&t.length===0)return[];const i={},s=a=>({id:a,steps:[]});return e.forEach(a=>{a.associations.forEach(l=>{const d=t.find(y=>y.id===l);if(d){const{id:y}=d;i[y]||(i[y]=s(y)),i[y].steps.push(ag(n)(a))}})}),Object.keys(i).forEach(a=>{i[a].steps.sort((y,_)=>y.datetime-_.datetime);const d=t.find(y=>y.id===a);d&&(i[a]={...d,...i[a]})}),t.map(a=>i[a.id]).filter(a=>a)}),aE=Lt([Dg,nE],(e,t)=>{if(t===null)return-1;const n=e[0];let r;return t.steps.forEach((i,s)=>{n.id===i.id&&(r=s)}),r}),lE=Lt([nE,aE],(e,t)=>e?{...e,current:t}:null),A$=Lt([Ug],e=>{const t={};return e.forEach(n=>{const{latitude:r,longitude:i}=n;if(!La(r)||!Ra(i))return;const s=`${n.location}$_${n.latitude}_${n.longitude}`;t[s]?t[s].events.push(n):t[s]={label:s,events:[n],id:n.id,latitude:n.latitude,longitude:n.longitude}}),Object.values(t)}),uE=Lt([Ug,hr,g$],(e,t,n)=>{if(!t.GRAPH_NONLOCATED)return[e,[]];const r=2*n,i=t.GRAPH_NONLOCATED.projectIdx||0,s=_=>_.filters[i],a={};e=e.reduce((_,c)=>{const f=c.filters.length>=1&&!c.latitude&&!c.longitude?s(c):null;return f!==null&&(a.hasOwnProperty(f)?(a[f].start=mD(a[f].start,c.datetime),a[f].end=gD(a[f].end,c.datetime)):a[f]={start:c.datetime,end:c.datetime,key:f,category:c.category}),_.push({...c,project:f}),_},[]);const l=Object.values(a);l.sort((_,c)=>_.start-c.start);const d=Object.keys(a).map((_,c)=>null),y=l.reduce((_,c,f)=>{d.forEach((v,m)=>{v!==null&&a[v].ende[0]),L$=Lt([uE,hr],(e,t)=>t.GRAPH_NONLOCATED?e[1]:[]),Hg=Lt([Dg,$g],(e,t)=>e.length===0?[]:e.map(ag(t))),Np=Lt([m$],e=>({...e,trackHeight:e.contentHeight-50})),cE=Lt([rE],e=>e.reduce((t,n)=>(t[Lc(n)]=n.id,t),{})),R$=Lt([p$,cE],(e,t)=>e.map(n=>dE(n,t).join(","))),I$=Lt([Fg,cE],(e,t)=>dE(e,t));function dE(e,t){return e.reduce((n,r)=>{const i=t[r];return i&&n.push(i),n},[])}const Et={NUMBER:"NUMBER",NUMBER_ARRAY:"NUMBER_ARRAY",STRING:"STRING",STRING_ARRAY:"STRING_ARRAY",DATE:"DATE",DATE_ARRAY:"DATE_ARRAY"};function w0(e){return[Et.DATE_ARRAY,Et.NUMBER_ARRAY,Et.STRING_ARRAY].includes(e.type)}const Vg=Object.freeze({id:{key:"id",trigger:Rc,type:Et.STRING_ARRAY,dehydrate(e){return Dg(e).map(({civId:t})=>t)},rehydrate(e,{id:t}){t!=null&&t.length&&(e.app.selected=t.reduce((n,r)=>{const i=e.domain.events.find(s=>s.civId===r);return i?n.push(i):console.warn(`event ${r} could not be rehydrated. reason: not present.`),n},[]))}},hid:{key:"hid",trigger:null,type:Et.STRING_ARRAY,dehydrate(){return[]},rehydrate(e,{hid:t}){t!=null&&t.length&&(e.app.highlighted=t)}},range:{key:"range",trigger:Nc,type:Et.DATE_ARRAY,dehydrate(e){return oE(e)},rehydrate(e,{range:t}){if((t==null?void 0:t.length)===2){const n=Array.from(t);n.sort((r,i)=>new Date(r)-new Date(i)),e.app.timeline={...e.app.timeline,range:{...e.app.timeline.range,current:n}}}}},filter:{key:"filter",trigger:Ic,type:Et.STRING_ARRAY,dehydrate(e){return I$(e)},rehydrate(e,{filter:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=b0(n);e.app.associations.filters=t.map(i=>r[i])}}},color:{key:"color",trigger:Oc,type:Et.STRING_ARRAY,dehydrate(e){return R$(e)},rehydrate(e,{color:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=b0(n);e.app.associations.coloringSet=t.map(i=>i.split(",").map(s=>r[s]))}}},lat:{key:"lat",trigger:No,type:Et.NUMBER,dehydrate(e){return _$(e)},rehydrate(e,{lat:t}){t!=null&&e.app.map&&(e.app.map={...e.app.map,anchor:[t,e.app.map.anchor[1]]})}},lng:{key:"lng",trigger:No,type:Et.NUMBER,dehydrate(e){return w$(e)},rehydrate(e,{lng:t}){t!=null&&e.app.map&&(e.app.map={...e.app.map,anchor:[e.app.map.anchor[0],t]})}},zoom:{key:"zoom",trigger:No,type:Et.NUMBER,dehydrate(e){return b$(e)},rehydrate(e,{zoom:t}){t!=null&&e.app.map&&(e.app.map={...e.app.map,startZoom:t})}}});function b0(e){return e.reduce((t,n)=>(t[n.id]=Lc(n),t),{})}class fE{constructor(){this.url=new URL(window.location),this.schema=Vg}delete(t){this.url.searchParams.delete(t)}set(t,n){const r=this.schema[t];if(r)if(this.delete(t),r.type===Et.DATE_ARRAY)n.current.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else if(w0(r))n.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else{const i=this._encode(r,n);i&&this.url.searchParams.set(t,i)}}serialize(){window.history.replaceState(null,"",this.url)}deserialize(){const t={};return this.url.searchParams.forEach((n,r)=>{if(t[r]!=null)return;const i=this.schema[r];i&&(t[r]=w0(i)?this.url.searchParams.getAll(r).map(s=>this._decode(i,s)):this._decode(i,this.url.searchParams.get(r)))}),t}_decode(t,n){switch(t.type){case Et.NUMBER_ARRAY:case Et.NUMBER:return+n;case Et.DATE:case Et.DATE_ARRAY:return new Date(n);default:return n==="null"||n==="undefined"?void 0:n}}_encode(t,n){switch(t.type){case Et.NUMBER_ARRAY:case Et.NUMBER:return n.toString();case Et.DATE:case Et.DATE_ARRAY:return xc(n).format("YYYY-MM-DD");default:return n}}}function N$(e){const t=new fE().deserialize();if(SD(t))return e;const n={...e};return Object.values(Vg).forEach(r=>{try{r.rehydrate(n,t)}catch(i){console.error(i)}}),n}function O$(e){return t=>n=>{const r=t(n);try{const i=Object.values(Vg).filter(s=>s.trigger===n.type);if(i.length){const s=new fE,a=e.getState();i.forEach(l=>{s.set(l.key,l.dehydrate(a))}),s.serialize()}}catch(i){console.error("error serializing url state",i)}return r}}function M$(e={},t){switch(t.type){case Mg:return N$(e);default:return e}}function at(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ni(e){return function t(n){return arguments.length===0||at(n)?t:e.apply(this,arguments)}}function Ai(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return at(n)?t:Ni(function(i){return e(n,i)});default:return at(n)&&at(r)?t:at(n)?Ni(function(i){return e(i,r)}):at(r)?Ni(function(i){return e(n,i)}):e(n,r)}}}function hE(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return at(n)?t:Ai(function(s,a){return e(n,s,a)});case 2:return at(n)&&at(r)?t:at(n)?Ai(function(s,a){return e(s,r,a)}):at(r)?Ai(function(s,a){return e(n,s,a)}):Ni(function(s){return e(n,r,s)});default:return at(n)&&at(r)&&at(i)?t:at(n)&&at(r)?Ai(function(s,a){return e(s,a,i)}):at(n)&&at(i)?Ai(function(s,a){return e(s,r,a)}):at(r)&&at(i)?Ai(function(s,a){return e(n,s,a)}):at(n)?Ni(function(s){return e(s,r,i)}):at(r)?Ni(function(s){return e(n,s,i)}):at(i)?Ni(function(s){return e(n,r,s)}):e(n,r,i)}}}function kl(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function T0(e){return Object.prototype.toString.call(e)==="[object Object]"}var D$=hE(function(t,n,r){var i={},s;for(s in n)kl(s,n)&&(i[s]=kl(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)kl(s,r)&&!kl(s,i)&&(i[s]=r[s]);return i}),$$=hE(function e(t,n,r){return D$(function(i,s,a){return T0(s)&&T0(a)?e(t,s,a):t(i,s,a)},n,r)}),F$=Ai(function(t,n){return $$(function(r,i,s){return i},t,n)});const Wg=F$,$s={fa_red:"#eb443e",yellow:"#ffd800",black:"#000",white:"#fff"},qn={fallbackEventColor:$s.fa_red,darkBackground:$s.black,primaryHighlight:$s.fa_red,secondaryHighlight:$s.white},ze={"es-MX":{tiles:{default:"Mapa",satellite:"Sat"},loading:"Cargando...",legend:{view2d:{paragraphs:["Seleccionando una serie de filtros verá aparecer eventos en el mapa y en la línea del tiempo.","Cada evento estará coloreado según la persona que dio el testimonio del evento."],colors:[{class:"category_group00",label:"Categoría Grupo 00"},{class:"category_group01",label:"Categoría Grupo 01"},{class:"category_group02",label:"Categoría Grupo 02"},{class:"category_group03",label:"Categoría Grupo 03"},{class:"other",label:"Otras categorías"}]},default:{header:"Ayudas para explorar la plataforma",intro:["Cada **punto** representa un **evento en los datos** (o cada incidente). Al hacer clic en cada punto se ven los detalles del evento. Pero si le da clic en un **grupo** de puntos, verá cuantos eventos hay en ese grupo.","Puede acercarse en el mapa *(zoom)* haciendo *scroll* con el ratón o haciendo clic en un grupo de puntos.","Puede usar **filtros** para segmentar los datos. En el mapa sólo vemos los puntos relacionados con cada filtro seleccionado. Cuando no hay filtros seleccionados, vemos todos los puntos de la base de datos en el mapa.","Al seleccionar más de un filtro se introducen diferentes colores para diferenciarlos. Esto permite comparar los tipos de incidentes tanto en el mapa, como en la línea de tiempo. Esto sirve con un máximo de 6 filtros-colores.","Con el teclado puede usar las flechas de la derecha e izquierda para moverse entre eventos. También puede hacer clic y arrastrar la línea de tiempo hacia los lados para modificar el rango de tiempo."],notation:"Cuando un circulo combina colores significa que hay varios eventos en esa misma ubicación.",arrows:"Usar las flechas izquierda/derecha en el teclado para moverse entre eventos cronológicamente."}},toolbar:{title:"Título",filters:"Filtros",explore_by_filter__title:"Explorar por filtros",explore_by_filter__description:"Al seleccionar filtros, puede ver los eventos que tienen esa categoria. Para ver todos los eventos puede quitar todas las selecciones (o seleccionarlos todos).",panels:{mentions:{title:"Personas",overview:"Seleccionar los nombres de personas mostrará eventos en los que esta persona o organización ha sido mencionada, incluyendo el propio testimonio. Entre paréntesis encontrará el número de menciones. Ej. (34)."},categories:{title:"Testimonios",overview:"Seleccionar el nombre de una persona mostrará los eventos descritos por su testimonio. Entre paréntesis encontrará el número de eventos descritos. Ej. (34)."},search:{title:"Directorio de etiquetas",placeholder:"Búsqueda"}}},timeline:{zoomLevels:[{label:"20 años",duration:10512e3},{label:"2 años",duration:1051200},{label:"3 meses",duration:129600},{label:"3 días",duration:4320},{label:"12 horas",duration:720},{label:"1 hora",duration:60}],labels_title:"Testimonios",labels:["Testimonio Grupo 00","Testimonio Grupo 01","Testimonio Grupo 02","Testimonio Grupo 03","Otras categorias"],info:"%n eventos ocurridos entre",default_categories_label:"Eventos"},cardstack:{date_title:"Fecha incidente",location_title:"Ubicación",summary_title:"Resumen",header:"eventos seleccionados",unknown_location:"Ubicación desconocida",unknown_time:"Día y hora desconocida",timestamp:"Día y hora",estimated:"aproximado",location:"Ubicación",incident_type:"Tipo de acción",description:"Hechos",people:"Personas en el evento",sources:"Fuentes",category:"Según el testimonio de",communication:"Comunicación",transmitter:"Transmisor",receiver:"Receptor",warning:"(!) HECHOS CUESTIONADOS"}},"en-US":{tiles:{default:"Map",satellite:"Sat"},loading:"Loading...",legend:{view2d:{paragraphs:["Selecting a series of filters, you will be able to explore events on the map of Iguala and on the timeline.","Each event is colored according the person that gave category of the event."],colors:[{class:"category_group00",label:"Category Group 00"},{class:"category_group01",label:"Category Group 01"},{class:"category_group02",label:"Category Group 02"},{class:"category_group03",label:"Category Group 03"},{class:"other",label:"Other categories"}]},default:{header:"Navigating the Platform",intro:["Each small **dot** represents a **datapoint**, or incident. Click on a dot to see details. Hover over a larger ‘**cluster**’ dot to see how many events it represents.","Zoom in either with a mouse-scroll or by clicking a ‘cluster’ dot.","Use **filters** and **categories** to segment the data. Selecting certain filters and categories will show only the datapoints that relate to them. If no filters or categories are selected, all the datapoints are displayed.","Selecting more than one filter will introduce colour-coded datapoints, which allow you to compare types of incident across time and space. This feature works up to a maximum of six filters.","Once you have clicked on an event, use the left and right arrows to move back and forward day by day. You can also click and drag anywhere on the timeline. Use the handles on the right to select a date range."],notation:"Combinations of colours within a circle indicate multiple events in a single location.",arrows:"Use the left/right arrows on the keboard to move back and forth between events in time."}},toolbar:{title:"TITLE",panels:{mentions:{title:"Mentions",overview:"Selecting the names of people/organisation will show events in which these have been mentioned in their own testimony and by others. The number in the parentheses shows how many events contain a mention of a person or organisation, e.g. (34)"},categories:{title:"Testimonies",overview:"Selecting the name of a person will show the events only according to a person’s category or category. The number in the parentheses show how many events are contained in each category, e.g. (34)."},search:{title:"Directory of filters",placeholder:"Search"}},narratives:"Narratives",narratives_label:"Narratives",explore_by_narrative__title:"Explore events by narrative",explore_by_narrative__description:"Follow a path through the data, from one key event to the next.",filters:"Filters",filters_label:"Filters",explore_by_filter__title:"Explore by filter",explore_by_filter__description:"'Filters' refer to the types of incident. Select multiple filters to introduce colour-coding, up to a maximum of four filters.

If no filters are selected, all datapoints are displayed.",categories:"Categories",categories_label:"Categories",explore_by_category__title:"Explore events by category",explore_by_category__description:"",shapes:"Shapes",shapes_label:"Shapes",explore_by_shapes__title:"Explore events by shape breakdown",explore_by_shape__description:"Shapes map to a given type of event that appears on the timeline.

Select the shape marker to toggle this type of event on / off",fullscreen_enter:"Fullscreen",fullscreen_exit:"Exit Fullscreen",download:{button:"Download",panel:{title:"Download events",description:"Export the most recent available events in different formats.",formats:{api:{label:"API",description:"An API endpoint where you can always fetch the entire dataset in JSON format with tools like curl. Useful for integrating the data in other services and visualizaitons."},csv:{label:"CSV",description:"CSV file where sources and filters are concatenated into a single column each due to data structure limitations."},json:{label:"JSON",description:"JSON file where each event is a structured object containing nested arrays of sources and filters."}}}}},timeline:{labels_title:"Testimonies",labels:["Testimony Group 00","Testimony Group 01","Testimony Group 02","Testimony Group 03","Other"],info:"Showing %n events that occurred between",reset:"reset dates",default_categories_label:""},cardstack:{header:"selected events",timestamp:"Day and time",unknown_location:"Unknown location",estimated:"estimated",unknown_time:"Unknown time",location:"Localization",incident_type:"Type of action",description:"Summary",filters:"Filters",nofilters:"No known filters for this event.",sources:"Sources",unknown_source:"The information for this source could not be retrieved.",category:"Category",communication:"Communication",transmitter:"Transmitter",receiver:"Receiver",warning:"(!) Highly questioned"}}},af=window.innerHeight<800,j$={anchor:[31.356397,34.784818],startZoom:11,minZoom:2,maxZoom:16,bounds:null,maxBounds:[[180,-180],[-180,180]]},z$={},S0={domain:{events:[],categories:[],associations:[],sources:{},sites:[],shapes:[],regions:[],notifications:[]},app:{debug:!0,errors:{source:!1},highlighted:[],selected:[],source:null,associations:{coloringSet:[],filters:[],narrative:null,categories:[],views:{events:!0,routes:!1,sites:!0}},shapes:[],language:"en-US",cluster:{radius:30,minZoom:2,maxZoom:16},timeline:{dimensions:{ticks:15,height:af?170:250,width:0,marginLeft:20,marginTop:af?5:10,marginBottom:60,contentHeight:af?160:200,width_controls:100},range:{current:null},zoomLevels:ze[ht].timeline.zoomLevels||[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}]},flags:{isFetchingDomain:!1,isFetchingSources:!1,isCover:!0,isCardstack:!0,isInfopopup:!1,isIntropopup:!1,isShowingSites:!0},cover:{title:"project title",description:`A description of the project goes here. This description may contain markdown. @@ -86,7 +86,7 @@ This description may contain markdown. ## Whereas this is a slightly smaller title. -Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/forensic-architecture/timemap) for more information around how to specify custom covers.`,exploreButton:"EXPLORE"},toolbar:{panels:{categories:{default:{icon:Cs.CATEGORY,label:ze[ht].toolbar.categories_label,title:ze[ht].toolbar.explore_by_category__title,description:ze[ht].toolbar.explore_by_category__description}},filters:{icon:Cs.FILTER,label:ze[ht].toolbar.filters_label,title:ze[ht].toolbar.explore_by_filter__title,description:ze[ht].toolbar.explore_by_filter__description},narratives:{icon:Cs.NARRATIVE,label:ze[ht].toolbar.narratives_label,title:ze[ht].toolbar.explore_by_narrative__title,description:ze[ht].toolbar.explore_by_narrative__description},shapes:{icon:Cs.SHAPE,label:ze[ht].toolbar.shapes_label,title:ze[ht].toolbar.explore_by_shape__title,description:ze[ht].toolbar.explore_by_shape__description},download:{icon:Cs.DOWNLOAD,label:ze[ht].toolbar.download.button,title:ze[ht].toolbar.download.panel.title,description:ze[ht].toolbar.download.panel.description}}},loading:!1},ui:{tiles:{current:"openstreetmap",default:"openstreetmap",satellite:"satellite"},style:{categories:{default:qn.fallbackEventColor},narratives:{default:{opacity:.9,stroke:qn.fallbackEventColor,strokeWidth:3}},regions:{default:{stroke:"blue",strokeWidth:3,opacity:.9}},clusters:{radial:!1}},card:{layout:{template:"basic"}},coloring:{maxNumOfColors:4,colors:Object.values($s)},dom:{timeline:"timeline",timeslider:"timeslider",map:"map"},eventRadius:8},features:{USE_COVER:!1,USE_ASSOCIATIONS:!1,USE_SITES:!1,USE_SOURCES:!1,USE_REGIONS:!1,GRAPH_NONLOCATED:!1,HIGHLIGHT_GROUPS:!1}};let Zn;Nt.store?Zn=Wg(Nt.store,S0):Zn=S0;Zn.app.flags.isIntropopup=!!Zn.app.intro;"map"in Zn.app&&(Zn.app.map=Wg(Zn.app.map,j$));"space3d"in Zn.app&&(Zn.app.space3d=Wg(Zn.app.space3d,z$));const Dc=Zn;var pE={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,s,a)=>{const l=a(375),d=a(8571),y=a(9474),_=a(1687),c=a(8652),f=a(8160),w=a(3292),v=a(6354),m=a(8901),b=a(9708),g=a(6914),p=a(2294),h=a(6133),T=a(1152),x=a(8863),k=a(2036),P={Base:class{constructor(E){this.type=E,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new p.Ids,this._preferences=null,this._refs=new h.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return l(typeof b.describe=="function","Manifest functionality disabled"),b.describe(this)}allow(){for(var E=arguments.length,A=new Array(E),C=0;C1&&arguments[1]!==void 0?arguments[1]:{};return l(E!==void 0,"Missing example"),f.assertOptions(A,["override"]),this._inner("examples",E,{single:!0,override:A.override})}external(E,A){return typeof E=="object"&&(l(!A,"Cannot combine options with description"),A=E.description,E=E.method),l(typeof E=="function","Method must be a function"),l(A===void 0||A&&typeof A=="string","Description must be a non-empty string"),this._inner("externals",{method:E,description:A},{single:!0})}failover(E,A){return this._default("failover",E,A)}forbidden(){return this.presence("forbidden")}id(E){return E?(l(typeof E=="string","id must be a non-empty string"),l(/^[^\.]+$/.test(E),"id cannot contain period character"),this.$_setFlag("id",E)):this.$_setFlag("id",void 0)}invalid(){for(var E=arguments.length,A=new Array(E),C=0;C0&&arguments[0]!==void 0)||arguments[0];return l(typeof E=="boolean","Invalid mode:",E),this.$_setFlag("only",E)}optional(){return this.presence("optional")}prefs(E){l(E,"Missing preferences"),l(E.context===void 0,"Cannot override context"),l(E.externals===void 0,"Cannot override externals"),l(E.warnings===void 0,"Cannot override warnings"),l(E.debug===void 0,"Cannot override debug"),f.checkPreferences(E);const A=this.clone();return A._preferences=f.preferences(A._preferences,E),A}presence(E){return l(["optional","required","forbidden"].includes(E),"Unknown presence mode",E),this.$_setFlag("presence",E)}raw(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"raw":void 0)}result(E){return l(["raw","strip"].includes(E),"Unknown result mode",E),this.$_setFlag("result",E)}required(){return this.presence("required")}strict(E){const A=this.clone(),C=E!==void 0&&!E;return A._preferences=f.preferences(A._preferences,{convert:C}),A}strip(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"strip":void 0)}tag(){for(var E=arguments.length,A=new Array(E),C=0;CN.keep||N.name!==C),A._singleRules.delete(C));for(const C of E._rules)E._definition.rules[C.method].multi||A._singleRules.set(C.name,C),A._rules.push(C);if(A._flags.empty&&E._flags.empty){A._flags.empty=A._flags.empty.concat(E._flags.empty);const C=Object.assign({},E._flags);delete C.empty,_(A._flags,C)}else if(E._flags.empty){A._flags.empty=E._flags.empty;const C=Object.assign({},E._flags);delete C.empty,_(A._flags,C)}else _(A._flags,E._flags);for(const C in E.$_terms){const N=E.$_terms[C];N?A.$_terms[C]?A.$_terms[C]=A.$_terms[C].concat(N):A.$_terms[C]=N.slice():A.$_terms[C]||(A.$_terms[C]=N)}return this.$_root._tracer&&this.$_root._tracer._combine(A,[this,E]),A.$_mutateRebuild()}extend(E){return l(!E.base,"Cannot extend type with another base"),m.type(this,E)}extract(E){return E=Array.isArray(E)?E:E.split("."),this._ids.reach(E)}fork(E,A){l(!this._inRuleset(),"Cannot fork inside a ruleset");let C=this;for(let N of[].concat(E))N=Array.isArray(N)?N:N.split("."),C=C._ids.fork(N,A,C);return C.$_temp.ruleset=!1,C}rule(E){const A=this._definition;f.assertOptions(E,Object.keys(A.modifiers)),l(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const C=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;l(C>=0&&CC.tailor(E),ref:!1}),A.$_temp.ruleset=!1,A.$_mutateRebuild()}tracer(){return T.location?T.location(this):this}validate(E,A){return x.entry(E,this,A)}validateAsync(E,A){return x.entryAsync(E,this,A)}$_addRule(E){typeof E=="string"&&(E={name:E}),l(E&&typeof E=="object","Invalid options"),l(E.name&&typeof E.name=="string","Invalid rule name");for(const F in E)l(F[0]!=="_","Cannot set private rule properties");const A=Object.assign({},E);A._resolve=[],A.method=A.method||A.name;const C=this._definition.rules[A.method],N=A.args;l(C,"Unknown rule",A.method);const $=this.clone();if(N){l(Object.keys(N).length===1||Object.keys(N).length===this._definition.rules[A.name].args.length,"Invalid rule definition for",this.type,A.name);for(const F in N){let z=N[F];if(C.argsByName){const U=C.argsByName.get(F);if(U.ref&&f.isResolvable(z))A._resolve.push(F),$.$_mutateRegister(z);else if(U.normalize&&(z=U.normalize(z),N[F]=z),U.assert){const H=f.validateArg(z,F,U);l(!H,H,"or reference")}}z!==void 0?N[F]=z:delete N[F]}}return C.multi||($._ruleRemove(A.name,{clone:!1}),$._singleRules.set(A.name,A)),$.$_temp.ruleset===!1&&($.$_temp.ruleset=null),C.priority?$._rules.unshift(A):$._rules.push(A),$}$_compile(E,A){return w.schema(this.$_root,E,A)}$_createError(E,A,C,N,$){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const z=F.flags!==!1?this._flags:{},U=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new v.Report(E,A,C,z,U,N,$)}$_getFlag(E){return this._flags[E]}$_getRule(E){return this._singleRules.get(E)}$_mapLabels(E){return E=Array.isArray(E)?E:E.split("."),this._ids.labels(E)}$_match(E,A,C,N){(C=Object.assign({},C)).abortEarly=!0,C._externals=!1,A.snapshot();const $=!x.validate(E,this,A,C,N).errors;return A.restore(),$}$_modify(E){return f.assertOptions(E,["each","once","ref","schema"]),p.schema(this,E)||this}$_mutateRebuild(){return l(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(E,A)=>{let{source:C,name:N,path:$,key:F}=A;const z=this._definition[C][N]&&this._definition[C][N].register;z!==!1&&this.$_mutateRegister(E,{family:z,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(E){let{family:A,key:C}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(E,A),this._ids.register(E,{key:C})}$_property(E){return this._definition.properties[E]}$_reach(E){return this._ids.reach(E)}$_rootReferences(){return this._refs.roots()}$_setFlag(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(E[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const N=this._definition.flags[E]||{};if(y(A,N.default)&&(A=void 0),y(A,this._flags[E]))return this;const $=C.clone!==!1?this.clone():this;return A!==void 0?($._flags[E]=A,$.$_mutateRegister(A)):delete $._flags[E],E[0]!=="_"&&($.$_temp.ruleset=!1),$}$_parent(E){for(var A=arguments.length,C=new Array(A>1?A-1:0),N=1;N2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(C,"literal"),l(A!==void 0,"Missing",E,"value"),l(typeof A=="function"||!C.literal,"Only function value supports literal option"),typeof A=="function"&&C.literal&&(A={[f.symbols.literal]:!0,literal:A}),this.$_setFlag(E,A)}_generate(E,A,C){if(!this.$_terms.whens)return{schema:this};const N=[],$=[];for(let U=0;UY)break}const F=$.join(", ");if(A.mainstay.tracer.debug(A,"rule","when",F),!F)return{schema:this};if(!A.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let z=this;this._definition.generate&&(z=this._definition.generate(this,E,A,C));for(const U of N)z=z.concat(U);return this.$_root._tracer&&this.$_root._tracer._combine(z,[this,...N]),this.$_temp.whens[F]=z,{schema:z,id:F}}_inner(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(!this._inRuleset(),`Cannot set ${E} inside a ruleset`);const N=this.clone();return N.$_terms[E]&&!C.override||(N.$_terms[E]=[]),C.single?N.$_terms[E].push(A):N.$_terms[E].push(...A),N.$_temp.ruleset=!1,N}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(E){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(E))return this;const C=A.clone!==!1?this.clone():this;C._singleRules.delete(E);const N=[];for(let $=0;${const l=a(375),d=a(8571),y=a(8160),_={max:1e3,supported:new Set(["undefined","boolean","number","string"])};s.provider={provision:c=>new _.Cache(c)},_.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};y.assertOptions(c,["max"]),l(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||_.max,this._map=new Map,this._list=new _.List}get length(){return this._map.size}set(c,f){if(c!==null&&!_.supported.has(typeof c))return;let w=this._map.get(c);if(w)return w.value=f,void this._list.first(w);w=this._list.unshift({key:c,value:f}),this._map.set(c,w),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),d(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},_.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:w}=c;return f.prev=w,w&&(w.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,s,a)=>{const l=a(375),d=a(7916),y=a(5934);let _,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};s.version=y.version,s.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},s.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},s.assertOptions=function(w,v){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";l(w&&typeof w=="object"&&!Array.isArray(w),"Options must be of type object");const b=Object.keys(w).filter(g=>!v.includes(g));l(b.length===0,`${m} contain unknown keys: ${b}`)},s.checkPreferences=function(w){c=c||a(3378);const v=c.preferences.validate(w);if(v.error)throw new d([v.error.details[0].message])},s.compare=function(w,v,m){switch(m){case"=":return w===v;case">":return w>v;case"<":return w=":return w>=v;case"<=":return w<=v}},s.default=function(w,v){return w===void 0?v:w},s.isIsoDate=function(w){return f.isoDate.test(w)},s.isNumber=function(w){return typeof w=="number"&&!isNaN(w)},s.isResolvable=function(w){return!!w&&(w[s.symbols.ref]||w[s.symbols.template])},s.isSchema=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=w&&w[s.symbols.any];return!!m&&(l(v.legacy||m.version===s.version,"Cannot mix different versions of joi schemas"),!0)},s.isValues=function(w){return w[s.symbols.values]},s.limit=function(w){return Number.isSafeInteger(w)&&w>=0},s.preferences=function(w,v){_=_||a(6914),w=w||{},v=v||{};const m=Object.assign({},w,v);return v.errors&&w.errors&&(m.errors=Object.assign({},w.errors,v.errors),m.errors.wrap=Object.assign({},w.errors.wrap,v.errors.wrap)),v.messages&&(m.messages=_.compile(v.messages,w.messages)),delete m[s.symbols.prefs],m},s.tryWithPath=function(w,v){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return w()}catch(b){throw b.path!==void 0?b.path=v+"."+b.path:b.path=v,m.append&&(b.message=`${b.message} (${b.path})`),b}},s.validateArg=function(w,v,m){let{assert:b,message:g}=m;if(s.isSchema(b)){const p=b.validate(w);return p.error?p.error.message:void 0}if(!b(w))return v?`${v} ${g}`:g},s.verifyFlat=function(w,v){for(const m of w)l(!Array.isArray(m),"Method no longer accepts array arguments:",v)}},3292:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.schema=function(c,f){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["appendPath","override"]);try{return _.schema(c,f,w)}catch(v){throw w.appendPath&&v.path!==void 0&&(v.message=`${v.message} (${v.path})`),v}},_.schema=function(c,f,w){l(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(l(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const v=function(m){for(var b=arguments.length,g=new Array(b>1?b-1:0),p=1;p2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["legacy"]);const v=f&&f[d.symbols.any];if(v)return l(w.legacy||v.version===d.version,"Cannot mix different versions of joi schemas:",v.version,d.version),f;if(typeof f!="object"||!w.legacy)return s.schema(c,f,{appendPath:!0});const m=_.walk(f);return m?m.compile(m.root,f):s.schema(c,f,{appendPath:!0})},_.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const w of c){const v=_.walk(w);if(v)return v}return null}const f=c[d.symbols.any];if(f)return{root:c[f.root],compile:f.compile};l(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const w in c){const v=_.walk(c[w]);if(v)return v}return null},_.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},s.when=function(c,f,w){if(w===void 0&&(l(f&&typeof f=="object","Missing options"),w=f,f=y.create(".")),Array.isArray(w)&&(w={switch:w}),d.assertOptions(w,["is","not","then","otherwise","switch","break"]),d.isSchema(f))return l(w.is===void 0,'"is" can not be used with a schema condition'),l(w.not===void 0,'"not" can not be used with a schema condition'),l(w.switch===void 0,'"switch" can not be used with a schema condition'),_.condition(c,{is:f,then:w.then,otherwise:w.otherwise,break:w.break});if(l(y.isRef(f)||typeof f=="string","Invalid condition:",f),l(w.not===void 0||w.is===void 0,'Cannot combine "is" with "not"'),w.switch===void 0){let m=w;w.not!==void 0&&(m={is:w.not,then:w.otherwise,otherwise:w.then,break:w.break});let b=m.is!==void 0?c.$_compile(m.is):c.$_root.invalid(null,!1,0,"").required();return l(m.then!==void 0||m.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(m.break===void 0||m.then===void 0||m.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),w.is===void 0||y.isRef(w.is)||d.isSchema(w.is)||(b=b.required()),_.condition(c,{ref:s.ref(f),is:b,then:m.then,otherwise:m.otherwise,break:m.break})}l(Array.isArray(w.switch),'"switch" must be an array'),l(w.is===void 0,'Cannot combine "switch" with "is"'),l(w.not===void 0,'Cannot combine "switch" with "not"'),l(w.then===void 0,'Cannot combine "switch" with "then"');const v={ref:s.ref(f),switch:[],break:w.break};for(let m=0;m{const l=a(5688),d=a(8160),y=a(3328);s.Report=class{constructor(_,c,f,w,v,m,b){if(this.code=_,this.flags=w,this.messages=v,this.path=m.path,this.prefs=b,this.state=m,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=s.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(_){if(this.template=_,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const _=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${_}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(_,c){return s.template(this.value,_,c||this.code,this.state,this.prefs)}},s.path=function(_){let c="";for(const f of _)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},s.template=function(_,c,f,w,v){if(!c)return;if(y.isTemplate(c))return f!=="root"?c:null;let m=v.errors.language;if(d.isResolvable(m)&&(m=m.resolve(_,w,v)),m&&c[m]){if(c[m][f]!==void 0)return c[m][f];if(c[m]["*"]!==void 0)return c[m]["*"]}return c[f]?c[f]:c["*"]},s.label=function(_,c,f,w){if(_.label)return _.label;if(!f.errors.label)return"";let v=c.path;return f.errors.label==="key"&&c.path.length>1&&(v=c.path.slice(-1)),s.path(v)||s.template(null,f.messages,"root",c,f)||w&&s.template(null,w,"root",c,f)||"value"},s.process=function(_,c,f){if(!_)return null;const{override:w,message:v,details:m}=s.details(_);if(w)return w;if(f.errors.stack)return new s.ValidationError(v,m,c);const b=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new s.ValidationError(v,m,c);return Error.stackTraceLimit=b,g},s.details=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const w=[];for(const v of _){if(v instanceof Error){if(c.override!==!1)return{override:v};const b=v.toString();f.push(b),w.push({message:b,type:"override",context:{error:v}});continue}const m=v.toString();f.push(m),w.push({message:m,path:v.path.filter(b=>typeof b!="object"),type:v.code,context:v.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:w}},s.ValidationError=class extends Error{constructor(_,c,f){super(_),this._original=f,this.details=c}static isError(_){return _ instanceof s.ValidationError}},s.ValidationError.prototype.isJoi=!0,s.ValidationError.prototype.name="ValidationError",s.ValidationError.prototype.annotate=l.error},8901:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8160),_=a(6914),c={};s.type=function(f,w){const v=Object.getPrototypeOf(f),m=d(v),b=f._assign(Object.create(m)),g=Object.assign({},w);delete g.base,m._definition=g;const p=v._definition||{};g.messages=_.merge(p.messages,g.messages),g.properties=Object.assign({},p.properties,g.properties),b.type=g.type,g.flags=Object.assign({},p.flags,g.flags);const h=Object.assign({},p.terms);if(g.terms)for(const P in g.terms){const E=g.terms[P];l(b.$_terms[P]===void 0,"Invalid term override for",g.type,P),b.$_terms[P]=E.init,h[P]=E}g.terms=h,g.args||(g.args=p.args),g.prepare=c.prepare(g.prepare,p.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,p.coerce),g.validate=c.validate(g.validate,p.validate);const T=Object.assign({},p.rules);if(g.rules)for(const P in g.rules){const E=g.rules[P];l(typeof E=="object","Invalid rule definition for",g.type,P);let A=E.method;if(A===void 0&&(A=function(){return this.$_addRule(P)}),A&&(l(!m[P],"Rule conflict in",g.type,P),m[P]=A),l(!T[P],"Rule conflict in",g.type,P),T[P]=E,E.alias){const C=[].concat(E.alias);for(const N of C)m[N]=E.method}E.args&&(E.argsByName=new Map,E.args=E.args.map(C=>(typeof C=="string"&&(C={name:C}),l(!E.argsByName.has(C.name),"Duplicated argument name",C.name),y.isSchema(C.assert)&&(C.assert=C.assert.strict().label(C.name)),E.argsByName.set(C.name,C),C)))}g.rules=T;const x=Object.assign({},p.modifiers);if(g.modifiers)for(const P in g.modifiers){l(!m[P],"Rule conflict in",g.type,P);const E=g.modifiers[P];l(typeof E=="function","Invalid modifier definition for",g.type,P);const A=function(C){return this.rule({[P]:C})};m[P]=A,x[P]=E}if(g.modifiers=x,g.overrides){m._super=v,b.$_super={};for(const P in g.overrides)l(v[P],"Cannot override missing",P),g.overrides[P][y.symbols.parent]=v[P],b.$_super[P]=v[P].bind(b);Object.assign(m,g.overrides)}g.cast=Object.assign({},p.cast,g.cast);const k=Object.assign({},p.manifest,g.manifest);return k.build=c.build(g.manifest&&g.manifest.build,p.manifest&&p.manifest.build),g.manifest=k,g.rebuild=c.rebuild(g.rebuild,p.rebuild),b},c.build=function(f,w){return f&&w?function(v,m){return w(f(v,m),m)}:f||w},c.coerce=function(f,w){return f&&w?{from:f.from&&w.from?[...new Set([...f.from,...w.from])]:null,method(v,m){let b;if((!w.from||w.from.includes(typeof v))&&(b=w.method(v,m),b)){if(b.errors||b.value===void 0)return b;v=b.value}if(!f.from||f.from.includes(typeof v)){const g=f.method(v,m);if(g)return g}return b}}:f||w},c.prepare=function(f,w){return f&&w?function(v,m){const b=f(v,m);if(b){if(b.errors||b.value===void 0)return b;v=b.value}return w(v,m)||b}:f||w},c.rebuild=function(f,w){return f&&w?function(v){w(v),f(v)}:f||w},c.validate=function(f,w){return f&&w?function(v,m){const b=w(v,m);if(b){if(b.errors&&(!Array.isArray(b.errors)||b.errors.length))return b;v=b.value}return f(v,m)||b}:f||w}},5107:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8652),_=a(8160),c=a(3292),f=a(6354),w=a(8901),v=a(9708),m=a(6133),b=a(3328),g=a(1152);let p;const h={types:{alternatives:a(4946),any:a(8068),array:a(546),boolean:a(4937),date:a(7500),function:a(390),link:a(8785),number:a(3832),object:a(8966),string:a(7417),symbol:a(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const T={_types:new Set(Object.keys(h.types))};for(const x of T._types)T[x]=function(){for(var k=arguments.length,P=new Array(k),E=0;E2?k-2:0),E=2;E2?k-2:0),E=2;E{const l=a(375),d=a(8571),y=a(3328);s.compile=function(_,c){if(typeof _=="string")return l(!c,"Cannot set single message string"),new y(_);if(y.isTemplate(_))return l(!c,"Cannot set single message template"),_;l(typeof _=="object"&&!Array.isArray(_),"Invalid message options"),c=c?d(c):{};for(let f in _){const w=_[f];if(f==="root"||y.isTemplate(w)){c[f]=w;continue}if(typeof w=="string"){c[f]=new y(w);continue}l(typeof w=="object"&&!Array.isArray(w),"Invalid message for",f);const v=f;for(f in c[v]=c[v]||{},w){const m=w[f];f==="root"||y.isTemplate(m)?c[v][f]=m:(l(typeof m=="string","Invalid message for",f,"in",v),c[v][f]=new y(m))}}return c},s.decompile=function(_){const c={};for(let f in _){const w=_[f];if(f==="root"){c.root=w;continue}if(y.isTemplate(w)){c[f]=w.describe({compact:!0});continue}const v=f;for(f in c[v]={},w){const m=w[f];f!=="root"?c[v][f]=m.describe({compact:!0}):c[v].root=m}}return c},s.merge=function(_,c){if(!_)return s.compile(c);if(!c)return _;if(typeof c=="string")return new y(c);if(y.isTemplate(c))return c;const f=d(_);for(let w in c){const v=c[w];if(w==="root"||y.isTemplate(v)){f[w]=v;continue}if(typeof v=="string"){f[w]=new y(v);continue}l(typeof v=="object"&&!Array.isArray(v),"Invalid message for",w);const m=w;for(w in f[m]=f[m]||{},v){const b=v[w];w==="root"||y.isTemplate(b)?f[m][w]=b:(l(typeof b=="string","Invalid message for",w,"in",m),f[m][w]=new y(b))}}return f}},2294:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.Ids=_.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new _.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,w]of c._byId.entries())l(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,w);for(const[f,w]of c._byKey.entries())l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,w)}fork(c,f,w){const v=this._collect(c);v.push({schema:w});const m=v.shift();let b={id:m.id,schema:f(m.schema)};l(d.isSchema(b.schema),"adjuster function failed to return a joi schema type");for(const g of v)b={id:g.id,schema:_.fork(g.schema,b.id,b.schema)};return b.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);if(!v)return[...f,...c].join(".");const m=c.slice(1);return f=[...f,v.schema._flags.label||w],m.length?v.schema._ids.labels(m,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);l(v,"Schema does not contain path",[...f,...c].join("."));const m=c.slice(1);return m.length?v.schema._ids.reach(m,[...f,w]):v.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!d.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const w=c._flags.id;if(w){const v=this._byId.get(w);l(!v||v.schema===c,"Cannot add different schemas with the same id:",w),l(!this._byKey.has(w),"Schema id conflicts with existing key:",w),this._byId.set(w,{schema:c,id:w})}f&&(l(!this._byKey.has(f),"Schema already contains key:",f),l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const v=c[0],m=this._get(v);l(m,"Schema does not contain path",[...f,...c].join(".")),w=[m,...w];const b=c.slice(1);return b.length?m.schema._ids._collect(b,[...f,v],w):w}_get(c){return this._byId.get(c)||this._byKey.get(c)}},_.fork=function(c,f,w){const v=s.schema(c,{each:(m,b)=>{let{key:g}=b;if(f===(m._flags.id||g))return w},ref:!1});return v?v.$_mutateRebuild():c},s.schema=function(c,f){let w;for(const v in c._flags){if(v[0]==="_")continue;const m=_.scan(c._flags[v],{source:"flags",name:v},f);m!==void 0&&(w=w||c.clone(),w._flags[v]=m)}for(let v=0;v{const l=a(375),d=a(8571),y=a(9621),_=a(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};s.create=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(typeof w=="string","Invalid reference key:",w),_.assertOptions(v,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!v.prefix||typeof v.prefix=="object","options.prefix must be of type object");const m=Object.assign({},f.defaults,v);delete m.prefix;const b=m.separator,g=f.context(w,b,v.prefix);if(m.type=g.type,w=g.key,m.type==="value")if(g.root&&(l(!b||w[0]!==b,"Cannot specify relative path with root prefix"),m.ancestor="root",w||(w=null)),b&&b===w)w=null,m.ancestor=0;else if(m.ancestor!==void 0)l(!b||!w||w[0]!==b,"Cannot combine prefix with ancestor option");else{const[p,h]=f.ancestor(w,b);h&&(w=w.slice(h))===""&&(w=null),m.ancestor=p}return m.path=b?w===null?[]:w.split(b):[w],new f.Ref(m)},s.in=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.create(w,{...v,in:!0})},s.isRef=function(w){return!!w&&!!w[_.symbols.ref]},f.Ref=class{constructor(w){l(typeof w=="object","Invalid reference construction"),_.assertOptions(w,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(w.separator)||typeof w.separator=="string"&&w.separator.length===1,"Invalid separator"),l(!w.adjust||typeof w.adjust=="function","options.adjust must be a function"),l(!w.map||Array.isArray(w.map),"options.map must be an array"),l(!w.map||!w.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,w),l(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(w,v,m,b){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return l(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(m.context,v,g):this.type==="local"?this._resolve(b,v,g):this.ancestor?this.ancestor==="root"?this._resolve(v.ancestors[v.ancestors.length-1],v,g):(l(this.ancestor<=v.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(v.ancestors[this.ancestor-1],v,g)):this._resolve(w,v,g)}_resolve(w,v,m){let b;if(this.type==="value"&&v.mainstay.shadow&&m.shadow!==!1&&(b=v.mainstay.shadow.get(this.absolute(v))),b===void 0&&(b=y(w,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(b=this.adjust(b)),this.map){const g=this.map.get(b);g!==void 0&&(b=g)}return v.mainstay&&v.mainstay.tracer.resolve(v,this,b),b}toString(){return this.display}absolute(w){return[...w.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const w={path:this.path};this.type!=="value"&&(w.type=this.type),this.separator!=="."&&(w.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(w.ancestor=this.ancestor),this.map&&(w.map=[...this.map]);for(const v of["adjust","iterables","render"])this[v]!==null&&this[v]!==void 0&&(w[v]=this[v]);return this.in!==!1&&(w.in=!0),{ref:w}}updateDisplay(){const w=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${w}`);if(!this.separator)return void(this.display=`ref:${w}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${w}`);if(this.ancestor==="root")return void(this.display=`ref:root:${w}`);if(this.ancestor===1)return void(this.display=`ref:${w||".."}`);const v=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${v}${w||""}`}},f.Ref.prototype[_.symbols.ref]=!0,s.build=function(w){return(w=Object.assign({},f.defaults,w)).type==="value"&&w.ancestor===void 0&&(w.ancestor=1),new f.Ref(w)},f.context=function(w,v){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(w=w.trim(),m){const b=m.global===void 0?"$":m.global;if(b!==v&&w.startsWith(b))return{key:w.slice(b.length),type:"global"};const g=m.local===void 0?"#":m.local;if(g!==v&&w.startsWith(g))return{key:w.slice(g.length),type:"local"};const p=m.root===void 0?"/":m.root;if(p!==v&&w.startsWith(p))return{key:w.slice(p.length),type:"value",root:!0}}return{key:w,type:"value"}},f.ancestor=function(w,v){if(!v)return[1,0];if(w[0]!==v)return[1,0];if(w[1]!==v)return[0,1];let m=2;for(;w[m]===v;)++m;return[m-1,m]},s.toSibling=0,s.toParent=1,s.Manager=class{constructor(){this.refs=[]}register(w,v){if(w)if(v=v===void 0?s.toParent:v,Array.isArray(w))for(const m of w)this.register(m,v);else if(_.isSchema(w))for(const m of w._refs.refs)m.ancestor-v>=0&&this.refs.push({ancestor:m.ancestor-v,root:m.root});else s.isRef(w)&&w.type==="value"&&w.ancestor-v>=0&&this.refs.push({ancestor:w.ancestor-v,root:w.root}),c=c||a(3328),c.isTemplate(w)&&this.register(w.refs(),v)}get length(){return this.refs.length}clone(){const w=new s.Manager;return w.refs=d(this.refs),w}reset(){this.refs=[]}roots(){return this.refs.filter(w=>!w.ancestor).map(w=>w.root)}}},3378:(i,s,a)=>{const l=a(5107),d={};d.wrap=l.string().min(1).max(2).allow(!1),s.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:d.wrap,array:d.wrap,string:d.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),d.nameRx=/^[a-zA-Z0-9]\w*$/,d.rule=l.object({alias:l.array().items(l.string().pattern(d.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(d.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),s.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(d.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(d.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(d.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(d.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(d.nameRx,d.rule),terms:l.object().pattern(d.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),s.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),d.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},d.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),d.desc.buffer,d.desc.func,d.desc.ref,d.desc.regex,d.desc.special,d.desc.template,d.desc.value,l.link("/")]),d.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.symbol(),d.desc.buffer,d.desc.func,d.desc.override,d.desc.ref,d.desc.regex,d.desc.template,d.desc.value),d.desc.messages=l.object().pattern(/.+/,[l.string(),d.desc.template,l.object().pattern(/.+/,[l.string(),d.desc.template])]),s.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:d.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),d.desc.ref],wrap:{label:d.wrap,array:d.wrap}},externals:l.boolean(),messages:d.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:d.desc.values,invalid:d.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),d.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:d.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(i,s,a)=>{const l=a(8571),d=a(9621),y=a(8160),_={value:Symbol("value")};i.exports=_.State=class{constructor(c,f,w){this.path=c,this.ancestors=f,this.mainstay=w.mainstay,this.schemas=w.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const v=new _.State(c,f,this);return w&&v.schemas&&(v.schemas=[_.schemas(w),...v.schemas]),v}nest(c,f){const w=new _.State(this.path,this.ancestors,this);return w.schemas=w.schemas&&[_.schemas(c),...w.schemas],w.debug=f,w}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new _.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=l(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},_.schemas=function(c){return y.isSchema(c)?{schema:c}:c},_.Shadow=class{constructor(){this._values=null}set(c,f,w){if(!c.length||w==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let v=this._values;for(let m=0;m{const l=a(375),d=a(8571),y=a(5277),_=a(1447),c=a(8160),f=a(6354),w=a(6133),v={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=v.Template=class{constructor(m,b){l(typeof m=="string","Template source must be a string"),l(!m.includes("\0")&&!m.includes(""),"Template source cannot contain reserved control characters"),this.source=m,this.rendered=m,this._template=null,this._settings=d(b),this._parse()}_parse(){if(!this.source.includes("{"))return;const m=v.encode(this.source),b=v.split(m);let g=!1;const p=[],h=b.shift();h&&p.push(h);for(const T of b){const x=T[0]!=="{",k=x?"}":"}}",P=T.indexOf(k);if(P===-1||T[1]==="{"){p.push(`{${v.decode(T)}`);continue}let E=T.slice(x?0:1,P);const A=E[0]===":";A&&(E=E.slice(1));const C=this._ref(v.decode(E),{raw:x,wrapped:A});p.push(C),typeof C!="string"&&(g=!0);const N=T.slice(P+k.length);N&&p.push(v.decode(N))}g?this._template=p:this.rendered=p.join("")}static date(m,b){return v.dateFormat[b.dateFormat].call(m)}describe(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&m.compact)return this.source;const b={template:this.source};return this._settings&&(b.options=this._settings),b}static build(m){return new v.Template(m.template,m.options)}isDynamic(){return!!this._template}static isTemplate(m){return!!m&&!!m[c.symbols.template]}refs(){if(!this._template)return;const m=[];for(const b of this._template)typeof b!="string"&&m.push(...b.refs);return m}resolve(m,b,g,p){return this._template&&this._template.length===1?this._part(this._template[0],m,b,g,p,{}):this.render(m,b,g,p)}_part(m){for(var b=arguments.length,g=new Array(b>1?b-1:0),p=1;p4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const T=[];for(const x of this._template)if(typeof x=="string")T.push(x);else{const k=this._part(x,m,b,g,p,h),P=v.stringify(k,m,b,g,p,h);if(P!==void 0){const E=x.raw||(h.errors&&h.errors.escapeHtml)===!1?P:y(P);T.push(v.wrap(E,x.wrapped&&g.errors.wrap.label))}}return T.join("")}_ref(m,b){let{raw:g,wrapped:p}=b;const h=[],T=k=>{const P=w.create(k,this._settings);return h.push(P),E=>P.resolve(...E)};try{var x=new _.Parser(m,{reference:T,functions:v.functions,constants:v.constants})}catch(k){throw k.message=`Invalid template variable "${m}" fails due to: ${k.message}`,k}if(x.single){if(x.single.type==="reference"){const k=h[0];return{ref:k,raw:g,refs:h,wrapped:p||k.type==="local"&&k.key==="label"}}return v.stringify(x.single.value)}return{formula:x,raw:g,refs:h}}toString(){return this.source}},v.Template.prototype[c.symbols.template]=!0,v.Template.prototype.isImmutable=!0,v.encode=function(m){return m.replace(/\\(\{+)/g,(b,g)=>v.opens.slice(0,g.length)).replace(/\\(\}+)/g,(b,g)=>v.closes.slice(0,g.length))},v.decode=function(m){return m.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},v.split=function(m){const b=[];let g="";for(let p=0;p5&&arguments[5]!==void 0?arguments[5]:{};const x=typeof m,k=p&&p.errors&&p.errors.wrap||{};let P=!1;if(w.isRef(m)&&m.render&&(P=m.in,m=m.resolve(b,g,p,h,{in:m.in,...T})),m===null)return"null";if(x==="string")return v.wrap(m,T.arrayItems&&k.string);if(x==="number"||x==="function"||x==="symbol")return m.toString();if(x!=="object")return JSON.stringify(m);if(m instanceof Date)return v.Template.date(m,p);if(m instanceof Map){const A=[];for(const[C,N]of m.entries())A.push(`${C.toString()} -> ${N.toString()}`);m=A}if(!Array.isArray(m))return m.toString();const E=[];for(const A of m)E.push(v.stringify(A,b,g,p,h,{arrayItems:!0,...T}));return v.wrap(E.join(", "),!P&&k.array)},v.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},v.functions={if:(m,b,g)=>m?b:g,length:m=>typeof m=="string"?m.length:m&&typeof m=="object"?Array.isArray(m)?m.length:Object.keys(m).length:null,msg(m){const[b,g,p,h,T]=this,x=T.messages;if(!x)return"";const k=f.template(b,x[0],m,g,p)||f.template(b,x[1],m,g,p);return k?k.render(b,g,p,h,T):""},number:m=>typeof m=="number"?m:typeof m=="string"?parseFloat(m):typeof m=="boolean"?m?1:0:m instanceof Date?m.getTime():null}},4946:(i,s,a)=>{const l=a(375),d=a(1687),y=a(8068),_=a(8160),c=a(3292),f=a(6354),w=a(6133),v={};i.exports=y.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:w.toSibling}},args(m){for(var b=arguments.length,g=new Array(b>1?b-1:0),p=1;pf.details(A,{override:!1}))})};if(g._flags.match==="one")return k.length===1?{value:k[0]}:{errors:p("alternatives.one")};if(k.length!==g.$_terms.matches.length)return{errors:p("alternatives.all",{details:P.map(A=>f.details(A,{override:!1}))})};const E=A=>A.$_terms.matches.some(C=>C.schema.type==="object"||C.schema.type==="alternatives"&&E(C.schema));return E(g)?{value:k.reduce((A,C)=>d(A,C,{mergeArrays:!1}))}:{value:k[k.length-1]}}const x=[];for(let k=0;kg.path[0]!=="is"?b.label(m):void 0,ref:!1})}},rebuild(m){m.$_modify({each:b=>{_.isSchema(b)&&b.type==="array"&&m.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(m,b){if(b.matches)for(const g of b.matches){const{schema:p,ref:h,is:T,not:x,then:k,otherwise:P}=g;m=p?m.try(p):h?m.conditional(h,{is:T,then:k,not:x,otherwise:P,switch:g.switch}):m.conditional(T,{then:k,otherwise:P})}return m}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),v.errors=function(m,b){let{error:g,state:p}=b;if(!m.length)return{errors:g("alternatives.any")};if(m.length===1)return{errors:m[0].reports};const h=new Set,T=[];for(const{reports:x,schema:k}of m){if(x.length>1)return v.unmatched(m,g);const P=x[0];if(P instanceof f.Report==0)return v.unmatched(m,g);if(P.state.path.length!==p.path.length){T.push({type:k.type,report:P});continue}if(P.code==="any.only"){for(const C of P.local.valids)h.add(C);continue}const[E,A]=P.code.split(".");A==="base"?h.add(E):T.push({type:k.type,report:P})}return T.length?T.length===1?{errors:T[0].report}:v.unmatched(m,g):{errors:g("alternatives.types",{types:[...h]})}},v.unmatched=function(m,b){const g=[];for(const p of m)g.push(...p.reports);return{errors:b("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,s,a)=>{const l=a(375),d=a(7629),y=a(8160),_=a(6914);i.exports=d.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return l(typeof c=="function","Method must be a function"),l(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,w){let{method:v}=w;try{return v(c,f)}catch(m){return f.error("any.custom",{error:m})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){l(y.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return l(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,w){let{code:v,local:m}=w;return f.error(v,m)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=_.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const w in f){const v=f[w];if(["examples","externals","metas","notes","tags"].includes(w))for(const m of v)c=c[w.slice(0,-1)](m);else if(w!=="alterations")if(w!=="whens"){if(w==="shared")for(const m of v)c=c.shared(m)}else for(const m of v){const{ref:b,is:g,not:p,then:h,otherwise:T,concat:x}=m;c=x?c.concat(x):b?c.when(b,{is:g,not:p,then:h,otherwise:T,switch:m.switch,break:m.break}):c.when(g,{then:h,otherwise:T,break:m.break})}else{const m={};for(const{target:b,adjuster:g}of v)m[b]=g;c=c.alter(m)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,s,a)=>{const l=a(375),d=a(9474),y=a(9621),_=a(8068),c=a(8160),f=a(3292),w={};i.exports=_.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(v,m){let{schema:b,state:g,prefs:p}=m;if(!Array.isArray(v))return;const h=b.$_getRule("sort");return h?w.sort(b,v,h.args.options,g,p):void 0}},validate(v,m){let{schema:b,error:g}=m;if(!Array.isArray(v)){if(b._flags.single){const p=[v];return p[c.symbols.arraySingle]=!0,{value:p}}return{errors:g("array.base")}}if(b.$_getRule("items")||b.$_terms.externals)return{value:v.slice()}},rules:{has:{method(v){v=this.$_compile(v,{appendPath:!0});const m=this.$_addRule({name:"has",args:{schema:v}});return m.$_mutateRegister(v),m},validate(v,m,b){let{state:g,prefs:p,error:h}=m,{schema:T}=b;const x=[v,...g.ancestors];for(let P=0;Pthis.$_compile(m[p]),p,{append:!0});g.$_terms.items.push(h)}return g.$_mutateRebuild()},validate(v,m){let{schema:b,error:g,state:p,prefs:h,errorsArray:T}=m;const x=b.$_terms._requireds.slice(),k=b.$_terms.ordered.slice(),P=[...b.$_terms._inclusions,...x],E=!v[c.symbols.arraySingle];delete v[c.symbols.arraySingle];const A=T();let C=v.length;for(let N=0;N="})}},ordered:{method(){for(var v=arguments.length,m=new Array(v),b=0;bthis.$_compile(m[p]),p,{append:!0});w.validateSingle(h,g),g.$_mutateRegister(h),g.$_terms.ordered.push(h)}return g.$_mutateRebuild()}},single:{method(v){const m=v===void 0||!!v;return l(!m||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",m)}},sort:{method(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(v,["by","order"]);const m={order:v.order||"ascending"};return v.by&&(m.by=f.ref(v.by,{ancestor:0}),l(!m.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:m}})},validate(v,m,b){let{error:g,state:p,prefs:h,schema:T}=m,{options:x}=b;const{value:k,errors:P}=w.sort(T,v,x,p,h);if(P)return P;for(let E=0;E1&&arguments[1]!==void 0?arguments[1]:{};l(!v||typeof v=="function"||typeof v=="string","comparator must be a function or a string"),c.assertOptions(m,["ignoreUndefined","separator"]);const b={name:"unique",args:{options:m,comparator:v}};if(v)if(typeof v=="string"){const g=c.default(m.separator,".");b.path=g?v.split(g):[v]}else b.comparator=v;return this.$_addRule(b)},validate(v,m,b,g){let{state:p,error:h,schema:T}=m,{comparator:x,options:k}=b,{comparator:P,path:E}=g;const A={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},C=P||d,N=k.ignoreUndefined;for(let $=0;$new Set(v)}},rebuild(v){v.$_terms._inclusions=[],v.$_terms._exclusions=[],v.$_terms._requireds=[];for(const m of v.$_terms.items)w.validateSingle(m,v),m._flags.presence==="required"?v.$_terms._requireds.push(m):m._flags.presence==="forbidden"?v.$_terms._exclusions.push(m):v.$_terms._inclusions.push(m);for(const m of v.$_terms.ordered)w.validateSingle(m,v)},manifest:{build:(v,m)=>(m.items&&(v=v.items(...m.items)),m.ordered&&(v=v.ordered(...m.ordered)),v)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),w.fillMissedErrors=function(v,m,b,g,p,h){const T=[];let x=0;for(const k of b){const P=k._flags.label;P?T.push(P):++x}T.length?x?m.push(v.$_createError("array.includesRequiredBoth",g,{knownMisses:T,unknownMisses:x},p,h)):m.push(v.$_createError("array.includesRequiredKnowns",g,{knownMisses:T},p,h)):m.push(v.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:x},p,h))},w.fillOrderedErrors=function(v,m,b,g,p,h){const T=[];for(const x of b)x._flags.presence==="required"&&T.push(x);T.length&&w.fillMissedErrors(v,m,T,g,p,h)},w.fillDefault=function(v,m,b,g){const p=[];let h=!0;for(let T=v.length-1;T>=0;--T){const x=v[T],k=[m,...b.ancestors],P=x.$_validate(void 0,b.localize(b.path,k,x),g).value;if(h){if(P===void 0)continue;h=!1}p.unshift(P)}p.length&&m.push(...p)},w.fastSplice=function(v,m){let b=m;for(;b{let A=w.compare(P,E,T,x);if(A!==null||(b.by&&(P=b.by.resolve(P,g,p),E=b.by.resolve(E,g,p)),A=w.compare(P,E,T,x),A!==null))return A;const C=typeof P;if(C!==typeof E)throw v.$_createError("array.sort.mismatching",m,null,g,p);if(C!=="number"&&C!=="string")throw v.$_createError("array.sort.unsupported",m,{type:C},g,p);return C==="number"?(P-E)*h:P{const l=a(375),d=a(8068),y=a(8160),_=a(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=d.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,w){let{schema:v}=w;if(typeof f!="boolean"){if(typeof f=="string"){const m=v._flags.sensitive?f:f.toLowerCase();f=m==="true"||m!=="false"&&f}return typeof f!="boolean"&&(f=v.$_terms.truthy&&v.$_terms.truthy.has(f,null,null,!v._flags.sensitive)||(!v.$_terms.falsy||!v.$_terms.falsy.has(f,null,null,!v._flags.sensitive))&&f),{value:f}}},validate(f,w){let{error:v}=w;if(typeof f!="boolean")return{value:f,errors:v("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,w=new Array(f),v=0;v0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,w)=>f?1:0},string:{from:c.isBool,to:(f,w)=>f?"true":"false"}},manifest:{build:(f,w)=>(w.truthy&&(f=f.truthy(...w.truthy)),w.falsy&&(f=f.falsy(...w.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_=a(3328),c={isDate:function(f){return f instanceof Date}};i.exports=d.extend({type:"date",coerce:{from:["number","string"],method(f,w){let{schema:v}=w;return{value:c.parse(f,v._flags.format)||f}}},validate(f,w){let{schema:v,error:m,prefs:b}=w;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=v._flags.format;return b.convert&&g&&typeof f=="string"?{value:f,errors:m("date.format",{format:g})}:{value:f,errors:m("date.base")}},rules:{compare:{method:!1,validate(f,w,v,m){let{date:b}=v,{name:g,operator:p,args:h}=m;const T=b==="now"?Date.now():b.getTime();return y.compare(f.getTime(),T,p)?f:w.error("date."+g,{limit:h.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return l(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return l(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,w)=>f.getTime()},string:{from:c.isDate,to(f,w){let{prefs:v}=w;return _.date(f,v)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,w){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(w==="iso")return y.isIsoDate(f)?c.date(f.toString()):null;const v=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),w){if(w==="javascript")return c.date(1*f);if(w==="unix")return c.date(1e3*f);if(typeof v=="string")return null}return c.date(f)},c.date=function(f){const w=new Date(f);return isNaN(w.getTime())?null:w}},390:(i,s,a)=>{const l=a(375),d=a(7824);i.exports=d.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length===f?y:_.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(y,_)=>/^\s*class\s/.test(y.toString())?y:_.error("function.class",{value:y})},minArity:{method(y){return l(Number.isSafeInteger(y)&&y>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length>=f?y:_.error("function.minArity",{n:f})}},maxArity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length<=f?y:_.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,s,a)=>{const l=a(978),d=a(375),y=a(8571),_=a(3652),c=a(8068),f=a(8160),w=a(3292),v=a(6354),m=a(6133),b=a(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(p,h)=>p.keys(h),validate(p,h){let{schema:T,error:x,state:k,prefs:P}=h;if(!p||typeof p!==T.$_property("typeof")||Array.isArray(p))return{value:p,errors:x("object.base",{type:T.$_property("typeof")})};if(!(T.$_terms.renames||T.$_terms.dependencies||T.$_terms.keys||T.$_terms.patterns||T.$_terms.externals))return;p=g.clone(p,P);const E=[];if(T.$_terms.renames&&!g.rename(T,p,k,P,E))return{value:p,errors:E};if(!T.$_terms.keys&&!T.$_terms.patterns&&!T.$_terms.dependencies)return{value:p,errors:E};const A=new Set(Object.keys(p));if(T.$_terms.keys){const C=[p,...k.ancestors];for(const N of T.$_terms.keys){const $=N.key,F=p[$];A.delete($);const z=k.localize([...k.path,$],C,N),U=N.schema.$_validate(F,z,P);if(U.errors){if(P.abortEarly)return{value:p,errors:U.errors};U.value!==void 0&&(p[$]=U.value),E.push(...U.errors)}else N.schema._flags.result==="strip"||U.value===void 0&&F!==void 0?delete p[$]:U.value!==void 0&&(p[$]=U.value)}}if(A.size||T._flags._hasPatternMatch){const C=g.unknown(T,p,A,E,k,P);if(C)return C}if(T.$_terms.dependencies)for(const C of T.$_terms.dependencies){if(C.key!==null&&g.isPresent(C.options)(C.key.resolve(p,k,P,null,{shadow:!1}))===!1)continue;const N=g.dependencies[C.rel](T,C,p,k,P);if(N){const $=T.$_createError(N.code,p,N.context,k,P);if(P.abortEarly)return{value:p,errors:$};E.push($)}}return{value:p,errors:E}},rules:{and:{method(){for(var p=arguments.length,h=new Array(p),T=0;T!p.hasOwnProperty(T.key)):new g.Keys;for(const T in p)f.tryWithPath(()=>h.$_terms.keys.push({key:T,schema:this.$_compile(p[T])}),T)}else h.$_terms.keys=new g.Keys;else h.$_terms.keys=null;return h.$_mutateRebuild()}},length:{method(p){return this.$_addRule({name:"length",args:{limit:p},operator:"="})},validate(p,h,T,x){let{limit:k}=T,{name:P,operator:E,args:A}=x;return f.compare(Object.keys(p).length,k,E)?p:h.error("object."+P,{limit:A.limit,value:p})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(p){return this.$_addRule({name:"max",method:"length",args:{limit:p},operator:"<="})}},min:{method(p){return this.$_addRule({name:"min",method:"length",args:{limit:p},operator:">="})}},nand:{method(){for(var p=arguments.length,h=new Array(p),T=0;T2&&arguments[2]!==void 0?arguments[2]:{};const x=p instanceof RegExp;x||(p=this.$_compile(p,{appendPath:!0})),d(h!==void 0,"Invalid rule"),f.assertOptions(T,["fallthrough","matches"]),x&&d(!p.flags.includes("g")&&!p.flags.includes("y"),"pattern should not use global or sticky mode"),h=this.$_compile(h,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const P={[x?"regex":"schema"]:p,rule:h};return T.matches&&(P.matches=this.$_compile(T.matches),P.matches.type!=="array"&&(P.matches=P.matches.$_root.array().items(P.matches)),k.$_mutateRegister(P.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),T.fallthrough&&(P.fallthrough=!0),k.$_terms.patterns.push(P),k.$_mutateRegister(h),k}},ref:{method(){return this.$_addRule("ref")},validate:(p,h)=>m.isRef(p)?p:h.error("object.refType",{value:p})},regex:{method(){return this.$_addRule("regex")},validate:(p,h)=>p instanceof RegExp?p:h.error("object.regex",{value:p})},rename:{method(p,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d(typeof p=="string"||p instanceof RegExp,"Rename missing the from argument"),d(typeof h=="string"||h instanceof b,"Invalid rename to argument"),d(h!==p,"Cannot rename key to same name:",p),f.assertOptions(T,["alias","ignoreUndefined","override","multiple"]);const x=this.clone();x.$_terms.renames=x.$_terms.renames||[];for(const k of x.$_terms.renames)d(k.from!==p,"Cannot rename the same key multiple times");return h instanceof b&&x.$_mutateRegister(h),x.$_terms.renames.push({from:p,to:h,options:l(g.renameDefaults,T)}),x}},schema:{method(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:p}})},validate(p,h,T){let{type:x}=T;return!f.isSchema(p)||x!=="any"&&p.type!==x?h.error("object.schema",{type:x}):p}},unknown:{method(p){return this.$_setFlag("unknown",p!==!1)}},with:{method(p,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",p,h,T)}},without:{method(p,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",p,h,T)}},xor:{method(){for(var p=arguments.length,h=new Array(p),T=0;Th.add(T,{after:T.schema.$_rootReferences(),group:T.key}),T.key);p.$_terms.keys=new g.Keys(...h.nodes)}},manifest:{build(p,h){if(h.keys&&(p=p.keys(h.keys)),h.dependencies)for(const{rel:T,key:x=null,peers:k,options:P}of h.dependencies)p=g.dependency(p,T,x,k,P);if(h.patterns)for(const{regex:T,schema:x,rule:k,fallthrough:P,matches:E}of h.patterns)p=p.pattern(T||x,k,{fallthrough:P,matches:E});if(h.renames)for(const{from:T,to:x,options:k}of h.renames)p=p.rename(T,x,k);return p}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(p,h){if(typeof p=="object"){if(h.nonEnumerables)return y(p,{shallow:!0});const x=Object.create(Object.getPrototypeOf(p));return Object.assign(x,p),x}const T=function(){for(var x=arguments.length,k=new Array(x),P=0;P1&&typeof x[x.length-1]=="object"?x.pop():{}),f.assertOptions(k,["separator","isPresent"]),x=[].concat(x);const P=f.default(k.separator,"."),E=[];for(const C of x)d(typeof C=="string",h,"peers must be strings"),E.push(w.ref(C,{separator:P,ancestor:0,prefix:!1}));T!==null&&(T=w.ref(T,{separator:P,ancestor:0,prefix:!1}));const A=p.clone();return A.$_terms.dependencies=A.$_terms.dependencies||[],A.$_terms.dependencies.push(new g.Dependency(h,T,E,x,k)),A},g.dependencies={and(p,h,T,x,k){const P=[],E=[],A=h.peers.length,C=g.isPresent(h.options);for(const N of h.peers)C(N.resolve(T,x,k,null,{shadow:!1}))===!1?P.push(N.key):E.push(N.key);if(P.length!==A&&E.length!==A)return{code:"object.and",context:{present:E,presentWithLabels:g.keysToLabels(p,E),missing:P,missingWithLabels:g.keysToLabels(p,P)}}},nand(p,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const N of h.peers)E(N.resolve(T,x,k,null,{shadow:!1}))&&P.push(N.key);if(P.length!==h.peers.length)return;const A=h.paths[0],C=h.paths.slice(1);return{code:"object.nand",context:{main:A,mainWithLabel:g.keysToLabels(p,A),peers:C,peersWithLabels:g.keysToLabels(p,C)}}},or(p,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:h.paths,peersWithLabels:g.keysToLabels(p,h.paths)}}},oxor(p,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&P.push(C.key);if(!P.length||P.length===1)return;const A={peers:h.paths,peersWithLabels:g.keysToLabels(p,h.paths)};return A.present=P,A.presentWithLabels=g.keysToLabels(p,P),{code:"object.oxor",context:A}},with(p,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:h.key.key,mainWithLabel:g.keysToLabels(p,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(p,E.key)}}},without(p,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1})))return{code:"object.without",context:{main:h.key.key,mainWithLabel:g.keysToLabels(p,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(p,E.key)}}},xor(p,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&P.push(C.key);if(P.length===1)return;const A={peers:h.paths,peersWithLabels:g.keysToLabels(p,h.paths)};return P.length===0?{code:"object.missing",context:A}:(A.present=P,A.presentWithLabels=g.keysToLabels(p,P),{code:"object.xor",context:A})}},g.keysToLabels=function(p,h){return Array.isArray(h)?h.map(T=>p.$_mapLabels(T)):p.$_mapLabels(h)},g.isPresent=function(p){return typeof p.isPresent=="function"?p.isPresent:h=>h!==void 0},g.rename=function(p,h,T,x,k){const P={};for(const E of p.$_terms.renames){const A=[],C=typeof E.from!="string";if(C)for(const N in h){if(h[N]===void 0&&E.options.ignoreUndefined||N===E.to)continue;const $=E.from.exec(N);$&&A.push({from:N,to:E.to,match:$})}else!Object.prototype.hasOwnProperty.call(h,E.from)||h[E.from]===void 0&&E.options.ignoreUndefined||A.push(E);for(const N of A){const $=N.from;let F=N.to;if(F instanceof b&&(F=F.render(h,T,x,N.match)),$!==F){if(!E.options.multiple&&P[F]&&(k.push(p.$_createError("object.rename.multiple",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly)||Object.prototype.hasOwnProperty.call(h,F)&&!E.options.override&&!P[F]&&(k.push(p.$_createError("object.rename.override",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly))return!1;h[$]===void 0?delete h[F]:h[F]=h[$],P[F]=!0,E.options.alias||delete h[$]}}}return!0},g.unknown=function(p,h,T,x,k,P){if(p.$_terms.patterns){let E=!1;const A=p.$_terms.patterns.map(N=>{if(N.matches)return E=!0,[]}),C=[h,...k.ancestors];for(const N of T){const $=h[N],F=[...k.path,N];for(let z=0;z{const l=a(375),d=a(8068),y=a(8160),_=a(3292),c=a(6354),f={};i.exports=d.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(w,v)=>w.ref(v),validate(w,v){let{schema:m,state:b,prefs:g}=v;l(m.$_terms.link,"Uninitialized link schema");const p=f.generate(m,w,b,g),h=m.$_terms.link[0].ref;return p.$_validate(w,b.nest(p,`link:${h.display}:${p.type}`),g)},generate:(w,v,m,b)=>f.generate(w,v,m,b),rules:{ref:{method(w){l(!this.$_terms.link,"Cannot reinitialize schema"),w=_.ref(w),l(w.type==="value"||w.type==="local","Invalid reference type:",w.type),l(w.type==="local"||w.ancestor==="root"||w.ancestor>0,"Link cannot reference itself");const v=this.clone();return v.$_terms.link=[{ref:w}],v}},relative:{method(){let w=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",w)}}},overrides:{concat(w){l(this.$_terms.link,"Uninitialized link schema"),l(y.isSchema(w),"Invalid schema object"),l(w.type!=="link","Cannot merge type link with another link");const v=this.clone();return v.$_terms.whens||(v.$_terms.whens=[]),v.$_terms.whens.push({concat:w}),v.$_mutateRebuild()}},manifest:{build:(w,v)=>(l(v.link,"Invalid link description missing link"),w.ref(v.link))}}),f.generate=function(w,v,m,b){let g=m.mainstay.links.get(w);if(g)return g._generate(v,m,b).schema;const p=w.$_terms.link[0].ref,{perspective:h,path:T}=f.perspective(p,m);f.assert(h,"which is outside of schema boundaries",p,w,m,b);try{g=T.length?h.$_reach(T):h}catch{f.assert(!1,"to non-existing schema",p,w,m,b)}return f.assert(g.type!=="link","which is another link",p,w,m,b),w._flags.relative||m.mainstay.links.set(w,g),g._generate(v,m,b).schema},f.perspective=function(w,v){if(w.type==="local"){for(const{schema:m,key:b}of v.schemas){if((m._flags.id||b)===w.path[0])return{perspective:m,path:w.path.slice(1)};if(m.$_terms.shared){for(const g of m.$_terms.shared)if(g._flags.id===w.path[0])return{perspective:g,path:w.path.slice(1)}}}return{perspective:null,path:null}}return w.ancestor==="root"?{perspective:v.schemas[v.schemas.length-1].schema,path:w.path}:{perspective:v.schemas[w.ancestor]&&v.schemas[w.ancestor].schema,path:w.path}},f.assert=function(w,v,m,b,g,p){w||l(!1,`"${c.label(b._flags,g,p)}" contains link reference "${m.display}" ${v}`)}},3832:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=d.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:w,error:v}=f;if(!c.match(_.numberRx))return;c=c.trim();const m={value:parseFloat(c)};if(m.value===0&&(m.value=0),!w._flags.unsafe)if(c.match(/e/i)){if(_.extractSignificantDigits(c)!==_.extractSignificantDigits(String(m.value)))return m.errors=v("number.unsafe"),m}else{const b=m.value.toString();if(b.match(/e/i))return m;if(b!==_.normalizeDecimal(c))return m.errors=v("number.unsafe"),m}return m}},validate(c,f){let{schema:w,error:v,prefs:m}=f;if(c===1/0||c===-1/0)return{value:c,errors:v("number.infinity")};if(!y.isNumber(c))return{value:c,errors:v("number.base")};const b={value:c};if(m.convert){const g=w.$_getRule("precision");if(g){const p=Math.pow(10,g.args.limit);b.value=Math.round(b.value*p)/p}}return b.value===0&&(b.value=0),!w._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,w,v){let{base:m}=w;return c*(1/m)%1==0?c:f.error("number.multiple",{multiple:v.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return l(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,w){let{limit:v}=w;const m=c.toString().match(_.precisionRx);return Math.max((m[1]?m[1].length:0)-(m[2]?parseInt(m[2],10):0),0)<=v?c:f.error("number.precision",{limit:v,value:c})},convert:!0},sign:{method(c){return l(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,w){let{sign:v}=w;return v==="negative"&&c<0||v==="positive"&&c>0?c:f.error(`number.${v}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),_.extractSignificantDigits=function(c){return c.replace(_.exponentialPartRegex,"").replace(_.dotRegex,"").replace(_.trailingZerosRegex,"").replace(_.leadingSignAndZerosRegex,"")},_.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,s,a)=>{const l=a(7824);i.exports=l.extend({type:"object",cast:{map:{from:d=>d&&typeof d=="object",to:(d,y)=>new Map(Object.entries(d))}}})},7417:(i,s,a)=>{const l=a(375),d=a(5380),y=a(1745),_=a(9959),c=a(6064),f=a(9926),w=a(5752),v=a(8068),m=a(8160),b={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:_.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=v.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,p){let{schema:h,state:T,prefs:x}=p;const k=h.$_getRule("normalize");k&&(g=g.normalize(k.args.form));const P=h.$_getRule("case");P&&(g=P.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const E=h.$_getRule("trim");if(E&&E.args.enabled&&(g=g.trim()),h.$_terms.replacements)for(const C of h.$_terms.replacements)g=g.replace(C.pattern,C.replacement);const A=h.$_getRule("hex");if(A&&A.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),h.$_getRule("isoDate")){const C=b.isoDate(g);C&&(g=C)}if(h._flags.truncate){const C=h.$_getRule("max");if(C){let N=C.args.limit;if(m.isResolvable(N)&&(N=N.resolve(g,T,x),!m.limit(N)))return{value:g,errors:h.$_createError("any.ref",N,{ref:C.args.limit,arg:"limit",reason:"must be a positive integer"},T,x)};g=g.slice(0,N)}}return{value:g}}},validate(g,p){let{schema:h,error:T}=p;if(typeof g!="string")return{value:g,errors:T("string.base")};if(g===""){const x=h.$_getRule("min");return x&&x.args.limit===0?void 0:{value:g,errors:T("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,p)=>/^[a-zA-Z0-9]+$/.test(g)?g:p.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,p,h){let{options:T}=h;return b.base64Regex[T.paddingRequired][T.urlSafe].test(g)?g:p.error("string.base64")}},case:{method(g){return l(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,p,h){let{direction:T}=h;return T==="lower"&&g===g.toLocaleLowerCase()||T==="upper"&&g===g.toLocaleUpperCase()?g:p.error(`string.${T}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,p){let h=g.length,T=0,x=1;for(;h--;){const k=g.charAt(h)*x;T+=k-9*(k>9),x^=3}return T>0&&T%10==0?g:p.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,p,h){let{options:T}=h;const x=g.match(b.dataUriRegex);return x&&(!x[2]||x[2]!=="base64"||b.base64Regex[T.paddingRequired].false.test(x[3]))?g:p.error("string.dataUri")}},domain:{method(g){g&&m.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const p=b.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:p})},validate(g,p,h,T){let{address:x}=T;return d.isValid(g,x)?g:p.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),l(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const p=b.addressOptions(g),h=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:h,address:p})},validate(g,p,h,T){let{options:x}=h,{regex:k,address:P}=T;const E=x.multiple?g.split(k):[g],A=[];for(const C of E)y.isValid(C,P)||A.push(C);return A.length?p.error("string.email",{value:g,invalids:A}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["version","separator"]);let p="";if(g.version){const x=[].concat(g.version);l(x.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let P=0;P0&&arguments[0]!==void 0?arguments[0]:{};return m.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},l(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,p,h){let{options:T}=h;return b.hexRegex.test(g)?T.byteAligned&&g.length%2!=0?p.error("string.hexAlign"):g:p.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,p)=>d.isValid(g,{minDomainSegments:1})||b.ipRegex.test(g)?g:p.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["cidr","version"]);const{cidr:p,versions:h,regex:T}=_.regex(g),x=g.version?h:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:p,version:x}},regex:T})},validate(g,p,h,T){let{options:x}=h,{regex:k}=T;return k.test(g)?g:x.version?p.error("string.ipVersion",{value:g,cidr:x.cidr,version:x.version}):p.error("string.ip",{value:g,cidr:x.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,p){let{error:h}=p;return b.isoDate(g)?g:h("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,p)=>b.isoDurationRegex.test(g)?g:p.error("string.isoDuration")},length:{method(g,p){return b.length(this,"length",g,"=",p)},validate(g,p,h,T){let{limit:x,encoding:k}=h,{name:P,operator:E,args:A}=T;const C=!k&&g.length;return m.compare(C,x,E)?g:p.error("string."+P,{limit:A.limit,value:g,encoding:k})},args:[{name:"limit",ref:!0,assert:m.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,p){return b.length(this,"max",g,"<=",p)},args:["limit","encoding"]},min:{method(g,p){return b.length(this,"min",g,">=",p)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return l(b.normalizationForms.includes(g),"normalization form must be one of "+b.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,p,h){let{error:T}=p,{form:x}=h;return g===g.normalize(x)?g:T("string.normalize",{value:g,form:x})},convert:!0},pattern:{alias:"regex",method(g){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(g instanceof RegExp,"regex must be a RegExp"),l(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof p=="string"&&(p={name:p}),m.assertOptions(p,["invert","name"]);const h=["string.pattern",p.invert?".invert":"",p.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:p},errorCode:h})},validate(g,p,h,T){let{regex:x,options:k}=h,{errorCode:P}=T;return x.test(g)^k.invert?g:p.error(P,{name:k.name,regex:x,value:g})},args:["regex","options"],multi:!0},replace:{method(g,p){typeof g=="string"&&(g=new RegExp(c(g),"g")),l(g instanceof RegExp,"pattern must be a RegExp"),l(typeof p=="string","replacement must be a String");const h=this.clone();return h.$_terms.replacements||(h.$_terms.replacements=[]),h.$_terms.replacements.push({pattern:g,replacement:p}),h}},token:{method(){return this.$_addRule("token")},validate:(g,p)=>/^\w+$/.test(g)?g:p.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,p,h){let{enabled:T}=h;return T&&g!==g.trim()?p.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&m.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:p,scheme:h}=w.regex(g),T=g.domain?b.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:p,domain:T,scheme:h})},validate(g,p,h,T){let{options:x}=h,{regex:k,domain:P,scheme:E}=T;if(["http:/","https:/"].includes(g))return p.error("string.uri");const A=k.exec(g);if(A){const C=A[1]||A[2];return!P||x.allowRelative&&!C||d.isValid(C,P)?g:p.error("string.domain",{value:C})}return x.relativeOnly?p.error("string.uriRelativeOnly"):x.scheme?p.error("string.uriCustomScheme",{scheme:E,value:g}):p.error("string.uri")}}},manifest:{build(g,p){if(p.replacements)for(const{pattern:h,replacement:T}of p.replacements)g=g.replace(h,T);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),b.addressOptions=function(g){if(!g||(l(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds);l(typeof g.tlds=="object","tlds must be true, false, or an object");const p=g.tlds.deny;if(p)return Array.isArray(p)&&(g=Object.assign({},g,{tlds:{deny:new Set(p)}})),l(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),b.validateTlds(g.tlds.deny,"tlds.deny"),g;const h=g.tlds.allow;return h?h===!0?(l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds)):(Array.isArray(h)&&(g=Object.assign({},g,{tlds:{allow:new Set(h)}})),l(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),b.validateTlds(g.tlds.allow,"tlds.allow"),g):g},b.validateTlds=function(g,p){for(const h of g)l(d.isValid(h,{minDomainSegments:1,maxDomainSegments:1}),`${p} must contain valid top level domain names`)},b.isoDate=function(g){if(!m.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const p=new Date(g);return isNaN(p.getTime())?null:p.toISOString()},b.length=function(g,p,h,T,x){return l(!x||!1,"Invalid encoding:",x),g.$_addRule({name:p,method:"length",args:{limit:h,encoding:x},operator:T})}},8826:(i,s,a)=>{const l=a(375),d=a(8068),y={};y.Map=class extends Map{slice(){return new y.Map(this)}},i.exports=d.extend({type:"symbol",terms:{map:{init:new y.Map}},coerce:{method(_,c){let{schema:f,error:w}=c;const v=f.$_terms.map.get(_);return v&&(_=v),f._flags.only&&typeof _!="symbol"?{value:_,errors:w("symbol.map",{map:f.$_terms.map})}:{value:_}}},validate(_,c){let{error:f}=c;if(typeof _!="symbol")return{value:_,errors:f("symbol.base")}},rules:{map:{method(_){_&&!_[Symbol.iterator]&&typeof _=="object"&&(_=Object.entries(_)),l(_&&_[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const w of _){l(w&&w[Symbol.iterator],"Entry must be an iterable");const[v,m]=w;l(typeof v!="object"&&typeof v!="function"&&typeof v!="symbol","Key must not be of type object, function, or Symbol"),l(typeof m=="symbol","Value must be a Symbol"),c.$_terms.map.set(v,m),f.push(m)}return c.valid(...f)}}},manifest:{build:(_,c)=>(c.map&&(_=_.map(c.map)),_)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,s,a)=>{const l=a(375),d=a(8571),y=a(738),_=a(9621),c=a(8160),f=a(6354),w=a(493),v={result:Symbol("result")};s.entry=function(m,b,g){let p=c.defaults;g&&(l(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),p=c.preferences(c.defaults,g));const h=v.entry(m,b,p);l(!h.mainstay.externals.length,"Schema with external rules must use validateAsync()");const T={value:h.value};return h.error&&(T.error=h.error),h.mainstay.warnings.length&&(T.warning=f.details(h.mainstay.warnings)),h.mainstay.debug&&(T.debug=h.mainstay.debug),h.mainstay.artifacts&&(T.artifacts=h.mainstay.artifacts),T},s.entryAsync=async function(m,b,g){let p=c.defaults;g&&(p=c.preferences(c.defaults,g));const h=v.entry(m,b,p),T=h.mainstay;if(h.error)throw T.debug&&(h.error.debug=T.debug),h.error;if(T.externals.length){let k=h.value;for(const{method:P,path:E,label:A}of T.externals){let C,N,$=k;E.length&&(C=E[E.length-1],N=_(k,E.slice(0,-1)),$=N[C]);try{const F=await P($,{prefs:g});if(F===void 0||F===$)continue;N?N[C]=F:k=F}catch(F){throw p.errors.label&&(F.message+=` (${A})`),F}}h.value=k}if(!p.warnings&&!p.debug&&!p.artifacts)return h.value;const x={value:h.value};return T.warnings.length&&(x.warning=f.details(T.warnings)),T.debug&&(x.debug=T.debug),T.artifacts&&(x.artifacts=T.artifacts),x},v.entry=function(m,b,g){const{tracer:p,cleanup:h}=v.tracer(b,g),T={externals:[],warnings:[],tracer:p,debug:g.debug?[]:null,links:b._ids._schemaChain?new Map:null},x=b._ids._schemaChain?[{schema:b}]:null,k=new w([],[],{mainstay:T,schemas:x}),P=s.validate(m,b,k,g);h&&b.$_root.untrace();const E=f.process(P.errors,m,g);return{value:P.value,error:E,mainstay:T}},v.tracer=function(m,b){return m.$_root._tracer?{tracer:m.$_root._tracer._register(m)}:b.debug?(l(m.$_root.trace,"Debug mode not supported"),{tracer:m.$_root.trace()._register(m),cleanup:!0}):{tracer:v.ignore}},s.validate=function(m,b,g,p){let h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(b.$_terms.whens&&(b=b._generate(m,g,p).schema),b._preferences&&(p=v.prefs(b,p)),b._cache&&p.cache){const C=b._cache.get(m);if(g.mainstay.tracer.debug(g,"validate","cached",!!C),C)return C}const T=(C,N,$)=>b.$_createError(C,m,N,$||g,p),x={original:m,prefs:p,schema:b,state:g,error:T,errorsArray:v.errorsArray,warn:(C,N,$)=>g.mainstay.warnings.push(T(C,N,$)),message:(C,N)=>b.$_createError("custom",m,N,g,p,{messages:C})};g.mainstay.tracer.entry(b,g);const k=b._definition;if(k.prepare&&m!==void 0&&p.convert){const C=k.prepare(m,x);if(C){if(g.mainstay.tracer.value(g,"prepare",m,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);m=C.value}}if(k.coerce&&m!==void 0&&p.convert&&(!k.coerce.from||k.coerce.from.includes(typeof m))){const C=k.coerce.method(m,x);if(C){if(g.mainstay.tracer.value(g,"coerced",m,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);m=C.value}}const P=b._flags.empty;P&&P.$_match(v.trim(m,b),g.nest(P),c.defaults)&&(g.mainstay.tracer.value(g,"empty",m,void 0),m=void 0);const E=h.presence||b._flags.presence||(b._flags._endedSwitch?null:p.presence);if(m===void 0){if(E==="forbidden")return v.finalize(m,null,x);if(E==="required")return v.finalize(m,[b.$_createError("any.required",m,null,g,p)],x);if(E==="optional"){if(b._flags.default!==c.symbols.deepDefault)return v.finalize(m,null,x);g.mainstay.tracer.value(g,"default",m,{}),m={}}}else if(E==="forbidden")return v.finalize(m,[b.$_createError("any.unknown",m,null,g,p)],x);const A=[];if(b._valids){const C=b._valids.get(m,g,p,b._flags.insensitive);if(C)return p.convert&&(g.mainstay.tracer.value(g,"valids",m,C.value),m=C.value),g.mainstay.tracer.filter(b,g,"valid",C),v.finalize(m,null,x);if(b._flags.only){const N=b.$_createError("any.only",m,{valids:b._valids.values({display:!0})},g,p);if(p.abortEarly)return v.finalize(m,[N],x);A.push(N)}}if(b._invalids){const C=b._invalids.get(m,g,p,b._flags.insensitive);if(C){g.mainstay.tracer.filter(b,g,"invalid",C);const N=b.$_createError("any.invalid",m,{invalids:b._invalids.values({display:!0})},g,p);if(p.abortEarly)return v.finalize(m,[N],x);A.push(N)}}if(k.validate){const C=k.validate(m,x);if(C&&(g.mainstay.tracer.value(g,"base",m,C.value),m=C.value,C.errors)){if(!Array.isArray(C.errors))return A.push(C.errors),v.finalize(m,A,x);if(C.errors.length)return A.push(...C.errors),v.finalize(m,A,x)}}return b._rules.length?v.rules(m,A,x):v.finalize(m,A,x)},v.rules=function(m,b,g){const{schema:p,state:h,prefs:T}=g;for(const x of p._rules){const k=p._definition.rules[x.method];if(k.convert&&T.convert){h.mainstay.tracer.log(p,h,"rule",x.name,"full");continue}let P,E=x.args;if(x._resolve.length){E=Object.assign({},E);for(const C of x._resolve){const N=k.argsByName.get(C),$=E[C].resolve(m,h,T),F=N.normalize?N.normalize($):$,z=c.validateArg(F,null,N);if(z){P=p.$_createError("any.ref",$,{arg:C,ref:E[C],reason:z},h,T);break}E[C]=F}}P=P||k.validate(m,g,E,x);const A=v.rule(P,x);if(A.errors){if(h.mainstay.tracer.log(p,h,"rule",x.name,"error"),x.warn){h.mainstay.warnings.push(...A.errors);continue}if(T.abortEarly)return v.finalize(m,A.errors,g);b.push(...A.errors)}else h.mainstay.tracer.log(p,h,"rule",x.name,"pass"),h.mainstay.tracer.value(h,"rule",m,A.value,x.name),m=A.value}return v.finalize(m,b,g)},v.rule=function(m,b){return m instanceof f.Report?(v.error(m,b),{errors:[m],value:null}):Array.isArray(m)&&m[c.symbols.errors]?(m.forEach(g=>v.error(g,b)),{errors:m,value:null}):{errors:null,value:m}},v.error=function(m,b){return b.message&&m._setTemplate(b.message),m},v.finalize=function(m,b,g){b=b||[];const{schema:p,state:h,prefs:T}=g;if(b.length){const k=v.default("failover",void 0,b,g);k!==void 0&&(h.mainstay.tracer.value(h,"failover",m,k),m=k,b=[])}if(b.length&&p._flags.error)if(typeof p._flags.error=="function"){b=p._flags.error(b),Array.isArray(b)||(b=[b]);for(const k of b)l(k instanceof Error||k instanceof f.Report,"error() must return an Error object")}else b=[p._flags.error];if(m===void 0){const k=v.default("default",m,b,g);h.mainstay.tracer.value(h,"default",m,k),m=k}if(p._flags.cast&&m!==void 0){const k=p._definition.cast[p._flags.cast];if(k.from(m)){const P=k.to(m,g);h.mainstay.tracer.value(h,"cast",m,P,p._flags.cast),m=P}}if(p.$_terms.externals&&T.externals&&T._externals!==!1)for(const{method:k}of p.$_terms.externals)h.mainstay.externals.push({method:k,path:h.path,label:f.label(p._flags,h,T)});const x={value:m,errors:b.length?b:null};return p._flags.result&&(x.value=p._flags.result==="strip"?void 0:g.original,h.mainstay.tracer.value(h,p._flags.result,m,x.value),h.shadow(m,p._flags.result)),p._cache&&T.cache!==!1&&!p._refs.length&&p._cache.set(g.original,x),m===void 0||x.errors||p._flags.artifact===void 0||(h.mainstay.artifacts=h.mainstay.artifacts||new Map,h.mainstay.artifacts.has(p._flags.artifact)||h.mainstay.artifacts.set(p._flags.artifact,[]),h.mainstay.artifacts.get(p._flags.artifact).push(h.path)),x},v.prefs=function(m,b){const g=b===c.defaults;return g&&m._preferences[c.symbols.prefs]?m._preferences[c.symbols.prefs]:(b=c.preferences(b,m._preferences),g&&(m._preferences[c.symbols.prefs]=b),b)},v.default=function(m,b,g,p){const{schema:h,state:T,prefs:x}=p,k=h._flags[m];if(x.noDefaults||k===void 0)return b;if(T.mainstay.tracer.log(h,T,"rule",m,"full"),!k)return k;if(typeof k=="function"){const P=k.length?[d(T.ancestors[0]),p]:[];try{return k(...P)}catch(E){return void g.push(h.$_createError(`any.${m}`,null,{error:E},T,x))}}return typeof k!="object"?k:k[c.symbols.literal]?k.literal:c.isResolvable(k)?k.resolve(b,T,x):d(k)},v.trim=function(m,b){if(typeof m!="string")return m;const g=b.$_getRule("trim");return g&&g.args.enabled?m.trim():m},v.ignore={active:!1,debug:y,entry:y,filter:y,log:y,resolve:y,value:y},v.errorsArray=function(){const m=[];return m[c.symbols.errors]=!0,m}},2036:(i,s,a)=>{const l=a(375),d=a(9474),y=a(8160),_={};i.exports=_.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=_.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){y.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,w){if(c=c||new _.Values,f){if(f._override)return f.clone();for(const v of[...f._values,...f._refs])c.add(v)}if(w)for(const v of[...w._values,...w._refs])c.remove(v);return c.length?c:null}remove(c){y.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,w,v){return!!this.get(c,f,w,v)}get(c,f,w,v){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&v){const m=this._lowercase.get(c.toLowerCase());if(m)return{value:m}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const m of this._values)if(d(m,c))return{value:m}}if(f)for(const m of this._refs){const b=m.resolve(c,f,w,null,{in:!0});if(b===void 0)continue;const g=m.in&&typeof b=="object"?Array.isArray(b)?b:Object.keys(b):[b];for(const p of g)if(typeof p==typeof c){if(v&&c&&typeof c=="string"){if(p.toLowerCase()===c.toLowerCase())return{value:p,ref:m}}else if(d(p,c))return{value:p,ref:m}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const w of[...this._values,...this._refs])w!==void 0&&f.push(w);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new _.Values(this._values,this._refs);return c._override=this._override,c}concat(c){l(!c._override,"Cannot concat override set of values");const f=new _.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},_.Values.prototype[y.symbols.values]=!0,_.Values.prototype.slice=_.Values.prototype.clone,_.lowercases=function(c){const f=new Map;if(c)for(const w of c)typeof w=="string"&&f.set(w.toLowerCase(),w);return f}},978:(i,s,a)=>{const l=a(375),d=a(8571),y=a(1687),_=a(9621),c={};i.exports=function(f,w){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(l(f&&typeof f=="object","Invalid defaults value: must be an object"),l(!w||w===!0||typeof w=="object","Invalid source value: must be true, falsy or an object"),l(typeof v=="object","Invalid options: must be an object"),!w)return null;if(v.shallow)return c.applyToDefaultsWithShallow(f,w,v);const m=d(f);if(w===!0)return m;const b=v.nullOverride!==void 0&&v.nullOverride;return y(m,w,{nullOverride:b,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,w,v){const m=v.shallow;l(Array.isArray(m),"Invalid keys");const b=new Map,g=w===!0?null:new Set;for(let T of m){T=Array.isArray(T)?T:T.split(".");const x=_(f,T);x&&typeof x=="object"?b.set(x,g&&_(w,T)||x):g&&g.add(T)}const p=d(f,{},b);if(!g)return p;for(const T of g)c.reachCopy(p,w,T);const h=v.nullOverride!==void 0&&v.nullOverride;return y(p,w,{nullOverride:h,mergeArrays:!1})},c.reachCopy=function(f,w,v){for(const g of v){if(!(g in w))return;const p=w[g];if(typeof p!="object"||p===null)return;w=p}const m=w;let b=f;for(let g=0;g{const l=a(7916);i.exports=function(d){if(!d){for(var y=arguments.length,_=new Array(y>1?y-1:0),c=1;c{const l=a(9621),d=a(4277),y=a(7043),_={needsProtoHack:new Set([d.set,d.map,d.weakSet,d.weakMap])};i.exports=_.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let v=_.clone,m=w;if(f.shallow){if(f.shallow!==!0)return _.cloneWithShallow(c,f);v=h=>h}else if(m){const h=m.get(c);if(h)return h}else m=new Map;const b=d.getInternalProto(c);if(b===d.buffer)return!1;if(b===d.date)return new Date(c.getTime());if(b===d.regex)return new RegExp(c);const g=_.base(c,b,f);if(g===c)return c;if(m&&m.set(c,g),b===d.set)for(const h of c)g.add(v(h,f,m));else if(b===d.map)for(const[h,T]of c)g.set(h,v(T,f,m));const p=y.keys(c,f);for(const h of p){if(h==="__proto__")continue;if(b===d.array&&h==="length"){g.length=c.length;continue}const T=Object.getOwnPropertyDescriptor(c,h);T?T.get||T.set?Object.defineProperty(g,h,T):T.enumerable?g[h]=v(c[h],f,m):Object.defineProperty(g,h,{enumerable:!1,writable:!0,configurable:!0,value:v(c[h],f,m)}):Object.defineProperty(g,h,{enumerable:!0,writable:!0,configurable:!0,value:v(c[h],f,m)})}return g},_.cloneWithShallow=function(c,f){const w=f.shallow;(f=Object.assign({},f)).shallow=!1;const v=new Map;for(const m of w){const b=l(c,m);typeof b!="object"&&typeof b!="function"||v.set(b,b)}return _.clone(c,f,v)},_.base=function(c,f,w){if(w.prototype===!1)return _.needsProtoHack.has(f)?new f.constructor:f===d.array?[]:{};const v=Object.getPrototypeOf(c);if(v&&v.isImmutable)return c;if(f===d.array){const m=[];return v!==f&&Object.setPrototypeOf(m,v),m}if(_.needsProtoHack.has(f)){const m=new v.constructor;return v!==f&&Object.setPrototypeOf(m,v),m}return Object.create(v)}},9474:(i,s,a)=>{const l=a(4277),d={mismatched:null};i.exports=function(y,_,c){return c=Object.assign({prototype:!0},c),!!d.isDeepEqual(y,_,c,[])},d.isDeepEqual=function(y,_,c,f){if(y===_)return y!==0||1/y==1/_;const w=typeof y;if(w!==typeof _||y===null||_===null)return!1;if(w==="function"){if(!c.deepFunction||y.toString()!==_.toString())return!1}else if(w!=="object")return y!=y&&_!=_;const v=d.getSharedType(y,_,!!c.prototype);switch(v){case l.buffer:return!1;case l.promise:return y===_;case l.regex:return y.toString()===_.toString();case d.mismatched:return!1}for(let m=f.length-1;m>=0;--m)if(f[m].isSame(y,_))return!0;f.push(new d.SeenEntry(y,_));try{return!!d.isDeepEqualObj(v,y,_,c,f)}finally{f.pop()}},d.getSharedType=function(y,_,c){if(c)return Object.getPrototypeOf(y)!==Object.getPrototypeOf(_)?d.mismatched:l.getInternalProto(y);const f=l.getInternalProto(y);return f!==l.getInternalProto(_)?d.mismatched:f},d.valueOf=function(y){const _=y.valueOf;if(_===void 0)return y;try{return _.call(y)}catch(c){return c}},d.hasOwnEnumerableProperty=function(y,_){return Object.prototype.propertyIsEnumerable.call(y,_)},d.isSetSimpleEqual=function(y,_){for(const c of Set.prototype.values.call(y))if(!Set.prototype.has.call(_,c))return!1;return!0},d.isDeepEqualObj=function(y,_,c,f,w){const{isDeepEqual:v,valueOf:m,hasOwnEnumerableProperty:b}=d,{keys:g,getOwnPropertySymbols:p}=Object;if(y===l.array){if(!f.part){if(_.length!==c.length)return!1;for(let P=0;P<_.length;++P)if(!v(_[P],c[P],f,w))return!1;return!0}for(const P of _)for(const E of c)if(v(P,E,f,w))return!0}else if(y===l.set){if(_.size!==c.size)return!1;if(!d.isSetSimpleEqual(_,c)){const P=new Set(Set.prototype.values.call(c));for(const E of Set.prototype.values.call(_)){if(P.delete(E))continue;let A=!1;for(const C of P)if(v(E,C,f,w)){P.delete(C),A=!0;break}if(!A)return!1}}}else if(y===l.map){if(_.size!==c.size)return!1;for(const[P,E]of Map.prototype.entries.call(_))if(E===void 0&&!Map.prototype.has.call(c,P)||!v(E,Map.prototype.get.call(c,P),f,w))return!1}else if(y===l.error&&(_.name!==c.name||_.message!==c.message))return!1;const h=m(_),T=m(c);if((_!==h||c!==T)&&!v(h,T,f,w))return!1;const x=g(_);if(!f.part&&x.length!==g(c).length&&!f.skip)return!1;let k=0;for(const P of x)if(f.skip&&f.skip.includes(P))c[P]===void 0&&++k;else if(!b(c,P)||!v(_[P],c[P],f,w))return!1;if(!f.part&&x.length-k!==g(c).length)return!1;if(f.symbols!==!1){const P=p(_),E=new Set(p(c));for(const A of P){if(!f.skip||!f.skip.includes(A)){if(b(_,A)){if(!b(c,A)||!v(_[A],c[A],f,w))return!1}else if(b(c,A))return!1}E.delete(A)}for(const A of E)if(b(c,A))return!1}return!0},d.SeenEntry=class{constructor(y,_){this.obj=y,this.ref=_}isSame(y,_){return this.obj===y&&this.ref===_}}},7916:(i,s,a)=>{const l=a(8761);i.exports=class extends Error{constructor(d){super(d.filter(y=>y!=="").map(y=>typeof y=="string"?y:y instanceof Error?y.message:l(y)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s.assert)}}},5277:i=>{const s={};i.exports=function(a){if(!a)return"";let l="";for(let d=0;d=256?"&#"+a+";":`&#x${a.toString(16).padStart(2,"0")};`)},s.isSafe=function(a){return s.safeCharCodes.has(a)},s.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),s.safeCharCodes=function(){const a=new Set;for(let l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&a.add(l);return a}()},6064:i=>{i.exports=function(s){return s.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,s,a)=>{const l=a(375),d=a(8571),y=a(7043),_={};i.exports=_.merge=function(c,f,w){if(l(c&&typeof c=="object","Invalid target value: must be an object"),l(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(w=Object.assign({nullOverride:!0,mergeArrays:!0},w),Array.isArray(f)){l(Array.isArray(c),"Cannot merge array onto an object"),w.mergeArrays||(c.length=0);for(let m=0;m{const l=a(375),d={};i.exports=function(y,_,c){if(_===!1||_==null)return y;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(_);l(!f||!c.separator,"Separator option is not valid for array-based chain");const w=f?_:_.split(c.separator||".");let v=y;for(let m=0;m{i.exports=function(){try{return JSON.stringify(...arguments)}catch(s){return"[Cannot display object: "+s.message+"]"}}},4277:(i,s)=>{const a={};s=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},a.typeMap=new Map([["[object Error]",s.error],["[object Map]",s.map],["[object Promise]",s.promise],["[object Set]",s.set],["[object WeakMap]",s.weakMap],["[object WeakSet]",s.weakSet]]),s.getInternalProto=function(l){if(Array.isArray(l))return s.array;if(l instanceof Date)return s.date;if(l instanceof RegExp)return s.regex;if(l instanceof Error)return s.error;const d=Object.prototype.toString.call(l);return a.typeMap.get(d)||s.generic}},7043:(i,s)=>{s.keys=function(a){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(a):Object.getOwnPropertyNames(a)}},3652:(i,s,a)=>{const l=a(375),d={};s.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(y,_){const c=[].concat((_=_||{}).before||[]),f=[].concat(_.after||[]),w=_.group||"?",v=_.sort||0;l(!c.includes(w),`Item cannot come before itself: ${w}`),l(!c.includes("?"),"Item cannot come before unassociated items"),l(!f.includes(w),`Item cannot come after itself: ${w}`),l(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(y)||(y=[y]);for(const m of y){const b={seq:this._items.length,sort:v,before:c,after:f,group:w,node:m};this._items.push(b)}if(!_.manual){const m=this._sort();l(m,"item",w!=="?"?`added into group ${w}`:"","created a dependencies error")}return this.nodes}merge(y){Array.isArray(y)||(y=[y]);for(const c of y)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(d.mergeSort);for(let c=0;cy.sort===_.sort?0:y.sort<_.sort?-1:1},5380:(i,s,a)=>{const l=a(443),d=a(2178),y={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:l.URL||URL};s.analyze=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_)return d.code("DOMAIN_NON_EMPTY_STRING");if(typeof _!="string")throw new Error("Invalid input: domain must be a string");if(_.length>256)return d.code("DOMAIN_TOO_LONG");if(!!y.nonAsciiRx.test(_)){if(c.allowUnicode===!1)return d.code("DOMAIN_INVALID_UNICODE_CHARS");_=_.normalize("NFC")}if(y.domainControlRx.test(_))return d.code("DOMAIN_INVALID_CHARS");_=y.punycode(_),c.allowFullyQualified&&_[_.length-1]==="."&&(_=_.slice(0,-1));const w=c.minDomainSegments||y.minDomainSegments,v=_.split(".");if(v.lengthc.maxDomainSegments)return d.code("DOMAIN_SEGMENTS_COUNT_MAX");const m=c.tlds;if(m){const b=v[v.length-1].toLowerCase();if(m.deny&&m.deny.has(b)||m.allow&&!m.allow.has(b))return d.code("DOMAIN_FORBIDDEN_TLDS")}for(let b=0;b63)return d.code("DOMAIN_LONG_SEGMENT");if(b{const l=a(9848),d=a(5380),y=a(2178),_={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.TextEncoder||TextEncoder)};s.analyze=function(c,f){return _.email(c,f)},s.isValid=function(c,f){return!_.email(c,f)},_.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return y.code("EMPTY_STRING");const w=!_.nonAsciiRx.test(c);if(!w){if(f.allowUnicode===!1)return y.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const v=c.split("@");if(v.length!==2)return v.length>2?y.code("MULTIPLE_AT_CHAR"):y.code("MISSING_AT_CHAR");const[m,b]=v;if(!m)return y.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return y.code("ADDRESS_TOO_LONG");if(_.encoder.encode(m).length>64)return y.code("LOCAL_TOO_LONG")}return _.local(m,w)||d.analyze(b,f)},_.local=function(c,f){const w=c.split(".");for(const v of w){if(!v.length)return y.code("EMPTY_LOCAL_SEGMENT");if(f){if(!_.atextRx.test(v))return y.code("INVALID_LOCAL_CHARS")}else for(const m of v){if(_.atextRx.test(m))continue;const b=_.binary(m);if(!_.atomRx.test(b))return y.code("INVALID_LOCAL_CHARS")}}},_.binary=function(c){return Array.from(_.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},_.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,_.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,s)=>{s.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},s.code=function(a){return{code:a,error:s.codes[a]}}},9959:(i,s,a)=>{const l=a(375),d=a(5752);s.regex=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};l(y.cidr===void 0||typeof y.cidr=="string","options.cidr must be a string");const _=y.cidr?y.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(_),"options.cidr must be one of required, optional, forbidden"),l(y.version===void 0||typeof y.version=="string"||Array.isArray(y.version),"options.version must be a string or an array of string");let c=y.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),l(c.length>=1,"options.version must have at least 1 version specified");for(let m=0;m{if(_==="forbidden")return d.ip[m];const b=`\\/${m==="ipv4"?d.ip.v4Cidr:d.ip.v6Cidr}`;return _==="required"?`${d.ip[m]}${b}`:`${d.ip[m]}(?:${b})?`}),w=`(?:${f.join("|")})`,v=new RegExp(`^${w}$`);return{cidr:_,versions:c,regex:v,raw:w}}},5752:(i,s,a)=>{const l=a(375),d=a(6064),y={generate:function(){const _={},c="!\\$&'\\(\\)\\*\\+,;=",f="\\w-\\.~%\\dA-Fa-f"+c+":@",w="["+f+"]",v="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";_.ipv4address="(?:"+v+"\\.){3}"+v;const m="[\\dA-Fa-f]{1,4}",b="(?:"+m+":"+m+"|"+_.ipv4address+")",g="(?:"+m+":){6}"+b,p="::(?:"+m+":){5}"+b,h="(?:"+m+")?::(?:"+m+":){4}"+b,T="(?:(?:"+m+":){0,1}"+m+")?::(?:"+m+":){3}"+b,x="(?:(?:"+m+":){0,2}"+m+")?::(?:"+m+":){2}"+b,k="(?:(?:"+m+":){0,3}"+m+")?::"+m+":"+b,P="(?:(?:"+m+":){0,4}"+m+")?::"+b;_.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",_.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",_.ipv6address="(?:"+g+"|"+p+"|"+h+"|"+T+"|"+x+"|"+k+"|"+P+"|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)",_.ipvFuture="v[\\dA-Fa-f]+\\.[\\w-\\.~"+c+":]+",_.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",_.schemeRegex=new RegExp(_.scheme);const E="[\\w-\\.~%\\dA-Fa-f"+c+":]*",A="(?:\\[(?:"+_.ipv6address+"|"+_.ipvFuture+")\\]|"+_.ipv4address+"|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})",C="(?:"+E+"@)?"+A+"(?::\\d*)?",N="(?:"+E+"@)?("+A+")(?::\\d*)?",$=w+"+",F="(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*",z="\\/(?:"+$+F+")?",U=$+F,H="[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=@]+"+F;return _.hierPart="(?:(?:\\/\\/"+C+F+")|"+z+"|"+U+"|(?:\\/\\/\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*))",_.hierPartCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+U+")",_.relativeRef="(?:(?:\\/\\/"+C+F+")|"+z+"|"+H+"|)",_.relativeRefCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+H+"|)",_.query="["+f+"\\/\\?]*(?=#|$)",_.queryWithSquareBrackets="["+f+"\\[\\]\\/\\?]*(?=#|$)",_.fragment="["+f+"\\/\\?]*",_}};y.rfc3986=y.generate(),s.ip={v4Cidr:y.rfc3986.ipv4Cidr,v6Cidr:y.rfc3986.ipv6Cidr,ipv4:y.rfc3986.ipv4address,ipv6:y.rfc3986.ipv6address,ipvfuture:y.rfc3986.ipvFuture},y.createRegex=function(_){const c=y.rfc3986,f="(?:\\?"+(_.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",w=_.domain?c.relativeRefCapture:c.relativeRef;if(_.relativeOnly)return y.wrap(w+f);let v="";if(_.scheme){l(_.scheme instanceof RegExp||typeof _.scheme=="string"||Array.isArray(_.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(_.scheme);l(g.length>=1,"scheme must have at least 1 scheme specified");const p=[];for(let h=0;h0&&arguments[0]!==void 0?arguments[0]:{};return _.scheme||_.allowRelative||_.relativeOnly||_.allowQuerySquareBrackets||_.domain?y.createRegex(_):y.uriRegex}},1447:(i,s)=>{const a={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*\.?[0-9]*){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};s.Parser=class{constructor(l){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d[a.settings]&&d.constants)for(const y in d.constants){const _=d.constants[y];if(_!==null&&!["boolean","number","string"].includes(typeof _))throw new Error(`Formula constant ${y} contains invalid ${typeof _} value type`)}this.settings=d[a.settings]?d:Object.assign({[a.settings]:!0,constants:{},functions:{}},d),this.single=null,this._parts=null,this._parse(l)}_parse(l){let d=[],y="",_=0,c=!1;const f=v=>{if(_)throw new Error("Formula missing closing parenthesis");const m=d.length?d[d.length-1]:null;if(c||y||v){if(m&&m.type==="reference"&&v===")")return m.type="function",m.value=this._subFormula(y,m.value),void(y="");if(v===")"){const b=new s.Parser(y,this.settings);d.push({type:"segment",value:b})}else if(c){if(c==="]")return d.push({type:"reference",value:y}),void(y="");d.push({type:"literal",value:y})}else if(a.operatorCharacters.includes(y))m&&m.type==="operator"&&a.operators.includes(m.value+y)?m.value+=y:d.push({type:"operator",value:y});else if(y.match(a.numberRx))d.push({type:"constant",value:parseFloat(y)});else if(this.settings.constants[y]!==void 0)d.push({type:"constant",value:this.settings.constants[y]});else{if(!y.match(a.tokenRx))throw new Error(`Formula contains invalid token: ${y}`);d.push({type:"reference",value:y})}y=""}};for(const v of l)c?v===c?(f(),c=!1):y+=v:_?v==="("?(y+=v,++_):v===")"?(--_,_?y+=v:f(v)):y+=v:v in a.literals?c=a.literals[v]:v==="("?(f(),++_):a.operatorCharacters.includes(v)?(f(),y=v,f()):v!==" "?y+=v:f();f(),d=d.map((v,m)=>v.type!=="operator"||v.value!=="-"||m&&d[m-1].type!=="operator"?v:{type:"operator",value:"n"});let w=!1;for(const v of d){if(v.type==="operator"){if(a.operatorsPrefix.includes(v.value))continue;if(!w)throw new Error("Formula contains an operator in invalid position");if(!a.operators.includes(v.value))throw new Error(`Formula contains an unknown operator ${v.value}`)}else if(w)throw new Error("Formula missing expected operator");w=!w}if(!w)throw new Error("Formula contains invalid trailing operator");d.length===1&&["reference","literal","constant"].includes(d[0].type)&&(this.single={type:d[0].type==="reference"?"reference":"value",value:d[0].value}),this._parts=d.map(v=>{if(v.type==="operator")return a.operatorsPrefix.includes(v.value)?v:v.value;if(v.type!=="reference")return v.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(v.value))throw new Error(`Formula contains invalid reference ${v.value}`);return this.settings.reference?this.settings.reference(v.value):a.reference(v.value)})}_subFormula(l,d){const y=this.settings.functions[d];if(typeof y!="function")throw new Error(`Formula contains unknown function ${d}`);let _=[];if(l){let c="",f=0,w=!1;const v=()=>{if(!c)throw new Error(`Formula contains function ${d} with invalid arguments ${l}`);_.push(c),c=""};for(let m=0;mnew s.Parser(c,this.settings)),function(c){const f=[];for(const w of _)f.push(w.evaluate(c));return y.call(c,...f)}}evaluate(l){const d=this._parts.slice();for(let y=d.length-2;y>=0;--y){const _=d[y];if(_&&_.type==="operator"){const c=d[y+1];d.splice(y+1,1);const f=a.evaluate(c,l);d[y]=a.single(_.value,f)}}return a.operatorsOrder.forEach(y=>{for(let _=1;_":return d>y;case">=":return d>=y;case"==":return d===y;case"!=":return d!==y;case"&&":return d&&y;case"||":return d||y}return null},a.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.7.0"}}},r={},function i(s){var a=r[s];if(a!==void 0)return a.exports;var l=r[s]={exports:{}};return n[s](l,l.exports,i),l.exports}(5107);var n,r})})(pE);var B$=pE.exports;const ye=Kn(B$);function U$(e){const t={};return e.forEach(n=>{(n.kind==="text"||n.kind==="link")&&(t[n.key]=ye.string().allow("")),n.kind==="list"&&(t[n.key]=ye.array().allow(""))}),t}function H$(e){return ye.object().keys({id:ye.string().allow(""),civId:ye.string().allow(""),description:ye.string().allow("").required(),graphic:ye.string().allow(""),date:ye.string().allow(""),time:ye.string().allow(""),time_precision:ye.string().allow(""),location:ye.string().allow(""),latitude:ye.string().allow(""),longitude:ye.string().allow(""),x:ye.string().allow(""),y:ye.string().allow(""),z:ye.string().allow(""),type:ye.string().allow(""),category:ye.string().allow(""),category_full:ye.string().allow(""),associations:ye.array().default([]),sources:ye.array(),comments:ye.string().allow(""),time_display:ye.string().allow(""),narrative___stepStyles:ye.array(),shape:ye.string().allow(""),colour:ye.string().allow(""),...U$(e)}).and("latitude","longitude").or("date","latitude")}const V$=ye.object().keys({id:ye.string().required(),description:ye.string().allow("").required(),site:ye.string().required(),latitude:ye.string().required(),longitude:ye.string().required(),enabled:ye.string().allow("")}),W$=ye.object().keys({id:ye.string().allow("").required(),title:ye.string().allow("").required(),desc:ye.string().allow(""),mode:ye.string().allow("").required(),filter_paths:ye.array()}),q$=ye.object().keys({id:ye.string().required(),title:ye.string().allow(""),thumbnail:ye.string().allow(""),paths:ye.array().required(),type:ye.string().allow(""),affil_s:ye.array().allow(""),url:ye.string().allow(""),description:ye.string().allow(""),parent:ye.string().allow(""),author:ye.string().allow(""),date:ye.string().allow(""),notes:ye.string().allow("")}),Z$=ye.object().keys({name:ye.string().required(),items:ye.array().required()}),G$=ye.object().keys({id:ye.string().allow(""),title:ye.string().allow(""),shape:ye.string().allow(""),colour:ye.string().allow("")});function Fs(e,t,n){return{type:"error",id:t,message:`${e} ${t}: ${n}`}}function Y$(e){return e instanceof Date&&!isNaN(e)}function K$(e){const t=new Set([]),n=[];return e.forEach(r=>{t.has(r.id)?n.push({id:r.id,error:Fs("Association",r.id,"association was found more than once. Ignoring duplicate.")}):t.add(r.id)}),n}function X$(e,t){const n={events:[],sites:[],associations:[],sources:{},regions:[],shapes:[],notifications:e?e.notifications:null};if(e===void 0)return n;const r={events:[],sites:[],associations:[],sources:[],regions:[],shapes:[]};function i(y,_,c){const f=c.validate(y);if(f.error!=null){const w=y.id||"-",v=p0(_),m=Fs(v,w,f.error.message);r[_].push(Object.assign(y,{error:m}))}else n[_].push(y)}function s(y,_,c){y.forEach(f=>{_==="events"&&f.date===""&&f.time===""||i(f,_,c)})}function a(y,_,c){Object.keys(y).forEach(f=>{if(f==="")return;const w=y[f],v=c.validate(w);if(v.error!=null){const m=w.id||"-",b=p0(_);r[_].push({...w,error:Fs(b,m,v.error.message)})}else n[_][f]=w})}Array.isArray(t.CUSTOM_EVENT_FIELDS)||(t.CUSTOM_EVENT_FIELDS=[]);const l=H$(t.CUSTOM_EVENT_FIELDS);s(e.events,"events",l),s(e.sites,"sites",V$),s(e.associations,"associations",W$),a(e.sources,"sources",q$),s(e.regions,"regions",Z$),s(e.shapes,"shapes",G$),n.regions=n.regions.map(y=>({name:y.name,points:y.items.map(_=>_.replace(/\s/g,"").split(","))})),n.shapes=n.shapes.reduce((y,_)=>(_.shape?y.push(_):r.shapes.push({..._,error:Fs("events",_.id,"Invalid event shape. Please specify a shape for this type of event.")}),y),[]);const d=K$(e.associations);return d.length>0&&n.notifications.push({message:"Associations are required to be unique. Ignoring duplicates for now.",items:d,type:"error"}),n.associations=e.associations,n.events=n.events.filter((y,_)=>{let c="";if(y.civId=y.id,y.id=_,y.associations=y.associations.reduce((f,w)=>{const v=n.associations.find(m=>m.id===w);return v&&f.push(v),f},[]),y.shape){const f=n.shapes.find(w=>w.id===y.shape);f?y.shape=f:c="Failed to find related shape. Please verify shape type for event."}return y.latitude=y.latitude.replace(",","."),y.longitude=y.longitude.replace(",","."),y.datetime=sD(y.date,y.time),Y$(y.datetime)||(c="Invalid date. It's been dropped, as otherwise timemap won't work as expected."),c?(r.events.push({...y,error:Fs("events",y.id,c)}),!1):!0}),n.events.sort((y,_)=>y.datetime-_.datetime),Object.keys(r).forEach(y=>{const _=r[y].length;_&&n.notifications.push({message:`${_} invalid ${y} not displayed.`,items:r[y],type:"error"})}),n}function Q$(e,t){return{...e,...X$(t.payload.domain,t.payload.features)}}function J$(e,t){return{...e,notifications:e.notifications.map(n=>({...n,isRead:!0}))}}function e3(e=Dc.domain,t){switch(t.type){case cg:return Q$(e,t);case Lg:return J$(e);default:return e}}function t3(e,t){return Object.assign({},e,{highlighted:t.highlighted})}function n3(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,ticks:t.ticks}}}}function r3(e,t){return Object.assign({},e,{selected:t.selected})}function i3(e,t){return{...e,associations:{...e.associations,coloringSet:t.coloringSet}}}function o3(e,t){let[n,r]=zg(e);const i=[180,180],s=[-180,-180];if(t.narrative){[n,r]=sE(e),t.narrative.steps.forEach(l=>{const d=l.datetime;dr&&(r=d),l.longitude&&l.latitude&&(+l.longitudes[1]&&(s[1]=+l.longitude),+l.latitudes[0]&&(s[0]=+l.latitude))});const a=t.narrative.steps[0];if(a.longitude&&a.latitude){const l=Math.abs(+a.longitude-i[1]),d=Math.abs(+a.longitude-s[1]),y=Math.abs(+a.latitude-i[0]),_=Math.abs(+a.latitude-s[0]);l>d&&(s[1]=+a.longitude+l),l_&&(s[0]=+a.latitude+y),y<_&&(i[0]=+a.latitude-_)}n=n-Math.abs((r-n)/10),r=r+Math.abs((r-n)/10)}return{...e,associations:{...e.associations,narrative:t.narrative},map:{...e.map,bounds:t.narrative?[i,s]:null},timeline:{...e.timeline,range:{...e.timeline.range,current:[n,r]}}}}function s3(e,t){return{...e,narrativeState:{current:t.idx}}}function a3(e,t){t.value instanceof Array||(t.value=[t.value]);const{association:n}=t;let r=e.associations[n].slice(0);return t.value.forEach(i=>{r.includes(i)?r=r.filter(s=>s!==i):r.push(i)}),{...e,associations:{...e.associations,[n]:r}}}function l3(e,t){let n=[...e.shapes];if(n.includes(t.shape)){const r=n.indexOf(t.shape);n.splice(r,1)}else n.push(t.shape);return{...e,shapes:n}}function u3(e,t){return{...e,filters:{...e.filters,[t.filter]:[]}}}function c3(e,t){return{...e,timeline:{...e.timeline,range:{...e.timeline.range,current:[new Date(t.timerange[0]).toISOString(),new Date(t.timerange[1]).toISOString()]}}}}function d3(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,...t.dims}}}}function f3(e,t){const n=e.language==="es-MX"?"en-US":"es-MX";return Object.assign({},e,{language:t.language||n})}function h3(e,t){return{...e,source:t.source}}function p3(e,t){return{...e,error:t.message,notifications:[{type:"error",message:t.message}]}}const m3=Qi("isShowingSites"),g3=Qi("isFetchingDomain"),v3=Qi("isFetchingSources"),y3=Qi("isInfopopup"),_3=Qi("isIntropopup"),w3=Qi("isNotification"),b3=Qi("isCover");function T3(e,t){return{...e,errors:{...e.errors,source:t.msg}}}function S3(e){return{...e,loading:!0}}function E3(e){return{...e,loading:!1}}function x3(e,t){const n=t.values.reduce((r,i)=>(i.mode===Yn.CATEGORY&&r.push(i.title),r),[]);return{...e,associations:{...e.associations,categories:n}}}function k3(e,t){const n=t.values.map(r=>r.id);return{...e,shapes:n}}function C3(e,t){return{...e,searchQuery:t.searchQuery}}function A3(e,t){return{...e,map:{...e.map,anchor:[t.lat,t.lng],startZoom:t.zoom}}}function P3(e=Dc.app,t){switch(t.type){case dg:return t3(e,t);case Rc:return r3(e,t);case Oc:return i3(e,t);case Tg:return n3(e,t);case fg:return u3(e,t);case Ic:return a3(e,t);case hg:return l3(e,t);case Nc:return c3(e,t);case yg:return d3(e,t);case _g:return o3(e,t);case wg:return s3(e,t);case bg:return h3(e,t);case kg:return f3(e,t);case Sg:return m3(e);case Eg:return g3(e);case xg:return v3(e);case Cg:return y3(e);case Ag:return _3(e);case Pg:return w3(e);case Rg:return b3(e);case ug:return p3(e,t);case Og:return T3(e,t);case pg:return S3(e);case mg:return E3(e);case gg:return x3(e,t);case vg:return k3(e,t);case Ng:return C3(e,t);case No:return A3(e,t);default:return e}}function L3(e=Dc.ui,t){switch(t.type){case Ig:return{...e,tiles:{...e.tiles,current:e.tiles.current===e.tiles.satellite?e.tiles.default:e.tiles.satellite}};default:return e}}function R3(e=Dc.features,t){return e}function I3(e,t){return(n,r)=>t({...e(n,r)},r)}const N3=I3(M$,JT({app:P3,domain:e3,ui:L3,features:R3})),O3=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Wm,M3=Ec(N3,O3(_p(E2),_p(O$)));var lf={exports:{}},uf,E0;function D3(){if(E0)return uf;E0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return uf=e,uf}var cf,x0;function $3(){if(x0)return cf;x0=1;var e=D3();function t(){}function n(){}return n.resetWarningCache=t,cf=function(){function r(a,l,d,y,_,c){if(c!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},cf}var k0;function De(){return k0||(k0=1,lf.exports=$3()()),lf.exports}var F3=De();const Sr=Kn(F3);function qg(e){return t=>!!t.type&&t.type.tabsRole===e}const $c=qg("Tab"),Zg=qg("TabList"),Gg=qg("TabPanel");function j3(e){return $c(e)||Zg(e)||Gg(e)}function Op(e,t){return te.Children.map(e,n=>n===null?null:j3(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"?te.cloneElement(n,{...n.props,children:Op(n.props.children,t)}):n)}function mE(e,t){return te.Children.forEach(e,n=>{n!==null&&($c(n)||Gg(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"&&(Zg(n)&&t(n),mE(n.props.children,t)))})}function gE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{$c(n)&&t++}),t}function yE(e){return e&&"getAttribute"in e}function C0(e){return yE(e)&&e.getAttribute("data-rttab")}function xi(e){return yE(e)&&e.getAttribute("aria-disabled")==="true"}let Mu;function z3(e){const t=e||(typeof window<"u"?window:void 0);try{Mu=!!(typeof t<"u"&&t.document&&t.document.activeElement)}catch{Mu=!1}}const B3={className:"react-tabs",focus:!1},Kg=e=>{let t=te.useRef([]),n=te.useRef([]);const r=te.useRef();function i(F,z){if(F<0||F>=y())return;const{onSelect:U,selectedIndex:H}=e;U(F,H,z)}function s(F){const z=y();for(let U=F+1;UF;)if(!xi(_(z)))return z;return F}function l(){const F=y();for(let z=0;z{let de=fe;if(Zg(fe)){let ue=0,be=!1;Mu==null&&z3(J);const ne=J||(typeof window<"u"?window:void 0);Mu&&ne&&(be=wt.Children.toArray(fe.props.children).filter($c).some((O,j)=>ne.document.activeElement===_(j))),de=te.cloneElement(fe,{children:Op(fe.props.children,O=>{const j=`tabs-${ue}`,W=V===ue,Z={tabRef:Q=>{t.current[j]=Q},id:n.current[ue],selected:W,focus:W&&(H||be)};return Y&&(Z.selectedClassName=Y),U&&(Z.disabledClassName=U),ue++,te.cloneElement(O,Z)})})}else if(Gg(fe)){const ue={id:n.current[F],selected:V===F};B&&(ue.forceRender=B),G&&(ue.selectedClassName=G),F++,de=te.cloneElement(fe,ue)}return de})}function f(F){const{direction:z,disableUpDownKeys:U,disableLeftRightKeys:H}=e;if(v(F.target)){let{selectedIndex:B}=e,V=!1,Y=!1;(F.code==="Space"||F.keyCode===32||F.code==="Enter"||F.keyCode===13)&&(V=!0,Y=!1,w(F)),!H&&(F.keyCode===37||F.code==="ArrowLeft")||!U&&(F.keyCode===38||F.code==="ArrowUp")?(z==="rtl"?B=s(B):B=a(B),V=!0,Y=!0):!H&&(F.keyCode===39||F.code==="ArrowRight")||!U&&(F.keyCode===40||F.code==="ArrowDown")?(z==="rtl"?B=a(B):B=s(B),V=!0,Y=!0):F.keyCode===35||F.code==="End"?(B=d(),V=!0,Y=!0):(F.keyCode===36||F.code==="Home")&&(B=l(),V=!0,Y=!0),V&&F.preventDefault(),Y&&i(B,F)}}function w(F){let z=F.target;do if(v(z)){if(xi(z))return;const U=[].slice.call(z.parentNode.children).filter(C0).indexOf(z);i(U,F);return}while((z=z.parentNode)!=null)}function v(F){if(!C0(F))return!1;let z=F.parentElement;do{if(z===r.current)return!0;if(z.getAttribute("data-rttabs"))break;z=z.parentElement}while(z);return!1}const{children:m,className:b,disabledTabClassName:g,domRef:p,focus:h,forceRenderTabPanel:T,onSelect:x,selectedIndex:k,selectedTabClassName:P,selectedTabPanelClassName:E,environment:A,disableUpDownKeys:C,disableLeftRightKeys:N,...$}=e;return wt.createElement("div",Object.assign({},$,{className:Yg(b),onClick:w,onKeyDown:f,ref:F=>{r.current=F,p&&p(F)},"data-rttabs":!0}),c())};Kg.defaultProps=B3;Kg.propTypes={};const U3=0,ql=1,H3={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},V3=e=>e.selectedIndex===null?ql:U3,Fc=e=>{const{children:t,defaultFocus:n,defaultIndex:r,focusTabOnClick:i,onSelect:s}=e,[a,l]=te.useState(n),[d]=te.useState(V3(e)),[y,_]=te.useState(d===ql?r||0:null);if(te.useEffect(()=>{l(!1)},[]),d===ql){const w=vE(t);te.useEffect(()=>{if(y!=null){const v=Math.max(0,w-1);_(Math.min(y,v))}},[w])}const c=(w,v,m)=>{typeof s=="function"&&s(w,v,m)===!1||(i&&l(!0),d===ql&&_(w))};let f={...e};return f.focus=a,f.onSelect=c,y!=null&&(f.selectedIndex=y),delete f.defaultFocus,delete f.defaultIndex,delete f.focusTabOnClick,wt.createElement(Kg,f,t)};Fc.propTypes={};Fc.defaultProps=H3;Fc.tabsRole="Tabs";const W3={className:"react-tabs__tab-list"},jc=e=>{const{children:t,className:n,...r}=e;return wt.createElement("ul",Object.assign({},r,{className:Yg(n),role:"tablist"}),t)};jc.tabsRole="TabList";jc.propTypes={};jc.defaultProps=W3;const A0="react-tabs__tab-panel",q3={className:A0,forceRender:!1,selectedClassName:`${A0}--selected`},Kr=e=>{const{children:t,className:n,forceRender:r,id:i,selected:s,selectedClassName:a,...l}=e;return wt.createElement("div",Object.assign({},l,{className:Yg(n,{[a]:s}),role:"tabpanel",id:`panel${i}`,"aria-labelledby":`tab${i}`}),r||s?t:null)};Kr.tabsRole="TabPanel";Kr.propTypes={};Kr.defaultProps=q3;const _E=({label:e,isActive:t,onClickCheckbox:n,color:r,styleProps:i})=>{const s=r||rD,a={checkboxStyles:{background:t?s:"none",border:`1px solid ${s}`}},l=i?i.containerStyles:{},d=i?i.checkboxStyles:a.checkboxStyles,y=e.toLowerCase().replaceAll(" ","-"),_=c=>{c.stopPropagation(),n(c)};return re("div",{className:t?"item active":"item",onClick:_,children:[M("button",{id:y,onClick:_,children:M("div",{className:"border",style:l,children:M("div",{className:"checkbox",style:d})})}),M("label",{htmlFor:y,style:{color:r},children:e})]})};function wE(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Qo=wE();function Z3(e){Qo=e}const bE=/[&<>"']/,G3=new RegExp(bE.source,"g"),TE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Y3=new RegExp(TE.source,"g"),K3={"&":"&","<":"<",">":">",'"':""","'":"'"},P0=e=>K3[e];function zt(e,t){if(t){if(bE.test(e))return e.replace(G3,P0)}else if(TE.test(e))return e.replace(Y3,P0);return e}const X3=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function SE(e){return e.replace(X3,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Q3=/(^|[^\[])\^/g;function Ye(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Q3,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const J3=/[^\w:]/g,eF=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L0(e,t,n){if(e){let r;try{r=decodeURIComponent(SE(n)).replace(J3,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!eF.test(n)&&(n=iF(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Cl={},tF=/^[^:]+:\/*[^/]*$/,nF=/^([^:]+:)[\s\S]*$/,rF=/^([^:]+:\/*[^/]*)[\s\S]*$/;function iF(e,t){Cl[" "+e]||(tF.test(e)?Cl[" "+e]=e+"/":Cl[" "+e]=Zl(e,"/",!0)),e=Cl[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(nF,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(rF,"$1")+t:e+t}const Du={exec:function(){}};function Qn(e){let t=1,n,r;for(;t{let d=!1,y=a;for(;--y>=0&&l[y]==="\\";)d=!d;return d?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function N0(e,t,n,r){const i=t.href,s=t.title?zt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:s,text:zt(a)}}function sF(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(` +Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/forensic-architecture/timemap) for more information around how to specify custom covers.`,exploreButton:"EXPLORE"},toolbar:{panels:{categories:{default:{icon:Cs.CATEGORY,label:ze[ht].toolbar.categories_label,title:ze[ht].toolbar.explore_by_category__title,description:ze[ht].toolbar.explore_by_category__description}},filters:{icon:Cs.FILTER,label:ze[ht].toolbar.filters_label,title:ze[ht].toolbar.explore_by_filter__title,description:ze[ht].toolbar.explore_by_filter__description},narratives:{icon:Cs.NARRATIVE,label:ze[ht].toolbar.narratives_label,title:ze[ht].toolbar.explore_by_narrative__title,description:ze[ht].toolbar.explore_by_narrative__description},shapes:{icon:Cs.SHAPE,label:ze[ht].toolbar.shapes_label,title:ze[ht].toolbar.explore_by_shape__title,description:ze[ht].toolbar.explore_by_shape__description},download:{icon:Cs.DOWNLOAD,label:ze[ht].toolbar.download.button,title:ze[ht].toolbar.download.panel.title,description:ze[ht].toolbar.download.panel.description}}},loading:!1},ui:{tiles:{current:"openstreetmap",default:"openstreetmap",satellite:"satellite"},style:{categories:{default:qn.fallbackEventColor},narratives:{default:{opacity:.9,stroke:qn.fallbackEventColor,strokeWidth:3}},regions:{default:{stroke:"blue",strokeWidth:3,opacity:.9}},clusters:{radial:!1}},card:{layout:{template:"basic"}},coloring:{maxNumOfColors:4,colors:Object.values($s)},dom:{timeline:"timeline",timeslider:"timeslider",map:"map"},eventRadius:8},features:{USE_COVER:!1,USE_ASSOCIATIONS:!1,USE_SITES:!1,USE_SOURCES:!1,USE_REGIONS:!1,GRAPH_NONLOCATED:!1,HIGHLIGHT_GROUPS:!1}};let Zn;rn.store?Zn=Wg(rn.store,S0):Zn=S0;Zn.app.flags.isIntropopup=!!Zn.app.intro;"map"in Zn.app&&(Zn.app.map=Wg(Zn.app.map,j$));"space3d"in Zn.app&&(Zn.app.space3d=Wg(Zn.app.space3d,z$));const Dc=Zn;var pE={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,s,a)=>{const l=a(375),d=a(8571),y=a(9474),_=a(1687),c=a(8652),f=a(8160),w=a(3292),v=a(6354),m=a(8901),b=a(9708),g=a(6914),p=a(2294),h=a(6133),T=a(1152),x=a(8863),k=a(2036),P={Base:class{constructor(E){this.type=E,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new p.Ids,this._preferences=null,this._refs=new h.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return l(typeof b.describe=="function","Manifest functionality disabled"),b.describe(this)}allow(){for(var E=arguments.length,A=new Array(E),C=0;C1&&arguments[1]!==void 0?arguments[1]:{};return l(E!==void 0,"Missing example"),f.assertOptions(A,["override"]),this._inner("examples",E,{single:!0,override:A.override})}external(E,A){return typeof E=="object"&&(l(!A,"Cannot combine options with description"),A=E.description,E=E.method),l(typeof E=="function","Method must be a function"),l(A===void 0||A&&typeof A=="string","Description must be a non-empty string"),this._inner("externals",{method:E,description:A},{single:!0})}failover(E,A){return this._default("failover",E,A)}forbidden(){return this.presence("forbidden")}id(E){return E?(l(typeof E=="string","id must be a non-empty string"),l(/^[^\.]+$/.test(E),"id cannot contain period character"),this.$_setFlag("id",E)):this.$_setFlag("id",void 0)}invalid(){for(var E=arguments.length,A=new Array(E),C=0;C0&&arguments[0]!==void 0)||arguments[0];return l(typeof E=="boolean","Invalid mode:",E),this.$_setFlag("only",E)}optional(){return this.presence("optional")}prefs(E){l(E,"Missing preferences"),l(E.context===void 0,"Cannot override context"),l(E.externals===void 0,"Cannot override externals"),l(E.warnings===void 0,"Cannot override warnings"),l(E.debug===void 0,"Cannot override debug"),f.checkPreferences(E);const A=this.clone();return A._preferences=f.preferences(A._preferences,E),A}presence(E){return l(["optional","required","forbidden"].includes(E),"Unknown presence mode",E),this.$_setFlag("presence",E)}raw(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"raw":void 0)}result(E){return l(["raw","strip"].includes(E),"Unknown result mode",E),this.$_setFlag("result",E)}required(){return this.presence("required")}strict(E){const A=this.clone(),C=E!==void 0&&!E;return A._preferences=f.preferences(A._preferences,{convert:C}),A}strip(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"strip":void 0)}tag(){for(var E=arguments.length,A=new Array(E),C=0;CN.keep||N.name!==C),A._singleRules.delete(C));for(const C of E._rules)E._definition.rules[C.method].multi||A._singleRules.set(C.name,C),A._rules.push(C);if(A._flags.empty&&E._flags.empty){A._flags.empty=A._flags.empty.concat(E._flags.empty);const C=Object.assign({},E._flags);delete C.empty,_(A._flags,C)}else if(E._flags.empty){A._flags.empty=E._flags.empty;const C=Object.assign({},E._flags);delete C.empty,_(A._flags,C)}else _(A._flags,E._flags);for(const C in E.$_terms){const N=E.$_terms[C];N?A.$_terms[C]?A.$_terms[C]=A.$_terms[C].concat(N):A.$_terms[C]=N.slice():A.$_terms[C]||(A.$_terms[C]=N)}return this.$_root._tracer&&this.$_root._tracer._combine(A,[this,E]),A.$_mutateRebuild()}extend(E){return l(!E.base,"Cannot extend type with another base"),m.type(this,E)}extract(E){return E=Array.isArray(E)?E:E.split("."),this._ids.reach(E)}fork(E,A){l(!this._inRuleset(),"Cannot fork inside a ruleset");let C=this;for(let N of[].concat(E))N=Array.isArray(N)?N:N.split("."),C=C._ids.fork(N,A,C);return C.$_temp.ruleset=!1,C}rule(E){const A=this._definition;f.assertOptions(E,Object.keys(A.modifiers)),l(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const C=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;l(C>=0&&CC.tailor(E),ref:!1}),A.$_temp.ruleset=!1,A.$_mutateRebuild()}tracer(){return T.location?T.location(this):this}validate(E,A){return x.entry(E,this,A)}validateAsync(E,A){return x.entryAsync(E,this,A)}$_addRule(E){typeof E=="string"&&(E={name:E}),l(E&&typeof E=="object","Invalid options"),l(E.name&&typeof E.name=="string","Invalid rule name");for(const F in E)l(F[0]!=="_","Cannot set private rule properties");const A=Object.assign({},E);A._resolve=[],A.method=A.method||A.name;const C=this._definition.rules[A.method],N=A.args;l(C,"Unknown rule",A.method);const $=this.clone();if(N){l(Object.keys(N).length===1||Object.keys(N).length===this._definition.rules[A.name].args.length,"Invalid rule definition for",this.type,A.name);for(const F in N){let z=N[F];if(C.argsByName){const B=C.argsByName.get(F);if(B.ref&&f.isResolvable(z))A._resolve.push(F),$.$_mutateRegister(z);else if(B.normalize&&(z=B.normalize(z),N[F]=z),B.assert){const H=f.validateArg(z,F,B);l(!H,H,"or reference")}}z!==void 0?N[F]=z:delete N[F]}}return C.multi||($._ruleRemove(A.name,{clone:!1}),$._singleRules.set(A.name,A)),$.$_temp.ruleset===!1&&($.$_temp.ruleset=null),C.priority?$._rules.unshift(A):$._rules.push(A),$}$_compile(E,A){return w.schema(this.$_root,E,A)}$_createError(E,A,C,N,$){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const z=F.flags!==!1?this._flags:{},B=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new v.Report(E,A,C,z,B,N,$)}$_getFlag(E){return this._flags[E]}$_getRule(E){return this._singleRules.get(E)}$_mapLabels(E){return E=Array.isArray(E)?E:E.split("."),this._ids.labels(E)}$_match(E,A,C,N){(C=Object.assign({},C)).abortEarly=!0,C._externals=!1,A.snapshot();const $=!x.validate(E,this,A,C,N).errors;return A.restore(),$}$_modify(E){return f.assertOptions(E,["each","once","ref","schema"]),p.schema(this,E)||this}$_mutateRebuild(){return l(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(E,A)=>{let{source:C,name:N,path:$,key:F}=A;const z=this._definition[C][N]&&this._definition[C][N].register;z!==!1&&this.$_mutateRegister(E,{family:z,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(E){let{family:A,key:C}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(E,A),this._ids.register(E,{key:C})}$_property(E){return this._definition.properties[E]}$_reach(E){return this._ids.reach(E)}$_rootReferences(){return this._refs.roots()}$_setFlag(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(E[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const N=this._definition.flags[E]||{};if(y(A,N.default)&&(A=void 0),y(A,this._flags[E]))return this;const $=C.clone!==!1?this.clone():this;return A!==void 0?($._flags[E]=A,$.$_mutateRegister(A)):delete $._flags[E],E[0]!=="_"&&($.$_temp.ruleset=!1),$}$_parent(E){for(var A=arguments.length,C=new Array(A>1?A-1:0),N=1;N2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(C,"literal"),l(A!==void 0,"Missing",E,"value"),l(typeof A=="function"||!C.literal,"Only function value supports literal option"),typeof A=="function"&&C.literal&&(A={[f.symbols.literal]:!0,literal:A}),this.$_setFlag(E,A)}_generate(E,A,C){if(!this.$_terms.whens)return{schema:this};const N=[],$=[];for(let B=0;BY)break}const F=$.join(", ");if(A.mainstay.tracer.debug(A,"rule","when",F),!F)return{schema:this};if(!A.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let z=this;this._definition.generate&&(z=this._definition.generate(this,E,A,C));for(const B of N)z=z.concat(B);return this.$_root._tracer&&this.$_root._tracer._combine(z,[this,...N]),this.$_temp.whens[F]=z,{schema:z,id:F}}_inner(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(!this._inRuleset(),`Cannot set ${E} inside a ruleset`);const N=this.clone();return N.$_terms[E]&&!C.override||(N.$_terms[E]=[]),C.single?N.$_terms[E].push(A):N.$_terms[E].push(...A),N.$_temp.ruleset=!1,N}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(E){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(E))return this;const C=A.clone!==!1?this.clone():this;C._singleRules.delete(E);const N=[];for(let $=0;${const l=a(375),d=a(8571),y=a(8160),_={max:1e3,supported:new Set(["undefined","boolean","number","string"])};s.provider={provision:c=>new _.Cache(c)},_.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};y.assertOptions(c,["max"]),l(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||_.max,this._map=new Map,this._list=new _.List}get length(){return this._map.size}set(c,f){if(c!==null&&!_.supported.has(typeof c))return;let w=this._map.get(c);if(w)return w.value=f,void this._list.first(w);w=this._list.unshift({key:c,value:f}),this._map.set(c,w),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),d(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},_.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:w}=c;return f.prev=w,w&&(w.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,s,a)=>{const l=a(375),d=a(7916),y=a(5934);let _,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};s.version=y.version,s.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},s.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},s.assertOptions=function(w,v){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";l(w&&typeof w=="object"&&!Array.isArray(w),"Options must be of type object");const b=Object.keys(w).filter(g=>!v.includes(g));l(b.length===0,`${m} contain unknown keys: ${b}`)},s.checkPreferences=function(w){c=c||a(3378);const v=c.preferences.validate(w);if(v.error)throw new d([v.error.details[0].message])},s.compare=function(w,v,m){switch(m){case"=":return w===v;case">":return w>v;case"<":return w=":return w>=v;case"<=":return w<=v}},s.default=function(w,v){return w===void 0?v:w},s.isIsoDate=function(w){return f.isoDate.test(w)},s.isNumber=function(w){return typeof w=="number"&&!isNaN(w)},s.isResolvable=function(w){return!!w&&(w[s.symbols.ref]||w[s.symbols.template])},s.isSchema=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=w&&w[s.symbols.any];return!!m&&(l(v.legacy||m.version===s.version,"Cannot mix different versions of joi schemas"),!0)},s.isValues=function(w){return w[s.symbols.values]},s.limit=function(w){return Number.isSafeInteger(w)&&w>=0},s.preferences=function(w,v){_=_||a(6914),w=w||{},v=v||{};const m=Object.assign({},w,v);return v.errors&&w.errors&&(m.errors=Object.assign({},w.errors,v.errors),m.errors.wrap=Object.assign({},w.errors.wrap,v.errors.wrap)),v.messages&&(m.messages=_.compile(v.messages,w.messages)),delete m[s.symbols.prefs],m},s.tryWithPath=function(w,v){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return w()}catch(b){throw b.path!==void 0?b.path=v+"."+b.path:b.path=v,m.append&&(b.message=`${b.message} (${b.path})`),b}},s.validateArg=function(w,v,m){let{assert:b,message:g}=m;if(s.isSchema(b)){const p=b.validate(w);return p.error?p.error.message:void 0}if(!b(w))return v?`${v} ${g}`:g},s.verifyFlat=function(w,v){for(const m of w)l(!Array.isArray(m),"Method no longer accepts array arguments:",v)}},3292:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.schema=function(c,f){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["appendPath","override"]);try{return _.schema(c,f,w)}catch(v){throw w.appendPath&&v.path!==void 0&&(v.message=`${v.message} (${v.path})`),v}},_.schema=function(c,f,w){l(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(l(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const v=function(m){for(var b=arguments.length,g=new Array(b>1?b-1:0),p=1;p2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["legacy"]);const v=f&&f[d.symbols.any];if(v)return l(w.legacy||v.version===d.version,"Cannot mix different versions of joi schemas:",v.version,d.version),f;if(typeof f!="object"||!w.legacy)return s.schema(c,f,{appendPath:!0});const m=_.walk(f);return m?m.compile(m.root,f):s.schema(c,f,{appendPath:!0})},_.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const w of c){const v=_.walk(w);if(v)return v}return null}const f=c[d.symbols.any];if(f)return{root:c[f.root],compile:f.compile};l(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const w in c){const v=_.walk(c[w]);if(v)return v}return null},_.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},s.when=function(c,f,w){if(w===void 0&&(l(f&&typeof f=="object","Missing options"),w=f,f=y.create(".")),Array.isArray(w)&&(w={switch:w}),d.assertOptions(w,["is","not","then","otherwise","switch","break"]),d.isSchema(f))return l(w.is===void 0,'"is" can not be used with a schema condition'),l(w.not===void 0,'"not" can not be used with a schema condition'),l(w.switch===void 0,'"switch" can not be used with a schema condition'),_.condition(c,{is:f,then:w.then,otherwise:w.otherwise,break:w.break});if(l(y.isRef(f)||typeof f=="string","Invalid condition:",f),l(w.not===void 0||w.is===void 0,'Cannot combine "is" with "not"'),w.switch===void 0){let m=w;w.not!==void 0&&(m={is:w.not,then:w.otherwise,otherwise:w.then,break:w.break});let b=m.is!==void 0?c.$_compile(m.is):c.$_root.invalid(null,!1,0,"").required();return l(m.then!==void 0||m.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(m.break===void 0||m.then===void 0||m.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),w.is===void 0||y.isRef(w.is)||d.isSchema(w.is)||(b=b.required()),_.condition(c,{ref:s.ref(f),is:b,then:m.then,otherwise:m.otherwise,break:m.break})}l(Array.isArray(w.switch),'"switch" must be an array'),l(w.is===void 0,'Cannot combine "switch" with "is"'),l(w.not===void 0,'Cannot combine "switch" with "not"'),l(w.then===void 0,'Cannot combine "switch" with "then"');const v={ref:s.ref(f),switch:[],break:w.break};for(let m=0;m{const l=a(5688),d=a(8160),y=a(3328);s.Report=class{constructor(_,c,f,w,v,m,b){if(this.code=_,this.flags=w,this.messages=v,this.path=m.path,this.prefs=b,this.state=m,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=s.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(_){if(this.template=_,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const _=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${_}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(_,c){return s.template(this.value,_,c||this.code,this.state,this.prefs)}},s.path=function(_){let c="";for(const f of _)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},s.template=function(_,c,f,w,v){if(!c)return;if(y.isTemplate(c))return f!=="root"?c:null;let m=v.errors.language;if(d.isResolvable(m)&&(m=m.resolve(_,w,v)),m&&c[m]){if(c[m][f]!==void 0)return c[m][f];if(c[m]["*"]!==void 0)return c[m]["*"]}return c[f]?c[f]:c["*"]},s.label=function(_,c,f,w){if(_.label)return _.label;if(!f.errors.label)return"";let v=c.path;return f.errors.label==="key"&&c.path.length>1&&(v=c.path.slice(-1)),s.path(v)||s.template(null,f.messages,"root",c,f)||w&&s.template(null,w,"root",c,f)||"value"},s.process=function(_,c,f){if(!_)return null;const{override:w,message:v,details:m}=s.details(_);if(w)return w;if(f.errors.stack)return new s.ValidationError(v,m,c);const b=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new s.ValidationError(v,m,c);return Error.stackTraceLimit=b,g},s.details=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const w=[];for(const v of _){if(v instanceof Error){if(c.override!==!1)return{override:v};const b=v.toString();f.push(b),w.push({message:b,type:"override",context:{error:v}});continue}const m=v.toString();f.push(m),w.push({message:m,path:v.path.filter(b=>typeof b!="object"),type:v.code,context:v.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:w}},s.ValidationError=class extends Error{constructor(_,c,f){super(_),this._original=f,this.details=c}static isError(_){return _ instanceof s.ValidationError}},s.ValidationError.prototype.isJoi=!0,s.ValidationError.prototype.name="ValidationError",s.ValidationError.prototype.annotate=l.error},8901:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8160),_=a(6914),c={};s.type=function(f,w){const v=Object.getPrototypeOf(f),m=d(v),b=f._assign(Object.create(m)),g=Object.assign({},w);delete g.base,m._definition=g;const p=v._definition||{};g.messages=_.merge(p.messages,g.messages),g.properties=Object.assign({},p.properties,g.properties),b.type=g.type,g.flags=Object.assign({},p.flags,g.flags);const h=Object.assign({},p.terms);if(g.terms)for(const P in g.terms){const E=g.terms[P];l(b.$_terms[P]===void 0,"Invalid term override for",g.type,P),b.$_terms[P]=E.init,h[P]=E}g.terms=h,g.args||(g.args=p.args),g.prepare=c.prepare(g.prepare,p.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,p.coerce),g.validate=c.validate(g.validate,p.validate);const T=Object.assign({},p.rules);if(g.rules)for(const P in g.rules){const E=g.rules[P];l(typeof E=="object","Invalid rule definition for",g.type,P);let A=E.method;if(A===void 0&&(A=function(){return this.$_addRule(P)}),A&&(l(!m[P],"Rule conflict in",g.type,P),m[P]=A),l(!T[P],"Rule conflict in",g.type,P),T[P]=E,E.alias){const C=[].concat(E.alias);for(const N of C)m[N]=E.method}E.args&&(E.argsByName=new Map,E.args=E.args.map(C=>(typeof C=="string"&&(C={name:C}),l(!E.argsByName.has(C.name),"Duplicated argument name",C.name),y.isSchema(C.assert)&&(C.assert=C.assert.strict().label(C.name)),E.argsByName.set(C.name,C),C)))}g.rules=T;const x=Object.assign({},p.modifiers);if(g.modifiers)for(const P in g.modifiers){l(!m[P],"Rule conflict in",g.type,P);const E=g.modifiers[P];l(typeof E=="function","Invalid modifier definition for",g.type,P);const A=function(C){return this.rule({[P]:C})};m[P]=A,x[P]=E}if(g.modifiers=x,g.overrides){m._super=v,b.$_super={};for(const P in g.overrides)l(v[P],"Cannot override missing",P),g.overrides[P][y.symbols.parent]=v[P],b.$_super[P]=v[P].bind(b);Object.assign(m,g.overrides)}g.cast=Object.assign({},p.cast,g.cast);const k=Object.assign({},p.manifest,g.manifest);return k.build=c.build(g.manifest&&g.manifest.build,p.manifest&&p.manifest.build),g.manifest=k,g.rebuild=c.rebuild(g.rebuild,p.rebuild),b},c.build=function(f,w){return f&&w?function(v,m){return w(f(v,m),m)}:f||w},c.coerce=function(f,w){return f&&w?{from:f.from&&w.from?[...new Set([...f.from,...w.from])]:null,method(v,m){let b;if((!w.from||w.from.includes(typeof v))&&(b=w.method(v,m),b)){if(b.errors||b.value===void 0)return b;v=b.value}if(!f.from||f.from.includes(typeof v)){const g=f.method(v,m);if(g)return g}return b}}:f||w},c.prepare=function(f,w){return f&&w?function(v,m){const b=f(v,m);if(b){if(b.errors||b.value===void 0)return b;v=b.value}return w(v,m)||b}:f||w},c.rebuild=function(f,w){return f&&w?function(v){w(v),f(v)}:f||w},c.validate=function(f,w){return f&&w?function(v,m){const b=w(v,m);if(b){if(b.errors&&(!Array.isArray(b.errors)||b.errors.length))return b;v=b.value}return f(v,m)||b}:f||w}},5107:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8652),_=a(8160),c=a(3292),f=a(6354),w=a(8901),v=a(9708),m=a(6133),b=a(3328),g=a(1152);let p;const h={types:{alternatives:a(4946),any:a(8068),array:a(546),boolean:a(4937),date:a(7500),function:a(390),link:a(8785),number:a(3832),object:a(8966),string:a(7417),symbol:a(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const T={_types:new Set(Object.keys(h.types))};for(const x of T._types)T[x]=function(){for(var k=arguments.length,P=new Array(k),E=0;E2?k-2:0),E=2;E2?k-2:0),E=2;E{const l=a(375),d=a(8571),y=a(3328);s.compile=function(_,c){if(typeof _=="string")return l(!c,"Cannot set single message string"),new y(_);if(y.isTemplate(_))return l(!c,"Cannot set single message template"),_;l(typeof _=="object"&&!Array.isArray(_),"Invalid message options"),c=c?d(c):{};for(let f in _){const w=_[f];if(f==="root"||y.isTemplate(w)){c[f]=w;continue}if(typeof w=="string"){c[f]=new y(w);continue}l(typeof w=="object"&&!Array.isArray(w),"Invalid message for",f);const v=f;for(f in c[v]=c[v]||{},w){const m=w[f];f==="root"||y.isTemplate(m)?c[v][f]=m:(l(typeof m=="string","Invalid message for",f,"in",v),c[v][f]=new y(m))}}return c},s.decompile=function(_){const c={};for(let f in _){const w=_[f];if(f==="root"){c.root=w;continue}if(y.isTemplate(w)){c[f]=w.describe({compact:!0});continue}const v=f;for(f in c[v]={},w){const m=w[f];f!=="root"?c[v][f]=m.describe({compact:!0}):c[v].root=m}}return c},s.merge=function(_,c){if(!_)return s.compile(c);if(!c)return _;if(typeof c=="string")return new y(c);if(y.isTemplate(c))return c;const f=d(_);for(let w in c){const v=c[w];if(w==="root"||y.isTemplate(v)){f[w]=v;continue}if(typeof v=="string"){f[w]=new y(v);continue}l(typeof v=="object"&&!Array.isArray(v),"Invalid message for",w);const m=w;for(w in f[m]=f[m]||{},v){const b=v[w];w==="root"||y.isTemplate(b)?f[m][w]=b:(l(typeof b=="string","Invalid message for",w,"in",m),f[m][w]=new y(b))}}return f}},2294:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.Ids=_.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new _.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,w]of c._byId.entries())l(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,w);for(const[f,w]of c._byKey.entries())l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,w)}fork(c,f,w){const v=this._collect(c);v.push({schema:w});const m=v.shift();let b={id:m.id,schema:f(m.schema)};l(d.isSchema(b.schema),"adjuster function failed to return a joi schema type");for(const g of v)b={id:g.id,schema:_.fork(g.schema,b.id,b.schema)};return b.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);if(!v)return[...f,...c].join(".");const m=c.slice(1);return f=[...f,v.schema._flags.label||w],m.length?v.schema._ids.labels(m,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);l(v,"Schema does not contain path",[...f,...c].join("."));const m=c.slice(1);return m.length?v.schema._ids.reach(m,[...f,w]):v.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!d.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const w=c._flags.id;if(w){const v=this._byId.get(w);l(!v||v.schema===c,"Cannot add different schemas with the same id:",w),l(!this._byKey.has(w),"Schema id conflicts with existing key:",w),this._byId.set(w,{schema:c,id:w})}f&&(l(!this._byKey.has(f),"Schema already contains key:",f),l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const v=c[0],m=this._get(v);l(m,"Schema does not contain path",[...f,...c].join(".")),w=[m,...w];const b=c.slice(1);return b.length?m.schema._ids._collect(b,[...f,v],w):w}_get(c){return this._byId.get(c)||this._byKey.get(c)}},_.fork=function(c,f,w){const v=s.schema(c,{each:(m,b)=>{let{key:g}=b;if(f===(m._flags.id||g))return w},ref:!1});return v?v.$_mutateRebuild():c},s.schema=function(c,f){let w;for(const v in c._flags){if(v[0]==="_")continue;const m=_.scan(c._flags[v],{source:"flags",name:v},f);m!==void 0&&(w=w||c.clone(),w._flags[v]=m)}for(let v=0;v{const l=a(375),d=a(8571),y=a(9621),_=a(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};s.create=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(typeof w=="string","Invalid reference key:",w),_.assertOptions(v,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!v.prefix||typeof v.prefix=="object","options.prefix must be of type object");const m=Object.assign({},f.defaults,v);delete m.prefix;const b=m.separator,g=f.context(w,b,v.prefix);if(m.type=g.type,w=g.key,m.type==="value")if(g.root&&(l(!b||w[0]!==b,"Cannot specify relative path with root prefix"),m.ancestor="root",w||(w=null)),b&&b===w)w=null,m.ancestor=0;else if(m.ancestor!==void 0)l(!b||!w||w[0]!==b,"Cannot combine prefix with ancestor option");else{const[p,h]=f.ancestor(w,b);h&&(w=w.slice(h))===""&&(w=null),m.ancestor=p}return m.path=b?w===null?[]:w.split(b):[w],new f.Ref(m)},s.in=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.create(w,{...v,in:!0})},s.isRef=function(w){return!!w&&!!w[_.symbols.ref]},f.Ref=class{constructor(w){l(typeof w=="object","Invalid reference construction"),_.assertOptions(w,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(w.separator)||typeof w.separator=="string"&&w.separator.length===1,"Invalid separator"),l(!w.adjust||typeof w.adjust=="function","options.adjust must be a function"),l(!w.map||Array.isArray(w.map),"options.map must be an array"),l(!w.map||!w.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,w),l(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(w,v,m,b){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return l(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(m.context,v,g):this.type==="local"?this._resolve(b,v,g):this.ancestor?this.ancestor==="root"?this._resolve(v.ancestors[v.ancestors.length-1],v,g):(l(this.ancestor<=v.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(v.ancestors[this.ancestor-1],v,g)):this._resolve(w,v,g)}_resolve(w,v,m){let b;if(this.type==="value"&&v.mainstay.shadow&&m.shadow!==!1&&(b=v.mainstay.shadow.get(this.absolute(v))),b===void 0&&(b=y(w,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(b=this.adjust(b)),this.map){const g=this.map.get(b);g!==void 0&&(b=g)}return v.mainstay&&v.mainstay.tracer.resolve(v,this,b),b}toString(){return this.display}absolute(w){return[...w.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const w={path:this.path};this.type!=="value"&&(w.type=this.type),this.separator!=="."&&(w.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(w.ancestor=this.ancestor),this.map&&(w.map=[...this.map]);for(const v of["adjust","iterables","render"])this[v]!==null&&this[v]!==void 0&&(w[v]=this[v]);return this.in!==!1&&(w.in=!0),{ref:w}}updateDisplay(){const w=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${w}`);if(!this.separator)return void(this.display=`ref:${w}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${w}`);if(this.ancestor==="root")return void(this.display=`ref:root:${w}`);if(this.ancestor===1)return void(this.display=`ref:${w||".."}`);const v=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${v}${w||""}`}},f.Ref.prototype[_.symbols.ref]=!0,s.build=function(w){return(w=Object.assign({},f.defaults,w)).type==="value"&&w.ancestor===void 0&&(w.ancestor=1),new f.Ref(w)},f.context=function(w,v){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(w=w.trim(),m){const b=m.global===void 0?"$":m.global;if(b!==v&&w.startsWith(b))return{key:w.slice(b.length),type:"global"};const g=m.local===void 0?"#":m.local;if(g!==v&&w.startsWith(g))return{key:w.slice(g.length),type:"local"};const p=m.root===void 0?"/":m.root;if(p!==v&&w.startsWith(p))return{key:w.slice(p.length),type:"value",root:!0}}return{key:w,type:"value"}},f.ancestor=function(w,v){if(!v)return[1,0];if(w[0]!==v)return[1,0];if(w[1]!==v)return[0,1];let m=2;for(;w[m]===v;)++m;return[m-1,m]},s.toSibling=0,s.toParent=1,s.Manager=class{constructor(){this.refs=[]}register(w,v){if(w)if(v=v===void 0?s.toParent:v,Array.isArray(w))for(const m of w)this.register(m,v);else if(_.isSchema(w))for(const m of w._refs.refs)m.ancestor-v>=0&&this.refs.push({ancestor:m.ancestor-v,root:m.root});else s.isRef(w)&&w.type==="value"&&w.ancestor-v>=0&&this.refs.push({ancestor:w.ancestor-v,root:w.root}),c=c||a(3328),c.isTemplate(w)&&this.register(w.refs(),v)}get length(){return this.refs.length}clone(){const w=new s.Manager;return w.refs=d(this.refs),w}reset(){this.refs=[]}roots(){return this.refs.filter(w=>!w.ancestor).map(w=>w.root)}}},3378:(i,s,a)=>{const l=a(5107),d={};d.wrap=l.string().min(1).max(2).allow(!1),s.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:d.wrap,array:d.wrap,string:d.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),d.nameRx=/^[a-zA-Z0-9]\w*$/,d.rule=l.object({alias:l.array().items(l.string().pattern(d.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(d.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),s.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(d.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(d.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(d.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(d.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(d.nameRx,d.rule),terms:l.object().pattern(d.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),s.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),d.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},d.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),d.desc.buffer,d.desc.func,d.desc.ref,d.desc.regex,d.desc.special,d.desc.template,d.desc.value,l.link("/")]),d.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.symbol(),d.desc.buffer,d.desc.func,d.desc.override,d.desc.ref,d.desc.regex,d.desc.template,d.desc.value),d.desc.messages=l.object().pattern(/.+/,[l.string(),d.desc.template,l.object().pattern(/.+/,[l.string(),d.desc.template])]),s.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:d.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),d.desc.ref],wrap:{label:d.wrap,array:d.wrap}},externals:l.boolean(),messages:d.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:d.desc.values,invalid:d.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),d.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:d.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(i,s,a)=>{const l=a(8571),d=a(9621),y=a(8160),_={value:Symbol("value")};i.exports=_.State=class{constructor(c,f,w){this.path=c,this.ancestors=f,this.mainstay=w.mainstay,this.schemas=w.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const v=new _.State(c,f,this);return w&&v.schemas&&(v.schemas=[_.schemas(w),...v.schemas]),v}nest(c,f){const w=new _.State(this.path,this.ancestors,this);return w.schemas=w.schemas&&[_.schemas(c),...w.schemas],w.debug=f,w}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new _.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=l(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},_.schemas=function(c){return y.isSchema(c)?{schema:c}:c},_.Shadow=class{constructor(){this._values=null}set(c,f,w){if(!c.length||w==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let v=this._values;for(let m=0;m{const l=a(375),d=a(8571),y=a(5277),_=a(1447),c=a(8160),f=a(6354),w=a(6133),v={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=v.Template=class{constructor(m,b){l(typeof m=="string","Template source must be a string"),l(!m.includes("\0")&&!m.includes(""),"Template source cannot contain reserved control characters"),this.source=m,this.rendered=m,this._template=null,this._settings=d(b),this._parse()}_parse(){if(!this.source.includes("{"))return;const m=v.encode(this.source),b=v.split(m);let g=!1;const p=[],h=b.shift();h&&p.push(h);for(const T of b){const x=T[0]!=="{",k=x?"}":"}}",P=T.indexOf(k);if(P===-1||T[1]==="{"){p.push(`{${v.decode(T)}`);continue}let E=T.slice(x?0:1,P);const A=E[0]===":";A&&(E=E.slice(1));const C=this._ref(v.decode(E),{raw:x,wrapped:A});p.push(C),typeof C!="string"&&(g=!0);const N=T.slice(P+k.length);N&&p.push(v.decode(N))}g?this._template=p:this.rendered=p.join("")}static date(m,b){return v.dateFormat[b.dateFormat].call(m)}describe(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&m.compact)return this.source;const b={template:this.source};return this._settings&&(b.options=this._settings),b}static build(m){return new v.Template(m.template,m.options)}isDynamic(){return!!this._template}static isTemplate(m){return!!m&&!!m[c.symbols.template]}refs(){if(!this._template)return;const m=[];for(const b of this._template)typeof b!="string"&&m.push(...b.refs);return m}resolve(m,b,g,p){return this._template&&this._template.length===1?this._part(this._template[0],m,b,g,p,{}):this.render(m,b,g,p)}_part(m){for(var b=arguments.length,g=new Array(b>1?b-1:0),p=1;p4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const T=[];for(const x of this._template)if(typeof x=="string")T.push(x);else{const k=this._part(x,m,b,g,p,h),P=v.stringify(k,m,b,g,p,h);if(P!==void 0){const E=x.raw||(h.errors&&h.errors.escapeHtml)===!1?P:y(P);T.push(v.wrap(E,x.wrapped&&g.errors.wrap.label))}}return T.join("")}_ref(m,b){let{raw:g,wrapped:p}=b;const h=[],T=k=>{const P=w.create(k,this._settings);return h.push(P),E=>P.resolve(...E)};try{var x=new _.Parser(m,{reference:T,functions:v.functions,constants:v.constants})}catch(k){throw k.message=`Invalid template variable "${m}" fails due to: ${k.message}`,k}if(x.single){if(x.single.type==="reference"){const k=h[0];return{ref:k,raw:g,refs:h,wrapped:p||k.type==="local"&&k.key==="label"}}return v.stringify(x.single.value)}return{formula:x,raw:g,refs:h}}toString(){return this.source}},v.Template.prototype[c.symbols.template]=!0,v.Template.prototype.isImmutable=!0,v.encode=function(m){return m.replace(/\\(\{+)/g,(b,g)=>v.opens.slice(0,g.length)).replace(/\\(\}+)/g,(b,g)=>v.closes.slice(0,g.length))},v.decode=function(m){return m.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},v.split=function(m){const b=[];let g="";for(let p=0;p5&&arguments[5]!==void 0?arguments[5]:{};const x=typeof m,k=p&&p.errors&&p.errors.wrap||{};let P=!1;if(w.isRef(m)&&m.render&&(P=m.in,m=m.resolve(b,g,p,h,{in:m.in,...T})),m===null)return"null";if(x==="string")return v.wrap(m,T.arrayItems&&k.string);if(x==="number"||x==="function"||x==="symbol")return m.toString();if(x!=="object")return JSON.stringify(m);if(m instanceof Date)return v.Template.date(m,p);if(m instanceof Map){const A=[];for(const[C,N]of m.entries())A.push(`${C.toString()} -> ${N.toString()}`);m=A}if(!Array.isArray(m))return m.toString();const E=[];for(const A of m)E.push(v.stringify(A,b,g,p,h,{arrayItems:!0,...T}));return v.wrap(E.join(", "),!P&&k.array)},v.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},v.functions={if:(m,b,g)=>m?b:g,length:m=>typeof m=="string"?m.length:m&&typeof m=="object"?Array.isArray(m)?m.length:Object.keys(m).length:null,msg(m){const[b,g,p,h,T]=this,x=T.messages;if(!x)return"";const k=f.template(b,x[0],m,g,p)||f.template(b,x[1],m,g,p);return k?k.render(b,g,p,h,T):""},number:m=>typeof m=="number"?m:typeof m=="string"?parseFloat(m):typeof m=="boolean"?m?1:0:m instanceof Date?m.getTime():null}},4946:(i,s,a)=>{const l=a(375),d=a(1687),y=a(8068),_=a(8160),c=a(3292),f=a(6354),w=a(6133),v={};i.exports=y.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:w.toSibling}},args(m){for(var b=arguments.length,g=new Array(b>1?b-1:0),p=1;pf.details(A,{override:!1}))})};if(g._flags.match==="one")return k.length===1?{value:k[0]}:{errors:p("alternatives.one")};if(k.length!==g.$_terms.matches.length)return{errors:p("alternatives.all",{details:P.map(A=>f.details(A,{override:!1}))})};const E=A=>A.$_terms.matches.some(C=>C.schema.type==="object"||C.schema.type==="alternatives"&&E(C.schema));return E(g)?{value:k.reduce((A,C)=>d(A,C,{mergeArrays:!1}))}:{value:k[k.length-1]}}const x=[];for(let k=0;kg.path[0]!=="is"?b.label(m):void 0,ref:!1})}},rebuild(m){m.$_modify({each:b=>{_.isSchema(b)&&b.type==="array"&&m.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(m,b){if(b.matches)for(const g of b.matches){const{schema:p,ref:h,is:T,not:x,then:k,otherwise:P}=g;m=p?m.try(p):h?m.conditional(h,{is:T,then:k,not:x,otherwise:P,switch:g.switch}):m.conditional(T,{then:k,otherwise:P})}return m}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),v.errors=function(m,b){let{error:g,state:p}=b;if(!m.length)return{errors:g("alternatives.any")};if(m.length===1)return{errors:m[0].reports};const h=new Set,T=[];for(const{reports:x,schema:k}of m){if(x.length>1)return v.unmatched(m,g);const P=x[0];if(P instanceof f.Report==0)return v.unmatched(m,g);if(P.state.path.length!==p.path.length){T.push({type:k.type,report:P});continue}if(P.code==="any.only"){for(const C of P.local.valids)h.add(C);continue}const[E,A]=P.code.split(".");A==="base"?h.add(E):T.push({type:k.type,report:P})}return T.length?T.length===1?{errors:T[0].report}:v.unmatched(m,g):{errors:g("alternatives.types",{types:[...h]})}},v.unmatched=function(m,b){const g=[];for(const p of m)g.push(...p.reports);return{errors:b("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,s,a)=>{const l=a(375),d=a(7629),y=a(8160),_=a(6914);i.exports=d.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return l(typeof c=="function","Method must be a function"),l(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,w){let{method:v}=w;try{return v(c,f)}catch(m){return f.error("any.custom",{error:m})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){l(y.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return l(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,w){let{code:v,local:m}=w;return f.error(v,m)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=_.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const w in f){const v=f[w];if(["examples","externals","metas","notes","tags"].includes(w))for(const m of v)c=c[w.slice(0,-1)](m);else if(w!=="alterations")if(w!=="whens"){if(w==="shared")for(const m of v)c=c.shared(m)}else for(const m of v){const{ref:b,is:g,not:p,then:h,otherwise:T,concat:x}=m;c=x?c.concat(x):b?c.when(b,{is:g,not:p,then:h,otherwise:T,switch:m.switch,break:m.break}):c.when(g,{then:h,otherwise:T,break:m.break})}else{const m={};for(const{target:b,adjuster:g}of v)m[b]=g;c=c.alter(m)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,s,a)=>{const l=a(375),d=a(9474),y=a(9621),_=a(8068),c=a(8160),f=a(3292),w={};i.exports=_.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(v,m){let{schema:b,state:g,prefs:p}=m;if(!Array.isArray(v))return;const h=b.$_getRule("sort");return h?w.sort(b,v,h.args.options,g,p):void 0}},validate(v,m){let{schema:b,error:g}=m;if(!Array.isArray(v)){if(b._flags.single){const p=[v];return p[c.symbols.arraySingle]=!0,{value:p}}return{errors:g("array.base")}}if(b.$_getRule("items")||b.$_terms.externals)return{value:v.slice()}},rules:{has:{method(v){v=this.$_compile(v,{appendPath:!0});const m=this.$_addRule({name:"has",args:{schema:v}});return m.$_mutateRegister(v),m},validate(v,m,b){let{state:g,prefs:p,error:h}=m,{schema:T}=b;const x=[v,...g.ancestors];for(let P=0;Pthis.$_compile(m[p]),p,{append:!0});g.$_terms.items.push(h)}return g.$_mutateRebuild()},validate(v,m){let{schema:b,error:g,state:p,prefs:h,errorsArray:T}=m;const x=b.$_terms._requireds.slice(),k=b.$_terms.ordered.slice(),P=[...b.$_terms._inclusions,...x],E=!v[c.symbols.arraySingle];delete v[c.symbols.arraySingle];const A=T();let C=v.length;for(let N=0;N="})}},ordered:{method(){for(var v=arguments.length,m=new Array(v),b=0;bthis.$_compile(m[p]),p,{append:!0});w.validateSingle(h,g),g.$_mutateRegister(h),g.$_terms.ordered.push(h)}return g.$_mutateRebuild()}},single:{method(v){const m=v===void 0||!!v;return l(!m||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",m)}},sort:{method(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(v,["by","order"]);const m={order:v.order||"ascending"};return v.by&&(m.by=f.ref(v.by,{ancestor:0}),l(!m.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:m}})},validate(v,m,b){let{error:g,state:p,prefs:h,schema:T}=m,{options:x}=b;const{value:k,errors:P}=w.sort(T,v,x,p,h);if(P)return P;for(let E=0;E1&&arguments[1]!==void 0?arguments[1]:{};l(!v||typeof v=="function"||typeof v=="string","comparator must be a function or a string"),c.assertOptions(m,["ignoreUndefined","separator"]);const b={name:"unique",args:{options:m,comparator:v}};if(v)if(typeof v=="string"){const g=c.default(m.separator,".");b.path=g?v.split(g):[v]}else b.comparator=v;return this.$_addRule(b)},validate(v,m,b,g){let{state:p,error:h,schema:T}=m,{comparator:x,options:k}=b,{comparator:P,path:E}=g;const A={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},C=P||d,N=k.ignoreUndefined;for(let $=0;$new Set(v)}},rebuild(v){v.$_terms._inclusions=[],v.$_terms._exclusions=[],v.$_terms._requireds=[];for(const m of v.$_terms.items)w.validateSingle(m,v),m._flags.presence==="required"?v.$_terms._requireds.push(m):m._flags.presence==="forbidden"?v.$_terms._exclusions.push(m):v.$_terms._inclusions.push(m);for(const m of v.$_terms.ordered)w.validateSingle(m,v)},manifest:{build:(v,m)=>(m.items&&(v=v.items(...m.items)),m.ordered&&(v=v.ordered(...m.ordered)),v)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),w.fillMissedErrors=function(v,m,b,g,p,h){const T=[];let x=0;for(const k of b){const P=k._flags.label;P?T.push(P):++x}T.length?x?m.push(v.$_createError("array.includesRequiredBoth",g,{knownMisses:T,unknownMisses:x},p,h)):m.push(v.$_createError("array.includesRequiredKnowns",g,{knownMisses:T},p,h)):m.push(v.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:x},p,h))},w.fillOrderedErrors=function(v,m,b,g,p,h){const T=[];for(const x of b)x._flags.presence==="required"&&T.push(x);T.length&&w.fillMissedErrors(v,m,T,g,p,h)},w.fillDefault=function(v,m,b,g){const p=[];let h=!0;for(let T=v.length-1;T>=0;--T){const x=v[T],k=[m,...b.ancestors],P=x.$_validate(void 0,b.localize(b.path,k,x),g).value;if(h){if(P===void 0)continue;h=!1}p.unshift(P)}p.length&&m.push(...p)},w.fastSplice=function(v,m){let b=m;for(;b{let A=w.compare(P,E,T,x);if(A!==null||(b.by&&(P=b.by.resolve(P,g,p),E=b.by.resolve(E,g,p)),A=w.compare(P,E,T,x),A!==null))return A;const C=typeof P;if(C!==typeof E)throw v.$_createError("array.sort.mismatching",m,null,g,p);if(C!=="number"&&C!=="string")throw v.$_createError("array.sort.unsupported",m,{type:C},g,p);return C==="number"?(P-E)*h:P{const l=a(375),d=a(8068),y=a(8160),_=a(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=d.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,w){let{schema:v}=w;if(typeof f!="boolean"){if(typeof f=="string"){const m=v._flags.sensitive?f:f.toLowerCase();f=m==="true"||m!=="false"&&f}return typeof f!="boolean"&&(f=v.$_terms.truthy&&v.$_terms.truthy.has(f,null,null,!v._flags.sensitive)||(!v.$_terms.falsy||!v.$_terms.falsy.has(f,null,null,!v._flags.sensitive))&&f),{value:f}}},validate(f,w){let{error:v}=w;if(typeof f!="boolean")return{value:f,errors:v("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,w=new Array(f),v=0;v0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,w)=>f?1:0},string:{from:c.isBool,to:(f,w)=>f?"true":"false"}},manifest:{build:(f,w)=>(w.truthy&&(f=f.truthy(...w.truthy)),w.falsy&&(f=f.falsy(...w.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_=a(3328),c={isDate:function(f){return f instanceof Date}};i.exports=d.extend({type:"date",coerce:{from:["number","string"],method(f,w){let{schema:v}=w;return{value:c.parse(f,v._flags.format)||f}}},validate(f,w){let{schema:v,error:m,prefs:b}=w;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=v._flags.format;return b.convert&&g&&typeof f=="string"?{value:f,errors:m("date.format",{format:g})}:{value:f,errors:m("date.base")}},rules:{compare:{method:!1,validate(f,w,v,m){let{date:b}=v,{name:g,operator:p,args:h}=m;const T=b==="now"?Date.now():b.getTime();return y.compare(f.getTime(),T,p)?f:w.error("date."+g,{limit:h.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return l(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return l(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,w)=>f.getTime()},string:{from:c.isDate,to(f,w){let{prefs:v}=w;return _.date(f,v)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,w){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(w==="iso")return y.isIsoDate(f)?c.date(f.toString()):null;const v=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),w){if(w==="javascript")return c.date(1*f);if(w==="unix")return c.date(1e3*f);if(typeof v=="string")return null}return c.date(f)},c.date=function(f){const w=new Date(f);return isNaN(w.getTime())?null:w}},390:(i,s,a)=>{const l=a(375),d=a(7824);i.exports=d.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length===f?y:_.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(y,_)=>/^\s*class\s/.test(y.toString())?y:_.error("function.class",{value:y})},minArity:{method(y){return l(Number.isSafeInteger(y)&&y>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length>=f?y:_.error("function.minArity",{n:f})}},maxArity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length<=f?y:_.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,s,a)=>{const l=a(978),d=a(375),y=a(8571),_=a(3652),c=a(8068),f=a(8160),w=a(3292),v=a(6354),m=a(6133),b=a(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(p,h)=>p.keys(h),validate(p,h){let{schema:T,error:x,state:k,prefs:P}=h;if(!p||typeof p!==T.$_property("typeof")||Array.isArray(p))return{value:p,errors:x("object.base",{type:T.$_property("typeof")})};if(!(T.$_terms.renames||T.$_terms.dependencies||T.$_terms.keys||T.$_terms.patterns||T.$_terms.externals))return;p=g.clone(p,P);const E=[];if(T.$_terms.renames&&!g.rename(T,p,k,P,E))return{value:p,errors:E};if(!T.$_terms.keys&&!T.$_terms.patterns&&!T.$_terms.dependencies)return{value:p,errors:E};const A=new Set(Object.keys(p));if(T.$_terms.keys){const C=[p,...k.ancestors];for(const N of T.$_terms.keys){const $=N.key,F=p[$];A.delete($);const z=k.localize([...k.path,$],C,N),B=N.schema.$_validate(F,z,P);if(B.errors){if(P.abortEarly)return{value:p,errors:B.errors};B.value!==void 0&&(p[$]=B.value),E.push(...B.errors)}else N.schema._flags.result==="strip"||B.value===void 0&&F!==void 0?delete p[$]:B.value!==void 0&&(p[$]=B.value)}}if(A.size||T._flags._hasPatternMatch){const C=g.unknown(T,p,A,E,k,P);if(C)return C}if(T.$_terms.dependencies)for(const C of T.$_terms.dependencies){if(C.key!==null&&g.isPresent(C.options)(C.key.resolve(p,k,P,null,{shadow:!1}))===!1)continue;const N=g.dependencies[C.rel](T,C,p,k,P);if(N){const $=T.$_createError(N.code,p,N.context,k,P);if(P.abortEarly)return{value:p,errors:$};E.push($)}}return{value:p,errors:E}},rules:{and:{method(){for(var p=arguments.length,h=new Array(p),T=0;T!p.hasOwnProperty(T.key)):new g.Keys;for(const T in p)f.tryWithPath(()=>h.$_terms.keys.push({key:T,schema:this.$_compile(p[T])}),T)}else h.$_terms.keys=new g.Keys;else h.$_terms.keys=null;return h.$_mutateRebuild()}},length:{method(p){return this.$_addRule({name:"length",args:{limit:p},operator:"="})},validate(p,h,T,x){let{limit:k}=T,{name:P,operator:E,args:A}=x;return f.compare(Object.keys(p).length,k,E)?p:h.error("object."+P,{limit:A.limit,value:p})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(p){return this.$_addRule({name:"max",method:"length",args:{limit:p},operator:"<="})}},min:{method(p){return this.$_addRule({name:"min",method:"length",args:{limit:p},operator:">="})}},nand:{method(){for(var p=arguments.length,h=new Array(p),T=0;T2&&arguments[2]!==void 0?arguments[2]:{};const x=p instanceof RegExp;x||(p=this.$_compile(p,{appendPath:!0})),d(h!==void 0,"Invalid rule"),f.assertOptions(T,["fallthrough","matches"]),x&&d(!p.flags.includes("g")&&!p.flags.includes("y"),"pattern should not use global or sticky mode"),h=this.$_compile(h,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const P={[x?"regex":"schema"]:p,rule:h};return T.matches&&(P.matches=this.$_compile(T.matches),P.matches.type!=="array"&&(P.matches=P.matches.$_root.array().items(P.matches)),k.$_mutateRegister(P.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),T.fallthrough&&(P.fallthrough=!0),k.$_terms.patterns.push(P),k.$_mutateRegister(h),k}},ref:{method(){return this.$_addRule("ref")},validate:(p,h)=>m.isRef(p)?p:h.error("object.refType",{value:p})},regex:{method(){return this.$_addRule("regex")},validate:(p,h)=>p instanceof RegExp?p:h.error("object.regex",{value:p})},rename:{method(p,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d(typeof p=="string"||p instanceof RegExp,"Rename missing the from argument"),d(typeof h=="string"||h instanceof b,"Invalid rename to argument"),d(h!==p,"Cannot rename key to same name:",p),f.assertOptions(T,["alias","ignoreUndefined","override","multiple"]);const x=this.clone();x.$_terms.renames=x.$_terms.renames||[];for(const k of x.$_terms.renames)d(k.from!==p,"Cannot rename the same key multiple times");return h instanceof b&&x.$_mutateRegister(h),x.$_terms.renames.push({from:p,to:h,options:l(g.renameDefaults,T)}),x}},schema:{method(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:p}})},validate(p,h,T){let{type:x}=T;return!f.isSchema(p)||x!=="any"&&p.type!==x?h.error("object.schema",{type:x}):p}},unknown:{method(p){return this.$_setFlag("unknown",p!==!1)}},with:{method(p,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",p,h,T)}},without:{method(p,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",p,h,T)}},xor:{method(){for(var p=arguments.length,h=new Array(p),T=0;Th.add(T,{after:T.schema.$_rootReferences(),group:T.key}),T.key);p.$_terms.keys=new g.Keys(...h.nodes)}},manifest:{build(p,h){if(h.keys&&(p=p.keys(h.keys)),h.dependencies)for(const{rel:T,key:x=null,peers:k,options:P}of h.dependencies)p=g.dependency(p,T,x,k,P);if(h.patterns)for(const{regex:T,schema:x,rule:k,fallthrough:P,matches:E}of h.patterns)p=p.pattern(T||x,k,{fallthrough:P,matches:E});if(h.renames)for(const{from:T,to:x,options:k}of h.renames)p=p.rename(T,x,k);return p}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(p,h){if(typeof p=="object"){if(h.nonEnumerables)return y(p,{shallow:!0});const x=Object.create(Object.getPrototypeOf(p));return Object.assign(x,p),x}const T=function(){for(var x=arguments.length,k=new Array(x),P=0;P1&&typeof x[x.length-1]=="object"?x.pop():{}),f.assertOptions(k,["separator","isPresent"]),x=[].concat(x);const P=f.default(k.separator,"."),E=[];for(const C of x)d(typeof C=="string",h,"peers must be strings"),E.push(w.ref(C,{separator:P,ancestor:0,prefix:!1}));T!==null&&(T=w.ref(T,{separator:P,ancestor:0,prefix:!1}));const A=p.clone();return A.$_terms.dependencies=A.$_terms.dependencies||[],A.$_terms.dependencies.push(new g.Dependency(h,T,E,x,k)),A},g.dependencies={and(p,h,T,x,k){const P=[],E=[],A=h.peers.length,C=g.isPresent(h.options);for(const N of h.peers)C(N.resolve(T,x,k,null,{shadow:!1}))===!1?P.push(N.key):E.push(N.key);if(P.length!==A&&E.length!==A)return{code:"object.and",context:{present:E,presentWithLabels:g.keysToLabels(p,E),missing:P,missingWithLabels:g.keysToLabels(p,P)}}},nand(p,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const N of h.peers)E(N.resolve(T,x,k,null,{shadow:!1}))&&P.push(N.key);if(P.length!==h.peers.length)return;const A=h.paths[0],C=h.paths.slice(1);return{code:"object.nand",context:{main:A,mainWithLabel:g.keysToLabels(p,A),peers:C,peersWithLabels:g.keysToLabels(p,C)}}},or(p,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:h.paths,peersWithLabels:g.keysToLabels(p,h.paths)}}},oxor(p,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&P.push(C.key);if(!P.length||P.length===1)return;const A={peers:h.paths,peersWithLabels:g.keysToLabels(p,h.paths)};return A.present=P,A.presentWithLabels=g.keysToLabels(p,P),{code:"object.oxor",context:A}},with(p,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:h.key.key,mainWithLabel:g.keysToLabels(p,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(p,E.key)}}},without(p,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1})))return{code:"object.without",context:{main:h.key.key,mainWithLabel:g.keysToLabels(p,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(p,E.key)}}},xor(p,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&P.push(C.key);if(P.length===1)return;const A={peers:h.paths,peersWithLabels:g.keysToLabels(p,h.paths)};return P.length===0?{code:"object.missing",context:A}:(A.present=P,A.presentWithLabels=g.keysToLabels(p,P),{code:"object.xor",context:A})}},g.keysToLabels=function(p,h){return Array.isArray(h)?h.map(T=>p.$_mapLabels(T)):p.$_mapLabels(h)},g.isPresent=function(p){return typeof p.isPresent=="function"?p.isPresent:h=>h!==void 0},g.rename=function(p,h,T,x,k){const P={};for(const E of p.$_terms.renames){const A=[],C=typeof E.from!="string";if(C)for(const N in h){if(h[N]===void 0&&E.options.ignoreUndefined||N===E.to)continue;const $=E.from.exec(N);$&&A.push({from:N,to:E.to,match:$})}else!Object.prototype.hasOwnProperty.call(h,E.from)||h[E.from]===void 0&&E.options.ignoreUndefined||A.push(E);for(const N of A){const $=N.from;let F=N.to;if(F instanceof b&&(F=F.render(h,T,x,N.match)),$!==F){if(!E.options.multiple&&P[F]&&(k.push(p.$_createError("object.rename.multiple",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly)||Object.prototype.hasOwnProperty.call(h,F)&&!E.options.override&&!P[F]&&(k.push(p.$_createError("object.rename.override",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly))return!1;h[$]===void 0?delete h[F]:h[F]=h[$],P[F]=!0,E.options.alias||delete h[$]}}}return!0},g.unknown=function(p,h,T,x,k,P){if(p.$_terms.patterns){let E=!1;const A=p.$_terms.patterns.map(N=>{if(N.matches)return E=!0,[]}),C=[h,...k.ancestors];for(const N of T){const $=h[N],F=[...k.path,N];for(let z=0;z{const l=a(375),d=a(8068),y=a(8160),_=a(3292),c=a(6354),f={};i.exports=d.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(w,v)=>w.ref(v),validate(w,v){let{schema:m,state:b,prefs:g}=v;l(m.$_terms.link,"Uninitialized link schema");const p=f.generate(m,w,b,g),h=m.$_terms.link[0].ref;return p.$_validate(w,b.nest(p,`link:${h.display}:${p.type}`),g)},generate:(w,v,m,b)=>f.generate(w,v,m,b),rules:{ref:{method(w){l(!this.$_terms.link,"Cannot reinitialize schema"),w=_.ref(w),l(w.type==="value"||w.type==="local","Invalid reference type:",w.type),l(w.type==="local"||w.ancestor==="root"||w.ancestor>0,"Link cannot reference itself");const v=this.clone();return v.$_terms.link=[{ref:w}],v}},relative:{method(){let w=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",w)}}},overrides:{concat(w){l(this.$_terms.link,"Uninitialized link schema"),l(y.isSchema(w),"Invalid schema object"),l(w.type!=="link","Cannot merge type link with another link");const v=this.clone();return v.$_terms.whens||(v.$_terms.whens=[]),v.$_terms.whens.push({concat:w}),v.$_mutateRebuild()}},manifest:{build:(w,v)=>(l(v.link,"Invalid link description missing link"),w.ref(v.link))}}),f.generate=function(w,v,m,b){let g=m.mainstay.links.get(w);if(g)return g._generate(v,m,b).schema;const p=w.$_terms.link[0].ref,{perspective:h,path:T}=f.perspective(p,m);f.assert(h,"which is outside of schema boundaries",p,w,m,b);try{g=T.length?h.$_reach(T):h}catch{f.assert(!1,"to non-existing schema",p,w,m,b)}return f.assert(g.type!=="link","which is another link",p,w,m,b),w._flags.relative||m.mainstay.links.set(w,g),g._generate(v,m,b).schema},f.perspective=function(w,v){if(w.type==="local"){for(const{schema:m,key:b}of v.schemas){if((m._flags.id||b)===w.path[0])return{perspective:m,path:w.path.slice(1)};if(m.$_terms.shared){for(const g of m.$_terms.shared)if(g._flags.id===w.path[0])return{perspective:g,path:w.path.slice(1)}}}return{perspective:null,path:null}}return w.ancestor==="root"?{perspective:v.schemas[v.schemas.length-1].schema,path:w.path}:{perspective:v.schemas[w.ancestor]&&v.schemas[w.ancestor].schema,path:w.path}},f.assert=function(w,v,m,b,g,p){w||l(!1,`"${c.label(b._flags,g,p)}" contains link reference "${m.display}" ${v}`)}},3832:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=d.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:w,error:v}=f;if(!c.match(_.numberRx))return;c=c.trim();const m={value:parseFloat(c)};if(m.value===0&&(m.value=0),!w._flags.unsafe)if(c.match(/e/i)){if(_.extractSignificantDigits(c)!==_.extractSignificantDigits(String(m.value)))return m.errors=v("number.unsafe"),m}else{const b=m.value.toString();if(b.match(/e/i))return m;if(b!==_.normalizeDecimal(c))return m.errors=v("number.unsafe"),m}return m}},validate(c,f){let{schema:w,error:v,prefs:m}=f;if(c===1/0||c===-1/0)return{value:c,errors:v("number.infinity")};if(!y.isNumber(c))return{value:c,errors:v("number.base")};const b={value:c};if(m.convert){const g=w.$_getRule("precision");if(g){const p=Math.pow(10,g.args.limit);b.value=Math.round(b.value*p)/p}}return b.value===0&&(b.value=0),!w._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,w,v){let{base:m}=w;return c*(1/m)%1==0?c:f.error("number.multiple",{multiple:v.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return l(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,w){let{limit:v}=w;const m=c.toString().match(_.precisionRx);return Math.max((m[1]?m[1].length:0)-(m[2]?parseInt(m[2],10):0),0)<=v?c:f.error("number.precision",{limit:v,value:c})},convert:!0},sign:{method(c){return l(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,w){let{sign:v}=w;return v==="negative"&&c<0||v==="positive"&&c>0?c:f.error(`number.${v}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),_.extractSignificantDigits=function(c){return c.replace(_.exponentialPartRegex,"").replace(_.dotRegex,"").replace(_.trailingZerosRegex,"").replace(_.leadingSignAndZerosRegex,"")},_.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,s,a)=>{const l=a(7824);i.exports=l.extend({type:"object",cast:{map:{from:d=>d&&typeof d=="object",to:(d,y)=>new Map(Object.entries(d))}}})},7417:(i,s,a)=>{const l=a(375),d=a(5380),y=a(1745),_=a(9959),c=a(6064),f=a(9926),w=a(5752),v=a(8068),m=a(8160),b={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:_.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=v.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,p){let{schema:h,state:T,prefs:x}=p;const k=h.$_getRule("normalize");k&&(g=g.normalize(k.args.form));const P=h.$_getRule("case");P&&(g=P.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const E=h.$_getRule("trim");if(E&&E.args.enabled&&(g=g.trim()),h.$_terms.replacements)for(const C of h.$_terms.replacements)g=g.replace(C.pattern,C.replacement);const A=h.$_getRule("hex");if(A&&A.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),h.$_getRule("isoDate")){const C=b.isoDate(g);C&&(g=C)}if(h._flags.truncate){const C=h.$_getRule("max");if(C){let N=C.args.limit;if(m.isResolvable(N)&&(N=N.resolve(g,T,x),!m.limit(N)))return{value:g,errors:h.$_createError("any.ref",N,{ref:C.args.limit,arg:"limit",reason:"must be a positive integer"},T,x)};g=g.slice(0,N)}}return{value:g}}},validate(g,p){let{schema:h,error:T}=p;if(typeof g!="string")return{value:g,errors:T("string.base")};if(g===""){const x=h.$_getRule("min");return x&&x.args.limit===0?void 0:{value:g,errors:T("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,p)=>/^[a-zA-Z0-9]+$/.test(g)?g:p.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,p,h){let{options:T}=h;return b.base64Regex[T.paddingRequired][T.urlSafe].test(g)?g:p.error("string.base64")}},case:{method(g){return l(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,p,h){let{direction:T}=h;return T==="lower"&&g===g.toLocaleLowerCase()||T==="upper"&&g===g.toLocaleUpperCase()?g:p.error(`string.${T}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,p){let h=g.length,T=0,x=1;for(;h--;){const k=g.charAt(h)*x;T+=k-9*(k>9),x^=3}return T>0&&T%10==0?g:p.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,p,h){let{options:T}=h;const x=g.match(b.dataUriRegex);return x&&(!x[2]||x[2]!=="base64"||b.base64Regex[T.paddingRequired].false.test(x[3]))?g:p.error("string.dataUri")}},domain:{method(g){g&&m.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const p=b.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:p})},validate(g,p,h,T){let{address:x}=T;return d.isValid(g,x)?g:p.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),l(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const p=b.addressOptions(g),h=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:h,address:p})},validate(g,p,h,T){let{options:x}=h,{regex:k,address:P}=T;const E=x.multiple?g.split(k):[g],A=[];for(const C of E)y.isValid(C,P)||A.push(C);return A.length?p.error("string.email",{value:g,invalids:A}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["version","separator"]);let p="";if(g.version){const x=[].concat(g.version);l(x.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let P=0;P0&&arguments[0]!==void 0?arguments[0]:{};return m.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},l(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,p,h){let{options:T}=h;return b.hexRegex.test(g)?T.byteAligned&&g.length%2!=0?p.error("string.hexAlign"):g:p.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,p)=>d.isValid(g,{minDomainSegments:1})||b.ipRegex.test(g)?g:p.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["cidr","version"]);const{cidr:p,versions:h,regex:T}=_.regex(g),x=g.version?h:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:p,version:x}},regex:T})},validate(g,p,h,T){let{options:x}=h,{regex:k}=T;return k.test(g)?g:x.version?p.error("string.ipVersion",{value:g,cidr:x.cidr,version:x.version}):p.error("string.ip",{value:g,cidr:x.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,p){let{error:h}=p;return b.isoDate(g)?g:h("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,p)=>b.isoDurationRegex.test(g)?g:p.error("string.isoDuration")},length:{method(g,p){return b.length(this,"length",g,"=",p)},validate(g,p,h,T){let{limit:x,encoding:k}=h,{name:P,operator:E,args:A}=T;const C=!k&&g.length;return m.compare(C,x,E)?g:p.error("string."+P,{limit:A.limit,value:g,encoding:k})},args:[{name:"limit",ref:!0,assert:m.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,p){return b.length(this,"max",g,"<=",p)},args:["limit","encoding"]},min:{method(g,p){return b.length(this,"min",g,">=",p)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return l(b.normalizationForms.includes(g),"normalization form must be one of "+b.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,p,h){let{error:T}=p,{form:x}=h;return g===g.normalize(x)?g:T("string.normalize",{value:g,form:x})},convert:!0},pattern:{alias:"regex",method(g){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(g instanceof RegExp,"regex must be a RegExp"),l(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof p=="string"&&(p={name:p}),m.assertOptions(p,["invert","name"]);const h=["string.pattern",p.invert?".invert":"",p.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:p},errorCode:h})},validate(g,p,h,T){let{regex:x,options:k}=h,{errorCode:P}=T;return x.test(g)^k.invert?g:p.error(P,{name:k.name,regex:x,value:g})},args:["regex","options"],multi:!0},replace:{method(g,p){typeof g=="string"&&(g=new RegExp(c(g),"g")),l(g instanceof RegExp,"pattern must be a RegExp"),l(typeof p=="string","replacement must be a String");const h=this.clone();return h.$_terms.replacements||(h.$_terms.replacements=[]),h.$_terms.replacements.push({pattern:g,replacement:p}),h}},token:{method(){return this.$_addRule("token")},validate:(g,p)=>/^\w+$/.test(g)?g:p.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,p,h){let{enabled:T}=h;return T&&g!==g.trim()?p.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&m.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:p,scheme:h}=w.regex(g),T=g.domain?b.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:p,domain:T,scheme:h})},validate(g,p,h,T){let{options:x}=h,{regex:k,domain:P,scheme:E}=T;if(["http:/","https:/"].includes(g))return p.error("string.uri");const A=k.exec(g);if(A){const C=A[1]||A[2];return!P||x.allowRelative&&!C||d.isValid(C,P)?g:p.error("string.domain",{value:C})}return x.relativeOnly?p.error("string.uriRelativeOnly"):x.scheme?p.error("string.uriCustomScheme",{scheme:E,value:g}):p.error("string.uri")}}},manifest:{build(g,p){if(p.replacements)for(const{pattern:h,replacement:T}of p.replacements)g=g.replace(h,T);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),b.addressOptions=function(g){if(!g||(l(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds);l(typeof g.tlds=="object","tlds must be true, false, or an object");const p=g.tlds.deny;if(p)return Array.isArray(p)&&(g=Object.assign({},g,{tlds:{deny:new Set(p)}})),l(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),b.validateTlds(g.tlds.deny,"tlds.deny"),g;const h=g.tlds.allow;return h?h===!0?(l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds)):(Array.isArray(h)&&(g=Object.assign({},g,{tlds:{allow:new Set(h)}})),l(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),b.validateTlds(g.tlds.allow,"tlds.allow"),g):g},b.validateTlds=function(g,p){for(const h of g)l(d.isValid(h,{minDomainSegments:1,maxDomainSegments:1}),`${p} must contain valid top level domain names`)},b.isoDate=function(g){if(!m.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const p=new Date(g);return isNaN(p.getTime())?null:p.toISOString()},b.length=function(g,p,h,T,x){return l(!x||!1,"Invalid encoding:",x),g.$_addRule({name:p,method:"length",args:{limit:h,encoding:x},operator:T})}},8826:(i,s,a)=>{const l=a(375),d=a(8068),y={};y.Map=class extends Map{slice(){return new y.Map(this)}},i.exports=d.extend({type:"symbol",terms:{map:{init:new y.Map}},coerce:{method(_,c){let{schema:f,error:w}=c;const v=f.$_terms.map.get(_);return v&&(_=v),f._flags.only&&typeof _!="symbol"?{value:_,errors:w("symbol.map",{map:f.$_terms.map})}:{value:_}}},validate(_,c){let{error:f}=c;if(typeof _!="symbol")return{value:_,errors:f("symbol.base")}},rules:{map:{method(_){_&&!_[Symbol.iterator]&&typeof _=="object"&&(_=Object.entries(_)),l(_&&_[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const w of _){l(w&&w[Symbol.iterator],"Entry must be an iterable");const[v,m]=w;l(typeof v!="object"&&typeof v!="function"&&typeof v!="symbol","Key must not be of type object, function, or Symbol"),l(typeof m=="symbol","Value must be a Symbol"),c.$_terms.map.set(v,m),f.push(m)}return c.valid(...f)}}},manifest:{build:(_,c)=>(c.map&&(_=_.map(c.map)),_)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,s,a)=>{const l=a(375),d=a(8571),y=a(738),_=a(9621),c=a(8160),f=a(6354),w=a(493),v={result:Symbol("result")};s.entry=function(m,b,g){let p=c.defaults;g&&(l(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),p=c.preferences(c.defaults,g));const h=v.entry(m,b,p);l(!h.mainstay.externals.length,"Schema with external rules must use validateAsync()");const T={value:h.value};return h.error&&(T.error=h.error),h.mainstay.warnings.length&&(T.warning=f.details(h.mainstay.warnings)),h.mainstay.debug&&(T.debug=h.mainstay.debug),h.mainstay.artifacts&&(T.artifacts=h.mainstay.artifacts),T},s.entryAsync=async function(m,b,g){let p=c.defaults;g&&(p=c.preferences(c.defaults,g));const h=v.entry(m,b,p),T=h.mainstay;if(h.error)throw T.debug&&(h.error.debug=T.debug),h.error;if(T.externals.length){let k=h.value;for(const{method:P,path:E,label:A}of T.externals){let C,N,$=k;E.length&&(C=E[E.length-1],N=_(k,E.slice(0,-1)),$=N[C]);try{const F=await P($,{prefs:g});if(F===void 0||F===$)continue;N?N[C]=F:k=F}catch(F){throw p.errors.label&&(F.message+=` (${A})`),F}}h.value=k}if(!p.warnings&&!p.debug&&!p.artifacts)return h.value;const x={value:h.value};return T.warnings.length&&(x.warning=f.details(T.warnings)),T.debug&&(x.debug=T.debug),T.artifacts&&(x.artifacts=T.artifacts),x},v.entry=function(m,b,g){const{tracer:p,cleanup:h}=v.tracer(b,g),T={externals:[],warnings:[],tracer:p,debug:g.debug?[]:null,links:b._ids._schemaChain?new Map:null},x=b._ids._schemaChain?[{schema:b}]:null,k=new w([],[],{mainstay:T,schemas:x}),P=s.validate(m,b,k,g);h&&b.$_root.untrace();const E=f.process(P.errors,m,g);return{value:P.value,error:E,mainstay:T}},v.tracer=function(m,b){return m.$_root._tracer?{tracer:m.$_root._tracer._register(m)}:b.debug?(l(m.$_root.trace,"Debug mode not supported"),{tracer:m.$_root.trace()._register(m),cleanup:!0}):{tracer:v.ignore}},s.validate=function(m,b,g,p){let h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(b.$_terms.whens&&(b=b._generate(m,g,p).schema),b._preferences&&(p=v.prefs(b,p)),b._cache&&p.cache){const C=b._cache.get(m);if(g.mainstay.tracer.debug(g,"validate","cached",!!C),C)return C}const T=(C,N,$)=>b.$_createError(C,m,N,$||g,p),x={original:m,prefs:p,schema:b,state:g,error:T,errorsArray:v.errorsArray,warn:(C,N,$)=>g.mainstay.warnings.push(T(C,N,$)),message:(C,N)=>b.$_createError("custom",m,N,g,p,{messages:C})};g.mainstay.tracer.entry(b,g);const k=b._definition;if(k.prepare&&m!==void 0&&p.convert){const C=k.prepare(m,x);if(C){if(g.mainstay.tracer.value(g,"prepare",m,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);m=C.value}}if(k.coerce&&m!==void 0&&p.convert&&(!k.coerce.from||k.coerce.from.includes(typeof m))){const C=k.coerce.method(m,x);if(C){if(g.mainstay.tracer.value(g,"coerced",m,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);m=C.value}}const P=b._flags.empty;P&&P.$_match(v.trim(m,b),g.nest(P),c.defaults)&&(g.mainstay.tracer.value(g,"empty",m,void 0),m=void 0);const E=h.presence||b._flags.presence||(b._flags._endedSwitch?null:p.presence);if(m===void 0){if(E==="forbidden")return v.finalize(m,null,x);if(E==="required")return v.finalize(m,[b.$_createError("any.required",m,null,g,p)],x);if(E==="optional"){if(b._flags.default!==c.symbols.deepDefault)return v.finalize(m,null,x);g.mainstay.tracer.value(g,"default",m,{}),m={}}}else if(E==="forbidden")return v.finalize(m,[b.$_createError("any.unknown",m,null,g,p)],x);const A=[];if(b._valids){const C=b._valids.get(m,g,p,b._flags.insensitive);if(C)return p.convert&&(g.mainstay.tracer.value(g,"valids",m,C.value),m=C.value),g.mainstay.tracer.filter(b,g,"valid",C),v.finalize(m,null,x);if(b._flags.only){const N=b.$_createError("any.only",m,{valids:b._valids.values({display:!0})},g,p);if(p.abortEarly)return v.finalize(m,[N],x);A.push(N)}}if(b._invalids){const C=b._invalids.get(m,g,p,b._flags.insensitive);if(C){g.mainstay.tracer.filter(b,g,"invalid",C);const N=b.$_createError("any.invalid",m,{invalids:b._invalids.values({display:!0})},g,p);if(p.abortEarly)return v.finalize(m,[N],x);A.push(N)}}if(k.validate){const C=k.validate(m,x);if(C&&(g.mainstay.tracer.value(g,"base",m,C.value),m=C.value,C.errors)){if(!Array.isArray(C.errors))return A.push(C.errors),v.finalize(m,A,x);if(C.errors.length)return A.push(...C.errors),v.finalize(m,A,x)}}return b._rules.length?v.rules(m,A,x):v.finalize(m,A,x)},v.rules=function(m,b,g){const{schema:p,state:h,prefs:T}=g;for(const x of p._rules){const k=p._definition.rules[x.method];if(k.convert&&T.convert){h.mainstay.tracer.log(p,h,"rule",x.name,"full");continue}let P,E=x.args;if(x._resolve.length){E=Object.assign({},E);for(const C of x._resolve){const N=k.argsByName.get(C),$=E[C].resolve(m,h,T),F=N.normalize?N.normalize($):$,z=c.validateArg(F,null,N);if(z){P=p.$_createError("any.ref",$,{arg:C,ref:E[C],reason:z},h,T);break}E[C]=F}}P=P||k.validate(m,g,E,x);const A=v.rule(P,x);if(A.errors){if(h.mainstay.tracer.log(p,h,"rule",x.name,"error"),x.warn){h.mainstay.warnings.push(...A.errors);continue}if(T.abortEarly)return v.finalize(m,A.errors,g);b.push(...A.errors)}else h.mainstay.tracer.log(p,h,"rule",x.name,"pass"),h.mainstay.tracer.value(h,"rule",m,A.value,x.name),m=A.value}return v.finalize(m,b,g)},v.rule=function(m,b){return m instanceof f.Report?(v.error(m,b),{errors:[m],value:null}):Array.isArray(m)&&m[c.symbols.errors]?(m.forEach(g=>v.error(g,b)),{errors:m,value:null}):{errors:null,value:m}},v.error=function(m,b){return b.message&&m._setTemplate(b.message),m},v.finalize=function(m,b,g){b=b||[];const{schema:p,state:h,prefs:T}=g;if(b.length){const k=v.default("failover",void 0,b,g);k!==void 0&&(h.mainstay.tracer.value(h,"failover",m,k),m=k,b=[])}if(b.length&&p._flags.error)if(typeof p._flags.error=="function"){b=p._flags.error(b),Array.isArray(b)||(b=[b]);for(const k of b)l(k instanceof Error||k instanceof f.Report,"error() must return an Error object")}else b=[p._flags.error];if(m===void 0){const k=v.default("default",m,b,g);h.mainstay.tracer.value(h,"default",m,k),m=k}if(p._flags.cast&&m!==void 0){const k=p._definition.cast[p._flags.cast];if(k.from(m)){const P=k.to(m,g);h.mainstay.tracer.value(h,"cast",m,P,p._flags.cast),m=P}}if(p.$_terms.externals&&T.externals&&T._externals!==!1)for(const{method:k}of p.$_terms.externals)h.mainstay.externals.push({method:k,path:h.path,label:f.label(p._flags,h,T)});const x={value:m,errors:b.length?b:null};return p._flags.result&&(x.value=p._flags.result==="strip"?void 0:g.original,h.mainstay.tracer.value(h,p._flags.result,m,x.value),h.shadow(m,p._flags.result)),p._cache&&T.cache!==!1&&!p._refs.length&&p._cache.set(g.original,x),m===void 0||x.errors||p._flags.artifact===void 0||(h.mainstay.artifacts=h.mainstay.artifacts||new Map,h.mainstay.artifacts.has(p._flags.artifact)||h.mainstay.artifacts.set(p._flags.artifact,[]),h.mainstay.artifacts.get(p._flags.artifact).push(h.path)),x},v.prefs=function(m,b){const g=b===c.defaults;return g&&m._preferences[c.symbols.prefs]?m._preferences[c.symbols.prefs]:(b=c.preferences(b,m._preferences),g&&(m._preferences[c.symbols.prefs]=b),b)},v.default=function(m,b,g,p){const{schema:h,state:T,prefs:x}=p,k=h._flags[m];if(x.noDefaults||k===void 0)return b;if(T.mainstay.tracer.log(h,T,"rule",m,"full"),!k)return k;if(typeof k=="function"){const P=k.length?[d(T.ancestors[0]),p]:[];try{return k(...P)}catch(E){return void g.push(h.$_createError(`any.${m}`,null,{error:E},T,x))}}return typeof k!="object"?k:k[c.symbols.literal]?k.literal:c.isResolvable(k)?k.resolve(b,T,x):d(k)},v.trim=function(m,b){if(typeof m!="string")return m;const g=b.$_getRule("trim");return g&&g.args.enabled?m.trim():m},v.ignore={active:!1,debug:y,entry:y,filter:y,log:y,resolve:y,value:y},v.errorsArray=function(){const m=[];return m[c.symbols.errors]=!0,m}},2036:(i,s,a)=>{const l=a(375),d=a(9474),y=a(8160),_={};i.exports=_.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=_.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){y.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,w){if(c=c||new _.Values,f){if(f._override)return f.clone();for(const v of[...f._values,...f._refs])c.add(v)}if(w)for(const v of[...w._values,...w._refs])c.remove(v);return c.length?c:null}remove(c){y.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,w,v){return!!this.get(c,f,w,v)}get(c,f,w,v){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&v){const m=this._lowercase.get(c.toLowerCase());if(m)return{value:m}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const m of this._values)if(d(m,c))return{value:m}}if(f)for(const m of this._refs){const b=m.resolve(c,f,w,null,{in:!0});if(b===void 0)continue;const g=m.in&&typeof b=="object"?Array.isArray(b)?b:Object.keys(b):[b];for(const p of g)if(typeof p==typeof c){if(v&&c&&typeof c=="string"){if(p.toLowerCase()===c.toLowerCase())return{value:p,ref:m}}else if(d(p,c))return{value:p,ref:m}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const w of[...this._values,...this._refs])w!==void 0&&f.push(w);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new _.Values(this._values,this._refs);return c._override=this._override,c}concat(c){l(!c._override,"Cannot concat override set of values");const f=new _.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},_.Values.prototype[y.symbols.values]=!0,_.Values.prototype.slice=_.Values.prototype.clone,_.lowercases=function(c){const f=new Map;if(c)for(const w of c)typeof w=="string"&&f.set(w.toLowerCase(),w);return f}},978:(i,s,a)=>{const l=a(375),d=a(8571),y=a(1687),_=a(9621),c={};i.exports=function(f,w){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(l(f&&typeof f=="object","Invalid defaults value: must be an object"),l(!w||w===!0||typeof w=="object","Invalid source value: must be true, falsy or an object"),l(typeof v=="object","Invalid options: must be an object"),!w)return null;if(v.shallow)return c.applyToDefaultsWithShallow(f,w,v);const m=d(f);if(w===!0)return m;const b=v.nullOverride!==void 0&&v.nullOverride;return y(m,w,{nullOverride:b,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,w,v){const m=v.shallow;l(Array.isArray(m),"Invalid keys");const b=new Map,g=w===!0?null:new Set;for(let T of m){T=Array.isArray(T)?T:T.split(".");const x=_(f,T);x&&typeof x=="object"?b.set(x,g&&_(w,T)||x):g&&g.add(T)}const p=d(f,{},b);if(!g)return p;for(const T of g)c.reachCopy(p,w,T);const h=v.nullOverride!==void 0&&v.nullOverride;return y(p,w,{nullOverride:h,mergeArrays:!1})},c.reachCopy=function(f,w,v){for(const g of v){if(!(g in w))return;const p=w[g];if(typeof p!="object"||p===null)return;w=p}const m=w;let b=f;for(let g=0;g{const l=a(7916);i.exports=function(d){if(!d){for(var y=arguments.length,_=new Array(y>1?y-1:0),c=1;c{const l=a(9621),d=a(4277),y=a(7043),_={needsProtoHack:new Set([d.set,d.map,d.weakSet,d.weakMap])};i.exports=_.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let v=_.clone,m=w;if(f.shallow){if(f.shallow!==!0)return _.cloneWithShallow(c,f);v=h=>h}else if(m){const h=m.get(c);if(h)return h}else m=new Map;const b=d.getInternalProto(c);if(b===d.buffer)return!1;if(b===d.date)return new Date(c.getTime());if(b===d.regex)return new RegExp(c);const g=_.base(c,b,f);if(g===c)return c;if(m&&m.set(c,g),b===d.set)for(const h of c)g.add(v(h,f,m));else if(b===d.map)for(const[h,T]of c)g.set(h,v(T,f,m));const p=y.keys(c,f);for(const h of p){if(h==="__proto__")continue;if(b===d.array&&h==="length"){g.length=c.length;continue}const T=Object.getOwnPropertyDescriptor(c,h);T?T.get||T.set?Object.defineProperty(g,h,T):T.enumerable?g[h]=v(c[h],f,m):Object.defineProperty(g,h,{enumerable:!1,writable:!0,configurable:!0,value:v(c[h],f,m)}):Object.defineProperty(g,h,{enumerable:!0,writable:!0,configurable:!0,value:v(c[h],f,m)})}return g},_.cloneWithShallow=function(c,f){const w=f.shallow;(f=Object.assign({},f)).shallow=!1;const v=new Map;for(const m of w){const b=l(c,m);typeof b!="object"&&typeof b!="function"||v.set(b,b)}return _.clone(c,f,v)},_.base=function(c,f,w){if(w.prototype===!1)return _.needsProtoHack.has(f)?new f.constructor:f===d.array?[]:{};const v=Object.getPrototypeOf(c);if(v&&v.isImmutable)return c;if(f===d.array){const m=[];return v!==f&&Object.setPrototypeOf(m,v),m}if(_.needsProtoHack.has(f)){const m=new v.constructor;return v!==f&&Object.setPrototypeOf(m,v),m}return Object.create(v)}},9474:(i,s,a)=>{const l=a(4277),d={mismatched:null};i.exports=function(y,_,c){return c=Object.assign({prototype:!0},c),!!d.isDeepEqual(y,_,c,[])},d.isDeepEqual=function(y,_,c,f){if(y===_)return y!==0||1/y==1/_;const w=typeof y;if(w!==typeof _||y===null||_===null)return!1;if(w==="function"){if(!c.deepFunction||y.toString()!==_.toString())return!1}else if(w!=="object")return y!=y&&_!=_;const v=d.getSharedType(y,_,!!c.prototype);switch(v){case l.buffer:return!1;case l.promise:return y===_;case l.regex:return y.toString()===_.toString();case d.mismatched:return!1}for(let m=f.length-1;m>=0;--m)if(f[m].isSame(y,_))return!0;f.push(new d.SeenEntry(y,_));try{return!!d.isDeepEqualObj(v,y,_,c,f)}finally{f.pop()}},d.getSharedType=function(y,_,c){if(c)return Object.getPrototypeOf(y)!==Object.getPrototypeOf(_)?d.mismatched:l.getInternalProto(y);const f=l.getInternalProto(y);return f!==l.getInternalProto(_)?d.mismatched:f},d.valueOf=function(y){const _=y.valueOf;if(_===void 0)return y;try{return _.call(y)}catch(c){return c}},d.hasOwnEnumerableProperty=function(y,_){return Object.prototype.propertyIsEnumerable.call(y,_)},d.isSetSimpleEqual=function(y,_){for(const c of Set.prototype.values.call(y))if(!Set.prototype.has.call(_,c))return!1;return!0},d.isDeepEqualObj=function(y,_,c,f,w){const{isDeepEqual:v,valueOf:m,hasOwnEnumerableProperty:b}=d,{keys:g,getOwnPropertySymbols:p}=Object;if(y===l.array){if(!f.part){if(_.length!==c.length)return!1;for(let P=0;P<_.length;++P)if(!v(_[P],c[P],f,w))return!1;return!0}for(const P of _)for(const E of c)if(v(P,E,f,w))return!0}else if(y===l.set){if(_.size!==c.size)return!1;if(!d.isSetSimpleEqual(_,c)){const P=new Set(Set.prototype.values.call(c));for(const E of Set.prototype.values.call(_)){if(P.delete(E))continue;let A=!1;for(const C of P)if(v(E,C,f,w)){P.delete(C),A=!0;break}if(!A)return!1}}}else if(y===l.map){if(_.size!==c.size)return!1;for(const[P,E]of Map.prototype.entries.call(_))if(E===void 0&&!Map.prototype.has.call(c,P)||!v(E,Map.prototype.get.call(c,P),f,w))return!1}else if(y===l.error&&(_.name!==c.name||_.message!==c.message))return!1;const h=m(_),T=m(c);if((_!==h||c!==T)&&!v(h,T,f,w))return!1;const x=g(_);if(!f.part&&x.length!==g(c).length&&!f.skip)return!1;let k=0;for(const P of x)if(f.skip&&f.skip.includes(P))c[P]===void 0&&++k;else if(!b(c,P)||!v(_[P],c[P],f,w))return!1;if(!f.part&&x.length-k!==g(c).length)return!1;if(f.symbols!==!1){const P=p(_),E=new Set(p(c));for(const A of P){if(!f.skip||!f.skip.includes(A)){if(b(_,A)){if(!b(c,A)||!v(_[A],c[A],f,w))return!1}else if(b(c,A))return!1}E.delete(A)}for(const A of E)if(b(c,A))return!1}return!0},d.SeenEntry=class{constructor(y,_){this.obj=y,this.ref=_}isSame(y,_){return this.obj===y&&this.ref===_}}},7916:(i,s,a)=>{const l=a(8761);i.exports=class extends Error{constructor(d){super(d.filter(y=>y!=="").map(y=>typeof y=="string"?y:y instanceof Error?y.message:l(y)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s.assert)}}},5277:i=>{const s={};i.exports=function(a){if(!a)return"";let l="";for(let d=0;d=256?"&#"+a+";":`&#x${a.toString(16).padStart(2,"0")};`)},s.isSafe=function(a){return s.safeCharCodes.has(a)},s.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),s.safeCharCodes=function(){const a=new Set;for(let l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&a.add(l);return a}()},6064:i=>{i.exports=function(s){return s.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,s,a)=>{const l=a(375),d=a(8571),y=a(7043),_={};i.exports=_.merge=function(c,f,w){if(l(c&&typeof c=="object","Invalid target value: must be an object"),l(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(w=Object.assign({nullOverride:!0,mergeArrays:!0},w),Array.isArray(f)){l(Array.isArray(c),"Cannot merge array onto an object"),w.mergeArrays||(c.length=0);for(let m=0;m{const l=a(375),d={};i.exports=function(y,_,c){if(_===!1||_==null)return y;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(_);l(!f||!c.separator,"Separator option is not valid for array-based chain");const w=f?_:_.split(c.separator||".");let v=y;for(let m=0;m{i.exports=function(){try{return JSON.stringify(...arguments)}catch(s){return"[Cannot display object: "+s.message+"]"}}},4277:(i,s)=>{const a={};s=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},a.typeMap=new Map([["[object Error]",s.error],["[object Map]",s.map],["[object Promise]",s.promise],["[object Set]",s.set],["[object WeakMap]",s.weakMap],["[object WeakSet]",s.weakSet]]),s.getInternalProto=function(l){if(Array.isArray(l))return s.array;if(l instanceof Date)return s.date;if(l instanceof RegExp)return s.regex;if(l instanceof Error)return s.error;const d=Object.prototype.toString.call(l);return a.typeMap.get(d)||s.generic}},7043:(i,s)=>{s.keys=function(a){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(a):Object.getOwnPropertyNames(a)}},3652:(i,s,a)=>{const l=a(375),d={};s.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(y,_){const c=[].concat((_=_||{}).before||[]),f=[].concat(_.after||[]),w=_.group||"?",v=_.sort||0;l(!c.includes(w),`Item cannot come before itself: ${w}`),l(!c.includes("?"),"Item cannot come before unassociated items"),l(!f.includes(w),`Item cannot come after itself: ${w}`),l(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(y)||(y=[y]);for(const m of y){const b={seq:this._items.length,sort:v,before:c,after:f,group:w,node:m};this._items.push(b)}if(!_.manual){const m=this._sort();l(m,"item",w!=="?"?`added into group ${w}`:"","created a dependencies error")}return this.nodes}merge(y){Array.isArray(y)||(y=[y]);for(const c of y)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(d.mergeSort);for(let c=0;cy.sort===_.sort?0:y.sort<_.sort?-1:1},5380:(i,s,a)=>{const l=a(443),d=a(2178),y={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:l.URL||URL};s.analyze=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_)return d.code("DOMAIN_NON_EMPTY_STRING");if(typeof _!="string")throw new Error("Invalid input: domain must be a string");if(_.length>256)return d.code("DOMAIN_TOO_LONG");if(!!y.nonAsciiRx.test(_)){if(c.allowUnicode===!1)return d.code("DOMAIN_INVALID_UNICODE_CHARS");_=_.normalize("NFC")}if(y.domainControlRx.test(_))return d.code("DOMAIN_INVALID_CHARS");_=y.punycode(_),c.allowFullyQualified&&_[_.length-1]==="."&&(_=_.slice(0,-1));const w=c.minDomainSegments||y.minDomainSegments,v=_.split(".");if(v.lengthc.maxDomainSegments)return d.code("DOMAIN_SEGMENTS_COUNT_MAX");const m=c.tlds;if(m){const b=v[v.length-1].toLowerCase();if(m.deny&&m.deny.has(b)||m.allow&&!m.allow.has(b))return d.code("DOMAIN_FORBIDDEN_TLDS")}for(let b=0;b63)return d.code("DOMAIN_LONG_SEGMENT");if(b{const l=a(9848),d=a(5380),y=a(2178),_={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.TextEncoder||TextEncoder)};s.analyze=function(c,f){return _.email(c,f)},s.isValid=function(c,f){return!_.email(c,f)},_.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return y.code("EMPTY_STRING");const w=!_.nonAsciiRx.test(c);if(!w){if(f.allowUnicode===!1)return y.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const v=c.split("@");if(v.length!==2)return v.length>2?y.code("MULTIPLE_AT_CHAR"):y.code("MISSING_AT_CHAR");const[m,b]=v;if(!m)return y.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return y.code("ADDRESS_TOO_LONG");if(_.encoder.encode(m).length>64)return y.code("LOCAL_TOO_LONG")}return _.local(m,w)||d.analyze(b,f)},_.local=function(c,f){const w=c.split(".");for(const v of w){if(!v.length)return y.code("EMPTY_LOCAL_SEGMENT");if(f){if(!_.atextRx.test(v))return y.code("INVALID_LOCAL_CHARS")}else for(const m of v){if(_.atextRx.test(m))continue;const b=_.binary(m);if(!_.atomRx.test(b))return y.code("INVALID_LOCAL_CHARS")}}},_.binary=function(c){return Array.from(_.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},_.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,_.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,s)=>{s.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},s.code=function(a){return{code:a,error:s.codes[a]}}},9959:(i,s,a)=>{const l=a(375),d=a(5752);s.regex=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};l(y.cidr===void 0||typeof y.cidr=="string","options.cidr must be a string");const _=y.cidr?y.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(_),"options.cidr must be one of required, optional, forbidden"),l(y.version===void 0||typeof y.version=="string"||Array.isArray(y.version),"options.version must be a string or an array of string");let c=y.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),l(c.length>=1,"options.version must have at least 1 version specified");for(let m=0;m{if(_==="forbidden")return d.ip[m];const b=`\\/${m==="ipv4"?d.ip.v4Cidr:d.ip.v6Cidr}`;return _==="required"?`${d.ip[m]}${b}`:`${d.ip[m]}(?:${b})?`}),w=`(?:${f.join("|")})`,v=new RegExp(`^${w}$`);return{cidr:_,versions:c,regex:v,raw:w}}},5752:(i,s,a)=>{const l=a(375),d=a(6064),y={generate:function(){const _={},c="!\\$&'\\(\\)\\*\\+,;=",f="\\w-\\.~%\\dA-Fa-f"+c+":@",w="["+f+"]",v="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";_.ipv4address="(?:"+v+"\\.){3}"+v;const m="[\\dA-Fa-f]{1,4}",b="(?:"+m+":"+m+"|"+_.ipv4address+")",g="(?:"+m+":){6}"+b,p="::(?:"+m+":){5}"+b,h="(?:"+m+")?::(?:"+m+":){4}"+b,T="(?:(?:"+m+":){0,1}"+m+")?::(?:"+m+":){3}"+b,x="(?:(?:"+m+":){0,2}"+m+")?::(?:"+m+":){2}"+b,k="(?:(?:"+m+":){0,3}"+m+")?::"+m+":"+b,P="(?:(?:"+m+":){0,4}"+m+")?::"+b;_.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",_.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",_.ipv6address="(?:"+g+"|"+p+"|"+h+"|"+T+"|"+x+"|"+k+"|"+P+"|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)",_.ipvFuture="v[\\dA-Fa-f]+\\.[\\w-\\.~"+c+":]+",_.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",_.schemeRegex=new RegExp(_.scheme);const E="[\\w-\\.~%\\dA-Fa-f"+c+":]*",A="(?:\\[(?:"+_.ipv6address+"|"+_.ipvFuture+")\\]|"+_.ipv4address+"|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})",C="(?:"+E+"@)?"+A+"(?::\\d*)?",N="(?:"+E+"@)?("+A+")(?::\\d*)?",$=w+"+",F="(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*",z="\\/(?:"+$+F+")?",B=$+F,H="[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=@]+"+F;return _.hierPart="(?:(?:\\/\\/"+C+F+")|"+z+"|"+B+"|(?:\\/\\/\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*))",_.hierPartCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+B+")",_.relativeRef="(?:(?:\\/\\/"+C+F+")|"+z+"|"+H+"|)",_.relativeRefCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+H+"|)",_.query="["+f+"\\/\\?]*(?=#|$)",_.queryWithSquareBrackets="["+f+"\\[\\]\\/\\?]*(?=#|$)",_.fragment="["+f+"\\/\\?]*",_}};y.rfc3986=y.generate(),s.ip={v4Cidr:y.rfc3986.ipv4Cidr,v6Cidr:y.rfc3986.ipv6Cidr,ipv4:y.rfc3986.ipv4address,ipv6:y.rfc3986.ipv6address,ipvfuture:y.rfc3986.ipvFuture},y.createRegex=function(_){const c=y.rfc3986,f="(?:\\?"+(_.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",w=_.domain?c.relativeRefCapture:c.relativeRef;if(_.relativeOnly)return y.wrap(w+f);let v="";if(_.scheme){l(_.scheme instanceof RegExp||typeof _.scheme=="string"||Array.isArray(_.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(_.scheme);l(g.length>=1,"scheme must have at least 1 scheme specified");const p=[];for(let h=0;h0&&arguments[0]!==void 0?arguments[0]:{};return _.scheme||_.allowRelative||_.relativeOnly||_.allowQuerySquareBrackets||_.domain?y.createRegex(_):y.uriRegex}},1447:(i,s)=>{const a={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*\.?[0-9]*){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};s.Parser=class{constructor(l){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d[a.settings]&&d.constants)for(const y in d.constants){const _=d.constants[y];if(_!==null&&!["boolean","number","string"].includes(typeof _))throw new Error(`Formula constant ${y} contains invalid ${typeof _} value type`)}this.settings=d[a.settings]?d:Object.assign({[a.settings]:!0,constants:{},functions:{}},d),this.single=null,this._parts=null,this._parse(l)}_parse(l){let d=[],y="",_=0,c=!1;const f=v=>{if(_)throw new Error("Formula missing closing parenthesis");const m=d.length?d[d.length-1]:null;if(c||y||v){if(m&&m.type==="reference"&&v===")")return m.type="function",m.value=this._subFormula(y,m.value),void(y="");if(v===")"){const b=new s.Parser(y,this.settings);d.push({type:"segment",value:b})}else if(c){if(c==="]")return d.push({type:"reference",value:y}),void(y="");d.push({type:"literal",value:y})}else if(a.operatorCharacters.includes(y))m&&m.type==="operator"&&a.operators.includes(m.value+y)?m.value+=y:d.push({type:"operator",value:y});else if(y.match(a.numberRx))d.push({type:"constant",value:parseFloat(y)});else if(this.settings.constants[y]!==void 0)d.push({type:"constant",value:this.settings.constants[y]});else{if(!y.match(a.tokenRx))throw new Error(`Formula contains invalid token: ${y}`);d.push({type:"reference",value:y})}y=""}};for(const v of l)c?v===c?(f(),c=!1):y+=v:_?v==="("?(y+=v,++_):v===")"?(--_,_?y+=v:f(v)):y+=v:v in a.literals?c=a.literals[v]:v==="("?(f(),++_):a.operatorCharacters.includes(v)?(f(),y=v,f()):v!==" "?y+=v:f();f(),d=d.map((v,m)=>v.type!=="operator"||v.value!=="-"||m&&d[m-1].type!=="operator"?v:{type:"operator",value:"n"});let w=!1;for(const v of d){if(v.type==="operator"){if(a.operatorsPrefix.includes(v.value))continue;if(!w)throw new Error("Formula contains an operator in invalid position");if(!a.operators.includes(v.value))throw new Error(`Formula contains an unknown operator ${v.value}`)}else if(w)throw new Error("Formula missing expected operator");w=!w}if(!w)throw new Error("Formula contains invalid trailing operator");d.length===1&&["reference","literal","constant"].includes(d[0].type)&&(this.single={type:d[0].type==="reference"?"reference":"value",value:d[0].value}),this._parts=d.map(v=>{if(v.type==="operator")return a.operatorsPrefix.includes(v.value)?v:v.value;if(v.type!=="reference")return v.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(v.value))throw new Error(`Formula contains invalid reference ${v.value}`);return this.settings.reference?this.settings.reference(v.value):a.reference(v.value)})}_subFormula(l,d){const y=this.settings.functions[d];if(typeof y!="function")throw new Error(`Formula contains unknown function ${d}`);let _=[];if(l){let c="",f=0,w=!1;const v=()=>{if(!c)throw new Error(`Formula contains function ${d} with invalid arguments ${l}`);_.push(c),c=""};for(let m=0;mnew s.Parser(c,this.settings)),function(c){const f=[];for(const w of _)f.push(w.evaluate(c));return y.call(c,...f)}}evaluate(l){const d=this._parts.slice();for(let y=d.length-2;y>=0;--y){const _=d[y];if(_&&_.type==="operator"){const c=d[y+1];d.splice(y+1,1);const f=a.evaluate(c,l);d[y]=a.single(_.value,f)}}return a.operatorsOrder.forEach(y=>{for(let _=1;_":return d>y;case">=":return d>=y;case"==":return d===y;case"!=":return d!==y;case"&&":return d&&y;case"||":return d||y}return null},a.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.7.0"}}},r={},function i(s){var a=r[s];if(a!==void 0)return a.exports;var l=r[s]={exports:{}};return n[s](l,l.exports,i),l.exports}(5107);var n,r})})(pE);var U$=pE.exports;const ye=Kn(U$);function B$(e){const t={};return e.forEach(n=>{(n.kind==="text"||n.kind==="link")&&(t[n.key]=ye.string().allow("")),n.kind==="list"&&(t[n.key]=ye.array().allow(""))}),t}function H$(e){return ye.object().keys({id:ye.string().allow(""),civId:ye.string().allow(""),description:ye.string().allow("").required(),graphic:ye.string().allow(""),date:ye.string().allow(""),time:ye.string().allow(""),time_precision:ye.string().allow(""),location:ye.string().allow(""),latitude:ye.string().allow(""),longitude:ye.string().allow(""),x:ye.string().allow(""),y:ye.string().allow(""),z:ye.string().allow(""),type:ye.string().allow(""),category:ye.string().allow(""),category_full:ye.string().allow(""),associations:ye.array().default([]),sources:ye.array(),comments:ye.string().allow(""),time_display:ye.string().allow(""),narrative___stepStyles:ye.array(),shape:ye.string().allow(""),colour:ye.string().allow(""),...B$(e)}).and("latitude","longitude").or("date","latitude")}const V$=ye.object().keys({id:ye.string().required(),description:ye.string().allow("").required(),site:ye.string().required(),latitude:ye.string().required(),longitude:ye.string().required(),enabled:ye.string().allow("")}),W$=ye.object().keys({id:ye.string().allow("").required(),title:ye.string().allow("").required(),desc:ye.string().allow(""),mode:ye.string().allow("").required(),filter_paths:ye.array()}),q$=ye.object().keys({id:ye.string().required(),title:ye.string().allow(""),thumbnail:ye.string().allow(""),paths:ye.array().required(),type:ye.string().allow(""),affil_s:ye.array().allow(""),url:ye.string().allow(""),description:ye.string().allow(""),parent:ye.string().allow(""),author:ye.string().allow(""),date:ye.string().allow(""),notes:ye.string().allow("")}),Z$=ye.object().keys({name:ye.string().required(),items:ye.array().required()}),G$=ye.object().keys({id:ye.string().allow(""),title:ye.string().allow(""),shape:ye.string().allow(""),colour:ye.string().allow("")});function Fs(e,t,n){return{type:"error",id:t,message:`${e} ${t}: ${n}`}}function Y$(e){return e instanceof Date&&!isNaN(e)}function K$(e){const t=new Set([]),n=[];return e.forEach(r=>{t.has(r.id)?n.push({id:r.id,error:Fs("Association",r.id,"association was found more than once. Ignoring duplicate.")}):t.add(r.id)}),n}function X$(e,t){const n={events:[],sites:[],associations:[],sources:{},regions:[],shapes:[],notifications:e?e.notifications:null};if(e===void 0)return n;const r={events:[],sites:[],associations:[],sources:[],regions:[],shapes:[]};function i(y,_,c){const f=c.validate(y);if(f.error!=null){const w=y.id||"-",v=p0(_),m=Fs(v,w,f.error.message);r[_].push(Object.assign(y,{error:m}))}else n[_].push(y)}function s(y,_,c){y.forEach(f=>{_==="events"&&f.date===""&&f.time===""||i(f,_,c)})}function a(y,_,c){Object.keys(y).forEach(f=>{if(f==="")return;const w=y[f],v=c.validate(w);if(v.error!=null){const m=w.id||"-",b=p0(_);r[_].push({...w,error:Fs(b,m,v.error.message)})}else n[_][f]=w})}Array.isArray(t.CUSTOM_EVENT_FIELDS)||(t.CUSTOM_EVENT_FIELDS=[]);const l=H$(t.CUSTOM_EVENT_FIELDS);s(e.events,"events",l),s(e.sites,"sites",V$),s(e.associations,"associations",W$),a(e.sources,"sources",q$),s(e.regions,"regions",Z$),s(e.shapes,"shapes",G$),n.regions=n.regions.map(y=>({name:y.name,points:y.items.map(_=>_.replace(/\s/g,"").split(","))})),n.shapes=n.shapes.reduce((y,_)=>(_.shape?y.push(_):r.shapes.push({..._,error:Fs("events",_.id,"Invalid event shape. Please specify a shape for this type of event.")}),y),[]);const d=K$(e.associations);return d.length>0&&n.notifications.push({message:"Associations are required to be unique. Ignoring duplicates for now.",items:d,type:"error"}),n.associations=e.associations,n.events=n.events.filter((y,_)=>{let c="";if(y.civId=y.id,y.id=_,y.associations=y.associations.reduce((f,w)=>{const v=n.associations.find(m=>m.id===w);return v&&f.push(v),f},[]),y.shape){const f=n.shapes.find(w=>w.id===y.shape);f?y.shape=f:c="Failed to find related shape. Please verify shape type for event."}return y.latitude=y.latitude.replace(",","."),y.longitude=y.longitude.replace(",","."),y.datetime=sD(y.date,y.time),Y$(y.datetime)||(c="Invalid date. It's been dropped, as otherwise timemap won't work as expected."),c?(r.events.push({...y,error:Fs("events",y.id,c)}),!1):!0}),n.events.sort((y,_)=>y.datetime-_.datetime),Object.keys(r).forEach(y=>{const _=r[y].length;_&&n.notifications.push({message:`${_} invalid ${y} not displayed.`,items:r[y],type:"error"})}),n}function Q$(e,t){return{...e,...X$(t.payload.domain,t.payload.features)}}function J$(e,t){return{...e,notifications:e.notifications.map(n=>({...n,isRead:!0}))}}function e3(e=Dc.domain,t){switch(t.type){case cg:return Q$(e,t);case Lg:return J$(e);default:return e}}function t3(e,t){return Object.assign({},e,{highlighted:t.highlighted})}function n3(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,ticks:t.ticks}}}}function r3(e,t){return Object.assign({},e,{selected:t.selected})}function i3(e,t){return{...e,associations:{...e.associations,coloringSet:t.coloringSet}}}function o3(e,t){let[n,r]=zg(e);const i=[180,180],s=[-180,-180];if(t.narrative){[n,r]=sE(e),t.narrative.steps.forEach(l=>{const d=l.datetime;dr&&(r=d),l.longitude&&l.latitude&&(+l.longitudes[1]&&(s[1]=+l.longitude),+l.latitudes[0]&&(s[0]=+l.latitude))});const a=t.narrative.steps[0];if(a.longitude&&a.latitude){const l=Math.abs(+a.longitude-i[1]),d=Math.abs(+a.longitude-s[1]),y=Math.abs(+a.latitude-i[0]),_=Math.abs(+a.latitude-s[0]);l>d&&(s[1]=+a.longitude+l),l_&&(s[0]=+a.latitude+y),y<_&&(i[0]=+a.latitude-_)}n=n-Math.abs((r-n)/10),r=r+Math.abs((r-n)/10)}return{...e,associations:{...e.associations,narrative:t.narrative},map:{...e.map,bounds:t.narrative?[i,s]:null},timeline:{...e.timeline,range:{...e.timeline.range,current:[n,r]}}}}function s3(e,t){return{...e,narrativeState:{current:t.idx}}}function a3(e,t){t.value instanceof Array||(t.value=[t.value]);const{association:n}=t;let r=e.associations[n].slice(0);return t.value.forEach(i=>{r.includes(i)?r=r.filter(s=>s!==i):r.push(i)}),{...e,associations:{...e.associations,[n]:r}}}function l3(e,t){let n=[...e.shapes];if(n.includes(t.shape)){const r=n.indexOf(t.shape);n.splice(r,1)}else n.push(t.shape);return{...e,shapes:n}}function u3(e,t){return{...e,filters:{...e.filters,[t.filter]:[]}}}function c3(e,t){return{...e,timeline:{...e.timeline,range:{...e.timeline.range,current:[new Date(t.timerange[0]).toISOString(),new Date(t.timerange[1]).toISOString()]}}}}function d3(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,...t.dims}}}}function f3(e,t){const n=e.language==="es-MX"?"en-US":"es-MX";return Object.assign({},e,{language:t.language||n})}function h3(e,t){return{...e,source:t.source}}function p3(e,t){return{...e,error:t.message,notifications:[{type:"error",message:t.message}]}}const m3=Qi("isShowingSites"),g3=Qi("isFetchingDomain"),v3=Qi("isFetchingSources"),y3=Qi("isInfopopup"),_3=Qi("isIntropopup"),w3=Qi("isNotification"),b3=Qi("isCover");function T3(e,t){return{...e,errors:{...e.errors,source:t.msg}}}function S3(e){return{...e,loading:!0}}function E3(e){return{...e,loading:!1}}function x3(e,t){const n=t.values.reduce((r,i)=>(i.mode===Yn.CATEGORY&&r.push(i.title),r),[]);return{...e,associations:{...e.associations,categories:n}}}function k3(e,t){const n=t.values.map(r=>r.id);return{...e,shapes:n}}function C3(e,t){return{...e,searchQuery:t.searchQuery}}function A3(e,t){return{...e,map:{...e.map,anchor:[t.lat,t.lng],startZoom:t.zoom}}}function P3(e=Dc.app,t){switch(t.type){case dg:return t3(e,t);case Rc:return r3(e,t);case Oc:return i3(e,t);case Tg:return n3(e,t);case fg:return u3(e,t);case Ic:return a3(e,t);case hg:return l3(e,t);case Nc:return c3(e,t);case yg:return d3(e,t);case _g:return o3(e,t);case wg:return s3(e,t);case bg:return h3(e,t);case kg:return f3(e,t);case Sg:return m3(e);case Eg:return g3(e);case xg:return v3(e);case Cg:return y3(e);case Ag:return _3(e);case Pg:return w3(e);case Rg:return b3(e);case ug:return p3(e,t);case Og:return T3(e,t);case pg:return S3(e);case mg:return E3(e);case gg:return x3(e,t);case vg:return k3(e,t);case Ng:return C3(e,t);case No:return A3(e,t);default:return e}}function L3(e=Dc.ui,t){switch(t.type){case Ig:return{...e,tiles:{...e.tiles,current:e.tiles.current===e.tiles.satellite?e.tiles.default:e.tiles.satellite}};default:return e}}function R3(e=Dc.features,t){return e}function I3(e,t){return(n,r)=>t({...e(n,r)},r)}const N3=I3(M$,JT({app:P3,domain:e3,ui:L3,features:R3})),O3=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Wm,M3=Ec(N3,O3(_p(E2),_p(O$)));var lf={exports:{}},uf,E0;function D3(){if(E0)return uf;E0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return uf=e,uf}var cf,x0;function $3(){if(x0)return cf;x0=1;var e=D3();function t(){}function n(){}return n.resetWarningCache=t,cf=function(){function r(a,l,d,y,_,c){if(c!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},cf}var k0;function De(){return k0||(k0=1,lf.exports=$3()()),lf.exports}var F3=De();const Sr=Kn(F3);function qg(e){return t=>!!t.type&&t.type.tabsRole===e}const $c=qg("Tab"),Zg=qg("TabList"),Gg=qg("TabPanel");function j3(e){return $c(e)||Zg(e)||Gg(e)}function Op(e,t){return te.Children.map(e,n=>n===null?null:j3(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"?te.cloneElement(n,{...n.props,children:Op(n.props.children,t)}):n)}function mE(e,t){return te.Children.forEach(e,n=>{n!==null&&($c(n)||Gg(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"&&(Zg(n)&&t(n),mE(n.props.children,t)))})}function gE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{$c(n)&&t++}),t}function yE(e){return e&&"getAttribute"in e}function C0(e){return yE(e)&&e.getAttribute("data-rttab")}function xi(e){return yE(e)&&e.getAttribute("aria-disabled")==="true"}let Mu;function z3(e){const t=e||(typeof window<"u"?window:void 0);try{Mu=!!(typeof t<"u"&&t.document&&t.document.activeElement)}catch{Mu=!1}}const U3={className:"react-tabs",focus:!1},Kg=e=>{let t=te.useRef([]),n=te.useRef([]);const r=te.useRef();function i(F,z){if(F<0||F>=y())return;const{onSelect:B,selectedIndex:H}=e;B(F,H,z)}function s(F){const z=y();for(let B=F+1;BF;)if(!xi(_(z)))return z;return F}function l(){const F=y();for(let z=0;z{let de=fe;if(Zg(fe)){let ue=0,be=!1;Mu==null&&z3(J);const ne=J||(typeof window<"u"?window:void 0);Mu&&ne&&(be=wt.Children.toArray(fe.props.children).filter($c).some((O,j)=>ne.document.activeElement===_(j))),de=te.cloneElement(fe,{children:Op(fe.props.children,O=>{const j=`tabs-${ue}`,W=V===ue,Z={tabRef:Q=>{t.current[j]=Q},id:n.current[ue],selected:W,focus:W&&(H||be)};return Y&&(Z.selectedClassName=Y),B&&(Z.disabledClassName=B),ue++,te.cloneElement(O,Z)})})}else if(Gg(fe)){const ue={id:n.current[F],selected:V===F};U&&(ue.forceRender=U),G&&(ue.selectedClassName=G),F++,de=te.cloneElement(fe,ue)}return de})}function f(F){const{direction:z,disableUpDownKeys:B,disableLeftRightKeys:H}=e;if(v(F.target)){let{selectedIndex:U}=e,V=!1,Y=!1;(F.code==="Space"||F.keyCode===32||F.code==="Enter"||F.keyCode===13)&&(V=!0,Y=!1,w(F)),!H&&(F.keyCode===37||F.code==="ArrowLeft")||!B&&(F.keyCode===38||F.code==="ArrowUp")?(z==="rtl"?U=s(U):U=a(U),V=!0,Y=!0):!H&&(F.keyCode===39||F.code==="ArrowRight")||!B&&(F.keyCode===40||F.code==="ArrowDown")?(z==="rtl"?U=a(U):U=s(U),V=!0,Y=!0):F.keyCode===35||F.code==="End"?(U=d(),V=!0,Y=!0):(F.keyCode===36||F.code==="Home")&&(U=l(),V=!0,Y=!0),V&&F.preventDefault(),Y&&i(U,F)}}function w(F){let z=F.target;do if(v(z)){if(xi(z))return;const B=[].slice.call(z.parentNode.children).filter(C0).indexOf(z);i(B,F);return}while((z=z.parentNode)!=null)}function v(F){if(!C0(F))return!1;let z=F.parentElement;do{if(z===r.current)return!0;if(z.getAttribute("data-rttabs"))break;z=z.parentElement}while(z);return!1}const{children:m,className:b,disabledTabClassName:g,domRef:p,focus:h,forceRenderTabPanel:T,onSelect:x,selectedIndex:k,selectedTabClassName:P,selectedTabPanelClassName:E,environment:A,disableUpDownKeys:C,disableLeftRightKeys:N,...$}=e;return wt.createElement("div",Object.assign({},$,{className:Yg(b),onClick:w,onKeyDown:f,ref:F=>{r.current=F,p&&p(F)},"data-rttabs":!0}),c())};Kg.defaultProps=U3;Kg.propTypes={};const B3=0,ql=1,H3={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},V3=e=>e.selectedIndex===null?ql:B3,Fc=e=>{const{children:t,defaultFocus:n,defaultIndex:r,focusTabOnClick:i,onSelect:s}=e,[a,l]=te.useState(n),[d]=te.useState(V3(e)),[y,_]=te.useState(d===ql?r||0:null);if(te.useEffect(()=>{l(!1)},[]),d===ql){const w=vE(t);te.useEffect(()=>{if(y!=null){const v=Math.max(0,w-1);_(Math.min(y,v))}},[w])}const c=(w,v,m)=>{typeof s=="function"&&s(w,v,m)===!1||(i&&l(!0),d===ql&&_(w))};let f={...e};return f.focus=a,f.onSelect=c,y!=null&&(f.selectedIndex=y),delete f.defaultFocus,delete f.defaultIndex,delete f.focusTabOnClick,wt.createElement(Kg,f,t)};Fc.propTypes={};Fc.defaultProps=H3;Fc.tabsRole="Tabs";const W3={className:"react-tabs__tab-list"},jc=e=>{const{children:t,className:n,...r}=e;return wt.createElement("ul",Object.assign({},r,{className:Yg(n),role:"tablist"}),t)};jc.tabsRole="TabList";jc.propTypes={};jc.defaultProps=W3;const A0="react-tabs__tab-panel",q3={className:A0,forceRender:!1,selectedClassName:`${A0}--selected`},Kr=e=>{const{children:t,className:n,forceRender:r,id:i,selected:s,selectedClassName:a,...l}=e;return wt.createElement("div",Object.assign({},l,{className:Yg(n,{[a]:s}),role:"tabpanel",id:`panel${i}`,"aria-labelledby":`tab${i}`}),r||s?t:null)};Kr.tabsRole="TabPanel";Kr.propTypes={};Kr.defaultProps=q3;const _E=({label:e,isActive:t,onClickCheckbox:n,color:r,styleProps:i})=>{const s=r||rD,a={checkboxStyles:{background:t?s:"none",border:`1px solid ${s}`}},l=i?i.containerStyles:{},d=i?i.checkboxStyles:a.checkboxStyles,y=e.toLowerCase().replaceAll(" ","-"),_=c=>{c.stopPropagation(),n(c)};return re("div",{className:t?"item active":"item",onClick:_,children:[M("button",{id:y,onClick:_,children:M("div",{className:"border",style:l,children:M("div",{className:"checkbox",style:d})})}),M("label",{htmlFor:y,style:{color:r},children:e})]})};function wE(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Qo=wE();function Z3(e){Qo=e}const bE=/[&<>"']/,G3=new RegExp(bE.source,"g"),TE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Y3=new RegExp(TE.source,"g"),K3={"&":"&","<":"<",">":">",'"':""","'":"'"},P0=e=>K3[e];function jt(e,t){if(t){if(bE.test(e))return e.replace(G3,P0)}else if(TE.test(e))return e.replace(Y3,P0);return e}const X3=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function SE(e){return e.replace(X3,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Q3=/(^|[^\[])\^/g;function Ye(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Q3,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const J3=/[^\w:]/g,eF=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L0(e,t,n){if(e){let r;try{r=decodeURIComponent(SE(n)).replace(J3,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!eF.test(n)&&(n=iF(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Cl={},tF=/^[^:]+:\/*[^/]*$/,nF=/^([^:]+:)[\s\S]*$/,rF=/^([^:]+:\/*[^/]*)[\s\S]*$/;function iF(e,t){Cl[" "+e]||(tF.test(e)?Cl[" "+e]=e+"/":Cl[" "+e]=Zl(e,"/",!0)),e=Cl[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(nF,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(rF,"$1")+t:e+t}const Du={exec:function(){}};function Qn(e){let t=1,n,r;for(;t{let d=!1,y=a;for(;--y>=0&&l[y]==="\\";)d=!d;return d?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function N0(e,t,n,r){const i=t.href,s=t.title?jt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:s,text:jt(a)}}function sF(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(` `).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[a]=s;return a.length>=r.length?i.slice(r.length):i}).join(` `)}class Xg{constructor(t){this.options=t||Qo}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Zl(r,` `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=sF(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=Zl(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:s,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,s,a,l,d,y,_,c,f,w,v,m=n[1].trim();const b=m.length>1,g={type:"list",raw:"",ordered:b,start:b?+m.slice(0,-1):"",loose:!1,items:[]};m=b?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=b?m:"[*+-]");const p=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(v=!1,!(!(n=p.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),_=n[2].split(` @@ -96,9 +96,9 @@ Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/ `,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(k.test(c)||P.test(c)||T.test(c)||x.test(t)));){if(c.search(/[^ ]/)>=a||!c.trim())w+=` `+c.slice(a);else{if(d||_.search(/[^ ]/)>=4||k.test(_)||P.test(_)||x.test(_))break;w+=` `+c}!d&&!c.trim()&&(d=!0),r+=f+` -`,t=t.substring(f.length+1),_=c.slice(a)}}g.loose||(y?g.loose=!0:/\n *\n *$/.test(r)&&(y=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(w),i&&(s=i[0]!=="[ ] ",w=w.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:w}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=w.trimRight(),g.raw=g.raw.trimRight();const h=g.items.length;for(l=0;lk.type==="space"),x=T.length>0&&T.some(k=>/\n.*\n/.test(k.raw));g.loose=x}if(g.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:R0(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`,t=t.substring(f.length+1),_=c.slice(a)}}g.loose||(y?g.loose=!0:/\n *\n *$/.test(r)&&(y=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(w),i&&(s=i[0]!=="[ ] ",w=w.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:w}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=w.trimRight(),g.raw=g.raw.trimRight();const h=g.items.length;for(l=0;lk.type==="space"),x=T.length>0&&T.some(k=>/\n.*\n/.test(k.raw));g.loose=x}if(g.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:R0(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,a,l,d;for(s=0;s({text:y}));for(i=r.header.length,a=0;a/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):zt(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const a=Zl(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=oF(n[2],"()");if(a>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],s=a[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),N0(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return N0(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const a=i[0].length-1;let l,d,y=a,_=0;const c=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+a);(i=c.exec(n))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=l.length,i[3]||i[4]){y+=d;continue}else if((i[5]||i[6])&&a%3&&!((a+d)%3)){_+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y+_);const f=t.slice(0,a+i.index+(i[0].length-l.length)+d);if(Math.min(a,d)%2){const v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}const w=f.slice(2,-2);return{type:"strong",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=zt(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=zt(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=zt(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=zt(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);i=zt(r[0]),r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):zt(r[0]):r[0]:i=zt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Te={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Du,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Te._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Te.def=Ye(Te.def).replace("label",Te._label).replace("title",Te._title).getRegex();Te.bullet=/(?:[*+-]|\d{1,9}[.)])/;Te.listItemStart=Ye(/^( *)(bull) */).replace("bull",Te.bullet).getRegex();Te.list=Ye(Te.list).replace(/bull/g,Te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Te.def.source+")").getRegex();Te._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Te._comment=/|$)/;Te.html=Ye(Te.html,"i").replace("comment",Te._comment).replace("tag",Te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Te.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.blockquote=Ye(Te.blockquote).replace("paragraph",Te.paragraph).getRegex();Te.normal=Qn({},Te);Te.gfm=Qn({},Te.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Te.gfm.table=Ye(Te.gfm.table).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.gfm.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Te.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.pedantic=Qn({},Te.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Te._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Du,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ye(Te.normal._paragraph).replace("hr",Te.hr).replace("heading",` *#{1,6} *[^ +`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:jt(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):jt(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const a=Zl(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=oF(n[2],"()");if(a>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],s=a[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),N0(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return N0(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const a=i[0].length-1;let l,d,y=a,_=0;const c=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+a);(i=c.exec(n))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=l.length,i[3]||i[4]){y+=d;continue}else if((i[5]||i[6])&&a%3&&!((a+d)%3)){_+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y+_);const f=t.slice(0,a+i.index+(i[0].length-l.length)+d);if(Math.min(a,d)%2){const v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}const w=f.slice(2,-2);return{type:"strong",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=jt(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=jt(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=jt(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=jt(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);i=jt(r[0]),r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):jt(r[0]):r[0]:i=jt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Te={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Du,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Te._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Te.def=Ye(Te.def).replace("label",Te._label).replace("title",Te._title).getRegex();Te.bullet=/(?:[*+-]|\d{1,9}[.)])/;Te.listItemStart=Ye(/^( *)(bull) */).replace("bull",Te.bullet).getRegex();Te.list=Ye(Te.list).replace(/bull/g,Te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Te.def.source+")").getRegex();Te._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Te._comment=/|$)/;Te.html=Ye(Te.html,"i").replace("comment",Te._comment).replace("tag",Te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Te.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.blockquote=Ye(Te.blockquote).replace("paragraph",Te.paragraph).getRegex();Te.normal=Qn({},Te);Te.gfm=Qn({},Te.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Te.gfm.table=Ye(Te.gfm.table).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.gfm.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Te.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.pedantic=Qn({},Te.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Te._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Du,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ye(Te.normal._paragraph).replace("hr",Te.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Te.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Du,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Du,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";me.punctuation=Ye(me.punctuation).replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;me.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;me._comment=Ye(Te._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=Ye(me.emStrong.lDelim).replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=Ye(me.emStrong.rDelimAst,"g").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=Ye(me.emStrong.rDelimUnd,"g").replace(/punct/g,me._punctuation).getRegex();me._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=Ye(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=Ye(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=Ye(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=Ye(me.reflink).replace("label",me._label).replace("ref",Te._label).getRegex();me.nolink=Ye(me.nolink).replace("ref",Te._label).getRegex();me.reflinkSearch=Ye(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal=Qn({},me);me.pedantic=Qn({},me.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ye(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:Ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()});me.gfm=Qn({},me.normal,{escape:Ye(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class $r{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Qo,this.options.tokenizer=this.options.tokenizer||new Xg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Te.normal,inline:me.normal};this.options.pedantic?(n.block=Te.pedantic,n.inline=me.pedantic):this.options.gfm&&(n.block=Te.gfm,this.options.breaks?n.inline=me.breaks:n.inline=me.gfm),this.tokenizer.rules=n}static get rules(){return{block:Te,inline:me}}static lex(t,n){return new $r(n).lex(t)}static lexInline(t,n){return new $r(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` `),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,d,y)=>d+" ".repeat(y.length));let r,i,s,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` @@ -110,8 +110,8 @@ Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),a=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=` `+r.raw,i.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,i,s,a=t,l,d,y;if(this.tokens.links){const _=Object.keys(this.tokens.links);if(_.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)_.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+I0("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+I0("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,l.index+l[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(d||(y=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(_=>(r=_.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,y)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,O0)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,O0))){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let _=1/0;const c=t.slice(1);let f;this.options.extensions.startInline.forEach(function(w){f=w.call({lexer:this},c),typeof f=="number"&&f>=0&&(_=Math.min(_,f))}),_<1/0&&_>=0&&(s=t.substring(0,_+1))}if(r=this.tokenizer.inlineText(s,aF)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(y=r.raw.slice(-1)),d=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const _="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return n}}class Qg{constructor(t){this.options=t||Qo}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(r=!0,t=s)}return t=t.replace(/\n$/,"")+` -`,i?'
'+(r?t:zt(t,!0))+`
-`:"
"+(r?t:zt(t,!0))+`
+`,i?'
'+(r?t:jt(t,!0))+`
+`:"
"+(r?t:jt(t,!0))+`
`}blockquote(t){return`
${t}
`}html(t){return t}heading(t,n,r,i){if(this.options.headerIds){const s=this.options.headerPrefix+i.slug(r);return`${t} @@ -131,26 +131,26 @@ ${t} `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` `}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
":"
"}del(t){return`${t}`}link(t,n,r){if(t=L0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='
",i}image(t,n,r){if(t=L0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i=`${r}":">",i}text(t){return t}}class xE{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class kE{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class dr{constructor(t){this.options=t||Qo,this.options.renderer=this.options.renderer||new Qg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xE,this.slugger=new kE}static parse(t,n){return new dr(n).parse(t)}static parseInline(t,n){return new dr(n).parseInline(t)}parse(t,n=!0){let r="",i,s,a,l,d,y,_,c,f,w,v,m,b,g,p,h,T,x,k;const P=t.length;for(i=0;i0&&p.tokens[0].type==="paragraph"?(p.tokens[0].text=x+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=x+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:x}):g+=x),g+=this.parse(p.tokens,b),f+=this.renderer.listitem(g,T,h);r+=this.renderer.list(f,v,m);continue}case"html":{r+=this.renderer.html(w.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(w.tokens));continue}case"text":{for(f=w.tokens?this.parseInline(w.tokens):w.text;i+1"u"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(n=t,t=null),t=Qn({},_e.defaults,t||{}),EE(t),n){const i=t.highlight;let s;try{s=$r.lex(e,t)}catch(d){return n(d)}const a=function(d){let y;if(!d)try{t.walkTokens&&_e.walkTokens(s,t.walkTokens),y=dr.parse(s,t)}catch(_){d=_}return t.highlight=i,d?n(d):n(null,y)};if(!i||i.length<3||(delete t.highlight,!s.length))return a();let l=0;_e.walkTokens(s,function(d){d.type==="code"&&(l++,setTimeout(()=>{i(d.text,d.lang,function(y,_){if(y)return a(y);_!=null&&_!==d.text&&(d.text=_,d.escaped=!0),l--,l===0&&a()})},0))}),l===0&&a();return}function r(i){if(i.message+=` -Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+zt(i.message+"",!0)+"
";throw i}try{const i=$r.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(_e.walkTokens(i,t.walkTokens)).then(()=>dr.parse(i,t)).catch(r);_e.walkTokens(i,t.walkTokens)}return dr.parse(i,t)}catch(i){r(i)}}_e.options=_e.setOptions=function(e){return Qn(_e.defaults,e),Z3(_e.defaults),_e};_e.getDefaults=wE;_e.defaults=Qo;_e.use=function(...e){const t=_e.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r=Qn({},n);if(r.async=_e.defaults.async||r.async,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=_e.defaults.renderer||new Qg;for(const s in n.renderer){const a=i[s];i[s]=(...l)=>{let d=n.renderer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.renderer=i}if(n.tokenizer){const i=_e.defaults.tokenizer||new Xg;for(const s in n.tokenizer){const a=i[s];i[s]=(...l)=>{let d=n.tokenizer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.tokenizer=i}if(n.walkTokens){const i=_e.defaults.walkTokens;r.walkTokens=function(s){let a=[];return a.push(n.walkTokens.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}_e.setOptions(r)})};_e.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(_e,r)),r.type){case"table":{for(const i of r.header)n=n.concat(_e.walkTokens(i.tokens,t));for(const i of r.rows)for(const s of i)n=n.concat(_e.walkTokens(s.tokens,t));break}case"list":{n=n.concat(_e.walkTokens(r.items,t));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(_e.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,t)))}return n};_e.parseInline=function(e,t){if(typeof e>"u"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Qn({},_e.defaults,t||{}),EE(t);try{const n=$r.lexInline(e,t);return t.walkTokens&&_e.walkTokens(n,t.walkTokens),dr.parseInline(n,t)}catch(n){if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+zt(n.message+"",!0)+"
";throw n}};_e.Parser=dr;_e.parser=dr.parse;_e.Renderer=Qg;_e.TextRenderer=xE;_e.Lexer=$r;_e.lexer=$r.lex;_e.Tokenizer=Xg;_e.Slugger=kE;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;dr.parse;$r.lex;function CE(e,t){const[n,r]=e,i=t.includes(n),s=Object.entries(r).flatMap(a=>CE(a,t)).filter(a=>t.includes(a)===i);return s.push(n),s}function lF({filters:e,activeFilters:t,onSelectFilter:n,language:r,coloringSet:i,filterColors:s,title:a,description:l}){function d(_,c){const[f,w]=_,v=FS(f),m=CE(_,t),b=VS(f,i),g=b!==-1&&t.includes(f)?s[b]:"",p={color:g,marginLeft:`${c*20}px`};return re("li",{className:"filter-filter",style:{...p},children:[M(_E,{label:v,isActive:t.includes(f),onClickCheckbox:h=>{h.preventDefault(),n(f,m)},color:g}),Object.keys(w).length>0?M("ul",{children:Object.entries(w).map(h=>d(h,c+1))}):null]},v.replace(/ /g,"_"))}function y(_){const c=jS(_);return M("div",{className:"scrolled-area",children:Object.entries(c).map(f=>d(f,0))})}return re("div",{children:[M("div",{className:"sticky-header",children:M("h2",{children:a})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:_e(l)}}),y(e)]})}const AE=({data:e,activeValues:t,onSelect:n,type:r})=>{const i=r===Yn.CATEGORY?"title":"id";return M("div",{children:e.map(s=>M("li",{className:"filter-filter active",children:M(_E,{label:s.title,isActive:t.includes(s[i]),onClickCheckbox:()=>n(s[i]),styleProps:s.styles})},s.title.replace(/ /g,"_")))})},uF=({categories:e,activeCategories:t,onCategoryFilter:n,language:r,title:i,description:s})=>re("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(AE,{data:e,activeValues:t,onSelect:n,type:Yn.CATEGORY})]}),cF=({shapes:e,activeShapes:t,onShapeFilter:n,language:r,title:i,description:s})=>{const a=_D(e,t);return re("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(AE,{data:a,activeValues:t,onSelect:n,type:$S})]})},dF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"location_on"})})},fF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"home"})})};function hF(e){function t(){return re(Ln,{children:[M("div",{className:"bottom-action-block",children:e.features.USE_SITES?M(dF,{isActive:e.sites.enabled,onClickHandler:e.sites.toggle}):null}),M("div",{className:"botttom-action-block",children:e.features.USE_COVER?M(fF,{onClickHandler:e.cover.toggle}):null}),re("div",{style:{fontSize:9,paddingTop:10},children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from ",M("br",{})," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}return M("div",{className:"bottom-actions",children:t()})}function Jg({isActive:e,iconKey:t,onClick:n,label:r}){return re("div",{className:e?"toolbar-tab active":"toolbar-tab",onClick:n,children:[M("i",{className:"material-icons",children:t}),M("div",{className:"tab-caption",children:r})]},t)}Jg.tabsRole="Tab";const M0=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Pr=(()=>{if(typeof document>"u")return!1;const e=M0[0],t={};for(const n of M0)if((n==null?void 0:n[1])in document){for(const[i,s]of n.entries())t[e[i]]=s;return t}return!1})(),D0={change:Pr.fullscreenchange,error:Pr.fullscreenerror};let fn={request(e=document.documentElement,t){return new Promise((n,r)=>{const i=()=>{fn.off("change",i),n()};fn.on("change",i);const s=e[Pr.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(r)})},exit(){return new Promise((e,t)=>{if(!fn.isFullscreen){e();return}const n=()=>{fn.off("change",n),e()};fn.on("change",n);const r=document[Pr.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},toggle(e,t){return fn.isFullscreen?fn.exit():fn.request(e,t)},onchange(e){fn.on("change",e)},onerror(e){fn.on("error",e)},on(e,t){const n=D0[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=D0[e];n&&document.removeEventListener(n,t,!1)},raw:Pr};Object.defineProperties(fn,{isFullscreen:{get:()=>!!document[Pr.fullscreenElement]},element:{enumerable:!0,get:()=>document[Pr.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[Pr.fullscreenEnabled]}});Pr||(fn={isEnabled:!1});const Vr=fn;let pF=class extends te.Component{constructor(t){super(t),this.onFullscreenStateChange=this.onFullscreenStateChange.bind(this),this.state={isFullscreen:Vr.isFullscreen}}componentDidMount(){Vr.on&&Vr.on("change",this.onFullscreenStateChange)}componentWillUnmount(){Vr.off&&Vr.off("change",this.onFullscreenStateChange)}onFullscreenStateChange(t){this.setState({isFullscreen:Vr.isFullscreen})}onToggleFullscreen(){Vr.toggle().catch(console.warn)}render(){if(!Vr.isEnabled)return null;const{language:t}=this.props,{isFullscreen:n}=this.state;return M(Jg,{isActive:n,label:n?ze[t].toolbar.fullscreen_exit:ze[t].toolbar.fullscreen_enter,iconKey:n?"fullscreen_exit":"fullscreen",onClick:this.onToggleFullscreen})}};var mF="Expected a function",PE="__lodash_hash_undefined__",LE=1/0,gF="[object Function]",vF="[object GeneratorFunction]",yF="[object Symbol]",_F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wF=/^\w*$/,bF=/^\./,TF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,SF=/[\\^$.*+?()[\]{}|]/g,EF=/\\(\\)?/g,xF=/^\[object .+?Constructor\]$/,kF=typeof Xr=="object"&&Xr&&Xr.Object===Object&&Xr,CF=typeof self=="object"&&self&&self.Object===Object&&self,ev=kF||CF||Function("return this")();function AF(e,t){return e==null?void 0:e[t]}function PF(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var LF=Array.prototype,RF=Function.prototype,RE=Object.prototype,df=ev["__core-js_shared__"],$0=function(){var e=/[^.]+$/.exec(df&&df.keys&&df.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),IE=RF.toString,tv=RE.hasOwnProperty,NE=RE.toString,IF=RegExp("^"+IE.call(tv).replace(SF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F0=ev.Symbol,NF=LF.splice,OF=OE(ev,"Map"),ba=OE(Object,"create"),j0=F0?F0.prototype:void 0,z0=j0?j0.toString:void 0;function qi(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function VF(e,t){var n=this.__data__,r=zc(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Jo.prototype.clear=zF;Jo.prototype.delete=BF;Jo.prototype.get=UF;Jo.prototype.has=HF;Jo.prototype.set=VF;function Ji(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function iv(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function hj(e={stringFormatter:iv()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function pj(e={stringFormatter:iv()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function U0(e,t,n){const r=e[t];return r===void 0?n:r}function $E(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Mp(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class mj{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||iv(),i=pj({stringFormatter:r}),s={header:r,undefined:ff,boolean:ff,number:fj(),bigint:ff,string:r,symbol:hj({stringFormatter:r}),function:i,object:i};return n.formatters={...s,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>B0(i,r,n):i=>U0(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?s=>B0(s,r.value,i):s=>U0(s,r.value,i)};if(typeof r.value=="function"){const s=r.label||r.value.name||"",a={label:s,default:i};return{label:s,value(l){const d=r.value(l,a);return d??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Mp(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce($E,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return Mp(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class gj extends mj{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,l)=>(Object.keys(l).forEach(d=>{a.includes(d)||a.push(d)}),a),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce($E,[])}processData(t){return Mp(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Rt;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(Rt||(Rt={}));Rt.QUOTATION_MARK+"",Rt.QUOTATION_MARK,Rt.REVERSE_SOLIDUS+"",Rt.REVERSE_SOLIDUS,Rt.SOLIDUS+"",Rt.SOLIDUS,Rt.LATIN_SMALL_LETTER_B+"",Rt.BACKSPACE,Rt.LATIN_SMALL_LETTER_F+"",Rt.FORM_FEED,Rt.LATIN_SMALL_LETTER_N+"",Rt.NEWLINE,Rt.LATIN_SMALL_LETTER_R+"",Rt.CARRIAGE_RETURN,Rt.LATIN_SMALL_LETTER_T+"",Rt.TAB;var H0;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(H0||(H0={}));var V0;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(V0||(V0={}));var W0;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(W0||(W0={}));var q0;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(q0||(q0={}));class hf extends te.Component{onDownload(t,n){let r=`ukr-civharm-${xc().format("YYYY-MM-DD")}`;if(t==="api")console.log(Nt.API_DATA),window.open(Nt.API_DATA,"_blank");else if(t==="csv"){let i=this.getCsvData(n);v0(`${r}.csv`,i)}else if(t==="json"){let i=this.getJsonData(n);v0(`${r}.json`,i)}}getCsvData(t){const{events:n,sources:r}=t,i=n.map(a=>({id:a.civId,date:a.date,latitude:a.latitude,longitude:a.longitude,location:a.location,description:a.description,sources:a.sources.map(l=>r[l].paths[0]).join(","),associations:a.associations.map(l=>l.filter_paths.join("=")).join(",")}));return new gj().parse(i,{flatten:!0})}getJsonData(t){const{events:n,sources:r}=t,i=n.map(s=>({id:s.civId,date:s.date,latitude:s.latitude,longitude:s.longitude,location:s.location,description:s.description,sources:s.sources.map(a=>{const l=r[a];return{id:a,path:l.paths[0],description:l.description}}),filters:s.associations.map(a=>({key:a.filter_paths[0],value:a.filter_paths[1]}))}));return JSON.stringify(i)}render(){const{language:t,domain:n,format:r}=this.props,i=ze[t].toolbar.download.panel.formats[r];let s=M("span",{className:"download-description",children:i.description});if(r=="api"){const a=Nt.API_DATA;s=re("span",{className:"download-description",children:[i.description," ",M("a",{href:a,children:"Copy API endpoint link from here."})]})}return re("div",{className:"download-row",children:[re("span",{className:"download-button",onClick:()=>this.onDownload(r,n),children:[M("i",{className:"material-icons",children:"download"}),M("span",{className:"tab-caption",children:i.label})]},`download-${r}`),s]})}}const vj=({language:e,title:t,description:n,domain:r})=>re("div",{className:"react-innertabpanel",children:[M("div",{className:"sticky-header",children:M("h2",{children:t})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:n}}),M("hr",{}),M(hf,{language:e,domain:r,format:"api"}),M(hf,{language:e,domain:r,format:"csv"}),M(hf,{language:e,domain:r,format:"json"})]});class yj extends te.Component{constructor(t){super(t),this.onSelectFilter=this.onSelectFilter.bind(this),this.state={_selected:0,_active:!1}}selectTab(t){let n=!0;this.state._selected===t&&this.state._active===!0&&(n=!1),this.setState({_selected:t,_active:n})}onSelectFilter(t,n){const{filters:r,activeFilters:i,coloringSet:s,maxNumOfColors:a}=this.props,l=uD(t);if(i.includes(t)){if(l&&i.includes(l)){const _=cD(r,l,t);let c=!0;for(const f of _)if(i.includes(f)){c=!1;break}if(c){const f=sg(t).filter(w=>i.includes(w));n=n.concat(f)}}const y=fD(s,n);this.props.actions.updateColoringSet(y)}else{const y=dD(s,n);y.length<=a&&this.props.actions.updateColoringSet(y)}this.props.methods.onSelectFilter(n),this.props.actions.updateSelected([])}renderClosePanel(){return M("div",{className:"panel-header",onClick:()=>this.selectTab(this.state._selected),children:M("div",{className:"caret"})})}goToNarrative(t){this.props.methods.onSelectNarrative(t)}renderToolbarNarrativePanel(){const{panels:t}=this.props.toolbarCopy;return re(Kr,{children:[M("h2",{children:t.narratives.label}),M("p",{children:t.narratives.description}),this.props.narratives.map(n=>M("div",{className:"panel-action action",children:re("button",{onClick:()=>{this.goToNarrative(n)},children:[M("p",{children:n.id}),M("p",{children:M("small",{children:lD(n.desc,120)})})]})}))]})}renderToolbarCategoriesPanel(){const{categories:t}=this.props.toolbarCopy.panels,n=wD(this.props.categories,Object.keys(t));return M("div",{children:Object.keys(n).map(r=>{const i=n[r];return M(Kr,{children:M(uF,{categories:i,activeCategories:this.props.activeCategories,onCategoryFilter:this.props.methods.onCategoryFilter,language:this.props.language,title:t[r].label,description:t[r].description})},r)})})}renderToolbarFilterPanel(){const{panels:t}=this.props.toolbarCopy;return M(Kr,{children:M(lF,{filters:this.props.filters,activeFilters:this.props.activeFilters,onSelectFilter:this.onSelectFilter,language:this.props.language,coloringSet:this.props.coloringSet,filterColors:this.props.filterColors,title:t.filters.label,description:t.filters.description})})}renderToolbarShapePanel(){const{panels:t}=this.props.toolbarCopy;if(this.props.features.USE_SHAPES)return M(Kr,{children:M(cF,{shapes:this.props.shapes,activeShapes:this.props.activeShapes,onShapeFilter:this.props.methods.onShapeFilter,language:this.props.language,title:t.shapes.label,description:t.shapes.description})})}renderToolbarDownloadPanel(){const{panels:t}=this.props.toolbarCopy;return M(Kr,{children:M(vj,{language:this.props.language,title:t.download.label,description:t.download.description,domain:this.props.domain})})}renderToolbarTab(t,n,r,i){return M(Jg,{label:n,iconKey:r,isActive:this.state._selected===t&&this.state._active===!0,onClick:()=>{this.selectTab(t)}},i)}renderToolbarCategoryTabs(t){const{categories:n}=this.props.toolbarCopy.panels;return M("div",{children:Object.keys(t).map(r=>this.renderToolbarTab(t[r],n[r].label,n[r].icon,r))})}renderToolbarPanels(){const{features:t,narratives:n}=this.props,r=this.state._active===!0?"toolbar-panels":"toolbar-panels folded";return re("div",{className:r,children:[this.renderClosePanel(),n&&n.length!==0?this.renderToolbarNarrativePanel():null,t.USE_CATEGORIES?this.renderToolbarCategoriesPanel():null,t.USE_ASSOCIATIONS?this.renderToolbarFilterPanel():null,t.USE_SHAPES?this.renderToolbarShapePanel():null,t.USE_DOWNLOAD?this.renderToolbarDownloadPanel():null]})}renderToolbarNavs(){return this.props.narratives?this.props.narratives.map((t,n)=>{const i=n===this.state._selected&&this.state._active===!0?"toolbar-tab active":"toolbar-tab";return M("div",{className:i,onClick:()=>{this.selectTab(n)},children:M("div",{className:"tab-caption",children:t.label})})}):null}renderToolbarTabs(){const{features:t,narratives:n,toolbarCopy:r}=this.props,i=n&&n.length!==0;let s=ze[this.props.language].toolbar.title;s=Nt.display_title;const{panels:a}=r,l=0,d=bD(Object.keys(a.categories),i?1:0),y=Object.keys(d).length,_=TD(i,t.USE_CATEGORIES,y||0),c=_+t.USE_SHAPES,f=c+t.USE_DOWNLOAD;return re("div",{className:"toolbar",children:[M("div",{className:"toolbar-header",onClick:this.props.methods.onTitle,children:M("p",{children:s})}),M("div",{className:"toolbar-tabs",children:re(jc,{children:[i?this.renderToolbarTab(l,a.narratives.label,a.narratives.icon):null,t.USE_CATEGORIES?this.renderToolbarCategoryTabs(d):null,t.USE_ASSOCIATIONS?this.renderToolbarTab(_,a.filters.label,a.filters.icon):null,t.USE_SHAPES?this.renderToolbarTab(c,a.shapes.label,a.shapes.icon):null,t.USE_DOWNLOAD?this.renderToolbarTab(f,a.download.label,a.download.icon):null,t.USE_FULLSCREEN&&M(pF,{language:this.props.language})]})}),M(hF,{info:{enabled:this.props.infoShowing,toggle:this.props.actions.toggleInfoPopup},sites:{enabled:this.props.sitesShowing,toggle:this.props.actions.toggleSites},cover:{toggle:this.props.actions.toggleCover},features:this.props.features}),re("div",{id:"made-with",children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from"," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}render(){const{isNarrative:t}=this.props;return M("div",{id:"toolbar-wrapper",className:`toolbar-wrapper ${t?"narrative-mode":""}`,children:re(Fc,{onSelect:()=>null,selectedIndex:this.state._selected,children:[this.renderToolbarTabs(),this.renderToolbarPanels()]})})}}function _j(e){return{filters:rE(e),categories:tE(e),narratives:Ug(e),shapes:h$(e),language:e.app.language,toolbarCopy:e.app.toolbar,activeFilters:Fg(e),activeCategories:jg(e),activeShapes:iE(e),viewFilters:e.app.associations.views,narrative:e.app.associations.narrative,sitesShowing:e.app.flags.isShowingSites,infoShowing:e.app.flags.isInfopopup,coloringSet:e.app.associations.coloringSet,maxNumOfColors:e.ui.coloring.maxNumOfColors,filterColors:e.ui.coloring.colors,eventRadius:e.ui.eventRadius,features:hr(e)}}function wj(e){return{actions:Ko(Mc,e)}}const bj=pi(_j,wj)(yj),Tj=window.innerWidth>1e3?14:18,FE=({content:e=[],styles:t={},isOpen:n=!0,onClose:r,title:i,theme:s="light",children:a})=>re("div",{children:[M("div",{className:`infopopup__bg ${n?"":"hidden"}`,onClick:r}),re("div",{className:`infopopup ${n?"":"hidden"} ${s==="dark"?"dark":"light"}`,style:{...t,fontSize:Tj},children:[re("div",{className:"legend-header",children:[M("button",{onClick:r,className:"side-menu-burg over-white is-active",children:M("span",{})}),M("h2",{children:i})]}),e.map((l,d)=>M("div",{dangerouslySetInnerHTML:{__html:_e(l)}},d)),a]})]}),Sj=({isOpen:e,onClose:t,language:n,styles:r})=>M(FE,{title:ze[n].legend.default.header,content:ze[n].legend.default.intro,onClose:t,isOpen:e,styles:r});class Ej extends te.Component{constructor(t){super(),this.state={isExtended:!1}}toggleDetails(){this.setState({isExtended:!this.state.isExtended})}renderItems(t){return t?M("div",{children:t.map((n,r)=>n.error?M("p",{children:n.error.message},r):null)}):""}renderNotificationContent(t){const{type:n,message:r,items:i}=t;return re("div",{children:[M("div",{className:`message ${n}`,children:r}),M("div",{className:`details ${this.state.isExtended}`,children:i!==null?this.renderItems(i):""})]})}render(){return this.props.notifications?this.props.notifications.filter(n=>!("isRead"in n&&n.isRead)).length>0?M("div",{className:"notification-wrapper",children:this.props.notifications.map((n,r)=>re("div",{className:"notification",onClick:()=>this.toggleDetails(),children:[M("button",{onClick:this.props.onToggle,className:"side-menu-burg over-white is-active",children:M("span",{})}),this.renderNotificationContent(n)]},r))}):M("div",{}):null}}var ov={},jE={exports:{}},zE={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(zE);var Uc=zE.exports;(function(e){var t=Uc.default;function n(i){if(typeof WeakMap!="function")return null;var s=new WeakMap,a=new WeakMap;return(n=function(d){return d?a:s})(i)}function r(i,s){if(!s&&i&&i.__esModule)return i;if(i===null||t(i)!=="object"&&typeof i!="function")return{default:i};var a=n(s);if(a&&a.has(i))return a.get(i);var l={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(y!=="default"&&Object.prototype.hasOwnProperty.call(i,y)){var _=d?Object.getOwnPropertyDescriptor(i,y):null;_&&(_.get||_.set)?Object.defineProperty(l,y,_):l[y]=i[y]}return l.default=i,a&&a.set(i,l),l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(jE);var dt=jE.exports,BE={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(BE);var ke=BE.exports,pf={},mf={exports:{}},gf={exports:{}},vf={exports:{}},yf={exports:{}},Z0;function xj(){return Z0||(Z0=1,function(e){var t=Uc.default;function n(r,i){if(t(r)!=="object"||r===null)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var a=s.call(r,i||"default");if(t(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(yf)),yf.exports}var G0;function UE(){return G0||(G0=1,function(e){var t=Uc.default,n=xj();function r(i){var s=n(i,"string");return t(s)==="symbol"?s:String(s)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(vf)),vf.exports}var Y0;function Hc(){return Y0||(Y0=1,function(e){var t=UE();function n(r,i,s){return i=t(i),i in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(gf)),gf.exports}var K0;function mi(){return K0||(K0=1,function(e){var t=Hc();function n(r){for(var i=1;i=0)&&(i[a]=n[a]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(wf)),wf.exports}var Q0;function sv(){return Q0||(Q0=1,function(e){var t=kj();function n(r,i){if(r==null)return{};var s=t(r,i),a,l;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(r,a)&&(s[a]=r[a])}return s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(_f)),_f.exports}var bf={exports:{}},J0;function it(){return J0||(J0=1,function(e){function t(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(bf)),bf.exports}var Tf={exports:{}},ew;function ot(){return ew||(ew=1,function(e){var t=UE();function n(i,s){for(var a=0;aAn error occurred:

"+jt(i.message+"",!0)+"
";throw i}try{const i=$r.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(_e.walkTokens(i,t.walkTokens)).then(()=>dr.parse(i,t)).catch(r);_e.walkTokens(i,t.walkTokens)}return dr.parse(i,t)}catch(i){r(i)}}_e.options=_e.setOptions=function(e){return Qn(_e.defaults,e),Z3(_e.defaults),_e};_e.getDefaults=wE;_e.defaults=Qo;_e.use=function(...e){const t=_e.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r=Qn({},n);if(r.async=_e.defaults.async||r.async,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=_e.defaults.renderer||new Qg;for(const s in n.renderer){const a=i[s];i[s]=(...l)=>{let d=n.renderer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.renderer=i}if(n.tokenizer){const i=_e.defaults.tokenizer||new Xg;for(const s in n.tokenizer){const a=i[s];i[s]=(...l)=>{let d=n.tokenizer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.tokenizer=i}if(n.walkTokens){const i=_e.defaults.walkTokens;r.walkTokens=function(s){let a=[];return a.push(n.walkTokens.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}_e.setOptions(r)})};_e.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(_e,r)),r.type){case"table":{for(const i of r.header)n=n.concat(_e.walkTokens(i.tokens,t));for(const i of r.rows)for(const s of i)n=n.concat(_e.walkTokens(s.tokens,t));break}case"list":{n=n.concat(_e.walkTokens(r.items,t));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(_e.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,t)))}return n};_e.parseInline=function(e,t){if(typeof e>"u"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Qn({},_e.defaults,t||{}),EE(t);try{const n=$r.lexInline(e,t);return t.walkTokens&&_e.walkTokens(n,t.walkTokens),dr.parseInline(n,t)}catch(n){if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+jt(n.message+"",!0)+"
";throw n}};_e.Parser=dr;_e.parser=dr.parse;_e.Renderer=Qg;_e.TextRenderer=xE;_e.Lexer=$r;_e.lexer=$r.lex;_e.Tokenizer=Xg;_e.Slugger=kE;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;dr.parse;$r.lex;function CE(e,t){const[n,r]=e,i=t.includes(n),s=Object.entries(r).flatMap(a=>CE(a,t)).filter(a=>t.includes(a)===i);return s.push(n),s}function lF({filters:e,activeFilters:t,onSelectFilter:n,language:r,coloringSet:i,filterColors:s,title:a,description:l}){function d(_,c){const[f,w]=_,v=FS(f),m=CE(_,t),b=VS(f,i),g=b!==-1&&t.includes(f)?s[b]:"",p={color:g,marginLeft:`${c*20}px`};return re("li",{className:"filter-filter",style:{...p},children:[M(_E,{label:v,isActive:t.includes(f),onClickCheckbox:h=>{h.preventDefault(),n(f,m)},color:g}),Object.keys(w).length>0?M("ul",{children:Object.entries(w).map(h=>d(h,c+1))}):null]},v.replace(/ /g,"_"))}function y(_){const c=jS(_);return M("div",{className:"scrolled-area",children:Object.entries(c).map(f=>d(f,0))})}return re("div",{children:[M("div",{className:"sticky-header",children:M("h2",{children:a})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:_e(l)}}),y(e)]})}const AE=({data:e,activeValues:t,onSelect:n,type:r})=>{const i=r===Yn.CATEGORY?"title":"id";return M("div",{children:e.map(s=>M("li",{className:"filter-filter active",children:M(_E,{label:s.title,isActive:t.includes(s[i]),onClickCheckbox:()=>n(s[i]),styleProps:s.styles})},s.title.replace(/ /g,"_")))})},uF=({categories:e,activeCategories:t,onCategoryFilter:n,language:r,title:i,description:s})=>re("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(AE,{data:e,activeValues:t,onSelect:n,type:Yn.CATEGORY})]}),cF=({shapes:e,activeShapes:t,onShapeFilter:n,language:r,title:i,description:s})=>{const a=_D(e,t);return re("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(AE,{data:a,activeValues:t,onSelect:n,type:$S})]})},dF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"location_on"})})},fF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"home"})})};function hF(e){function t(){return re(Ln,{children:[M("div",{className:"bottom-action-block",children:e.features.USE_SITES?M(dF,{isActive:e.sites.enabled,onClickHandler:e.sites.toggle}):null}),M("div",{className:"botttom-action-block",children:e.features.USE_COVER?M(fF,{onClickHandler:e.cover.toggle}):null}),re("div",{style:{fontSize:9,paddingTop:10},children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from ",M("br",{})," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}return M("div",{className:"bottom-actions",children:t()})}function Jg({isActive:e,iconKey:t,onClick:n,label:r}){return re("div",{className:e?"toolbar-tab active":"toolbar-tab",onClick:n,children:[M("i",{className:"material-icons",children:t}),M("div",{className:"tab-caption",children:r})]},t)}Jg.tabsRole="Tab";const M0=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Pr=(()=>{if(typeof document>"u")return!1;const e=M0[0],t={};for(const n of M0)if((n==null?void 0:n[1])in document){for(const[i,s]of n.entries())t[e[i]]=s;return t}return!1})(),D0={change:Pr.fullscreenchange,error:Pr.fullscreenerror};let fn={request(e=document.documentElement,t){return new Promise((n,r)=>{const i=()=>{fn.off("change",i),n()};fn.on("change",i);const s=e[Pr.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(r)})},exit(){return new Promise((e,t)=>{if(!fn.isFullscreen){e();return}const n=()=>{fn.off("change",n),e()};fn.on("change",n);const r=document[Pr.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},toggle(e,t){return fn.isFullscreen?fn.exit():fn.request(e,t)},onchange(e){fn.on("change",e)},onerror(e){fn.on("error",e)},on(e,t){const n=D0[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=D0[e];n&&document.removeEventListener(n,t,!1)},raw:Pr};Object.defineProperties(fn,{isFullscreen:{get:()=>!!document[Pr.fullscreenElement]},element:{enumerable:!0,get:()=>document[Pr.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[Pr.fullscreenEnabled]}});Pr||(fn={isEnabled:!1});const Vr=fn;let pF=class extends te.Component{constructor(t){super(t),this.onFullscreenStateChange=this.onFullscreenStateChange.bind(this),this.state={isFullscreen:Vr.isFullscreen}}componentDidMount(){Vr.on&&Vr.on("change",this.onFullscreenStateChange)}componentWillUnmount(){Vr.off&&Vr.off("change",this.onFullscreenStateChange)}onFullscreenStateChange(t){this.setState({isFullscreen:Vr.isFullscreen})}onToggleFullscreen(){Vr.toggle().catch(console.warn)}render(){if(!Vr.isEnabled)return null;const{language:t}=this.props,{isFullscreen:n}=this.state;return M(Jg,{isActive:n,label:n?ze[t].toolbar.fullscreen_exit:ze[t].toolbar.fullscreen_enter,iconKey:n?"fullscreen_exit":"fullscreen",onClick:this.onToggleFullscreen})}};var mF="Expected a function",PE="__lodash_hash_undefined__",LE=1/0,gF="[object Function]",vF="[object GeneratorFunction]",yF="[object Symbol]",_F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wF=/^\w*$/,bF=/^\./,TF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,SF=/[\\^$.*+?()[\]{}|]/g,EF=/\\(\\)?/g,xF=/^\[object .+?Constructor\]$/,kF=typeof Xr=="object"&&Xr&&Xr.Object===Object&&Xr,CF=typeof self=="object"&&self&&self.Object===Object&&self,ev=kF||CF||Function("return this")();function AF(e,t){return e==null?void 0:e[t]}function PF(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var LF=Array.prototype,RF=Function.prototype,RE=Object.prototype,df=ev["__core-js_shared__"],$0=function(){var e=/[^.]+$/.exec(df&&df.keys&&df.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),IE=RF.toString,tv=RE.hasOwnProperty,NE=RE.toString,IF=RegExp("^"+IE.call(tv).replace(SF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F0=ev.Symbol,NF=LF.splice,OF=OE(ev,"Map"),ba=OE(Object,"create"),j0=F0?F0.prototype:void 0,z0=j0?j0.toString:void 0;function qi(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function VF(e,t){var n=this.__data__,r=zc(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Jo.prototype.clear=zF;Jo.prototype.delete=UF;Jo.prototype.get=BF;Jo.prototype.has=HF;Jo.prototype.set=VF;function Ji(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function iv(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function hj(e={stringFormatter:iv()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function pj(e={stringFormatter:iv()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function B0(e,t,n){const r=e[t];return r===void 0?n:r}function $E(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Mp(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class mj{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||iv(),i=pj({stringFormatter:r}),s={header:r,undefined:ff,boolean:ff,number:fj(),bigint:ff,string:r,symbol:hj({stringFormatter:r}),function:i,object:i};return n.formatters={...s,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>U0(i,r,n):i=>B0(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?s=>U0(s,r.value,i):s=>B0(s,r.value,i)};if(typeof r.value=="function"){const s=r.label||r.value.name||"",a={label:s,default:i};return{label:s,value(l){const d=r.value(l,a);return d??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Mp(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce($E,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return Mp(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class gj extends mj{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,l)=>(Object.keys(l).forEach(d=>{a.includes(d)||a.push(d)}),a),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce($E,[])}processData(t){return Mp(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Rt;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(Rt||(Rt={}));Rt.QUOTATION_MARK+"",Rt.QUOTATION_MARK,Rt.REVERSE_SOLIDUS+"",Rt.REVERSE_SOLIDUS,Rt.SOLIDUS+"",Rt.SOLIDUS,Rt.LATIN_SMALL_LETTER_B+"",Rt.BACKSPACE,Rt.LATIN_SMALL_LETTER_F+"",Rt.FORM_FEED,Rt.LATIN_SMALL_LETTER_N+"",Rt.NEWLINE,Rt.LATIN_SMALL_LETTER_R+"",Rt.CARRIAGE_RETURN,Rt.LATIN_SMALL_LETTER_T+"",Rt.TAB;var H0;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(H0||(H0={}));var V0;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(V0||(V0={}));var W0;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(W0||(W0={}));var q0;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(q0||(q0={}));class hf extends te.Component{onDownload(t,n){let r=`ukr-civharm-${xc().format("YYYY-MM-DD")}`;if(t==="api")console.log(rn.API_DATA),window.open(rn.API_DATA,"_blank");else if(t==="csv"){let i=this.getCsvData(n);v0(`${r}.csv`,i)}else if(t==="json"){let i=this.getJsonData(n);v0(`${r}.json`,i)}}getCsvData(t){const{events:n,sources:r}=t,i=n.map(a=>({id:a.civId,date:a.date,latitude:a.latitude,longitude:a.longitude,location:a.location,description:a.description,sources:a.sources.map(l=>r[l].paths[0]).join(","),associations:a.associations.map(l=>l.filter_paths.join("=")).join(",")}));return new gj().parse(i,{flatten:!0})}getJsonData(t){const{events:n,sources:r}=t,i=n.map(s=>({id:s.civId,date:s.date,latitude:s.latitude,longitude:s.longitude,location:s.location,description:s.description,sources:s.sources.map(a=>{const l=r[a];return{id:a,path:l.paths[0],description:l.description}}),filters:s.associations.map(a=>({key:a.filter_paths[0],value:a.filter_paths[1]}))}));return JSON.stringify(i)}render(){const{language:t,domain:n,format:r}=this.props,i=ze[t].toolbar.download.panel.formats[r];let s=M("span",{className:"download-description",children:i.description});if(r=="api"){const a=rn.API_DATA;s=re("span",{className:"download-description",children:[i.description," ",M("a",{href:a,children:"Copy API endpoint link from here."})]})}return re("div",{className:"download-row",children:[re("span",{className:"download-button",onClick:()=>this.onDownload(r,n),children:[M("i",{className:"material-icons",children:"download"}),M("span",{className:"tab-caption",children:i.label})]},`download-${r}`),s]})}}const vj=({language:e,title:t,description:n,domain:r})=>re("div",{className:"react-innertabpanel",children:[M("div",{className:"sticky-header",children:M("h2",{children:t})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:n}}),M("hr",{}),M(hf,{language:e,domain:r,format:"api"}),M(hf,{language:e,domain:r,format:"csv"}),M(hf,{language:e,domain:r,format:"json"})]});class yj extends te.Component{constructor(t){super(t),this.onSelectFilter=this.onSelectFilter.bind(this),this.state={_selected:0,_active:!1}}selectTab(t){let n=!0;this.state._selected===t&&this.state._active===!0&&(n=!1),this.setState({_selected:t,_active:n})}onSelectFilter(t,n){const{filters:r,activeFilters:i,coloringSet:s,maxNumOfColors:a}=this.props,l=uD(t);if(i.includes(t)){if(l&&i.includes(l)){const _=cD(r,l,t);let c=!0;for(const f of _)if(i.includes(f)){c=!1;break}if(c){const f=sg(t).filter(w=>i.includes(w));n=n.concat(f)}}const y=fD(s,n);this.props.actions.updateColoringSet(y)}else{const y=dD(s,n);y.length<=a&&this.props.actions.updateColoringSet(y)}this.props.methods.onSelectFilter(n),this.props.actions.updateSelected([])}renderClosePanel(){return M("div",{className:"panel-header",onClick:()=>this.selectTab(this.state._selected),children:M("div",{className:"caret"})})}goToNarrative(t){this.props.methods.onSelectNarrative(t)}renderToolbarNarrativePanel(){const{panels:t}=this.props.toolbarCopy;return re(Kr,{children:[M("h2",{children:t.narratives.label}),M("p",{children:t.narratives.description}),this.props.narratives.map(n=>M("div",{className:"panel-action action",children:re("button",{onClick:()=>{this.goToNarrative(n)},children:[M("p",{children:n.id}),M("p",{children:M("small",{children:lD(n.desc,120)})})]})}))]})}renderToolbarCategoriesPanel(){const{categories:t}=this.props.toolbarCopy.panels,n=wD(this.props.categories,Object.keys(t));return M("div",{children:Object.keys(n).map(r=>{const i=n[r];return M(Kr,{children:M(uF,{categories:i,activeCategories:this.props.activeCategories,onCategoryFilter:this.props.methods.onCategoryFilter,language:this.props.language,title:t[r].label,description:t[r].description})},r)})})}renderToolbarFilterPanel(){const{panels:t}=this.props.toolbarCopy;return M(Kr,{children:M(lF,{filters:this.props.filters,activeFilters:this.props.activeFilters,onSelectFilter:this.onSelectFilter,language:this.props.language,coloringSet:this.props.coloringSet,filterColors:this.props.filterColors,title:t.filters.label,description:t.filters.description})})}renderToolbarShapePanel(){const{panels:t}=this.props.toolbarCopy;if(this.props.features.USE_SHAPES)return M(Kr,{children:M(cF,{shapes:this.props.shapes,activeShapes:this.props.activeShapes,onShapeFilter:this.props.methods.onShapeFilter,language:this.props.language,title:t.shapes.label,description:t.shapes.description})})}renderToolbarDownloadPanel(){const{panels:t}=this.props.toolbarCopy;return M(Kr,{children:M(vj,{language:this.props.language,title:t.download.label,description:t.download.description,domain:this.props.domain})})}renderToolbarTab(t,n,r,i){return M(Jg,{label:n,iconKey:r,isActive:this.state._selected===t&&this.state._active===!0,onClick:()=>{this.selectTab(t)}},i)}renderToolbarCategoryTabs(t){const{categories:n}=this.props.toolbarCopy.panels;return M("div",{children:Object.keys(t).map(r=>this.renderToolbarTab(t[r],n[r].label,n[r].icon,r))})}renderToolbarPanels(){const{features:t,narratives:n}=this.props,r=this.state._active===!0?"toolbar-panels":"toolbar-panels folded";return re("div",{className:r,children:[this.renderClosePanel(),n&&n.length!==0?this.renderToolbarNarrativePanel():null,t.USE_CATEGORIES?this.renderToolbarCategoriesPanel():null,t.USE_ASSOCIATIONS?this.renderToolbarFilterPanel():null,t.USE_SHAPES?this.renderToolbarShapePanel():null,t.USE_DOWNLOAD?this.renderToolbarDownloadPanel():null]})}renderToolbarNavs(){return this.props.narratives?this.props.narratives.map((t,n)=>{const i=n===this.state._selected&&this.state._active===!0?"toolbar-tab active":"toolbar-tab";return M("div",{className:i,onClick:()=>{this.selectTab(n)},children:M("div",{className:"tab-caption",children:t.label})})}):null}renderToolbarTabs(){const{features:t,narratives:n,toolbarCopy:r}=this.props,i=n&&n.length!==0;let s=ze[this.props.language].toolbar.title;s=rn.display_title;const{panels:a}=r,l=0,d=bD(Object.keys(a.categories),i?1:0),y=Object.keys(d).length,_=TD(i,t.USE_CATEGORIES,y||0),c=_+t.USE_SHAPES,f=c+t.USE_DOWNLOAD;return re("div",{className:"toolbar",children:[M("div",{className:"toolbar-header",onClick:this.props.methods.onTitle,children:M("p",{children:s})}),M("div",{className:"toolbar-tabs",children:re(jc,{children:[i?this.renderToolbarTab(l,a.narratives.label,a.narratives.icon):null,t.USE_CATEGORIES?this.renderToolbarCategoryTabs(d):null,t.USE_ASSOCIATIONS?this.renderToolbarTab(_,a.filters.label,a.filters.icon):null,t.USE_SHAPES?this.renderToolbarTab(c,a.shapes.label,a.shapes.icon):null,t.USE_DOWNLOAD?this.renderToolbarTab(f,a.download.label,a.download.icon):null,t.USE_FULLSCREEN&&M(pF,{language:this.props.language})]})}),M(hF,{info:{enabled:this.props.infoShowing,toggle:this.props.actions.toggleInfoPopup},sites:{enabled:this.props.sitesShowing,toggle:this.props.actions.toggleSites},cover:{toggle:this.props.actions.toggleCover},features:this.props.features}),re("div",{id:"made-with",children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from"," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}render(){const{isNarrative:t}=this.props;return M("div",{id:"toolbar-wrapper",className:`toolbar-wrapper ${t?"narrative-mode":""}`,children:re(Fc,{onSelect:()=>null,selectedIndex:this.state._selected,children:[this.renderToolbarTabs(),this.renderToolbarPanels()]})})}}function _j(e){return{filters:rE(e),categories:tE(e),narratives:Bg(e),shapes:h$(e),language:e.app.language,toolbarCopy:e.app.toolbar,activeFilters:Fg(e),activeCategories:jg(e),activeShapes:iE(e),viewFilters:e.app.associations.views,narrative:e.app.associations.narrative,sitesShowing:e.app.flags.isShowingSites,infoShowing:e.app.flags.isInfopopup,coloringSet:e.app.associations.coloringSet,maxNumOfColors:e.ui.coloring.maxNumOfColors,filterColors:e.ui.coloring.colors,eventRadius:e.ui.eventRadius,features:hr(e)}}function wj(e){return{actions:Ko(Mc,e)}}const bj=pi(_j,wj)(yj),Tj=window.innerWidth>1e3?14:18,FE=({content:e=[],styles:t={},isOpen:n=!0,onClose:r,title:i,theme:s="light",children:a})=>re("div",{children:[M("div",{className:`infopopup__bg ${n?"":"hidden"}`,onClick:r}),re("div",{className:`infopopup ${n?"":"hidden"} ${s==="dark"?"dark":"light"}`,style:{...t,fontSize:Tj},children:[re("div",{className:"legend-header",children:[M("button",{onClick:r,className:"side-menu-burg over-white is-active",children:M("span",{})}),M("h2",{children:i})]}),e.map((l,d)=>M("div",{dangerouslySetInnerHTML:{__html:_e(l)}},d)),a]})]}),Sj=({isOpen:e,onClose:t,language:n,styles:r})=>M(FE,{title:ze[n].legend.default.header,content:ze[n].legend.default.intro,onClose:t,isOpen:e,styles:r});class Ej extends te.Component{constructor(t){super(),this.state={isExtended:!1}}toggleDetails(){this.setState({isExtended:!this.state.isExtended})}renderItems(t){return t?M("div",{children:t.map((n,r)=>n.error?M("p",{children:n.error.message},r):null)}):""}renderNotificationContent(t){const{type:n,message:r,items:i}=t;return re("div",{children:[M("div",{className:`message ${n}`,children:r}),M("div",{className:`details ${this.state.isExtended}`,children:i!==null?this.renderItems(i):""})]})}render(){return this.props.notifications?this.props.notifications.filter(n=>!("isRead"in n&&n.isRead)).length>0?M("div",{className:"notification-wrapper",children:this.props.notifications.map((n,r)=>re("div",{className:"notification",onClick:()=>this.toggleDetails(),children:[M("button",{onClick:this.props.onToggle,className:"side-menu-burg over-white is-active",children:M("span",{})}),this.renderNotificationContent(n)]},r))}):M("div",{}):null}}var ov={},jE={exports:{}},zE={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(zE);var Bc=zE.exports;(function(e){var t=Bc.default;function n(i){if(typeof WeakMap!="function")return null;var s=new WeakMap,a=new WeakMap;return(n=function(d){return d?a:s})(i)}function r(i,s){if(!s&&i&&i.__esModule)return i;if(i===null||t(i)!=="object"&&typeof i!="function")return{default:i};var a=n(s);if(a&&a.has(i))return a.get(i);var l={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(y!=="default"&&Object.prototype.hasOwnProperty.call(i,y)){var _=d?Object.getOwnPropertyDescriptor(i,y):null;_&&(_.get||_.set)?Object.defineProperty(l,y,_):l[y]=i[y]}return l.default=i,a&&a.set(i,l),l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(jE);var dt=jE.exports,UE={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(UE);var ke=UE.exports,pf={},mf={exports:{}},gf={exports:{}},vf={exports:{}},yf={exports:{}},Z0;function xj(){return Z0||(Z0=1,function(e){var t=Bc.default;function n(r,i){if(t(r)!=="object"||r===null)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var a=s.call(r,i||"default");if(t(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(yf)),yf.exports}var G0;function BE(){return G0||(G0=1,function(e){var t=Bc.default,n=xj();function r(i){var s=n(i,"string");return t(s)==="symbol"?s:String(s)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(vf)),vf.exports}var Y0;function Hc(){return Y0||(Y0=1,function(e){var t=BE();function n(r,i,s){return i=t(i),i in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(gf)),gf.exports}var K0;function mi(){return K0||(K0=1,function(e){var t=Hc();function n(r){for(var i=1;i=0)&&(i[a]=n[a]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(wf)),wf.exports}var Q0;function sv(){return Q0||(Q0=1,function(e){var t=kj();function n(r,i){if(r==null)return{};var s=t(r,i),a,l;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(r,a)&&(s[a]=r[a])}return s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(_f)),_f.exports}var bf={exports:{}},J0;function it(){return J0||(J0=1,function(e){function t(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(bf)),bf.exports}var Tf={exports:{}},ew;function ot(){return ew||(ew=1,function(e){var t=BE();function n(i,s){for(var a=0;a0&&arguments[0]!==void 0?arguments[0]:{action:"play",source:""};return this.video.play(),{type:n,operation:h}}function _(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"pause",source:""};return this.video.pause(),{type:n,operation:h}}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"toggle-play",source:""};return this.video.togglePlay(),{type:n,operation:h}}function f(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"seek",source:""};return this.video.seek(h),{type:n,operation:T}}function w(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"forward-".concat(h),source:""};return this.video.forward(h),{type:n,operation:T}}function v(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"replay-".concat(h),source:""};return this.video.replay(h),{type:n,operation:T}}function m(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-rate",source:""};return this.video.playbackRate=h,{type:n,operation:T}}function b(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-volume",source:""},x=h;return h<0&&(x=0),h>1&&(x=1),this.video.volume=x,{type:n,operation:T}}function g(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:h?"muted":"unmuted",source:""};return this.video.muted=h,{type:n,operation:T}}function p(h){return t.default.enabled?(t.default.isFullscreen?t.default.exit():t.default.request(this.rootElement),{type:n,operation:{action:"toggle-fullscreen",source:""}}):{type:r,isFullscreen:!h.isFullscreen}}return nt}var cw;function Pj(){return cw||(cw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(mi()),r=av(),i=Vc(),s={currentSrc:null,duration:0,currentTime:0,seekingTime:0,buffered:null,waiting:!1,seeking:!1,paused:!0,autoPaused:!1,ended:!1,playbackRate:1,muted:!1,volume:1,readyState:0,networkState:0,videoWidth:0,videoHeight:0,hasStarted:!1,userActivity:!0,isActive:!1,isFullscreen:!1,activeTextTrack:null};function a(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,d=arguments.length>1?arguments[1]:void 0;switch(d.type){case i.USER_ACTIVATE:return(0,n.default)({},l,{userActivity:d.activity});case i.PLAYER_ACTIVATE:return(0,n.default)({},l,{isActive:d.activity});case i.FULLSCREEN_CHANGE:return(0,n.default)({},l,{isFullscreen:!!d.isFullscreen});case r.SEEKING_TIME:return(0,n.default)({},l,{seekingTime:d.time});case r.END_SEEKING:return(0,n.default)({},l,{seekingTime:0});case r.LOAD_START:return(0,n.default)({},l,d.videoProps,{hasStarted:!1,ended:!1});case r.CAN_PLAY:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.WAITING:return(0,n.default)({},l,d.videoProps,{waiting:!0});case r.CAN_PLAY_THROUGH:case r.PLAYING:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.PLAY:return(0,n.default)({},l,d.videoProps,{ended:!1,paused:!1,autoPaused:!1,waiting:!1,hasStarted:!0});case r.PAUSE:return(0,n.default)({},l,d.videoProps,{paused:!0});case r.END:return(0,n.default)({},l,d.videoProps,{ended:!0});case r.SEEKING:return(0,n.default)({},l,d.videoProps,{seeking:!0});case r.SEEKED:return(0,n.default)({},l,d.videoProps,{seeking:!1});case r.ERROR:return(0,n.default)({},l,d.videoProps,{error:"UNKNOWN ERROR",ended:!0});case r.DURATION_CHANGE:case r.TIME_UPDATE:case r.VOLUME_CHANGE:case r.PROGRESS_CHANGE:case r.RATE_CHANGE:case r.SUSPEND:case r.ABORT:case r.EMPTIED:case r.STALLED:case r.LOADED_META_DATA:case r.LOADED_DATA:case r.RESIZE:return(0,n.default)({},l,d.videoProps);case r.ACTIVATE_TEXT_TRACK:return(0,n.default)({},l,{activeTextTrack:d.textTrack});default:return l}}}(Rf)),Rf}var Nf={},dw;function Lj(){return dw||(dw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=t(mi()),r=Vc(),i={count:0,operation:{action:"",source:""}};function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i,l=arguments.length>1?arguments[1]:void 0;switch(l.type){case r.OPERATE:return(0,n.default)({},a,{count:a.count+1,operation:(0,n.default)({},a.operation,l.operation)});default:return a}}}(Nf)),Nf}var fw;function VE(){return fw||(fw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.operationReducer=e.playerReducer=void 0;var n=t(Pj()),r=t(Lj());function i(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;return{player:(0,n.default)(l.player,d),operation:(0,r.default)(l.operation,d)}}var s=n.default;e.playerReducer=s;var a=r.default;e.operationReducer=a}(Lf)),Lf}var hw;function Rj(){return hw||(hw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(it()),s=n(ot()),a=Aj,l=n(VE()),d=t(Vc()),y=t(av()),_=function(){function c(f){(0,i.default)(this,c),this.store=f||(0,a.createStore)(l.default),this.video=null,this.rootElement=null}return(0,s.default)(c,[{key:"getActions",value:function(){var w=this,v=this.store.dispatch,m=(0,r.default)({},d,y);function b(g){return function(){var h=g.apply(w,arguments);typeof h<"u"&&v(h)}}return Object.keys(m).filter(function(g){return typeof m[g]=="function"}).reduce(function(g,p){return g[p]=b(m[p]),g},{})}},{key:"getState",value:function(){return this.store.getState()}},{key:"subscribeToStateChange",value:function(w,v){v||(v=this.getState.bind(this));var m=v(),b=function(){var p=v();if(p!==m){var h=m;m=p,w(p,h)}};return this.store.subscribe(b)}},{key:"subscribeToOperationStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().operation})}},{key:"subscribeToPlayerStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().player})}}]),c}();e.default=_}(Pf)),Pf}var Of={},pw;function WE(){return pw||(pw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={actions:y.default.object,player:y.default.object,position:y.default.string,className:y.default.string},w={position:"left"},v=function(m){(0,d.default)(b,m);function b(g,p){var h;return(0,r.default)(this,b),h=(0,s.default)(this,(0,a.default)(b).call(this,g,p)),h.handleClick=h.handleClick.bind((0,l.default)(h)),h}return(0,i.default)(b,[{key:"componentDidMount",value:function(){}},{key:"handleClick",value:function(){var p=this.props.actions;p.play()}},{key:"render",value:function(){var p=this.props,h=p.player,T=p.position;return _.default.createElement("button",{className:(0,c.default)("video-react-button","video-react-big-play-button","video-react-big-play-button-".concat(T),this.props.className,{"big-play-button-hide":h.hasStarted||!h.currentSrc}),type:"button","aria-live":"polite",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Play Video"))}}]),b}(_.Component);e.default=v,v.propTypes=f,v.defaultProps=w,v.displayName="BigPlayButton"}(Of)),Of}var Mf={},mw;function qE(){return mw||(mw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(te),i=t(Ze()),s={player:n.default.object,className:n.default.string};function a(l){var d=l.player,y=l.className;return d.error?null:r.default.createElement("div",{className:(0,i.default)("video-react-loading-spinner",y)})}a.propTypes=s,a.displayName="LoadingSpinner"}(Mf)),Mf}var Df={},gw;function ZE(){return gw||(gw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s={poster:n.default.string,player:n.default.object,actions:n.default.object,className:n.default.string};function a(d){var y=d.poster,_=d.player,c=d.actions,f=d.className;return!y||_.hasStarted?null:r.default.createElement("div",{className:(0,i.default)("video-react-poster",f),style:{backgroundImage:'url("'.concat(y,'")')},onClick:function(){_.paused&&c.play()}})}a.propTypes=s,a.displayName="PosterImage";var l=a;e.default=l}(Df)),Df}var $f={},ir={},Ff={exports:{}},jf={exports:{}},zf={exports:{}},vw;function GE(){return vw||(vw=1,function(e){function t(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,s=new Array(r);i0&&arguments[0]!==void 0?arguments[0]:0,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,b=Math.floor(v%60),g=Math.floor(v/60%60),p=Math.floor(v/3600),h=Math.floor(m/60%60),T=Math.floor(m/3600);return(s(v)||v===1/0)&&(p="-",g="-",b="-"),p=p>0||T>0?"".concat(p,":"):"",g="".concat((p||h>=10)&&g<10?"0".concat(g):g,":"),b=b<10?"0".concat(b):b,p+g+b}function l(v){return v.props&&v.props.isVideoChild?!0:v.type==="source"||v.type==="track"}var d=function(m,b){return m.filter(b)[0]},y=function(m,b){var g=m.type,p=b.type;return typeof g=="string"||typeof p=="string"?g===p:typeof g=="function"&&typeof p=="function"?g.displayName===p.displayName:!1};function _(v,m,b){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,p=i.default.Children.toArray(m);b.order;var h=(0,r.default)(b,["order"]);return p.filter(function(T){return!T.props.disabled}).concat(v.filter(function(T){return!d(p,function(x){return y(x,T)})})).map(function(T){var x=d(v,function(A){return y(A,T)}),k=x?x.props:{},P=(0,n.default)({},h,k,T.props),E=i.default.cloneElement(T,P,T.props.children);return E}).sort(function(T,x){return(T.props.order||g)-(x.props.order||g)})}function c(v,m){console.warn("WARNING: ".concat(v," will be deprecated soon! Please use ").concat(m," instead."))}function f(v,m){var b=arguments,g=!1;return function(){g||(v.apply(void 0,(0,t.default)(b)),g=!0,setTimeout(function(){g=!1},m))}}var w=["error","src","srcObject","currentSrc","crossOrigin","networkState","preload","buffered","readyState","seeking","currentTime","duration","paused","defaultPlaybackRate","playbackRate","played","seekable","ended","autoplay","loop","mediaGroup","controller","controls","volume","muted","defaultMuted","audioTracks","videoTracks","textTracks","width","height","videoWidth","videoHeight","poster"];return ir.mediaProperties=w,ir}var Ew;function KE(){return Ew||(Ew=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=pr(),v={actions:_.default.object,player:_.default.object,children:_.default.any,startTime:_.default.number,loop:_.default.bool,muted:_.default.bool,autoPlay:_.default.bool,playsInline:_.default.bool,src:_.default.string,poster:_.default.string,className:_.default.string,preload:_.default.oneOf(["auto","metadata","none"]),crossOrigin:_.default.string,onLoadStart:_.default.func,onWaiting:_.default.func,onCanPlay:_.default.func,onCanPlayThrough:_.default.func,onPlaying:_.default.func,onEnded:_.default.func,onSeeking:_.default.func,onSeeked:_.default.func,onPlay:_.default.func,onPause:_.default.func,onProgress:_.default.func,onDurationChange:_.default.func,onError:_.default.func,onSuspend:_.default.func,onAbort:_.default.func,onEmptied:_.default.func,onStalled:_.default.func,onLoadedMetadata:_.default.func,onLoadedData:_.default.func,onTimeUpdate:_.default.func,onRateChange:_.default.func,onVolumeChange:_.default.func,onResize:_.default.func},m=function(b){(0,y.default)(g,b);function g(p){var h;return(0,i.default)(this,g),h=(0,a.default)(this,(0,l.default)(g).call(this,p)),h.video=null,h.play=h.play.bind((0,d.default)(h)),h.pause=h.pause.bind((0,d.default)(h)),h.seek=h.seek.bind((0,d.default)(h)),h.forward=h.forward.bind((0,d.default)(h)),h.replay=h.replay.bind((0,d.default)(h)),h.toggleFullscreen=h.toggleFullscreen.bind((0,d.default)(h)),h.getProperties=h.getProperties.bind((0,d.default)(h)),h.renderChildren=h.renderChildren.bind((0,d.default)(h)),h.handleLoadStart=h.handleLoadStart.bind((0,d.default)(h)),h.handleCanPlay=h.handleCanPlay.bind((0,d.default)(h)),h.handleCanPlayThrough=h.handleCanPlayThrough.bind((0,d.default)(h)),h.handlePlay=h.handlePlay.bind((0,d.default)(h)),h.handlePlaying=h.handlePlaying.bind((0,d.default)(h)),h.handlePause=h.handlePause.bind((0,d.default)(h)),h.handleEnded=h.handleEnded.bind((0,d.default)(h)),h.handleWaiting=h.handleWaiting.bind((0,d.default)(h)),h.handleSeeking=h.handleSeeking.bind((0,d.default)(h)),h.handleSeeked=h.handleSeeked.bind((0,d.default)(h)),h.handleFullscreenChange=h.handleFullscreenChange.bind((0,d.default)(h)),h.handleError=h.handleError.bind((0,d.default)(h)),h.handleSuspend=h.handleSuspend.bind((0,d.default)(h)),h.handleAbort=h.handleAbort.bind((0,d.default)(h)),h.handleEmptied=h.handleEmptied.bind((0,d.default)(h)),h.handleStalled=h.handleStalled.bind((0,d.default)(h)),h.handleLoadedMetaData=h.handleLoadedMetaData.bind((0,d.default)(h)),h.handleLoadedData=h.handleLoadedData.bind((0,d.default)(h)),h.handleTimeUpdate=h.handleTimeUpdate.bind((0,d.default)(h)),h.handleRateChange=h.handleRateChange.bind((0,d.default)(h)),h.handleVolumeChange=h.handleVolumeChange.bind((0,d.default)(h)),h.handleDurationChange=h.handleDurationChange.bind((0,d.default)(h)),h.handleProgress=(0,w.throttle)(h.handleProgress.bind((0,d.default)(h)),250),h.handleKeypress=h.handleKeypress.bind((0,d.default)(h)),h.handleTextTrackChange=h.handleTextTrackChange.bind((0,d.default)(h)),h}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.forceUpdate(),this.video&&this.video.textTracks&&(this.video.textTracks.onaddtrack=this.handleTextTrackChange,this.video.textTracks.onremovetrack=this.handleTextTrackChange)}},{key:"getProperties",value:function(){var h=this;return this.video?w.mediaProperties.reduce(function(T,x){return T[x]=h.video[x],T},{}):null}},{key:"handleTextTrackChange",value:function(){var h=this.props,T=h.actions,x=h.player;if(this.video&&this.video.textTracks){var k=Array.from(this.video.textTracks).find(function(P){return P.mode==="showing"});k!==x.activeTextTrack&&T.activateTextTrack(k)}}},{key:"play",value:function(){var h=this.video.play();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"pause",value:function(){var h=this.video.pause();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"load",value:function(){this.video.load()}},{key:"addTextTrack",value:function(){var h;(h=this.video).addTextTrack.apply(h,arguments)}},{key:"canPlayType",value:function(){var h;(h=this.video).canPlayType.apply(h,arguments)}},{key:"togglePlay",value:function(){this.video.paused?this.play():this.pause()}},{key:"seek",value:function(h){try{this.video.currentTime=h}catch{}}},{key:"forward",value:function(h){this.seek(this.video.currentTime+h)}},{key:"replay",value:function(h){this.forward(-h)}},{key:"toggleFullscreen",value:function(){var h=this.props,T=h.player,x=h.actions;x.toggleFullscreen(T)}},{key:"handleLoadStart",value:function(){var h=this.props,T=h.actions,x=h.onLoadStart;T.handleLoadStart(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlay",value:function(){var h=this.props,T=h.actions,x=h.onCanPlay;T.handleCanPlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlayThrough",value:function(){var h=this.props,T=h.actions,x=h.onCanPlayThrough;T.handleCanPlayThrough(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlaying",value:function(){var h=this.props,T=h.actions,x=h.onPlaying;T.handlePlaying(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlay",value:function(){var h=this.props,T=h.actions,x=h.onPlay;T.handlePlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePause",value:function(){var h=this.props,T=h.actions,x=h.onPause;T.handlePause(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleDurationChange",value:function(){var h=this.props,T=h.actions,x=h.onDurationChange;T.handleDurationChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleProgress",value:function(){var h=this.props,T=h.actions,x=h.onProgress;this.video&&T.handleProgressChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEnded",value:function(){var h=this.props,T=h.loop,x=h.player,k=h.actions,P=h.onEnded;T?(this.seek(0),this.play()):x.paused||this.pause(),k.handleEnd(this.getProperties()),P&&P.apply(void 0,arguments)}},{key:"handleWaiting",value:function(){var h=this.props,T=h.actions,x=h.onWaiting;T.handleWaiting(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeking",value:function(){var h=this.props,T=h.actions,x=h.onSeeking;T.handleSeeking(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeked",value:function(){var h=this.props,T=h.actions,x=h.onSeeked;T.handleSeeked(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleFullscreenChange",value:function(){}},{key:"handleSuspend",value:function(){var h=this.props,T=h.actions,x=h.onSuspend;T.handleSuspend(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleAbort",value:function(){var h=this.props,T=h.actions,x=h.onAbort;T.handleAbort(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEmptied",value:function(){var h=this.props,T=h.actions,x=h.onEmptied;T.handleEmptied(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleStalled",value:function(){var h=this.props,T=h.actions,x=h.onStalled;T.handleStalled(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedMetaData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedMetadata,k=h.startTime;k&&k>0&&(this.video.currentTime=k),T.handleLoadedMetaData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedData;T.handleLoadedData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleTimeUpdate",value:function(){var h=this.props,T=h.actions,x=h.onTimeUpdate;T.handleTimeUpdate(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleRateChange",value:function(){var h=this.props,T=h.actions,x=h.onRateChange;T.handleRateChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleVolumeChange",value:function(){var h=this.props,T=h.actions,x=h.onVolumeChange;T.handleVolumeChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleError",value:function(){var h=this.props,T=h.actions,x=h.onError;T.handleError(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleResize",value:function(){var h=this.props,T=h.actions,x=h.onResize;T.handleResize(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleKeypress",value:function(){}},{key:"renderChildren",value:function(){var h=this,T=(0,r.default)({},this.props,{video:this.video});return this.video?c.default.Children.toArray(this.props.children).filter(w.isVideoChild).map(function(x){var k;if(typeof x.type=="string"){if(x.type==="source"){k=(0,r.default)({},x.props);var P=k.onError;k.onError=function(){P&&P.apply(void 0,arguments),h.handleError.apply(h,arguments)}}}else k=T;return c.default.cloneElement(x,k)}):null}},{key:"render",value:function(){var h=this,T=this.props,x=T.loop,k=T.poster,P=T.preload,E=T.src,A=T.autoPlay,C=T.playsInline,N=T.muted,$=T.crossOrigin,F=T.videoId;return c.default.createElement("video",{className:(0,f.default)("video-react-video",this.props.className),id:F,crossOrigin:$,ref:function(U){h.video=U},muted:N,preload:P,loop:x,playsInline:C,autoPlay:A,poster:k,src:E,onLoadStart:this.handleLoadStart,onWaiting:this.handleWaiting,onCanPlay:this.handleCanPlay,onCanPlayThrough:this.handleCanPlayThrough,onPlaying:this.handlePlaying,onEnded:this.handleEnded,onSeeking:this.handleSeeking,onSeeked:this.handleSeeked,onPlay:this.handlePlay,onPause:this.handlePause,onProgress:this.handleProgress,onDurationChange:this.handleDurationChange,onError:this.handleError,onSuspend:this.handleSuspend,onAbort:this.handleAbort,onEmptied:this.handleEmptied,onStalled:this.handleStalled,onLoadedMetadata:this.handleLoadedMetaData,onLoadedData:this.handleLoadedData,onTimeUpdate:this.handleTimeUpdate,onRateChange:this.handleRateChange,onVolumeChange:this.handleVolumeChange,tabIndex:"-1"},this.renderChildren())}},{key:"playbackRate",get:function(){return this.video.playbackRate},set:function(h){this.video.playbackRate=h}},{key:"muted",get:function(){return this.video.muted},set:function(h){this.video.muted=h}},{key:"volume",get:function(){return this.video.volume},set:function(h){h>1&&(h=1),h<0&&(h=0),this.video.volume=h}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}}]),g}(c.Component);e.default=m,m.propTypes=v,m.displayName="Video"}($f)),$f}var Vf={},xw;function XE(){return xw||(xw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={manager:y.default.object,className:y.default.string},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.timer=null,b.manager.subscribeToOperationStateChange(p.handleStateChange.bind((0,l.default)(p))),p.state={hidden:!0,operation:{}},p}return(0,i.default)(m,[{key:"handleStateChange",value:function(g,p){var h=this;g.count!==p.count&&g.operation.source==="shortcut"&&(this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({hidden:!1,count:g.count,operation:g.operation}),this.timer=setTimeout(function(){h.setState({hidden:!0}),h.timer=null},500))}},{key:"render",value:function(){if(this.state.operation.source!=="shortcut")return null;var g=this.state.hidden?{display:"none"}:null;return _.default.createElement("div",{className:(0,c.default)({"video-react-bezel":!0,"video-react-bezel-animation":this.state.count%2===0,"video-react-bezel-animation-alt":this.state.count%2===1},this.props.className),style:g,role:"status","aria-label":this.state.operation.action},_.default.createElement("div",{className:(0,c.default)("video-react-bezel-icon","video-react-bezel-icon-".concat(this.state.operation.action))}))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="Bezel"}(Vf)),Vf}var Wf={},Wr={},kw;function Wc(){if(kw)return Wr;kw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.findElPosition=e,Wr.getPointerPosition=t,Wr.blurNode=n,Wr.focusNode=r,Wr.hasClass=i;function e(s){var a;if(s.getBoundingClientRect&&s.parentNode&&(a=s.getBoundingClientRect()),!a)return{left:0,top:0};var l=document,d=l.body,y=l.documentElement,_=y.clientLeft||d.clientLeft||0,c=window.pageXOffset||d.scrollLeft,f=a.left+c-_,w=y.clientTop||d.clientTop||0,v=window.pageYOffset||d.scrollTop,m=a.top+v-w;return{left:Math.round(f),top:Math.round(m)}}function t(s,a){var l={},d=e(s),y=s.offsetWidth,_=s.offsetHeight,c=d.top,f=d.left,w=a.pageY,v=a.pageX;return a.changedTouches&&(v=a.changedTouches[0].pageX,w=a.changedTouches[0].pageY),l.y=Math.max(0,Math.min(1,(c-w+_)/_)),l.x=Math.max(0,Math.min(1,(v-f)/y)),l}function n(s){s&&s.blur&&s.blur()}function r(s){s&&s.focus&&s.focus()}function i(s,a){for(var l=s.className.split(" "),d=0;d1&&(E=1),P.changeVolume(E,{action:"volume-up",source:"shortcut"})}},{keyCode:40,handle:function(k,P){var E=k.volume-.05;E<0&&(E=0);var A=E>0?"volume-down":"volume-off";P.changeVolume(E,{action:A,source:"shortcut"})}},{keyCode:190,shift:!0,handle:function(k,P){var E=k.playbackRate;E>=1.5?E=2:E>=1.25?E=1.5:E>=1?E=1.25:E>=.5?E=1:E>=.25?E=.5:E>=0&&(E=.25),P.changeRate(E,{action:"fast-forward",source:"shortcut"})}},{keyCode:188,shift:!0,handle:function(k,P){var E=k.playbackRate;E<=.5?E=.25:E<=1?E=.5:E<=1.25?E=1:E<=1.5?E=1.25:E<=2&&(E=1.5),P.changeRate(E,{action:"fast-rewind",source:"shortcut"})}}],T.shortcuts=(0,r.default)(T.defaultShortcuts),T.mergeShortcuts=T.mergeShortcuts.bind((0,d.default)(T)),T.handleKeyPress=T.handleKeyPress.bind((0,d.default)(T)),T.handleClick=T.handleClick.bind((0,d.default)(T)),T.handleDoubleClick=T.handleDoubleClick.bind((0,d.default)(T)),T}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.mergeShortcuts(),document.addEventListener("keydown",this.handleKeyPress),document.addEventListener("click",this.handleClick),document.addEventListener("dblclick",this.handleDoubleClick)}},{key:"componentDidUpdate",value:function(h){h.shortcuts!==this.props.shortcuts&&this.mergeShortcuts()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("click",this.handleClick),document.removeEventListener("dblclick",this.handleDoubleClick)}},{key:"mergeShortcuts",value:function(){var h=function(E){var A=E.keyCode,C=A===void 0?0:A,N=E.ctrl,$=N===void 0?!1:N,F=E.shift,z=F===void 0?!1:F,U=E.alt,H=U===void 0?!1:U;return"".concat(C,":").concat($,":").concat(z,":").concat(H)},T=this.defaultShortcuts.reduce(function(P,E){return Object.assign(P,(0,n.default)({},h(E),E))},{}),x=(this.props.shortcuts||[]).reduce(function(P,E){var A=E.keyCode,C=E.handle;return A&&typeof C=="function"?Object.assign(P,(0,n.default)({},h(E),E)):P},T),k=function(E){var A=0,C=["ctrl","shift","alt"];return C.forEach(function(N){E[N]&&A++}),A};this.shortcuts=Object.keys(x).map(function(P){return x[P]}).sort(function(P,E){return k(E)-k(P)})}},{key:"togglePlay",value:function(h,T){h.paused?T.play({action:"play",source:"shortcut"}):T.pause({action:"pause",source:"shortcut"})}},{key:"toggleFullscreen",value:function(h,T){T.toggleFullscreen(h)}},{key:"handleKeyPress",value:function(h){var T=this.props,x=T.player,k=T.actions;if(x.isActive&&!(document.activeElement&&((0,f.hasClass)(document.activeElement,"video-react-control")||(0,f.hasClass)(document.activeElement,"video-react-menu-button-active")||(0,f.hasClass)(document.activeElement,"video-react-big-play-button")))){var P=h.keyCode||h.which,E=h.ctrlKey||h.metaKey,A=h.shiftKey,C=h.altKey,N=this.shortcuts.filter(function($){return!(!$.keyCode||$.keyCode-P!==0||$.ctrl!==void 0&&$.ctrl!==E||$.shift!==void 0&&$.shift!==A||$.alt!==void 0&&$.alt!==C)})[0];N&&(N.handle(x,k),h.preventDefault())}}},{key:"canBeClicked",value:function(h,T){return!(!h.isActive||T.target.nodeName!=="VIDEO"||h.readyState!==4)}},{key:"handleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,P=T.clickable;!this.canBeClicked(x,h)||!P||this.togglePlay(x,k)}},{key:"handleDoubleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,P=T.dblclickable;!this.canBeClicked(x,h)||!P||this.toggleFullscreen(x,k)}},{key:"render",value:function(){return null}}]),g}(_.Component);e.default=m,m.propTypes=w,m.defaultProps=v,m.displayName="Shortcut"}(Wf)),Wf}var qf={},Zf={},Gf={exports:{}},Aw;function Ia(){return Aw||(Aw=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;ry&&(c=y);function w(h,T){var x=h/T||0;return"".concat((x>=1?1:x)*100,"%")}f.width=w(c,y);for(var v=[],m=0;m=1?1:N}},{key:"getNewTime",value:function(k){var P=this.props.player.duration,E=this.slider.calculateDistance(k),A=E*P;return A===P?A-.1:A}},{key:"handleMouseDown",value:function(){}},{key:"handleMouseUp",value:function(k){var P=this.props.actions,E=this.getNewTime(k);P.seek(E),P.handleEndSeeking(E)}},{key:"handleMouseMove",value:function(k){var P=this.props.actions,E=this.getNewTime(k);P.handleSeekingTime(E)}},{key:"stepForward",value:function(){var k=this.props.actions;k.forward(5)}},{key:"stepBack",value:function(){var k=this.props.actions;k.replay(5)}},{key:"render",value:function(){var k=this,P=this.props,E=P.player,A=E.currentTime,C=E.seekingTime,N=E.duration,$=E.buffered,F=P.mouseTime,z=C||A;return _.default.createElement(f.default,{ref:function(H){k.slider=H},label:"video progress bar",className:(0,c.default)("video-react-progress-holder",this.props.className),valuenow:(this.getPercent()*100).toFixed(2),valuetext:(0,b.formatTime)(z,N),onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,getPercent:this.getPercent,stepForward:this.stepForward,stepBack:this.stepBack},_.default.createElement(v.default,{buffered:$,currentTime:z,duration:N}),_.default.createElement(m.default,{duration:N,mouseTime:F}),_.default.createElement(w.default,{currentTime:z,duration:N}))}}]),T}(_.Component);e.default=p,p.propTypes=g,p.displayName="SeekBar"}(Yf)),Yf}var Ow;function rx(){return Ow||(Ow=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=t(Wc()),v=n(nx()),m={player:_.default.object,className:_.default.string},b=function(g){(0,y.default)(p,g);function p(h,T){var x;return(0,i.default)(this,p),x=(0,a.default)(this,(0,l.default)(p).call(this,h,T)),x.state={mouseTime:{time:null,position:0}},x.handleMouseMoveThrottle=x.handleMouseMove.bind((0,d.default)(x)),x}return(0,s.default)(p,[{key:"handleMouseMove",value:function(T){if(T.pageX){var x=this.props.player.duration,k=this.seekBar,P=w.getPointerPosition(k,T).x*x,E=T.pageX-w.findElPosition(k).left;this.setState({mouseTime:{time:P,position:E}})}}},{key:"render",value:function(){var T=this,x=this.props.className;return c.default.createElement("div",{onMouseMove:this.handleMouseMoveThrottle,className:(0,f.default)("video-react-progress-control video-react-control",x)},c.default.createElement(v.default,(0,r.default)({mouseTime:this.state.mouseTime,ref:function(P){T.seekBar=P}},this.props)))}}]),p}(c.Component);e.default=b,b.propTypes=m,b.displayName="ProgressControl"}(Zf)),Zf}var eh={},Mw;function ix(){return Mw||(Mw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.handleClick=p.handleClick.bind((0,l.default)(p)),p}return(0,i.default)(m,[{key:"handleClick",value:function(){var g=this.props,p=g.actions,h=g.player;h.paused?p.play():p.pause()}},{key:"render",value:function(){var g=this,p=this.props,h=p.player,T=p.className,x=h.paused?"Play":"Pause";return _.default.createElement("button",{ref:function(P){g.button=P},className:(0,c.default)(T,{"video-react-play-control":!0,"video-react-control":!0,"video-react-button":!0,"video-react-paused":h.paused,"video-react-playing":!h.paused}),type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},x))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="PlayToggle"}(eh)),eh}var th={},nh={},Dw;function ox(){return Dw||(Dw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c={actions:y.default.object,className:y.default.string,seconds:y.default.oneOf([5,10,30])},f={seconds:10},w=function(m){var b=function(g){(0,d.default)(p,g);function p(h,T){var x;return(0,r.default)(this,p),x=(0,s.default)(this,(0,a.default)(p).call(this,h,T)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x}return(0,i.default)(p,[{key:"handleClick",value:function(){var T=this.props,x=T.actions,k=T.seconds;m==="forward"?x.forward(k):x.replay(k)}},{key:"render",value:function(){var T=this,x=this.props,k=x.seconds,P=x.className,E=["video-react-control","video-react-button","video-react-icon"];return E.push("video-react-icon-".concat(m,"-").concat(k),"video-react-".concat(m,"-control")),P&&E.push(P),_.default.createElement("button",{ref:function(C){T.button=C},className:E.join(" "),type:"button",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"".concat(m," ").concat(k," seconds")))}}]),p}(_.Component);return b.propTypes=c,b.defaultProps=f,b};e.default=w}(nh)),nh}var $w;function sx(){return $w||($w=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ox()),r=(0,n.default)("forward");r.displayName="ForwardControl";var i=r;e.default=i}(th)),th}var rh={},Fw;function ax(){return Fw||(Fw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ox()),r=(0,n.default)("replay");r.displayName="ReplayControl";var i=r;e.default=i}(rh)),rh}var ih={},jw;function lx(){return jw||(jw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.handleClick=p.handleClick.bind((0,l.default)(p)),p}return(0,i.default)(m,[{key:"handleClick",value:function(){var g=this.props,p=g.player,h=g.actions;h.toggleFullscreen(p)}},{key:"render",value:function(){var g=this,p=this.props,h=p.player,T=p.className;return _.default.createElement("button",{className:(0,c.default)(T,{"video-react-icon-fullscreen-exit":h.isFullscreen,"video-react-icon-fullscreen":!h.isFullscreen},"video-react-fullscreen-control video-react-control video-react-button video-react-icon"),ref:function(k){g.button=k},type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Non-Fullscreen"))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="FullscreenToggle"}(ih)),ih}var oh={},zw;function ux(){return zw||(zw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s=pr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=f-c,m=(0,s.formatTime)(v);return r.default.createElement("div",{className:(0,i.default)("video-react-remaining-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-remaining-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Remaining Time "),"-".concat(m)))}l.propTypes=a,l.displayName="RemainingTimeDisplay";var d=l;e.default=d}(oh)),oh}var sh={},Bw;function cx(){return Bw||(Bw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s=pr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=(0,s.formatTime)(c,f);return r.default.createElement("div",{className:(0,i.default)("video-react-current-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-current-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Current Time "),v))}l.propTypes=a,l.displayName="CurrentTimeDisplay";var d=l;e.default=d}(sh)),sh}var ah={},Uw;function dx(){return Uw||(Uw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s=pr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player.duration,c=y.className,f=(0,s.formatTime)(_);return r.default.createElement("div",{className:(0,i.default)(c,"video-react-duration video-react-time-control video-react-control")},r.default.createElement("div",{className:"video-react-duration-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Duration Time "),f))}l.propTypes=a,l.displayName="DurationDisplay";var d=l;e.default=d}(ah)),ah}var lh={},Hw;function fx(){return Hw||(Hw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(te),i=t(Ze()),s={separator:n.default.string,className:n.default.string};function a(l){var d=l.separator,y=l.className,_=d||"/";return r.default.createElement("div",{className:(0,i.default)("video-react-time-control video-react-time-divider",y),dir:"ltr"},r.default.createElement("div",null,r.default.createElement("span",null,_)))}a.propTypes=s,a.displayName="TimeDivider"}(lh)),lh}var uh={},ch={},dh={},Vw;function hx(){return Vw||(Vw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(mi()),s=n(it()),a=n(ot()),l=n(gt()),d=n(vt()),y=n(mt()),_=n(yt()),c=n(De()),f=t(te),w=n(Ze()),v={tagName:c.default.string,onClick:c.default.func.isRequired,onFocus:c.default.func,onBlur:c.default.func,className:c.default.string},m={tagName:"div"},b=function(g){(0,_.default)(p,g);function p(h,T){var x;return(0,s.default)(this,p),x=(0,l.default)(this,(0,d.default)(p).call(this,h,T)),x.handleClick=x.handleClick.bind((0,y.default)(x)),x.handleFocus=x.handleFocus.bind((0,y.default)(x)),x.handleBlur=x.handleBlur.bind((0,y.default)(x)),x.handleKeypress=x.handleKeypress.bind((0,y.default)(x)),x}return(0,a.default)(p,[{key:"componentWillUnmount",value:function(T){this.handleBlur(T)}},{key:"handleKeypress",value:function(T){(T.which===32||T.which===13)&&(T.preventDefault(),this.handleClick(T))}},{key:"handleClick",value:function(T){var x=this.props.onClick;x(T)}},{key:"handleFocus",value:function(T){document.addEventListener("keydown",this.handleKeypress),this.props.onFocus&&this.props.onFocus(T)}},{key:"handleBlur",value:function(T){document.removeEventListener("keydown",this.handleKeypress),this.props.onBlur&&this.props.onBlur(T)}},{key:"render",value:function(){var T=this.props.tagName,x=(0,i.default)({},this.props);return delete x.tagName,delete x.className,f.default.createElement(T,(0,r.default)({className:(0,w.default)(this.props.className),role:"button",tabIndex:"0",onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},x))}}]),p}(f.Component);e.default=b,b.propTypes=v,b.defaultProps=m,b.displayName="ClickableComponent"}(dh)),dh}var fh={},Ww;function Dj(){return Ww||(Ww=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c={player:y.default.object,children:y.default.any},f=function(w){(0,d.default)(v,w);function v(m,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,m,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){var b=this.props.children;return _.default.createElement("div",{className:"video-react-menu",onClick:this.handleClick},_.default.createElement("div",{className:"video-react-menu-content"},b))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Popup"}(fh)),fh}var qw;function $j(){return qw||(qw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=t(Ia()),r=t(mi()),i=t(De()),s=t(te),a=t(Ze()),l=t(hx()),d=t(Dj()),y={inline:i.default.bool,onClick:i.default.func.isRequired,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string},_={inline:!0};function c(f){var w=f.inline,v=f.className,m=(0,r.default)({},f);return delete m.children,delete m.inline,delete m.className,s.default.createElement(l.default,(0,n.default)({className:(0,a.default)(v,{"video-react-menu-button-inline":!!w,"video-react-menu-button-popup":!w},"video-react-control video-react-button video-react-menu-button")},m),s.default.createElement(d.default,f))}c.propTypes=y,c.defaultProps=_,c.displayName="PopupButton"}(ch)),ch}var hh={},ph={},Zw;function Fj(){return Zw||(Zw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s={percentage:n.default.string,vertical:n.default.bool,className:n.default.string},a={percentage:"100%",vertical:!1};function l(y){var _=y.percentage,c=y.vertical,f=y.className,w={};return c?w.height=_:w.width=_,r.default.createElement("div",{className:(0,i.default)(f,"video-react-volume-level"),style:w},r.default.createElement("span",{className:"video-react-control-text"}))}l.propTypes=s,l.defaultProps=a,l.displayName="VolumeLevel";var d=l;e.default=d}(ph)),ph}var Gw;function jj(){return Gw||(Gw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=n(lv()),v=n(Fj()),m={actions:_.default.object,player:_.default.object,className:_.default.string,onFocus:_.default.func,onBlur:_.default.func},b=function(p){(0,y.default)(h,p);function h(T,x){var k;return(0,i.default)(this,h),k=(0,a.default)(this,(0,l.default)(h).call(this,T,x)),k.state={percentage:"0%"},k.handleMouseMove=k.handleMouseMove.bind((0,d.default)(k)),k.handlePercentageChange=k.handlePercentageChange.bind((0,d.default)(k)),k.checkMuted=k.checkMuted.bind((0,d.default)(k)),k.getPercent=k.getPercent.bind((0,d.default)(k)),k.stepForward=k.stepForward.bind((0,d.default)(k)),k.stepBack=k.stepBack.bind((0,d.default)(k)),k.handleFocus=k.handleFocus.bind((0,d.default)(k)),k.handleBlur=k.handleBlur.bind((0,d.default)(k)),k.handleClick=k.handleClick.bind((0,d.default)(k)),k}return(0,s.default)(h,[{key:"componentDidMount",value:function(){}},{key:"getPercent",value:function(){var x=this.props.player;return x.muted?0:x.volume}},{key:"checkMuted",value:function(){var x=this.props,k=x.player,P=x.actions;k.muted&&P.mute(!1)}},{key:"handleMouseMove",value:function(x){var k=this.props.actions;this.checkMuted();var P=this.slider.calculateDistance(x);k.changeVolume(P)}},{key:"stepForward",value:function(){var x=this.props,k=x.player,P=x.actions;this.checkMuted(),P.changeVolume(k.volume+.1)}},{key:"stepBack",value:function(){var x=this.props,k=x.player,P=x.actions;this.checkMuted(),P.changeVolume(k.volume-.1)}},{key:"handleFocus",value:function(x){this.props.onFocus&&this.props.onFocus(x)}},{key:"handleBlur",value:function(x){this.props.onBlur&&this.props.onBlur(x)}},{key:"handlePercentageChange",value:function(x){x!==this.state.percentage&&this.setState({percentage:x})}},{key:"handleClick",value:function(x){x.stopPropagation()}},{key:"render",value:function(){var x=this,k=this.props,P=k.player,E=k.className,A=(P.volume*100).toFixed(2);return c.default.createElement(w.default,(0,r.default)({ref:function(N){x.slider=N},label:"volume level",valuenow:A,valuetext:"".concat(A,"%"),onMouseMove:this.handleMouseMove,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,sliderActive:this.handleFocus,sliderInactive:this.handleBlur,getPercent:this.getPercent,onPercentageChange:this.handlePercentageChange,stepForward:this.stepForward,stepBack:this.stepBack},this.props,{className:(0,f.default)(E,"video-react-volume-bar video-react-slider-bar")}),c.default.createElement(v.default,this.props))}}]),h}(c.Component);b.propTypes=m,b.displayName="VolumeBar";var g=b;e.default=g}(hh)),hh}var Yw;function px(){return Yw||(Yw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=n($j()),v=n(jj()),m={player:_.default.object,actions:_.default.object,vertical:_.default.bool,className:_.default.string,alwaysShowVolume:_.default.bool},b={vertical:!1},g=function(h){(0,y.default)(T,h);function T(x,k){var P;return(0,i.default)(this,T),P=(0,a.default)(this,(0,l.default)(T).call(this,x,k)),P.state={active:!1},P.handleClick=P.handleClick.bind((0,d.default)(P)),P.handleFocus=P.handleFocus.bind((0,d.default)(P)),P.handleBlur=P.handleBlur.bind((0,d.default)(P)),P}return(0,s.default)(T,[{key:"handleClick",value:function(){var k=this.props,P=k.player,E=k.actions;E.mute(!P.muted)}},{key:"handleFocus",value:function(){this.setState({active:!0})}},{key:"handleBlur",value:function(){this.setState({active:!1})}},{key:"render",value:function(){var k=this.props,P=k.vertical,E=k.player,A=k.className,C=!P,N=this.volumeLevel;return c.default.createElement(w.default,{className:(0,f.default)(A,{"video-react-volume-menu-button-vertical":P,"video-react-volume-menu-button-horizontal":!P,"video-react-vol-muted":E.muted,"video-react-vol-0":N===0&&!E.muted,"video-react-vol-1":N===1,"video-react-vol-2":N===2,"video-react-vol-3":N===3,"video-react-slider-active":this.props.alwaysShowVolume||this.state.active,"video-react-lock-showing":this.props.alwaysShowVolume||this.state.active},"video-react-volume-menu-button"),onClick:this.handleClick,inline:C},c.default.createElement(v.default,(0,r.default)({onFocus:this.handleFocus,onBlur:this.handleBlur},this.props)))}},{key:"volumeLevel",get:function(){var k=this.props.player,P=k.volume,E=k.muted,A=3;return P===0||E?A=0:P<.33?A=1:P<.67&&(A=2),A}}]),T}(c.Component);g.propTypes=m,g.defaultProps=b,g.displayName="VolumeMenuButton";var p=g;e.default=p}(uh)),uh}var mh={},gh={},vh={},Kw;function zj(){return Kw||(Kw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c={children:y.default.any},f=function(w){(0,d.default)(v,w);function v(m,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,m,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){return _.default.createElement("div",{className:"video-react-menu video-react-lock-showing",role:"presentation",onClick:this.handleClick},_.default.createElement("ul",{className:"video-react-menu-content"},this.props.children))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Menu"}(vh)),vh}var yh={},Xw;function Bj(){return Xw||(Xw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={item:y.default.object,index:y.default.number,activateIndex:y.default.number,onSelectItem:y.default.func},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.handleClick=p.handleClick.bind((0,l.default)(p)),p}return(0,i.default)(m,[{key:"handleClick",value:function(){var g=this.props,p=g.index,h=g.onSelectItem;h(p)}},{key:"render",value:function(){var g=this.props,p=g.item,h=g.index,T=g.activateIndex;return _.default.createElement("li",{className:(0,c.default)({"video-react-menu-item":!0,"video-react-selected":h===T}),role:"menuitem",onClick:this.handleClick},p.label,_.default.createElement("span",{className:"video-react-control-text"}))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="MenuItem"}(yh)),yh}var Qw;function uv(){return Qw||(Qw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f=n(zj()),w=n(Bj()),v=n(hx()),m={inline:y.default.bool,items:y.default.array,className:y.default.string,onSelectItem:y.default.func,children:y.default.any,selectedIndex:y.default.number},b=function(g){(0,d.default)(p,g);function p(h,T){var x;return(0,r.default)(this,p),x=(0,s.default)(this,(0,a.default)(p).call(this,h,T)),x.state={active:!1,activateIndex:h.selectedIndex||0},x.commitSelection=x.commitSelection.bind((0,l.default)(x)),x.activateMenuItem=x.activateMenuItem.bind((0,l.default)(x)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x.renderMenu=x.renderMenu.bind((0,l.default)(x)),x.handleFocus=x.handleFocus.bind((0,l.default)(x)),x.handleBlur=x.handleBlur.bind((0,l.default)(x)),x.handleUpArrow=x.handleUpArrow.bind((0,l.default)(x)),x.handleDownArrow=x.handleDownArrow.bind((0,l.default)(x)),x.handleEscape=x.handleEscape.bind((0,l.default)(x)),x.handleReturn=x.handleReturn.bind((0,l.default)(x)),x.handleTab=x.handleTab.bind((0,l.default)(x)),x.handleKeyPress=x.handleKeyPress.bind((0,l.default)(x)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x.handleIndexChange=x.handleIndexChange.bind((0,l.default)(x)),x}return(0,i.default)(p,[{key:"componentDidUpdate",value:function(T){T.selectedIndex!==this.props.selectedIndex&&this.activateMenuItem(this.props.selectedIndex)}},{key:"commitSelection",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"activateMenuItem",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"handleIndexChange",value:function(T){var x=this.props.onSelectItem;x(T)}},{key:"handleClick",value:function(){this.setState(function(T){return{active:!T.active}})}},{key:"handleFocus",value:function(){document.addEventListener("keydown",this.handleKeyPress)}},{key:"handleBlur",value:function(){this.setState({active:!1}),document.removeEventListener("keydown",this.handleKeyPress)}},{key:"handleUpArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex-1;k<0&&(k=x.length?x.length-1:0),this.activateMenuItem(k)}}},{key:"handleDownArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex+1;k>=x.length&&(k=0),this.activateMenuItem(k)}}},{key:"handleTab",value:function(T){this.state.active&&(T.preventDefault(),this.commitSelection(this.state.activateIndex))}},{key:"handleReturn",value:function(T){T.preventDefault(),this.state.active?this.commitSelection(this.state.activateIndex):this.setState({active:!0})}},{key:"handleEscape",value:function(){this.setState({active:!1,activateIndex:0})}},{key:"handleKeyPress",value:function(T){T.which===27?this.handleEscape(T):T.which===9?this.handleTab(T):T.which===13?this.handleReturn(T):T.which===38?this.handleUpArrow(T):T.which===40&&this.handleDownArrow(T)}},{key:"handleSelectItem",value:function(T){this.commitSelection(T)}},{key:"renderMenu",value:function(){var T=this;if(!this.state.active)return null;var x=this.props.items;return _.default.createElement(f.default,null,x.map(function(k,P){return _.default.createElement(w.default,{item:k,index:P,onSelectItem:T.handleSelectItem,activateIndex:T.state.activateIndex,key:"item-".concat(P++)})}))}},{key:"render",value:function(){var T=this,x=this.props,k=x.inline,P=x.className;return _.default.createElement(v.default,{className:(0,c.default)(P,{"video-react-menu-button-inline":!!k,"video-react-menu-button-popup":!k,"video-react-menu-button-active":this.state.active},"video-react-control video-react-button video-react-menu-button"),role:"button",tabIndex:"0",ref:function(A){T.menuButton=A},onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},this.props.children,this.renderMenu())}}]),p}(_.Component);e.default=b,b.propTypes=m,b.displayName="MenuButton"}(gh)),gh}var Jw;function cv(){return Jw||(Jw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f=n(uv()),w={player:y.default.object,actions:y.default.object,rates:y.default.array,className:y.default.string},v={rates:[2,1.5,1.25,1,.5,.25]},m=function(g){(0,d.default)(p,g);function p(h,T){var x;return(0,r.default)(this,p),x=(0,s.default)(this,(0,a.default)(p).call(this,h,T)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x}return(0,i.default)(p,[{key:"handleSelectItem",value:function(T){var x=this.props,k=x.rates,P=x.actions;T>=0&&Tt.text()).then(t=>{if(t.length<=0)throw new Error;this.setState({md:_e(t)})}).catch(()=>{this.setState({error:!0})})}render(){return this.state.md&&!this.state.error?M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:this.state.md}}):this.state.error?this.props.unloader||M("div",{children:"Error: couldn't load source"}):this.props.loader}}vx.propTypes={loader:Sr.func,unloader:Sr.func.isRequired,path:Sr.string.isRequired};const sb=({small:e})=>re("div",{className:`spinner ${e?"small":""}`,children:[M("div",{className:"double-bounce-overlay"}),M("div",{className:"double-bounce"})]}),ab=({failedUrls:e})=>M("div",{className:"no-source-container",children:re("div",{className:"no-source-row",children:[M("p",{children:M("i",{className:"material-icons no-source-icon",children:"error"})}),M("p",{children:"No media found, as the original media has not yet been uploaded to the platform."})]})}),Jj=({media:e,viewIdx:t,translations:n,switchLanguage:r,langIdx:i})=>{const s=document.querySelector(".source-media-gallery"),a=s?s.getBoundingClientRect().width:0;function l(d){const{path:y,type:_,poster:c}=d;switch(_){case"Image":return M("div",{className:"source-image-container",children:M(Qj,{className:"source-image",src:y,loader:M("div",{className:"source-image-loader",children:M(sb,{})}),unloader:M(ab,{failedUrls:[y]}),onClick:()=>window.open(y,"_blank")})});case"Video":return re("div",{className:"media-player",children:[M("div",{className:"banner-trans right-overlay",children:n?n.map((f,w)=>i!==w+1?M("div",{className:"trans-button",onClick:()=>r(w+1),children:f.code}):M("div",{className:"trans-button",onClick:()=>r(0),children:"EN"})):null}),M(ov.Player,{poster:c,className:"source-video",playsInline:!0,src:y})]});case"Text":return M("div",{className:"source-text-container",children:M(vx,{path:y,loader:M(sb,{}),unloader:()=>this.renderError()})});case"Document":return M("iframe",{title:y,className:"source-document",src:y});default:return M(ab,{failedUrls:[`Application does not support extension: ${y.split(".")[1]}`]})}}return M("div",{className:"source-media-gallery",style:{transform:`translate(${t*-a}px)`},children:e.map(d=>l(d))})},e4=({viewIdx:e,paths:t,onShiftHandler:n})=>{const r=e!==0?M("div",{className:"back",onClick:()=>n(-1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_left"})})}):null,i=en(1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_right"})})}):null;return t.length>1?re("div",{className:"media-gallery-controls",children:[r,i]}):M("div",{className:"media-gallery-controls"})};class yx extends te.Component{constructor(){super(),this.state={mediaIdx:0,langIdx:0},this.onShiftGallery=this.onShiftGallery.bind(this)}getTypeCounts(t){return t.reduce((n,r)=>(n[r.type]+=1,n),{Image:0,Video:0,Text:0})}onShiftGallery(t){this.state.mediaIdx===0&&t===-1||this.state.mediaIdx===this.props.source.paths.length-1&&t===1||this.setState({mediaIdx:this.state.mediaIdx+t})}switchLanguage(t){this.setState({langIdx:t})}renderContent(t){const{url:n,title:r,paths:i,date:s,type:a,poster:l,description:d}=t,y=r.substring(0,100);return re(Ln,{children:[re("div",{className:"mo-banner",children:[M("div",{className:"mo-banner-close",onClick:this.props.onCancel,children:M("i",{className:"material-icons",children:"close"})}),M("h3",{className:"mo-banner-content",children:y})]}),M("div",{className:"mo-container",onClick:_=>_.stopPropagation(),children:M("div",{className:"mo-media-container",children:M(Jj,{switchLanguage:_=>this.switchLanguage(_),translations:this.props.translations,langIdx:this.state.langIdx,media:i.map(_=>hD(_,l)),viewIdx:this.state.mediaIdx})})}),re("div",{className:"mo-footer",children:[M(e4,{paths:i,viewIdx:this.state.mediaIdx,onShiftHandler:this.onShiftGallery}),re("div",{className:"mo-meta-container",children:[d?M("div",{className:"mo-box-desc",children:M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(d)}})}):null,a||s||n?re("div",{className:"mo-box",children:[re("div",{children:[a?M("h4",{children:"Evidence type"}):null,a?re("p",{children:[M("i",{className:"material-icons left",children:"perm_media"}),a]}):null]}),re("div",{children:[s?M("h4",{children:"Date Published"}):null,s?re("p",{children:[M("i",{className:"material-icons left",children:"today"}),s]}):null]}),re("div",{children:[n?M("h4",{children:"Link"}):null,n?re("span",{children:[M("i",{className:"material-icons left",children:"link"}),M("a",{href:n,target:"_blank",rel:"noreferrer",children:"Link to original URL"})]}):null]})]}):null]})]})]})}renderIntlContent(){const{langIdx:t}=this.state,{translations:n,source:r}=this.props;let i=null;return n&&n.length&&t>0&&(i=n[t-1]),i&&(i={...i,poster:r.poster,paths:i.file?[i.file]:i.paths}),this.renderContent(t===0?r:i)}render(){return typeof this.props.source!="object"?this.renderError():M("div",{className:`mo-overlay ${this.props.opaque?"opaque":""}`,children:this.renderIntlContent()})}}const t4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEUAAAD////8/PwEBAT5+fltbW3w8PAICAj19fXS0tKlpaUQEBB5eXmioqL09PTGxsaMjIzd3d3q6uo3NzfAwMB/f3/k5ORkZGQrKytNTU0fHx9VVVWPj4+4uLhbW1vR0dGXl5cnJydxcXGwsLA+Pj5GRkYZGRkwMDBPT09YWFiFhYVwONfZAAAHtklEQVR4nO2diXbaOhCGtWEwuw2YhABhCdDy/g94NbItCULaNIhjMXe+tpykp9XRnxlJo2UkxgiCIAiCIAiCIAiCIAiCIAiCIAhkSAmfve1k24Mv2uX3mNCCjrNpViR5Np31UEpsDzqcC4Dz4aDH0Cmc51xLM3+AvKUl4hEp22ynjPEsQu0YIoWMrSv3tHSUmGNy1G2ihP7lKdQmTV4YDoVS++iK++pqVmgUstfhhYfWTbHzq+m6hUHbaXDThIJ3m65bICTLbugDsqarForjLQvC6K8WTVctCLoZfqnw0HTlgiDZ241uppT41nTlgiDZr68UKiSdKZvc9lI9XEyarlooki/60qTpioVBj/jTLxROm65bGHTQ1ufiRlAjeL/puoVBxzTt7GZQk7WbrlsgtJvO9Vzis8I5ksjbWLHLr+aH+usBGoGGkVCeGXU4I0YMk0ItZXVlwyn8LR6Juj9l/cTzUHVmqFaiAC3mnJY9qkrPTdfmERh7TeazcX+NJla7wvdJXO5ZYQTCh0TVhxIEQRAEQRAEQYTGmx8iW76ouFyVwajQnMlw3zRXj8ch2TxLK5ZNV+ZBtOxqKZZDGNeQwueHFD4/pPD5qRUKvmm6Kg/C2RDniC/ZzCocN12ZhyDZ0nopVhuOkdsQjgrX7JquyoPoWoWtpqvyIEa2HeI4OfsJmVmFp6br8hgWuVXYdFUegmQHjlshYzvb0WQ412lsR4MnHeiKiTsLvcSnENZKl/YUrXjDqJAdc3s2MenhU9iWrOvSD1fITn2Z014miRRrVGqOsm3taC940Wu6SoEBG7bfbRK34OgOl0KTmzqBAk0OQkm5pzblVSOEz3nTdQpLJdAaUKCLZ0Dg3muDIsO2dwhpCH6+TOeAaSw0bVD3otZDlRLrpisVFi1wkblOVMel6HoZts1srCYUZOMhclHTi04KLlwvo2aYehnTBg91qFZevINsCVG22VvHBduCJ8gmhVrMeuhnqxWv6Fx03nFdjOAZrlwnmC71rf2UUvz92HSdwqLb4FIoZ0O+R5bLpcVstC47EPINKoFmMrGsY22hexuFbDtUGgt6gUwHVyBTuajnoR09DLbxzOolLBsOeBWq6dkgz16arlNYLpe2tSXTBcNjP0C3t5mw813Fpz0mcSlss7lwwwSc7cJ0h6cJ1d6ch3ZgXRSPPFaGaie7+6J9dYxqnAe0mlTYUE1s0GVVmMsD3TDRxZc3It3RQwXrvrjaoMHtYgtY923jU+gu9BKdF3QuanxU2VWnPjoXBXvl5aoMfE6RhWoAnB1VVUcq8i1ChWyRq9qGZmUbm5cydr7oRxHSs/foCmy7LxUtuwnKi6brEh4Iud2hPD2jwNcG9ZwisTZMjvgUSkgVsSvc2A4iAFrhSlgb7rBNCgHJhvVIwXNka2sGyT7cUPEepMjZoKL7GqS8O5HecM83QYqsz2/wWO7h3TuFv4MU6FJPIlFoR0PR+QhZoIhGoTuQkIXZCY1NYdvd8xymo2Epr48yxhHkTlzINgpTYsarqSaP45TYwSlchSmxCgL1RxxJbmuncBCkwJ6yB27jCCBcijbfBCnwo1rUEkLFcei9H1ShlHa2qYPA+8sLQXCFS163w0B9872EVcj8teV9kPLuxlMYoKeR7OiyaSM5qOL1NEF+5gcXQYQJc+/GGy2CjPjWJ6LJpnUjvkhDlOeWtWJZel1YgSLEFP+U25XJMAFEALxHDwLMyfsuASWaR0xS1xBn95fmnDSP5FSq9Of40zuf5ZDsw+5hmcJiwFunUSJf3LWaKCGb1u5DtqJZmfS6GqjVHSVJ1ha8VlgsYrGhZIVTeFcWs3lUSNX7kJuIznMM3Kr+8J5rS6Qfz6iYLkBZey/h3ncVm7eJFWi9IBCZl0R5z6R17PYheVwveLqaKfMg3k/aj/4/r4lLF97H0wiBFxtpmQyun54qtWtsQgwncSlkGzdgqPynlbMp30qJQTRjoUGynrszQfH0Z266rx1UF5KyiIYKZobEPi93Sc3nP08TQUzXDjnCPMEak0A44M1SYUcMBRK/72TlrQQXKd/x3ckHCaMdd0hfSzx93wbwD3up/0BihA8HghW8EUNbM//+EgtkYya+wIJFeTBOQkjpv+JYxiR/cVYz11qsXCQDCwUxhWseuq5TF57CF/m49w2FrDceXjz9mEexd3+DtmTH1CWtwRUKvBj/dd3mdM7czwWIOCNamgN8Lj41f5LV7z/V97D3nnsW8Du6WOaaEfemGaWzDkfnm7v7vV238GxnXl/lgbbJHwVkcQ1c8mHtrdC7pvvBef7rMDm9nE4fr+vZZlVwfume8E0k+xRfIiEDoZVcGkaU6erwteoME82wo8pvBb9QyJN+fOPgNdBzfow4t6q+B/wYuBg9Sc6+1tjPwVW/r1BAwJbv4jegoTzEvky+L9D4ajJ7mkw3WWrcnrO/a7Nk5wV7Egt6HFujBO5TMBe3iE8mNYOfaavDUSuO8wj/iHnf+LwyvaYSn7udOj1jNHuS/uUa+7rTejMtrtVVDEeD+cW/fTK8Wi9+9zer9zQtijwZJkWRvo/25/mT2u5P9Lbbl8nktFjEOPm7F3m95/asnvlHSk31y9yfNBMEQRAEQRAEQRAEQRAEQRAE8b/nP3XqQCdLzBvzAAAAAElFTkSuQmCC",Th=-2;class n4 extends te.Component{constructor(t){super(t),this.state={video:Th,featureLang:0}}getVideo(t,n){return t=0?this.props.cover.videos[t-n]:null}onVideoClickHandler(t){const n=this.props.cover.headerVideos?this.props.cover.headerVideos.length:0;return()=>{this.setState({video:t+n})}}renderFeature(){const{featureVideo:t}=this.props.cover,{featureLang:n}=this.state,{translations:r}=t,i=n===0?t:{...r[n-1],poster:t.poster};return re("div",{children:[M("div",{className:"banner-trans right-overlay",children:r&&r.map((s,a)=>{const l=a+1;return n!==l?M("div",{onClick:()=>this.setState({featureLang:l}),className:"trans-button",children:s.code},s.code):M("div",{onClick:()=>this.setState({featureLang:0}),className:"trans-button",children:"ENG"},"ENG")})}),M(ov.Player,{className:"source-video",poster:i.poster,playsInline:!0,src:i.file})]})}renderHeaderVideos(){const{headerVideos:t}=this.props.cover;return M("div",{className:"row",children:t.slice(0,2).map((n,r)=>M("div",{className:"cell plain",onClick:()=>this.setState({video:r}),children:n.buttonTitle},r))})}renderButton(t,n){return M("div",{className:"row",children:M("a",{className:`cell ${n?"yellow":"plain"}`,href:t.href,children:t.title})})}renderMediaOverlay(){const t=this.getVideo(this.state.video,this.props.cover.headerVideos?this.props.cover.headerVideos.length:0);return M(yx,{opaque:!0,source:{title:t.title,desc:t.desc,paths:[t.file],poster:t.poster},translations:t.translations,onCancel:()=>this.setState({video:Th})})}render(){if(!this.props.cover)return re("div",{className:"default-cover-container",children:["You haven't specified any cover props. Put them in the values that overwrite the store in ",M("code",{children:"app.cover"})]});const{videos:t,footerButton:n}=this.props.cover,{showing:r}=this.props;return re("div",{className:"default-cover-container",children:[M("div",{className:r?"cover-header":"cover-header minimized",children:M("a",{className:"cover-logo-container",href:"https://bellingcat.com",children:M("img",{className:"cover-logo",src:t4,alt:"Bellingcat logo"})})}),re("div",{className:"cover-content",children:[this.props.cover.bgVideo?M("div",{className:`fullscreen-bg ${this.props.showing?"":"hidden"}`,children:M("video",{loop:!0,muted:!0,autoPlay:!0,preload:"auto",className:"fullscreen-bg__video",children:M("source",{src:this.props.cover.bgVideo,type:"video/mp4"})})}):null,M("h2",{dangerouslySetInnerHTML:{__html:this.props.cover.title}}),this.props.cover.subtitle?M("h3",{style:{marginTop:0},children:this.props.cover.subtitle}):null,this.props.cover.subsubtitle?M("h5",{children:this.props.cover.subsubtitle}):null,this.props.cover.featureVideo?this.renderFeature():null,re("div",{className:"hero thin",children:[this.props.cover.headerVideos?this.renderHeaderVideos():null,this.props.cover.headerButton?this.renderButton(this.props.cover.headerButton):null,M("div",{className:"row",children:M("div",{className:"cell yellow",onClick:this.props.showAppHandler,children:this.props.cover.exploreButton})})]}),Array.isArray(this.props.cover.description)?this.props.cover.description.map((i,s)=>M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(i)}},s)):M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(this.props.cover.description)}}),t?re("div",{className:"hero",children:[M("div",{className:"row",children:t&&t.slice(0,2).map((i,s)=>re("div",{className:"cell small",onClick:this.onVideoClickHandler(s),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))}),M("div",{className:"row",children:t.length>2&&this.props.cover.videos.slice(2,4).map((i,s)=>re("div",{className:"cell small",onClick:this.onVideoClickHandler(s+2),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))})]}):null,n?M("div",{className:"hero",children:M("div",{className:"row",children:this.renderButton(n)})}):null]}),this.state.video!==Th?this.renderMediaOverlay():null]})}}function r4(e){return{cover:e.app.cover}}const i4=pi(r4)(n4),o4=({showing:e,children:t})=>M("div",{className:`cover-container ${e?"showing":""}`,children:t}),_x=({isLoading:e,language:t})=>{let n="loading-overlay";return n+=e?"":" hidden",M("div",{id:"loading-overlay",className:n,children:re("div",{className:"loading-wrapper",children:[M("span",{id:"loading-text",className:"text",children:ze[t].loading}),re("div",{className:"spinner",children:[M("div",{className:"double-bounce1"}),M("div",{className:"double-bounce2"})]})]})})},s4=({title:e,from:t,to:n,onClick:r,hideInfo:i,resetTest:s,resetClick:a})=>{const l=t&&Lp(t),d=n&&Lp(n);return re("div",{className:"timeline-header",children:[M("div",{className:"timeline-toggle",onClick:()=>r(),children:M("p",{children:M("i",{className:"arrow-down"})})}),re("div",{className:`timeline-info ${i?"hidden":""}`,children:[M("p",{dangerouslySetInnerHTML:{__html:e}}),re("p",{children:[l," - ",d,M("small",{className:"reset-button",onClick:()=>a(),children:M("a",{className:"cell",children:s})})]}),re("div",{style:{fontWeight:"400",textAlign:"center",marginTop:"5px"},children:[M("i",{className:"material-icons",style:{color:"#FFA726",fontSize:"18px",verticalAlign:"middle"},children:"warning"})," No verified incidents are being added after Aug 2025."]})]})]})},a4=15;yD();class l4 extends te.Component{constructor(){super(),this.xAxis0Ref=te.createRef(),this.xAxis1Ref=te.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){let t,n;this.props.extent>5256e3?(t="%Y",n=""):(this.props.extent>43200,n="%d %b",t="");let{marginTop:r}=this.props.dims;this.props.scaleX&&(this.x0=$_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r+30).tickSize(100-a4-r).tickFormat(Iu(t)),this.x1=$_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r).tickSize(0).tickFormat(Iu(n)),this.state.isInitialized||this.setState({isInitialized:!0})),this.state.isInitialized&&(Ui(this.xAxis0Ref.current).transition().duration(this.props.transitionDuration).call(this.x0),Ui(this.xAxis1Ref.current).transition().duration(this.props.transitionDuration).call(this.x1))}render(){return re(Ln,{children:[M("g",{ref:this.xAxis0Ref,transform:"translate(0, 24)",clipPath:"url(#clip)",className:"axis xAxis"}),M("g",{ref:this.xAxis1Ref,transform:`translate(0, ${this.props.dims.marginTop})`,clipPath:"url(#clip)",className:"axis xAxis"})]})}}const u4=({dims:e})=>M("clipPath",{id:"clip",children:M("rect",{x:e.marginLeft,y:"0",width:Math.max(0,e.width-e.marginLeft*2),height:e.contentHeight})}),lb=({dims:e,onMoveTime:t,backward:n})=>n===!0?M("div",{className:"timeline-handle",onClick:()=>t("backwards"),children:M("span",{className:"timeline-handle__triangle"})}):M("div",{className:"timeline-handle right",onClick:()=>t("forward"),children:M("span",{className:"timeline-handle__triangle"})}),c4=[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}];function d4(e,t,n){return e>=n&&t>=n?!0:e===t}const f4=({extent:e,zoomLevels:t,dims:n,onApplyZoom:r})=>{function i(s,a){const l=t.reduce((y,_)=>y.duration<_.duration?_:y),d=d4(s.duration,e,l.duration);return M("div",{className:`zoom-level-button ${d?"active":""}`,x:"60",y:a*15+20,onClick:()=>r(s),children:s.label},a)}return t.length===0&&(t=c4),M("div",{className:"zoom-controls",children:t.map((s,a)=>i(s,a))})},h4=({styles:e,eventRadius:t,getEventX:n,getEventY:r,categories:i,transitionDuration:s,selected:a,dims:l,features:d})=>{function y(_,c){function f(g){return M("circle",{className:"timeline-marker",cx:0,cy:0,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeLinejoin:"round",strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px, ${g+40}px)`,WebkitTransition:`transform ${s/1e3}s ease`,MozTransition:"none",opacity:1},r:t*2},nn(c))}function w(){return M("rect",{className:"timeline-marker",x:0,y:l.marginTop,width:t/1.5,height:l.contentHeight-55,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px)`,opacity:.7}})}const v=La(c.latitude)&&Ra(c.longitude)||d.GRAPH_NONLOCATED&&c.projectOffset!==-1,m=zS(c,i).map(g=>r({...c,category:g}));function b(g){switch(c.shape){case"circle":case Tr.DIAMOND:case Tr.STAR:_.push(f(g));break;case Tr.BAR:_.push(w());break;default:return v?_.push(f(g)):_.push(w())}}return m.length>0?m.forEach(b):b(r(c)),_}return M("g",{clipPath:"url(#clip)",children:a.reduce(y,[])})},p4=({highlights:e,events:t,x:n,y:r,width:i,height:s,onSelect:a,styleProps:l,extraRender:d})=>{if(e.length===0)return M("rect",{onClick:a,className:"event",x:n,y:r,style:l,width:i,height:s});const y=s/e.length;return M(Ln,{children:e.map((_,c)=>M("rect",{onClick:a,className:"event",x:n,y:r-y+c*y+y/2,style:{...l,opacity:_?.3:.1},width:i,height:y}))})},wx=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>M("rect",{onClick:i,className:"event",x:e,y:t,style:s,width:n,height:n,transform:r}),m4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>{const l=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e+l},${t-l} ${e-n},${t} ${e+n},${t} ${e-l},${t-l} ${e},${t+l}`,transform:r})},g4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t-a} ${e-a},${t-a}`,transform:`rotate(180, ${e}, ${t})`})},v4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t} ${e+a},${t-a} ${e-a},${t-a} ${e-a},${t}`,transform:`rotate(180, ${e}, ${t})`})},y4=({offset:e,id:t,start:n,end:r,getX:i,y:s,dims:a,colour:l,eventRadius:d,onClick:y})=>{const _=i(r)-i(n);return e===void 0?null:M("rect",{onClick:y,className:"project",x:i(n),y:a.marginTop+e,width:_,style:{fill:l,fillOpacity:.2},height:2*d})};function dv({radius:e,colorPercentMap:t,styles:n,className:r}){let i=0;const s=Object.keys(t);return M(Ln,{children:s.map((a,l)=>{const d=t[a],[y,_]=h0(e,i);i+=d;const[c,f]=h0(e,i),w=s.length===1||d>.5?1:0,v=[`M ${y} ${_}`,`A ${e} ${e} 0 ${w} 1 ${c} ${f}`,"L 0 0 ",`L ${y} ${_} Z`].join(" "),m={...n,fill:a};return M("path",{className:r,id:`arc_${l}`,d:v,style:m},`arc_${l}`)})})}const _4="#E31A1B";function ub(e,t,n){const r=wa([e],n.coloringSet);return M("g",{className:"timeline-event",onClick:n.onSelect,transform:`translate(${n.x}, ${n.y+40})`,children:M(dv,{radius:n.eventRadius,colorPercentMap:_a(n.filterColors,r),styles:{...t},className:"event"})},e.id)}function cb(e,t,n){const r=n.features.GRAPH_NONLOCATED?e.projectOffset>=0?t.opacity:.5:lg(1);return M(p4,{onSelect:n.onSelect,category:e.category,events:[e],x:n.x,y:n.dims.marginTop,width:n.eventRadius/4,height:n.dims.trackHeight,styleProps:{...t,fillOpacity:r},highlights:n.highlights})}function w4(e,t,n){return M(wx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius,r:1.8*n.eventRadius,styleProps:t,transform:`rotate(45, ${n.x}, ${n.y})`})}function b4(e,t,n){return M(wx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius/2,r:1.8*n.eventRadius,styleProps:t})}function T4(e,t,n){return M(g4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function S4(e,t,n){return M(v4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function E4(e,t,n){return M(m4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.8*n.eventRadius,styleProps:{...t,fillRule:"nonzero"},transform:`rotate(180, ${n.x}, ${n.y})`})}const x4=({events:e,projects:t,categories:n,narrative:r,getDatetimeX:i,getY:s,getCategoryColor:a,getHighlights:l,onSelect:d,transitionDuration:y,dims:_,features:c,setLoading:f,setNotLoading:w,eventRadius:v,filterColors:m,coloringSet:b,highlighted:g})=>{const p=r?r.steps.map(x=>x.id):[];function h(x,k){if(r&&!p.includes(k.id))return null;const P=La(k.latitude)&&Ra(k.longitude)||c.GRAPH_NONLOCATED&&k.projectOffset!==-1,{shape:E}=k;let A=P?ub:cb;E&&E.shape&&(E.shape===Tr.BAR?A=cb:E.shape===Tr.DIAMOND?A=w4:E.shape===Tr.STAR?A=E4:E.shape===Tr.TRIANGLE?A=T4:E.shape===Tr.PENTAGON?A=S4:E.shape===Tr.SQUARE?A=b4:A=ub);const C=g&&g.length>0&&g.includes(k.civId),N=zS(k,n).map(F=>{const z=s({...k,category:F}),H={fill:C?_4:k.colour?k.colour:a(F.title),fillOpacity:z>0?lg(1):0,transition:`transform ${y/1e3}s ease`};return{y:z,styles:H}});function $(F,z){return A(k,z,{x:i(k.datetime),y:F,eventRadius:v,onSelect:()=>d(k),dims:_,highlights:c.HIGHLIGHT_GROUPS?l(k.filters[c.HIGHLIGHT_GROUPS.filterIndexIndicatingGroup]):[],features:c,filterColors:m,coloringSet:b})}return N.length===0?x.push($(s(k),{fill:a(null)})):N.forEach(F=>{x.push($(F.y,F.styles))}),x}let T=()=>null;return c.GRAPH_NONLOCATED&&(T=function(){return M(Ln,{children:Object.values(t).map(x=>M(y4,{...x,eventRadius:v,onClick:()=>console.log(x),getX:i,dims:_,colour:a(x.category)},x.id))})}),re("g",{clipPath:"url(#clip)",children:[T(),e.reduce(h,[])]})};class k4 extends te.Component{constructor(t){super(t),this.grabRef=te.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){if(!this.state.isInitialized){const t=OI().on("start",this.props.onDragStart).on("drag",this.props.onDrag).on("end",this.props.onDragEnd);Ui(this.grabRef.current).call(t),this.setState({isInitialized:!0})}}renderCategory(t,n){const{features:r,dims:i}=this.props,s=1;return r.GRAPH_NONLOCATED&&r.GRAPH_NONLOCATED.categories&&r.GRAPH_NONLOCATED.categories.includes(t)?null:re(Ln,{children:[M("g",{className:"tick",style:{strokeWidth:s},opacity:"0.5",transform:"translate(0, 66)",children:M("line",{x1:i.marginLeft,x2:i.width-i.marginLeft})}),M("g",{className:"tick",opacity:"1",transform:"translate(0, 66)",children:M("text",{x:i.marginLeft-5,dy:"0.32em",children:t})})]})}render(){const{dims:t,categories:n,fallbackLabel:r}=this.props,s=n&&n.length>0?n.map((a,l)=>this.renderCategory(a,l)):this.renderCategory(r,0);return re("g",{className:"yAxis",children:[s,M("rect",{ref:this.grabRef,className:"drag-grabber",x:t.marginLeft,y:t.marginTop,width:Math.max(0,t.width-t.marginLeft*2),height:t.contentHeight})]})}}class C4 extends te.Component{constructor(t){super(t);let n=new URLSearchParams(window.location.href.split("?")[1]);this.styleDatetime=this.styleDatetime.bind(this),this.getDatetimeX=this.getDatetimeX.bind(this),this.getY=this.getY.bind(this),this.onApplyZoom=this.onApplyZoom.bind(this),this.onSelect=this.onSelect.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.svgRef=te.createRef(),this.state={isFolded:n.has("timeline")&&n.get("timeline")==="false",dims:t.dimensions,scaleX:null,scaleY:null,timerange:[null,null],dragPos0:null,transitionDuration:300}}componentDidMount(){this.addEventListeners()}UNSAFE_componentWillReceiveProps(t){if(nn(t)!==nn(this.props)&&(this.setState({timerange:t.app.timeline.range,scaleX:this.makeScaleX()}),(this==null?void 0:this.initialTimeRange)==null&&(this.initialTimeRange=t.app.timeline.range)),nn(t.activeCategories)!==nn(this.props.activeCategories)||nn(t.dimensions)!==nn(this.props.dimensions)){const{trackHeight:n,marginTop:r}=t.dimensions;this.setState({scaleY:this.makeScaleY(t.activeCategories,n,r)})}t.dimensions.trackHeight!==this.props.dimensions.trackHeight&&this.computeDims()}addEventListeners(){window.addEventListener("resize",()=>{this.computeDims()});const t=document.querySelector(".timeline-wrapper");t!==null&&t.addEventListener("transitionend",n=>{this.computeDims()})}makeScaleX(){return ZM().domain(this.state.timerange).range([this.state.dims.marginLeft,this.state.dims.width-this.state.dims.marginLeft])}makeScaleY(t,n,r){const{features:i}=this.props;i.GRAPH_NONLOCATED&&i.GRAPH_NONLOCATED.categories&&(t=t.filter(d=>!i.GRAPH_NONLOCATED.categories.includes(d.title)));const s=0,a=t.length>2?n/t.length:n/(t.length+1),l=t.map((d,y)=>(y+1)*a+r+s/2);return d=>{const y=t.indexOf(d);return l[y]}}componentDidUpdate(t,n){n.timerange!==this.state.timerange&&this.setState({scaleX:this.makeScaleX()})}getTimeScaleExtent(){if(!this.state.scaleX)return 0;const t=this.state.scaleX.domain();return(t[1].getTime()-t[0].getTime())/6e4}onClickArrow(){this.setState(t=>({isFolded:!t.isFolded}))}computeDims(){const t=this.props.ui.dom.timeline;if(document.querySelector(`#${t}`)!==null){const n=document.querySelector(`#${t}`).getBoundingClientRect();this.setState({dims:{...this.props.dimensions,width:n.width}},()=>{this.setState({scaleX:this.makeScaleX()})})}}onMoveTime(t){const n=this.getTimeScaleExtent(),r=en.offset(this.state.scaleX.domain()[0],n);let i=r,s=en.offset(r,n);t==="backwards"&&(i=en.offset(r,-(2*n)),s=en.offset(r,-n)),this.props.methods.onUpdateTimerange([i,s]),this.props.methods.onSelect([])}onCenterTime(t){const n=this.getTimeScaleExtent(),r=en.offset(t,-n/2),i=en.offset(t,+n/2);this.setState({timerange:[r,i]},()=>{this.props.methods.onUpdateTimerange(this.state.timerange)})}onSoftTimeRangeUpdate(t){this.setState({timerange:t})}onApplyZoom(t){const n=new Date,{rangeLimits:r}=this.props.app.timeline;let i=n,s=en.offset(n,-t.duration);if(r){const a=r[0],l=r[1];sl&&(i=l,s=en.offset(i,-t.duration))}this.setState({timerange:[s,i]},()=>{this.props.actions.updateTicks(15),this.props.methods.onUpdateTimerange(this.state.timerange)})}toggleTransition(t){this.setState({transitionDuration:t?300:0})}onDragStart(t){t.sourceEvent.stopPropagation(),this.setState({dragPos0:t.x},()=>{this.toggleTransition(!1)})}onDrag(t){const n=this.state.scaleX.invert(this.state.dragPos0).getTime(),r=this.state.scaleX.invert(t.x).getTime(),i=(n-r)/1e3,{range:s,rangeLimits:a}=this.props.app.timeline;let l=ei.offset(s[0],i),d=ei.offset(s[1],i);if(a){const y=a[0],_=a[1];l=l_?_:d}this.onSoftTimeRangeUpdate([l,d])}onDragEnd(){this.toggleTransition(!0),this.props.methods.onUpdateTimerange(this.state.timerange)}getDatetimeX(t){return this.state.scaleX(t)}getY(t){const{features:n,domain:r,activeCategories:i}=this.props,{USE_CATEGORIES:s,GRAPH_NONLOCATED:a}=n;if(!(s&&i&&i.length>0))return this.state.dims.trackHeight/1.5;const{category:d}=t;if(a&&a.categories.includes(d)){const{project:y}=t;return this.state.dims.marginTop+r.projects[y].offset+this.props.ui.eventRadius}return this.state.scaleY?this.state.scaleY(d):0}styleDatetime(t,n){return[null,null]}onSelect(t){if(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK){const n=Math.floor(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK/2),r=en.offset(t.datetime,-n),i=en.offset(t.datetime,n);this.props.actions.updateTicks(1),this.props.methods.onUpdateTimerange([r,i])}this.props.methods.onSelect(t)}render(){const{isNarrative:t,app:n,domain:r}=this.props,{timeline:i}=n;let s=`timeline-wrapper ${this.state.isFolded?" folded":""}`;s+=n.narrative!==null?" narrative-mode":"";const{dims:a}=this.state,l={height:a.contentHeight},{activeCategories:d}=this.props,y=ze[this.props.app.language].timeline.info.replace("%n",r.eventCountInTimeRange),_=ze[this.props.app.language].timeline.reset;return re("div",{className:s,onKeyDown:this.props.onKeyDown,tabIndex:"1",children:[M(s4,{title:y,from:this.state.timerange[0],to:this.state.timerange[1],onClick:()=>{this.onClickArrow()},hideInfo:t,resetTest:_,resetClick:()=>{this.setState({timerange:this.initialTimeRange},()=>{this.props.methods.onUpdateTimerange(this.state.timerange)}),this.computeDims()}}),M("div",{className:"timeline-content",children:re("div",{id:this.props.ui.dom.timeline,className:"timeline",children:[M("div",{className:"timeline-container",children:re("svg",{ref:this.svgRef,width:a.width,style:l,children:[M(u4,{dims:a}),M(l4,{ticks:i.dimensions.ticks,dims:a,extent:this.getTimeScaleExtent(),transitionDuration:this.state.transitionDuration,scaleX:this.state.scaleX}),M(k4,{dims:a,getCategoryY:c=>this.getY({category:c,project:null}),onDragStart:this.onDragStart,onDrag:this.onDrag,onDragEnd:this.onDragEnd,categories:d,features:this.props.features,fallbackLabel:ze[this.props.app.language].timeline.default_categories_label}),M(h4,{dims:a,selected:this.props.app.selected,getEventX:c=>this.getDatetimeX(c.datetime),getEventY:this.getY,categories:d,transitionDuration:this.state.transitionDuration,styles:this.props.ui.styles,features:this.props.features,eventRadius:this.props.ui.eventRadius}),M(x4,{events:this.props.domain.events,projects:this.props.domain.projects,categories:d,styleDatetime:this.styleDatetime,narrative:this.props.app.narrative,getDatetimeX:this.getDatetimeX,getY:this.getY,getHighlights:c=>c==="None"?[]:d.map(f=>f.group===c),getCategoryColor:this.props.methods.getCategoryColor,transitionDuration:this.state.transitionDuration,onSelect:this.onSelect,dims:a,features:this.props.features,setLoading:this.props.actions.setLoading,setNotLoading:this.props.actions.setNotLoading,eventRadius:this.props.ui.eventRadius,filterColors:this.props.ui.filterColors,coloringSet:this.props.app.coloringSet,highlighted:this.props.app.highlighted})]})}),re("div",{className:"timeline-bottom",children:[M(lb,{dims:a,onMoveTime:c=>{this.onMoveTime(c)},backward:!0}),M(f4,{extent:this.getTimeScaleExtent(),zoomLevels:i.zoomLevels,dims:a,onApplyZoom:this.onApplyZoom}),M(lb,{dims:a,onMoveTime:c=>{this.onMoveTime(c)},backward:!1})]})]})})]})}}function A4(e){return{dimensions:Np(e),isNarrative:!!e.app.associations.narrative,activeCategories:jg(e),domain:{events:P$(e),eventCountInTimeRange:C$(e),projects:L$(e),narratives:e.domain.narratives},app:{selected:e.app.selected,highlighted:e.app.highlighted,language:e.app.language,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,timeline:{zoomLevels:e.app.timeline.zoomLevels,dimensions:Np(e),ticks:e.app.timeline.ticks,range:zg(e),rangeLimits:sE(e)}},ui:{dom:e.ui.dom,styles:e.ui.style.selectedEvents,eventRadius:e.ui.eventRadius,filterColors:e.ui.coloring.colors},features:hr(e)}}function P4(e){return{actions:Ko({setLoading:ZS,setNotLoading:GS,updateTicks:XS},e)}}const L4=pi(A4,P4)(C4);var db={exports:{}};/* @preserve +*/var sw;function Ze(){return sw||(sw=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0&&arguments[0]!==void 0?arguments[0]:{action:"play",source:""};return this.video.play(),{type:n,operation:h}}function _(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"pause",source:""};return this.video.pause(),{type:n,operation:h}}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"toggle-play",source:""};return this.video.togglePlay(),{type:n,operation:h}}function f(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"seek",source:""};return this.video.seek(h),{type:n,operation:T}}function w(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"forward-".concat(h),source:""};return this.video.forward(h),{type:n,operation:T}}function v(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"replay-".concat(h),source:""};return this.video.replay(h),{type:n,operation:T}}function m(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-rate",source:""};return this.video.playbackRate=h,{type:n,operation:T}}function b(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-volume",source:""},x=h;return h<0&&(x=0),h>1&&(x=1),this.video.volume=x,{type:n,operation:T}}function g(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:h?"muted":"unmuted",source:""};return this.video.muted=h,{type:n,operation:T}}function p(h){return t.default.enabled?(t.default.isFullscreen?t.default.exit():t.default.request(this.rootElement),{type:n,operation:{action:"toggle-fullscreen",source:""}}):{type:r,isFullscreen:!h.isFullscreen}}return nt}var cw;function Pj(){return cw||(cw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(mi()),r=av(),i=Vc(),s={currentSrc:null,duration:0,currentTime:0,seekingTime:0,buffered:null,waiting:!1,seeking:!1,paused:!0,autoPaused:!1,ended:!1,playbackRate:1,muted:!1,volume:1,readyState:0,networkState:0,videoWidth:0,videoHeight:0,hasStarted:!1,userActivity:!0,isActive:!1,isFullscreen:!1,activeTextTrack:null};function a(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,d=arguments.length>1?arguments[1]:void 0;switch(d.type){case i.USER_ACTIVATE:return(0,n.default)({},l,{userActivity:d.activity});case i.PLAYER_ACTIVATE:return(0,n.default)({},l,{isActive:d.activity});case i.FULLSCREEN_CHANGE:return(0,n.default)({},l,{isFullscreen:!!d.isFullscreen});case r.SEEKING_TIME:return(0,n.default)({},l,{seekingTime:d.time});case r.END_SEEKING:return(0,n.default)({},l,{seekingTime:0});case r.LOAD_START:return(0,n.default)({},l,d.videoProps,{hasStarted:!1,ended:!1});case r.CAN_PLAY:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.WAITING:return(0,n.default)({},l,d.videoProps,{waiting:!0});case r.CAN_PLAY_THROUGH:case r.PLAYING:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.PLAY:return(0,n.default)({},l,d.videoProps,{ended:!1,paused:!1,autoPaused:!1,waiting:!1,hasStarted:!0});case r.PAUSE:return(0,n.default)({},l,d.videoProps,{paused:!0});case r.END:return(0,n.default)({},l,d.videoProps,{ended:!0});case r.SEEKING:return(0,n.default)({},l,d.videoProps,{seeking:!0});case r.SEEKED:return(0,n.default)({},l,d.videoProps,{seeking:!1});case r.ERROR:return(0,n.default)({},l,d.videoProps,{error:"UNKNOWN ERROR",ended:!0});case r.DURATION_CHANGE:case r.TIME_UPDATE:case r.VOLUME_CHANGE:case r.PROGRESS_CHANGE:case r.RATE_CHANGE:case r.SUSPEND:case r.ABORT:case r.EMPTIED:case r.STALLED:case r.LOADED_META_DATA:case r.LOADED_DATA:case r.RESIZE:return(0,n.default)({},l,d.videoProps);case r.ACTIVATE_TEXT_TRACK:return(0,n.default)({},l,{activeTextTrack:d.textTrack});default:return l}}}(Rf)),Rf}var Nf={},dw;function Lj(){return dw||(dw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=t(mi()),r=Vc(),i={count:0,operation:{action:"",source:""}};function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i,l=arguments.length>1?arguments[1]:void 0;switch(l.type){case r.OPERATE:return(0,n.default)({},a,{count:a.count+1,operation:(0,n.default)({},a.operation,l.operation)});default:return a}}}(Nf)),Nf}var fw;function VE(){return fw||(fw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.operationReducer=e.playerReducer=void 0;var n=t(Pj()),r=t(Lj());function i(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;return{player:(0,n.default)(l.player,d),operation:(0,r.default)(l.operation,d)}}var s=n.default;e.playerReducer=s;var a=r.default;e.operationReducer=a}(Lf)),Lf}var hw;function Rj(){return hw||(hw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(it()),s=n(ot()),a=Aj,l=n(VE()),d=t(Vc()),y=t(av()),_=function(){function c(f){(0,i.default)(this,c),this.store=f||(0,a.createStore)(l.default),this.video=null,this.rootElement=null}return(0,s.default)(c,[{key:"getActions",value:function(){var w=this,v=this.store.dispatch,m=(0,r.default)({},d,y);function b(g){return function(){var h=g.apply(w,arguments);typeof h<"u"&&v(h)}}return Object.keys(m).filter(function(g){return typeof m[g]=="function"}).reduce(function(g,p){return g[p]=b(m[p]),g},{})}},{key:"getState",value:function(){return this.store.getState()}},{key:"subscribeToStateChange",value:function(w,v){v||(v=this.getState.bind(this));var m=v(),b=function(){var p=v();if(p!==m){var h=m;m=p,w(p,h)}};return this.store.subscribe(b)}},{key:"subscribeToOperationStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().operation})}},{key:"subscribeToPlayerStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().player})}}]),c}();e.default=_}(Pf)),Pf}var Of={},pw;function WE(){return pw||(pw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={actions:y.default.object,player:y.default.object,position:y.default.string,className:y.default.string},w={position:"left"},v=function(m){(0,d.default)(b,m);function b(g,p){var h;return(0,r.default)(this,b),h=(0,s.default)(this,(0,a.default)(b).call(this,g,p)),h.handleClick=h.handleClick.bind((0,l.default)(h)),h}return(0,i.default)(b,[{key:"componentDidMount",value:function(){}},{key:"handleClick",value:function(){var p=this.props.actions;p.play()}},{key:"render",value:function(){var p=this.props,h=p.player,T=p.position;return _.default.createElement("button",{className:(0,c.default)("video-react-button","video-react-big-play-button","video-react-big-play-button-".concat(T),this.props.className,{"big-play-button-hide":h.hasStarted||!h.currentSrc}),type:"button","aria-live":"polite",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Play Video"))}}]),b}(_.Component);e.default=v,v.propTypes=f,v.defaultProps=w,v.displayName="BigPlayButton"}(Of)),Of}var Mf={},mw;function qE(){return mw||(mw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(te),i=t(Ze()),s={player:n.default.object,className:n.default.string};function a(l){var d=l.player,y=l.className;return d.error?null:r.default.createElement("div",{className:(0,i.default)("video-react-loading-spinner",y)})}a.propTypes=s,a.displayName="LoadingSpinner"}(Mf)),Mf}var Df={},gw;function ZE(){return gw||(gw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s={poster:n.default.string,player:n.default.object,actions:n.default.object,className:n.default.string};function a(d){var y=d.poster,_=d.player,c=d.actions,f=d.className;return!y||_.hasStarted?null:r.default.createElement("div",{className:(0,i.default)("video-react-poster",f),style:{backgroundImage:'url("'.concat(y,'")')},onClick:function(){_.paused&&c.play()}})}a.propTypes=s,a.displayName="PosterImage";var l=a;e.default=l}(Df)),Df}var $f={},ir={},Ff={exports:{}},jf={exports:{}},zf={exports:{}},vw;function GE(){return vw||(vw=1,function(e){function t(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,s=new Array(r);i0&&arguments[0]!==void 0?arguments[0]:0,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,b=Math.floor(v%60),g=Math.floor(v/60%60),p=Math.floor(v/3600),h=Math.floor(m/60%60),T=Math.floor(m/3600);return(s(v)||v===1/0)&&(p="-",g="-",b="-"),p=p>0||T>0?"".concat(p,":"):"",g="".concat((p||h>=10)&&g<10?"0".concat(g):g,":"),b=b<10?"0".concat(b):b,p+g+b}function l(v){return v.props&&v.props.isVideoChild?!0:v.type==="source"||v.type==="track"}var d=function(m,b){return m.filter(b)[0]},y=function(m,b){var g=m.type,p=b.type;return typeof g=="string"||typeof p=="string"?g===p:typeof g=="function"&&typeof p=="function"?g.displayName===p.displayName:!1};function _(v,m,b){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,p=i.default.Children.toArray(m);b.order;var h=(0,r.default)(b,["order"]);return p.filter(function(T){return!T.props.disabled}).concat(v.filter(function(T){return!d(p,function(x){return y(x,T)})})).map(function(T){var x=d(v,function(A){return y(A,T)}),k=x?x.props:{},P=(0,n.default)({},h,k,T.props),E=i.default.cloneElement(T,P,T.props.children);return E}).sort(function(T,x){return(T.props.order||g)-(x.props.order||g)})}function c(v,m){console.warn("WARNING: ".concat(v," will be deprecated soon! Please use ").concat(m," instead."))}function f(v,m){var b=arguments,g=!1;return function(){g||(v.apply(void 0,(0,t.default)(b)),g=!0,setTimeout(function(){g=!1},m))}}var w=["error","src","srcObject","currentSrc","crossOrigin","networkState","preload","buffered","readyState","seeking","currentTime","duration","paused","defaultPlaybackRate","playbackRate","played","seekable","ended","autoplay","loop","mediaGroup","controller","controls","volume","muted","defaultMuted","audioTracks","videoTracks","textTracks","width","height","videoWidth","videoHeight","poster"];return ir.mediaProperties=w,ir}var Ew;function KE(){return Ew||(Ew=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=pr(),v={actions:_.default.object,player:_.default.object,children:_.default.any,startTime:_.default.number,loop:_.default.bool,muted:_.default.bool,autoPlay:_.default.bool,playsInline:_.default.bool,src:_.default.string,poster:_.default.string,className:_.default.string,preload:_.default.oneOf(["auto","metadata","none"]),crossOrigin:_.default.string,onLoadStart:_.default.func,onWaiting:_.default.func,onCanPlay:_.default.func,onCanPlayThrough:_.default.func,onPlaying:_.default.func,onEnded:_.default.func,onSeeking:_.default.func,onSeeked:_.default.func,onPlay:_.default.func,onPause:_.default.func,onProgress:_.default.func,onDurationChange:_.default.func,onError:_.default.func,onSuspend:_.default.func,onAbort:_.default.func,onEmptied:_.default.func,onStalled:_.default.func,onLoadedMetadata:_.default.func,onLoadedData:_.default.func,onTimeUpdate:_.default.func,onRateChange:_.default.func,onVolumeChange:_.default.func,onResize:_.default.func},m=function(b){(0,y.default)(g,b);function g(p){var h;return(0,i.default)(this,g),h=(0,a.default)(this,(0,l.default)(g).call(this,p)),h.video=null,h.play=h.play.bind((0,d.default)(h)),h.pause=h.pause.bind((0,d.default)(h)),h.seek=h.seek.bind((0,d.default)(h)),h.forward=h.forward.bind((0,d.default)(h)),h.replay=h.replay.bind((0,d.default)(h)),h.toggleFullscreen=h.toggleFullscreen.bind((0,d.default)(h)),h.getProperties=h.getProperties.bind((0,d.default)(h)),h.renderChildren=h.renderChildren.bind((0,d.default)(h)),h.handleLoadStart=h.handleLoadStart.bind((0,d.default)(h)),h.handleCanPlay=h.handleCanPlay.bind((0,d.default)(h)),h.handleCanPlayThrough=h.handleCanPlayThrough.bind((0,d.default)(h)),h.handlePlay=h.handlePlay.bind((0,d.default)(h)),h.handlePlaying=h.handlePlaying.bind((0,d.default)(h)),h.handlePause=h.handlePause.bind((0,d.default)(h)),h.handleEnded=h.handleEnded.bind((0,d.default)(h)),h.handleWaiting=h.handleWaiting.bind((0,d.default)(h)),h.handleSeeking=h.handleSeeking.bind((0,d.default)(h)),h.handleSeeked=h.handleSeeked.bind((0,d.default)(h)),h.handleFullscreenChange=h.handleFullscreenChange.bind((0,d.default)(h)),h.handleError=h.handleError.bind((0,d.default)(h)),h.handleSuspend=h.handleSuspend.bind((0,d.default)(h)),h.handleAbort=h.handleAbort.bind((0,d.default)(h)),h.handleEmptied=h.handleEmptied.bind((0,d.default)(h)),h.handleStalled=h.handleStalled.bind((0,d.default)(h)),h.handleLoadedMetaData=h.handleLoadedMetaData.bind((0,d.default)(h)),h.handleLoadedData=h.handleLoadedData.bind((0,d.default)(h)),h.handleTimeUpdate=h.handleTimeUpdate.bind((0,d.default)(h)),h.handleRateChange=h.handleRateChange.bind((0,d.default)(h)),h.handleVolumeChange=h.handleVolumeChange.bind((0,d.default)(h)),h.handleDurationChange=h.handleDurationChange.bind((0,d.default)(h)),h.handleProgress=(0,w.throttle)(h.handleProgress.bind((0,d.default)(h)),250),h.handleKeypress=h.handleKeypress.bind((0,d.default)(h)),h.handleTextTrackChange=h.handleTextTrackChange.bind((0,d.default)(h)),h}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.forceUpdate(),this.video&&this.video.textTracks&&(this.video.textTracks.onaddtrack=this.handleTextTrackChange,this.video.textTracks.onremovetrack=this.handleTextTrackChange)}},{key:"getProperties",value:function(){var h=this;return this.video?w.mediaProperties.reduce(function(T,x){return T[x]=h.video[x],T},{}):null}},{key:"handleTextTrackChange",value:function(){var h=this.props,T=h.actions,x=h.player;if(this.video&&this.video.textTracks){var k=Array.from(this.video.textTracks).find(function(P){return P.mode==="showing"});k!==x.activeTextTrack&&T.activateTextTrack(k)}}},{key:"play",value:function(){var h=this.video.play();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"pause",value:function(){var h=this.video.pause();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"load",value:function(){this.video.load()}},{key:"addTextTrack",value:function(){var h;(h=this.video).addTextTrack.apply(h,arguments)}},{key:"canPlayType",value:function(){var h;(h=this.video).canPlayType.apply(h,arguments)}},{key:"togglePlay",value:function(){this.video.paused?this.play():this.pause()}},{key:"seek",value:function(h){try{this.video.currentTime=h}catch{}}},{key:"forward",value:function(h){this.seek(this.video.currentTime+h)}},{key:"replay",value:function(h){this.forward(-h)}},{key:"toggleFullscreen",value:function(){var h=this.props,T=h.player,x=h.actions;x.toggleFullscreen(T)}},{key:"handleLoadStart",value:function(){var h=this.props,T=h.actions,x=h.onLoadStart;T.handleLoadStart(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlay",value:function(){var h=this.props,T=h.actions,x=h.onCanPlay;T.handleCanPlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlayThrough",value:function(){var h=this.props,T=h.actions,x=h.onCanPlayThrough;T.handleCanPlayThrough(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlaying",value:function(){var h=this.props,T=h.actions,x=h.onPlaying;T.handlePlaying(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlay",value:function(){var h=this.props,T=h.actions,x=h.onPlay;T.handlePlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePause",value:function(){var h=this.props,T=h.actions,x=h.onPause;T.handlePause(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleDurationChange",value:function(){var h=this.props,T=h.actions,x=h.onDurationChange;T.handleDurationChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleProgress",value:function(){var h=this.props,T=h.actions,x=h.onProgress;this.video&&T.handleProgressChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEnded",value:function(){var h=this.props,T=h.loop,x=h.player,k=h.actions,P=h.onEnded;T?(this.seek(0),this.play()):x.paused||this.pause(),k.handleEnd(this.getProperties()),P&&P.apply(void 0,arguments)}},{key:"handleWaiting",value:function(){var h=this.props,T=h.actions,x=h.onWaiting;T.handleWaiting(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeking",value:function(){var h=this.props,T=h.actions,x=h.onSeeking;T.handleSeeking(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeked",value:function(){var h=this.props,T=h.actions,x=h.onSeeked;T.handleSeeked(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleFullscreenChange",value:function(){}},{key:"handleSuspend",value:function(){var h=this.props,T=h.actions,x=h.onSuspend;T.handleSuspend(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleAbort",value:function(){var h=this.props,T=h.actions,x=h.onAbort;T.handleAbort(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEmptied",value:function(){var h=this.props,T=h.actions,x=h.onEmptied;T.handleEmptied(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleStalled",value:function(){var h=this.props,T=h.actions,x=h.onStalled;T.handleStalled(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedMetaData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedMetadata,k=h.startTime;k&&k>0&&(this.video.currentTime=k),T.handleLoadedMetaData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedData;T.handleLoadedData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleTimeUpdate",value:function(){var h=this.props,T=h.actions,x=h.onTimeUpdate;T.handleTimeUpdate(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleRateChange",value:function(){var h=this.props,T=h.actions,x=h.onRateChange;T.handleRateChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleVolumeChange",value:function(){var h=this.props,T=h.actions,x=h.onVolumeChange;T.handleVolumeChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleError",value:function(){var h=this.props,T=h.actions,x=h.onError;T.handleError(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleResize",value:function(){var h=this.props,T=h.actions,x=h.onResize;T.handleResize(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleKeypress",value:function(){}},{key:"renderChildren",value:function(){var h=this,T=(0,r.default)({},this.props,{video:this.video});return this.video?c.default.Children.toArray(this.props.children).filter(w.isVideoChild).map(function(x){var k;if(typeof x.type=="string"){if(x.type==="source"){k=(0,r.default)({},x.props);var P=k.onError;k.onError=function(){P&&P.apply(void 0,arguments),h.handleError.apply(h,arguments)}}}else k=T;return c.default.cloneElement(x,k)}):null}},{key:"render",value:function(){var h=this,T=this.props,x=T.loop,k=T.poster,P=T.preload,E=T.src,A=T.autoPlay,C=T.playsInline,N=T.muted,$=T.crossOrigin,F=T.videoId;return c.default.createElement("video",{className:(0,f.default)("video-react-video",this.props.className),id:F,crossOrigin:$,ref:function(B){h.video=B},muted:N,preload:P,loop:x,playsInline:C,autoPlay:A,poster:k,src:E,onLoadStart:this.handleLoadStart,onWaiting:this.handleWaiting,onCanPlay:this.handleCanPlay,onCanPlayThrough:this.handleCanPlayThrough,onPlaying:this.handlePlaying,onEnded:this.handleEnded,onSeeking:this.handleSeeking,onSeeked:this.handleSeeked,onPlay:this.handlePlay,onPause:this.handlePause,onProgress:this.handleProgress,onDurationChange:this.handleDurationChange,onError:this.handleError,onSuspend:this.handleSuspend,onAbort:this.handleAbort,onEmptied:this.handleEmptied,onStalled:this.handleStalled,onLoadedMetadata:this.handleLoadedMetaData,onLoadedData:this.handleLoadedData,onTimeUpdate:this.handleTimeUpdate,onRateChange:this.handleRateChange,onVolumeChange:this.handleVolumeChange,tabIndex:"-1"},this.renderChildren())}},{key:"playbackRate",get:function(){return this.video.playbackRate},set:function(h){this.video.playbackRate=h}},{key:"muted",get:function(){return this.video.muted},set:function(h){this.video.muted=h}},{key:"volume",get:function(){return this.video.volume},set:function(h){h>1&&(h=1),h<0&&(h=0),this.video.volume=h}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}}]),g}(c.Component);e.default=m,m.propTypes=v,m.displayName="Video"}($f)),$f}var Vf={},xw;function XE(){return xw||(xw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={manager:y.default.object,className:y.default.string},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.timer=null,b.manager.subscribeToOperationStateChange(p.handleStateChange.bind((0,l.default)(p))),p.state={hidden:!0,operation:{}},p}return(0,i.default)(m,[{key:"handleStateChange",value:function(g,p){var h=this;g.count!==p.count&&g.operation.source==="shortcut"&&(this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({hidden:!1,count:g.count,operation:g.operation}),this.timer=setTimeout(function(){h.setState({hidden:!0}),h.timer=null},500))}},{key:"render",value:function(){if(this.state.operation.source!=="shortcut")return null;var g=this.state.hidden?{display:"none"}:null;return _.default.createElement("div",{className:(0,c.default)({"video-react-bezel":!0,"video-react-bezel-animation":this.state.count%2===0,"video-react-bezel-animation-alt":this.state.count%2===1},this.props.className),style:g,role:"status","aria-label":this.state.operation.action},_.default.createElement("div",{className:(0,c.default)("video-react-bezel-icon","video-react-bezel-icon-".concat(this.state.operation.action))}))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="Bezel"}(Vf)),Vf}var Wf={},Wr={},kw;function Wc(){if(kw)return Wr;kw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.findElPosition=e,Wr.getPointerPosition=t,Wr.blurNode=n,Wr.focusNode=r,Wr.hasClass=i;function e(s){var a;if(s.getBoundingClientRect&&s.parentNode&&(a=s.getBoundingClientRect()),!a)return{left:0,top:0};var l=document,d=l.body,y=l.documentElement,_=y.clientLeft||d.clientLeft||0,c=window.pageXOffset||d.scrollLeft,f=a.left+c-_,w=y.clientTop||d.clientTop||0,v=window.pageYOffset||d.scrollTop,m=a.top+v-w;return{left:Math.round(f),top:Math.round(m)}}function t(s,a){var l={},d=e(s),y=s.offsetWidth,_=s.offsetHeight,c=d.top,f=d.left,w=a.pageY,v=a.pageX;return a.changedTouches&&(v=a.changedTouches[0].pageX,w=a.changedTouches[0].pageY),l.y=Math.max(0,Math.min(1,(c-w+_)/_)),l.x=Math.max(0,Math.min(1,(v-f)/y)),l}function n(s){s&&s.blur&&s.blur()}function r(s){s&&s.focus&&s.focus()}function i(s,a){for(var l=s.className.split(" "),d=0;d1&&(E=1),P.changeVolume(E,{action:"volume-up",source:"shortcut"})}},{keyCode:40,handle:function(k,P){var E=k.volume-.05;E<0&&(E=0);var A=E>0?"volume-down":"volume-off";P.changeVolume(E,{action:A,source:"shortcut"})}},{keyCode:190,shift:!0,handle:function(k,P){var E=k.playbackRate;E>=1.5?E=2:E>=1.25?E=1.5:E>=1?E=1.25:E>=.5?E=1:E>=.25?E=.5:E>=0&&(E=.25),P.changeRate(E,{action:"fast-forward",source:"shortcut"})}},{keyCode:188,shift:!0,handle:function(k,P){var E=k.playbackRate;E<=.5?E=.25:E<=1?E=.5:E<=1.25?E=1:E<=1.5?E=1.25:E<=2&&(E=1.5),P.changeRate(E,{action:"fast-rewind",source:"shortcut"})}}],T.shortcuts=(0,r.default)(T.defaultShortcuts),T.mergeShortcuts=T.mergeShortcuts.bind((0,d.default)(T)),T.handleKeyPress=T.handleKeyPress.bind((0,d.default)(T)),T.handleClick=T.handleClick.bind((0,d.default)(T)),T.handleDoubleClick=T.handleDoubleClick.bind((0,d.default)(T)),T}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.mergeShortcuts(),document.addEventListener("keydown",this.handleKeyPress),document.addEventListener("click",this.handleClick),document.addEventListener("dblclick",this.handleDoubleClick)}},{key:"componentDidUpdate",value:function(h){h.shortcuts!==this.props.shortcuts&&this.mergeShortcuts()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("click",this.handleClick),document.removeEventListener("dblclick",this.handleDoubleClick)}},{key:"mergeShortcuts",value:function(){var h=function(E){var A=E.keyCode,C=A===void 0?0:A,N=E.ctrl,$=N===void 0?!1:N,F=E.shift,z=F===void 0?!1:F,B=E.alt,H=B===void 0?!1:B;return"".concat(C,":").concat($,":").concat(z,":").concat(H)},T=this.defaultShortcuts.reduce(function(P,E){return Object.assign(P,(0,n.default)({},h(E),E))},{}),x=(this.props.shortcuts||[]).reduce(function(P,E){var A=E.keyCode,C=E.handle;return A&&typeof C=="function"?Object.assign(P,(0,n.default)({},h(E),E)):P},T),k=function(E){var A=0,C=["ctrl","shift","alt"];return C.forEach(function(N){E[N]&&A++}),A};this.shortcuts=Object.keys(x).map(function(P){return x[P]}).sort(function(P,E){return k(E)-k(P)})}},{key:"togglePlay",value:function(h,T){h.paused?T.play({action:"play",source:"shortcut"}):T.pause({action:"pause",source:"shortcut"})}},{key:"toggleFullscreen",value:function(h,T){T.toggleFullscreen(h)}},{key:"handleKeyPress",value:function(h){var T=this.props,x=T.player,k=T.actions;if(x.isActive&&!(document.activeElement&&((0,f.hasClass)(document.activeElement,"video-react-control")||(0,f.hasClass)(document.activeElement,"video-react-menu-button-active")||(0,f.hasClass)(document.activeElement,"video-react-big-play-button")))){var P=h.keyCode||h.which,E=h.ctrlKey||h.metaKey,A=h.shiftKey,C=h.altKey,N=this.shortcuts.filter(function($){return!(!$.keyCode||$.keyCode-P!==0||$.ctrl!==void 0&&$.ctrl!==E||$.shift!==void 0&&$.shift!==A||$.alt!==void 0&&$.alt!==C)})[0];N&&(N.handle(x,k),h.preventDefault())}}},{key:"canBeClicked",value:function(h,T){return!(!h.isActive||T.target.nodeName!=="VIDEO"||h.readyState!==4)}},{key:"handleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,P=T.clickable;!this.canBeClicked(x,h)||!P||this.togglePlay(x,k)}},{key:"handleDoubleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,P=T.dblclickable;!this.canBeClicked(x,h)||!P||this.toggleFullscreen(x,k)}},{key:"render",value:function(){return null}}]),g}(_.Component);e.default=m,m.propTypes=w,m.defaultProps=v,m.displayName="Shortcut"}(Wf)),Wf}var qf={},Zf={},Gf={exports:{}},Aw;function Ia(){return Aw||(Aw=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;ry&&(c=y);function w(h,T){var x=h/T||0;return"".concat((x>=1?1:x)*100,"%")}f.width=w(c,y);for(var v=[],m=0;m=1?1:N}},{key:"getNewTime",value:function(k){var P=this.props.player.duration,E=this.slider.calculateDistance(k),A=E*P;return A===P?A-.1:A}},{key:"handleMouseDown",value:function(){}},{key:"handleMouseUp",value:function(k){var P=this.props.actions,E=this.getNewTime(k);P.seek(E),P.handleEndSeeking(E)}},{key:"handleMouseMove",value:function(k){var P=this.props.actions,E=this.getNewTime(k);P.handleSeekingTime(E)}},{key:"stepForward",value:function(){var k=this.props.actions;k.forward(5)}},{key:"stepBack",value:function(){var k=this.props.actions;k.replay(5)}},{key:"render",value:function(){var k=this,P=this.props,E=P.player,A=E.currentTime,C=E.seekingTime,N=E.duration,$=E.buffered,F=P.mouseTime,z=C||A;return _.default.createElement(f.default,{ref:function(H){k.slider=H},label:"video progress bar",className:(0,c.default)("video-react-progress-holder",this.props.className),valuenow:(this.getPercent()*100).toFixed(2),valuetext:(0,b.formatTime)(z,N),onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,getPercent:this.getPercent,stepForward:this.stepForward,stepBack:this.stepBack},_.default.createElement(v.default,{buffered:$,currentTime:z,duration:N}),_.default.createElement(m.default,{duration:N,mouseTime:F}),_.default.createElement(w.default,{currentTime:z,duration:N}))}}]),T}(_.Component);e.default=p,p.propTypes=g,p.displayName="SeekBar"}(Yf)),Yf}var Ow;function rx(){return Ow||(Ow=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=t(Wc()),v=n(nx()),m={player:_.default.object,className:_.default.string},b=function(g){(0,y.default)(p,g);function p(h,T){var x;return(0,i.default)(this,p),x=(0,a.default)(this,(0,l.default)(p).call(this,h,T)),x.state={mouseTime:{time:null,position:0}},x.handleMouseMoveThrottle=x.handleMouseMove.bind((0,d.default)(x)),x}return(0,s.default)(p,[{key:"handleMouseMove",value:function(T){if(T.pageX){var x=this.props.player.duration,k=this.seekBar,P=w.getPointerPosition(k,T).x*x,E=T.pageX-w.findElPosition(k).left;this.setState({mouseTime:{time:P,position:E}})}}},{key:"render",value:function(){var T=this,x=this.props.className;return c.default.createElement("div",{onMouseMove:this.handleMouseMoveThrottle,className:(0,f.default)("video-react-progress-control video-react-control",x)},c.default.createElement(v.default,(0,r.default)({mouseTime:this.state.mouseTime,ref:function(P){T.seekBar=P}},this.props)))}}]),p}(c.Component);e.default=b,b.propTypes=m,b.displayName="ProgressControl"}(Zf)),Zf}var eh={},Mw;function ix(){return Mw||(Mw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.handleClick=p.handleClick.bind((0,l.default)(p)),p}return(0,i.default)(m,[{key:"handleClick",value:function(){var g=this.props,p=g.actions,h=g.player;h.paused?p.play():p.pause()}},{key:"render",value:function(){var g=this,p=this.props,h=p.player,T=p.className,x=h.paused?"Play":"Pause";return _.default.createElement("button",{ref:function(P){g.button=P},className:(0,c.default)(T,{"video-react-play-control":!0,"video-react-control":!0,"video-react-button":!0,"video-react-paused":h.paused,"video-react-playing":!h.paused}),type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},x))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="PlayToggle"}(eh)),eh}var th={},nh={},Dw;function ox(){return Dw||(Dw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c={actions:y.default.object,className:y.default.string,seconds:y.default.oneOf([5,10,30])},f={seconds:10},w=function(m){var b=function(g){(0,d.default)(p,g);function p(h,T){var x;return(0,r.default)(this,p),x=(0,s.default)(this,(0,a.default)(p).call(this,h,T)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x}return(0,i.default)(p,[{key:"handleClick",value:function(){var T=this.props,x=T.actions,k=T.seconds;m==="forward"?x.forward(k):x.replay(k)}},{key:"render",value:function(){var T=this,x=this.props,k=x.seconds,P=x.className,E=["video-react-control","video-react-button","video-react-icon"];return E.push("video-react-icon-".concat(m,"-").concat(k),"video-react-".concat(m,"-control")),P&&E.push(P),_.default.createElement("button",{ref:function(C){T.button=C},className:E.join(" "),type:"button",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"".concat(m," ").concat(k," seconds")))}}]),p}(_.Component);return b.propTypes=c,b.defaultProps=f,b};e.default=w}(nh)),nh}var $w;function sx(){return $w||($w=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ox()),r=(0,n.default)("forward");r.displayName="ForwardControl";var i=r;e.default=i}(th)),th}var rh={},Fw;function ax(){return Fw||(Fw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ox()),r=(0,n.default)("replay");r.displayName="ReplayControl";var i=r;e.default=i}(rh)),rh}var ih={},jw;function lx(){return jw||(jw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.handleClick=p.handleClick.bind((0,l.default)(p)),p}return(0,i.default)(m,[{key:"handleClick",value:function(){var g=this.props,p=g.player,h=g.actions;h.toggleFullscreen(p)}},{key:"render",value:function(){var g=this,p=this.props,h=p.player,T=p.className;return _.default.createElement("button",{className:(0,c.default)(T,{"video-react-icon-fullscreen-exit":h.isFullscreen,"video-react-icon-fullscreen":!h.isFullscreen},"video-react-fullscreen-control video-react-control video-react-button video-react-icon"),ref:function(k){g.button=k},type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Non-Fullscreen"))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="FullscreenToggle"}(ih)),ih}var oh={},zw;function ux(){return zw||(zw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s=pr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=f-c,m=(0,s.formatTime)(v);return r.default.createElement("div",{className:(0,i.default)("video-react-remaining-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-remaining-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Remaining Time "),"-".concat(m)))}l.propTypes=a,l.displayName="RemainingTimeDisplay";var d=l;e.default=d}(oh)),oh}var sh={},Uw;function cx(){return Uw||(Uw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s=pr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=(0,s.formatTime)(c,f);return r.default.createElement("div",{className:(0,i.default)("video-react-current-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-current-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Current Time "),v))}l.propTypes=a,l.displayName="CurrentTimeDisplay";var d=l;e.default=d}(sh)),sh}var ah={},Bw;function dx(){return Bw||(Bw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s=pr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player.duration,c=y.className,f=(0,s.formatTime)(_);return r.default.createElement("div",{className:(0,i.default)(c,"video-react-duration video-react-time-control video-react-control")},r.default.createElement("div",{className:"video-react-duration-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Duration Time "),f))}l.propTypes=a,l.displayName="DurationDisplay";var d=l;e.default=d}(ah)),ah}var lh={},Hw;function fx(){return Hw||(Hw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(te),i=t(Ze()),s={separator:n.default.string,className:n.default.string};function a(l){var d=l.separator,y=l.className,_=d||"/";return r.default.createElement("div",{className:(0,i.default)("video-react-time-control video-react-time-divider",y),dir:"ltr"},r.default.createElement("div",null,r.default.createElement("span",null,_)))}a.propTypes=s,a.displayName="TimeDivider"}(lh)),lh}var uh={},ch={},dh={},Vw;function hx(){return Vw||(Vw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(mi()),s=n(it()),a=n(ot()),l=n(gt()),d=n(vt()),y=n(mt()),_=n(yt()),c=n(De()),f=t(te),w=n(Ze()),v={tagName:c.default.string,onClick:c.default.func.isRequired,onFocus:c.default.func,onBlur:c.default.func,className:c.default.string},m={tagName:"div"},b=function(g){(0,_.default)(p,g);function p(h,T){var x;return(0,s.default)(this,p),x=(0,l.default)(this,(0,d.default)(p).call(this,h,T)),x.handleClick=x.handleClick.bind((0,y.default)(x)),x.handleFocus=x.handleFocus.bind((0,y.default)(x)),x.handleBlur=x.handleBlur.bind((0,y.default)(x)),x.handleKeypress=x.handleKeypress.bind((0,y.default)(x)),x}return(0,a.default)(p,[{key:"componentWillUnmount",value:function(T){this.handleBlur(T)}},{key:"handleKeypress",value:function(T){(T.which===32||T.which===13)&&(T.preventDefault(),this.handleClick(T))}},{key:"handleClick",value:function(T){var x=this.props.onClick;x(T)}},{key:"handleFocus",value:function(T){document.addEventListener("keydown",this.handleKeypress),this.props.onFocus&&this.props.onFocus(T)}},{key:"handleBlur",value:function(T){document.removeEventListener("keydown",this.handleKeypress),this.props.onBlur&&this.props.onBlur(T)}},{key:"render",value:function(){var T=this.props.tagName,x=(0,i.default)({},this.props);return delete x.tagName,delete x.className,f.default.createElement(T,(0,r.default)({className:(0,w.default)(this.props.className),role:"button",tabIndex:"0",onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},x))}}]),p}(f.Component);e.default=b,b.propTypes=v,b.defaultProps=m,b.displayName="ClickableComponent"}(dh)),dh}var fh={},Ww;function Dj(){return Ww||(Ww=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c={player:y.default.object,children:y.default.any},f=function(w){(0,d.default)(v,w);function v(m,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,m,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){var b=this.props.children;return _.default.createElement("div",{className:"video-react-menu",onClick:this.handleClick},_.default.createElement("div",{className:"video-react-menu-content"},b))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Popup"}(fh)),fh}var qw;function $j(){return qw||(qw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=t(Ia()),r=t(mi()),i=t(De()),s=t(te),a=t(Ze()),l=t(hx()),d=t(Dj()),y={inline:i.default.bool,onClick:i.default.func.isRequired,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string},_={inline:!0};function c(f){var w=f.inline,v=f.className,m=(0,r.default)({},f);return delete m.children,delete m.inline,delete m.className,s.default.createElement(l.default,(0,n.default)({className:(0,a.default)(v,{"video-react-menu-button-inline":!!w,"video-react-menu-button-popup":!w},"video-react-control video-react-button video-react-menu-button")},m),s.default.createElement(d.default,f))}c.propTypes=y,c.defaultProps=_,c.displayName="PopupButton"}(ch)),ch}var hh={},ph={},Zw;function Fj(){return Zw||(Zw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(te),i=t(Ze()),s={percentage:n.default.string,vertical:n.default.bool,className:n.default.string},a={percentage:"100%",vertical:!1};function l(y){var _=y.percentage,c=y.vertical,f=y.className,w={};return c?w.height=_:w.width=_,r.default.createElement("div",{className:(0,i.default)(f,"video-react-volume-level"),style:w},r.default.createElement("span",{className:"video-react-control-text"}))}l.propTypes=s,l.defaultProps=a,l.displayName="VolumeLevel";var d=l;e.default=d}(ph)),ph}var Gw;function jj(){return Gw||(Gw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=n(lv()),v=n(Fj()),m={actions:_.default.object,player:_.default.object,className:_.default.string,onFocus:_.default.func,onBlur:_.default.func},b=function(p){(0,y.default)(h,p);function h(T,x){var k;return(0,i.default)(this,h),k=(0,a.default)(this,(0,l.default)(h).call(this,T,x)),k.state={percentage:"0%"},k.handleMouseMove=k.handleMouseMove.bind((0,d.default)(k)),k.handlePercentageChange=k.handlePercentageChange.bind((0,d.default)(k)),k.checkMuted=k.checkMuted.bind((0,d.default)(k)),k.getPercent=k.getPercent.bind((0,d.default)(k)),k.stepForward=k.stepForward.bind((0,d.default)(k)),k.stepBack=k.stepBack.bind((0,d.default)(k)),k.handleFocus=k.handleFocus.bind((0,d.default)(k)),k.handleBlur=k.handleBlur.bind((0,d.default)(k)),k.handleClick=k.handleClick.bind((0,d.default)(k)),k}return(0,s.default)(h,[{key:"componentDidMount",value:function(){}},{key:"getPercent",value:function(){var x=this.props.player;return x.muted?0:x.volume}},{key:"checkMuted",value:function(){var x=this.props,k=x.player,P=x.actions;k.muted&&P.mute(!1)}},{key:"handleMouseMove",value:function(x){var k=this.props.actions;this.checkMuted();var P=this.slider.calculateDistance(x);k.changeVolume(P)}},{key:"stepForward",value:function(){var x=this.props,k=x.player,P=x.actions;this.checkMuted(),P.changeVolume(k.volume+.1)}},{key:"stepBack",value:function(){var x=this.props,k=x.player,P=x.actions;this.checkMuted(),P.changeVolume(k.volume-.1)}},{key:"handleFocus",value:function(x){this.props.onFocus&&this.props.onFocus(x)}},{key:"handleBlur",value:function(x){this.props.onBlur&&this.props.onBlur(x)}},{key:"handlePercentageChange",value:function(x){x!==this.state.percentage&&this.setState({percentage:x})}},{key:"handleClick",value:function(x){x.stopPropagation()}},{key:"render",value:function(){var x=this,k=this.props,P=k.player,E=k.className,A=(P.volume*100).toFixed(2);return c.default.createElement(w.default,(0,r.default)({ref:function(N){x.slider=N},label:"volume level",valuenow:A,valuetext:"".concat(A,"%"),onMouseMove:this.handleMouseMove,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,sliderActive:this.handleFocus,sliderInactive:this.handleBlur,getPercent:this.getPercent,onPercentageChange:this.handlePercentageChange,stepForward:this.stepForward,stepBack:this.stepBack},this.props,{className:(0,f.default)(E,"video-react-volume-bar video-react-slider-bar")}),c.default.createElement(v.default,this.props))}}]),h}(c.Component);b.propTypes=m,b.displayName="VolumeBar";var g=b;e.default=g}(hh)),hh}var Yw;function px(){return Yw||(Yw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Ia()),i=n(it()),s=n(ot()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(te),f=n(Ze()),w=n($j()),v=n(jj()),m={player:_.default.object,actions:_.default.object,vertical:_.default.bool,className:_.default.string,alwaysShowVolume:_.default.bool},b={vertical:!1},g=function(h){(0,y.default)(T,h);function T(x,k){var P;return(0,i.default)(this,T),P=(0,a.default)(this,(0,l.default)(T).call(this,x,k)),P.state={active:!1},P.handleClick=P.handleClick.bind((0,d.default)(P)),P.handleFocus=P.handleFocus.bind((0,d.default)(P)),P.handleBlur=P.handleBlur.bind((0,d.default)(P)),P}return(0,s.default)(T,[{key:"handleClick",value:function(){var k=this.props,P=k.player,E=k.actions;E.mute(!P.muted)}},{key:"handleFocus",value:function(){this.setState({active:!0})}},{key:"handleBlur",value:function(){this.setState({active:!1})}},{key:"render",value:function(){var k=this.props,P=k.vertical,E=k.player,A=k.className,C=!P,N=this.volumeLevel;return c.default.createElement(w.default,{className:(0,f.default)(A,{"video-react-volume-menu-button-vertical":P,"video-react-volume-menu-button-horizontal":!P,"video-react-vol-muted":E.muted,"video-react-vol-0":N===0&&!E.muted,"video-react-vol-1":N===1,"video-react-vol-2":N===2,"video-react-vol-3":N===3,"video-react-slider-active":this.props.alwaysShowVolume||this.state.active,"video-react-lock-showing":this.props.alwaysShowVolume||this.state.active},"video-react-volume-menu-button"),onClick:this.handleClick,inline:C},c.default.createElement(v.default,(0,r.default)({onFocus:this.handleFocus,onBlur:this.handleBlur},this.props)))}},{key:"volumeLevel",get:function(){var k=this.props.player,P=k.volume,E=k.muted,A=3;return P===0||E?A=0:P<.33?A=1:P<.67&&(A=2),A}}]),T}(c.Component);g.propTypes=m,g.defaultProps=b,g.displayName="VolumeMenuButton";var p=g;e.default=p}(uh)),uh}var mh={},gh={},vh={},Kw;function zj(){return Kw||(Kw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c={children:y.default.any},f=function(w){(0,d.default)(v,w);function v(m,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,m,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){return _.default.createElement("div",{className:"video-react-menu video-react-lock-showing",role:"presentation",onClick:this.handleClick},_.default.createElement("ul",{className:"video-react-menu-content"},this.props.children))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Menu"}(vh)),vh}var yh={},Xw;function Uj(){return Xw||(Xw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f={item:y.default.object,index:y.default.number,activateIndex:y.default.number,onSelectItem:y.default.func},w=function(v){(0,d.default)(m,v);function m(b,g){var p;return(0,r.default)(this,m),p=(0,s.default)(this,(0,a.default)(m).call(this,b,g)),p.handleClick=p.handleClick.bind((0,l.default)(p)),p}return(0,i.default)(m,[{key:"handleClick",value:function(){var g=this.props,p=g.index,h=g.onSelectItem;h(p)}},{key:"render",value:function(){var g=this.props,p=g.item,h=g.index,T=g.activateIndex;return _.default.createElement("li",{className:(0,c.default)({"video-react-menu-item":!0,"video-react-selected":h===T}),role:"menuitem",onClick:this.handleClick},p.label,_.default.createElement("span",{className:"video-react-control-text"}))}}]),m}(_.Component);e.default=w,w.propTypes=f,w.displayName="MenuItem"}(yh)),yh}var Qw;function uv(){return Qw||(Qw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f=n(zj()),w=n(Uj()),v=n(hx()),m={inline:y.default.bool,items:y.default.array,className:y.default.string,onSelectItem:y.default.func,children:y.default.any,selectedIndex:y.default.number},b=function(g){(0,d.default)(p,g);function p(h,T){var x;return(0,r.default)(this,p),x=(0,s.default)(this,(0,a.default)(p).call(this,h,T)),x.state={active:!1,activateIndex:h.selectedIndex||0},x.commitSelection=x.commitSelection.bind((0,l.default)(x)),x.activateMenuItem=x.activateMenuItem.bind((0,l.default)(x)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x.renderMenu=x.renderMenu.bind((0,l.default)(x)),x.handleFocus=x.handleFocus.bind((0,l.default)(x)),x.handleBlur=x.handleBlur.bind((0,l.default)(x)),x.handleUpArrow=x.handleUpArrow.bind((0,l.default)(x)),x.handleDownArrow=x.handleDownArrow.bind((0,l.default)(x)),x.handleEscape=x.handleEscape.bind((0,l.default)(x)),x.handleReturn=x.handleReturn.bind((0,l.default)(x)),x.handleTab=x.handleTab.bind((0,l.default)(x)),x.handleKeyPress=x.handleKeyPress.bind((0,l.default)(x)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x.handleIndexChange=x.handleIndexChange.bind((0,l.default)(x)),x}return(0,i.default)(p,[{key:"componentDidUpdate",value:function(T){T.selectedIndex!==this.props.selectedIndex&&this.activateMenuItem(this.props.selectedIndex)}},{key:"commitSelection",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"activateMenuItem",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"handleIndexChange",value:function(T){var x=this.props.onSelectItem;x(T)}},{key:"handleClick",value:function(){this.setState(function(T){return{active:!T.active}})}},{key:"handleFocus",value:function(){document.addEventListener("keydown",this.handleKeyPress)}},{key:"handleBlur",value:function(){this.setState({active:!1}),document.removeEventListener("keydown",this.handleKeyPress)}},{key:"handleUpArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex-1;k<0&&(k=x.length?x.length-1:0),this.activateMenuItem(k)}}},{key:"handleDownArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex+1;k>=x.length&&(k=0),this.activateMenuItem(k)}}},{key:"handleTab",value:function(T){this.state.active&&(T.preventDefault(),this.commitSelection(this.state.activateIndex))}},{key:"handleReturn",value:function(T){T.preventDefault(),this.state.active?this.commitSelection(this.state.activateIndex):this.setState({active:!0})}},{key:"handleEscape",value:function(){this.setState({active:!1,activateIndex:0})}},{key:"handleKeyPress",value:function(T){T.which===27?this.handleEscape(T):T.which===9?this.handleTab(T):T.which===13?this.handleReturn(T):T.which===38?this.handleUpArrow(T):T.which===40&&this.handleDownArrow(T)}},{key:"handleSelectItem",value:function(T){this.commitSelection(T)}},{key:"renderMenu",value:function(){var T=this;if(!this.state.active)return null;var x=this.props.items;return _.default.createElement(f.default,null,x.map(function(k,P){return _.default.createElement(w.default,{item:k,index:P,onSelectItem:T.handleSelectItem,activateIndex:T.state.activateIndex,key:"item-".concat(P++)})}))}},{key:"render",value:function(){var T=this,x=this.props,k=x.inline,P=x.className;return _.default.createElement(v.default,{className:(0,c.default)(P,{"video-react-menu-button-inline":!!k,"video-react-menu-button-popup":!k,"video-react-menu-button-active":this.state.active},"video-react-control video-react-button video-react-menu-button"),role:"button",tabIndex:"0",ref:function(A){T.menuButton=A},onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},this.props.children,this.renderMenu())}}]),p}(_.Component);e.default=b,b.propTypes=m,b.displayName="MenuButton"}(gh)),gh}var Jw;function cv(){return Jw||(Jw=1,function(e){var t=dt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(it()),i=n(ot()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(te),c=n(Ze()),f=n(uv()),w={player:y.default.object,actions:y.default.object,rates:y.default.array,className:y.default.string},v={rates:[2,1.5,1.25,1,.5,.25]},m=function(g){(0,d.default)(p,g);function p(h,T){var x;return(0,r.default)(this,p),x=(0,s.default)(this,(0,a.default)(p).call(this,h,T)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x}return(0,i.default)(p,[{key:"handleSelectItem",value:function(T){var x=this.props,k=x.rates,P=x.actions;T>=0&&Tt.text()).then(t=>{if(t.length<=0)throw new Error;this.setState({md:_e(t)})}).catch(()=>{this.setState({error:!0})})}render(){return this.state.md&&!this.state.error?M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:this.state.md}}):this.state.error?this.props.unloader||M("div",{children:"Error: couldn't load source"}):this.props.loader}}vx.propTypes={loader:Sr.func,unloader:Sr.func.isRequired,path:Sr.string.isRequired};const sb=({small:e})=>re("div",{className:`spinner ${e?"small":""}`,children:[M("div",{className:"double-bounce-overlay"}),M("div",{className:"double-bounce"})]}),ab=({failedUrls:e})=>M("div",{className:"no-source-container",children:re("div",{className:"no-source-row",children:[M("p",{children:M("i",{className:"material-icons no-source-icon",children:"error"})}),M("p",{children:"No media found, as the original media has not yet been uploaded to the platform."})]})}),Jj=({media:e,viewIdx:t,translations:n,switchLanguage:r,langIdx:i})=>{const s=document.querySelector(".source-media-gallery"),a=s?s.getBoundingClientRect().width:0;function l(d){const{path:y,type:_,poster:c}=d;switch(_){case"Image":return M("div",{className:"source-image-container",children:M(Qj,{className:"source-image",src:y,loader:M("div",{className:"source-image-loader",children:M(sb,{})}),unloader:M(ab,{failedUrls:[y]}),onClick:()=>window.open(y,"_blank")})});case"Video":return re("div",{className:"media-player",children:[M("div",{className:"banner-trans right-overlay",children:n?n.map((f,w)=>i!==w+1?M("div",{className:"trans-button",onClick:()=>r(w+1),children:f.code}):M("div",{className:"trans-button",onClick:()=>r(0),children:"EN"})):null}),M(ov.Player,{poster:c,className:"source-video",playsInline:!0,src:y})]});case"Text":return M("div",{className:"source-text-container",children:M(vx,{path:y,loader:M(sb,{}),unloader:()=>this.renderError()})});case"Document":return M("iframe",{title:y,className:"source-document",src:y});default:return M(ab,{failedUrls:[`Application does not support extension: ${y.split(".")[1]}`]})}}return M("div",{className:"source-media-gallery",style:{transform:`translate(${t*-a}px)`},children:e.map(d=>l(d))})},ez=({viewIdx:e,paths:t,onShiftHandler:n})=>{const r=e!==0?M("div",{className:"back",onClick:()=>n(-1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_left"})})}):null,i=en(1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_right"})})}):null;return t.length>1?re("div",{className:"media-gallery-controls",children:[r,i]}):M("div",{className:"media-gallery-controls"})};class yx extends te.Component{constructor(){super(),this.state={mediaIdx:0,langIdx:0},this.onShiftGallery=this.onShiftGallery.bind(this)}getTypeCounts(t){return t.reduce((n,r)=>(n[r.type]+=1,n),{Image:0,Video:0,Text:0})}onShiftGallery(t){this.state.mediaIdx===0&&t===-1||this.state.mediaIdx===this.props.source.paths.length-1&&t===1||this.setState({mediaIdx:this.state.mediaIdx+t})}switchLanguage(t){this.setState({langIdx:t})}renderContent(t){const{url:n,title:r,paths:i,date:s,type:a,poster:l,description:d}=t,y=r.substring(0,100);return re(Ln,{children:[re("div",{className:"mo-banner",children:[M("div",{className:"mo-banner-close",onClick:this.props.onCancel,children:M("i",{className:"material-icons",children:"close"})}),M("h3",{className:"mo-banner-content",children:y})]}),M("div",{className:"mo-container",onClick:_=>_.stopPropagation(),children:M("div",{className:"mo-media-container",children:M(Jj,{switchLanguage:_=>this.switchLanguage(_),translations:this.props.translations,langIdx:this.state.langIdx,media:i.map(_=>hD(_,l)),viewIdx:this.state.mediaIdx})})}),re("div",{className:"mo-footer",children:[M(ez,{paths:i,viewIdx:this.state.mediaIdx,onShiftHandler:this.onShiftGallery}),re("div",{className:"mo-meta-container",children:[d?M("div",{className:"mo-box-desc",children:M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(d)}})}):null,a||s||n?re("div",{className:"mo-box",children:[re("div",{children:[a?M("h4",{children:"Evidence type"}):null,a?re("p",{children:[M("i",{className:"material-icons left",children:"perm_media"}),a]}):null]}),re("div",{children:[s?M("h4",{children:"Date Published"}):null,s?re("p",{children:[M("i",{className:"material-icons left",children:"today"}),s]}):null]}),re("div",{children:[n?M("h4",{children:"Link"}):null,n?re("span",{children:[M("i",{className:"material-icons left",children:"link"}),M("a",{href:n,target:"_blank",rel:"noreferrer",children:"Link to original URL"})]}):null]})]}):null]})]})]})}renderIntlContent(){const{langIdx:t}=this.state,{translations:n,source:r}=this.props;let i=null;return n&&n.length&&t>0&&(i=n[t-1]),i&&(i={...i,poster:r.poster,paths:i.file?[i.file]:i.paths}),this.renderContent(t===0?r:i)}render(){return typeof this.props.source!="object"?this.renderError():M("div",{className:`mo-overlay ${this.props.opaque?"opaque":""}`,children:this.renderIntlContent()})}}const tz="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEUAAAD////8/PwEBAT5+fltbW3w8PAICAj19fXS0tKlpaUQEBB5eXmioqL09PTGxsaMjIzd3d3q6uo3NzfAwMB/f3/k5ORkZGQrKytNTU0fHx9VVVWPj4+4uLhbW1vR0dGXl5cnJydxcXGwsLA+Pj5GRkYZGRkwMDBPT09YWFiFhYVwONfZAAAHtklEQVR4nO2diXbaOhCGtWEwuw2YhABhCdDy/g94NbItCULaNIhjMXe+tpykp9XRnxlJo2UkxgiCIAiCIAiCIAiCIAiCIAiCIAhkSAmfve1k24Mv2uX3mNCCjrNpViR5Np31UEpsDzqcC4Dz4aDH0Cmc51xLM3+AvKUl4hEp22ynjPEsQu0YIoWMrSv3tHSUmGNy1G2ihP7lKdQmTV4YDoVS++iK++pqVmgUstfhhYfWTbHzq+m6hUHbaXDThIJ3m65bICTLbugDsqarForjLQvC6K8WTVctCLoZfqnw0HTlgiDZ241uppT41nTlgiDZr68UKiSdKZvc9lI9XEyarlooki/60qTpioVBj/jTLxROm65bGHTQ1ufiRlAjeL/puoVBxzTt7GZQk7WbrlsgtJvO9Vzis8I5ksjbWLHLr+aH+usBGoGGkVCeGXU4I0YMk0ItZXVlwyn8LR6Juj9l/cTzUHVmqFaiAC3mnJY9qkrPTdfmERh7TeazcX+NJla7wvdJXO5ZYQTCh0TVhxIEQRAEQRAEQYTGmx8iW76ouFyVwajQnMlw3zRXj8ch2TxLK5ZNV+ZBtOxqKZZDGNeQwueHFD4/pPD5qRUKvmm6Kg/C2RDniC/ZzCocN12ZhyDZ0nopVhuOkdsQjgrX7JquyoPoWoWtpqvyIEa2HeI4OfsJmVmFp6br8hgWuVXYdFUegmQHjlshYzvb0WQ412lsR4MnHeiKiTsLvcSnENZKl/YUrXjDqJAdc3s2MenhU9iWrOvSD1fITn2Z014miRRrVGqOsm3taC940Wu6SoEBG7bfbRK34OgOl0KTmzqBAk0OQkm5pzblVSOEz3nTdQpLJdAaUKCLZ0Dg3muDIsO2dwhpCH6+TOeAaSw0bVD3otZDlRLrpisVFi1wkblOVMel6HoZts1srCYUZOMhclHTi04KLlwvo2aYehnTBg91qFZevINsCVG22VvHBduCJ8gmhVrMeuhnqxWv6Fx03nFdjOAZrlwnmC71rf2UUvz92HSdwqLb4FIoZ0O+R5bLpcVstC47EPINKoFmMrGsY22hexuFbDtUGgt6gUwHVyBTuajnoR09DLbxzOolLBsOeBWq6dkgz16arlNYLpe2tSXTBcNjP0C3t5mw813Fpz0mcSlss7lwwwSc7cJ0h6cJ1d6ch3ZgXRSPPFaGaie7+6J9dYxqnAe0mlTYUE1s0GVVmMsD3TDRxZc3It3RQwXrvrjaoMHtYgtY923jU+gu9BKdF3QuanxU2VWnPjoXBXvl5aoMfE6RhWoAnB1VVUcq8i1ChWyRq9qGZmUbm5cydr7oRxHSs/foCmy7LxUtuwnKi6brEh4Iud2hPD2jwNcG9ZwisTZMjvgUSkgVsSvc2A4iAFrhSlgb7rBNCgHJhvVIwXNka2sGyT7cUPEepMjZoKL7GqS8O5HecM83QYqsz2/wWO7h3TuFv4MU6FJPIlFoR0PR+QhZoIhGoTuQkIXZCY1NYdvd8xymo2Epr48yxhHkTlzINgpTYsarqSaP45TYwSlchSmxCgL1RxxJbmuncBCkwJ6yB27jCCBcijbfBCnwo1rUEkLFcei9H1ShlHa2qYPA+8sLQXCFS163w0B9872EVcj8teV9kPLuxlMYoKeR7OiyaSM5qOL1NEF+5gcXQYQJc+/GGy2CjPjWJ6LJpnUjvkhDlOeWtWJZel1YgSLEFP+U25XJMAFEALxHDwLMyfsuASWaR0xS1xBn95fmnDSP5FSq9Of40zuf5ZDsw+5hmcJiwFunUSJf3LWaKCGb1u5DtqJZmfS6GqjVHSVJ1ha8VlgsYrGhZIVTeFcWs3lUSNX7kJuIznMM3Kr+8J5rS6Qfz6iYLkBZey/h3ncVm7eJFWi9IBCZl0R5z6R17PYheVwveLqaKfMg3k/aj/4/r4lLF97H0wiBFxtpmQyun54qtWtsQgwncSlkGzdgqPynlbMp30qJQTRjoUGynrszQfH0Z266rx1UF5KyiIYKZobEPi93Sc3nP08TQUzXDjnCPMEak0A44M1SYUcMBRK/72TlrQQXKd/x3ckHCaMdd0hfSzx93wbwD3up/0BihA8HghW8EUNbM//+EgtkYya+wIJFeTBOQkjpv+JYxiR/cVYz11qsXCQDCwUxhWseuq5TF57CF/m49w2FrDceXjz9mEexd3+DtmTH1CWtwRUKvBj/dd3mdM7czwWIOCNamgN8Lj41f5LV7z/V97D3nnsW8Du6WOaaEfemGaWzDkfnm7v7vV238GxnXl/lgbbJHwVkcQ1c8mHtrdC7pvvBef7rMDm9nE4fr+vZZlVwfume8E0k+xRfIiEDoZVcGkaU6erwteoME82wo8pvBb9QyJN+fOPgNdBzfow4t6q+B/wYuBg9Sc6+1tjPwVW/r1BAwJbv4jegoTzEvky+L9D4ajJ7mkw3WWrcnrO/a7Nk5wV7Egt6HFujBO5TMBe3iE8mNYOfaavDUSuO8wj/iHnf+LwyvaYSn7udOj1jNHuS/uUa+7rTejMtrtVVDEeD+cW/fTK8Wi9+9zer9zQtijwZJkWRvo/25/mT2u5P9Lbbl8nktFjEOPm7F3m95/asnvlHSk31y9yfNBMEQRAEQRAEQRAEQRAEQRAE8b/nP3XqQCdLzBvzAAAAAElFTkSuQmCC",Th=-2;class nz extends te.Component{constructor(t){super(t),this.state={video:Th,featureLang:0}}getVideo(t,n){return t=0?this.props.cover.videos[t-n]:null}onVideoClickHandler(t){const n=this.props.cover.headerVideos?this.props.cover.headerVideos.length:0;return()=>{this.setState({video:t+n})}}renderFeature(){const{featureVideo:t}=this.props.cover,{featureLang:n}=this.state,{translations:r}=t,i=n===0?t:{...r[n-1],poster:t.poster};return re("div",{children:[M("div",{className:"banner-trans right-overlay",children:r&&r.map((s,a)=>{const l=a+1;return n!==l?M("div",{onClick:()=>this.setState({featureLang:l}),className:"trans-button",children:s.code},s.code):M("div",{onClick:()=>this.setState({featureLang:0}),className:"trans-button",children:"ENG"},"ENG")})}),M(ov.Player,{className:"source-video",poster:i.poster,playsInline:!0,src:i.file})]})}renderHeaderVideos(){const{headerVideos:t}=this.props.cover;return M("div",{className:"row",children:t.slice(0,2).map((n,r)=>M("div",{className:"cell plain",onClick:()=>this.setState({video:r}),children:n.buttonTitle},r))})}renderButton(t,n){return M("div",{className:"row",children:M("a",{className:`cell ${n?"yellow":"plain"}`,href:t.href,children:t.title})})}renderMediaOverlay(){const t=this.getVideo(this.state.video,this.props.cover.headerVideos?this.props.cover.headerVideos.length:0);return M(yx,{opaque:!0,source:{title:t.title,desc:t.desc,paths:[t.file],poster:t.poster},translations:t.translations,onCancel:()=>this.setState({video:Th})})}render(){if(!this.props.cover)return re("div",{className:"default-cover-container",children:["You haven't specified any cover props. Put them in the values that overwrite the store in ",M("code",{children:"app.cover"})]});const{videos:t,footerButton:n}=this.props.cover,{showing:r}=this.props;return re("div",{className:"default-cover-container",children:[M("div",{className:r?"cover-header":"cover-header minimized",children:M("a",{className:"cover-logo-container",href:"https://bellingcat.com",children:M("img",{className:"cover-logo",src:tz,alt:"Bellingcat logo"})})}),re("div",{className:"cover-content",children:[this.props.cover.bgVideo?M("div",{className:`fullscreen-bg ${this.props.showing?"":"hidden"}`,children:M("video",{loop:!0,muted:!0,autoPlay:!0,preload:"auto",className:"fullscreen-bg__video",children:M("source",{src:this.props.cover.bgVideo,type:"video/mp4"})})}):null,M("h2",{dangerouslySetInnerHTML:{__html:this.props.cover.title}}),this.props.cover.subtitle?M("h3",{style:{marginTop:0},children:this.props.cover.subtitle}):null,this.props.cover.subsubtitle?M("h5",{children:this.props.cover.subsubtitle}):null,this.props.cover.featureVideo?this.renderFeature():null,re("div",{className:"hero thin",children:[this.props.cover.headerVideos?this.renderHeaderVideos():null,this.props.cover.headerButton?this.renderButton(this.props.cover.headerButton):null,M("div",{className:"row",children:M("div",{className:"cell yellow",onClick:this.props.showAppHandler,children:this.props.cover.exploreButton})})]}),Array.isArray(this.props.cover.description)?this.props.cover.description.map((i,s)=>M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(i)}},s)):M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(this.props.cover.description)}}),t?re("div",{className:"hero",children:[M("div",{className:"row",children:t&&t.slice(0,2).map((i,s)=>re("div",{className:"cell small",onClick:this.onVideoClickHandler(s),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))}),M("div",{className:"row",children:t.length>2&&this.props.cover.videos.slice(2,4).map((i,s)=>re("div",{className:"cell small",onClick:this.onVideoClickHandler(s+2),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))})]}):null,n?M("div",{className:"hero",children:M("div",{className:"row",children:this.renderButton(n)})}):null]}),this.state.video!==Th?this.renderMediaOverlay():null]})}}function rz(e){return{cover:e.app.cover}}const iz=pi(rz)(nz),oz=({showing:e,children:t})=>M("div",{className:`cover-container ${e?"showing":""}`,children:t}),_x=({isLoading:e,language:t})=>{let n="loading-overlay";return n+=e?"":" hidden",M("div",{id:"loading-overlay",className:n,children:re("div",{className:"loading-wrapper",children:[M("span",{id:"loading-text",className:"text",children:ze[t].loading}),re("div",{className:"spinner",children:[M("div",{className:"double-bounce1"}),M("div",{className:"double-bounce2"})]})]})})},sz=({title:e,from:t,to:n,onClick:r,hideInfo:i,resetTest:s,resetClick:a})=>{const l=t&&Lp(t),d=n&&Lp(n);return re("div",{className:"timeline-header",children:[M("div",{className:"timeline-toggle",onClick:()=>r(),children:M("p",{children:M("i",{className:"arrow-down"})})}),re("div",{className:`timeline-info ${i?"hidden":""}`,children:[M("p",{dangerouslySetInnerHTML:{__html:e}}),re("p",{children:[l," - ",d,M("small",{className:"reset-button",onClick:()=>a(),children:M("a",{className:"cell",children:s})})]}),re("div",{style:{fontWeight:"400",textAlign:"center",marginTop:"5px"},children:[M("i",{className:"material-icons",style:{color:"#FFA726",fontSize:"18px",verticalAlign:"middle"},children:"warning"})," No verified incidents are being added after Aug 2025."]})]})]})},az=15;yD();class lz extends te.Component{constructor(){super(),this.xAxis0Ref=te.createRef(),this.xAxis1Ref=te.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){let t,n;this.props.extent>5256e3?(t="%Y",n=""):(this.props.extent>43200,n="%d %b",t="");let{marginTop:r}=this.props.dims;this.props.scaleX&&(this.x0=$_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r+30).tickSize(100-az-r).tickFormat(Iu(t)),this.x1=$_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r).tickSize(0).tickFormat(Iu(n)),this.state.isInitialized||this.setState({isInitialized:!0})),this.state.isInitialized&&(Bi(this.xAxis0Ref.current).transition().duration(this.props.transitionDuration).call(this.x0),Bi(this.xAxis1Ref.current).transition().duration(this.props.transitionDuration).call(this.x1))}render(){return re(Ln,{children:[M("g",{ref:this.xAxis0Ref,transform:"translate(0, 24)",clipPath:"url(#clip)",className:"axis xAxis"}),M("g",{ref:this.xAxis1Ref,transform:`translate(0, ${this.props.dims.marginTop})`,clipPath:"url(#clip)",className:"axis xAxis"})]})}}const uz=({dims:e})=>M("clipPath",{id:"clip",children:M("rect",{x:e.marginLeft,y:"0",width:Math.max(0,e.width-e.marginLeft*2),height:e.contentHeight})}),lb=({dims:e,onMoveTime:t,backward:n})=>n===!0?M("div",{className:"timeline-handle",onClick:()=>t("backwards"),children:M("span",{className:"timeline-handle__triangle"})}):M("div",{className:"timeline-handle right",onClick:()=>t("forward"),children:M("span",{className:"timeline-handle__triangle"})}),cz=[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}];function dz(e,t,n){return e>=n&&t>=n?!0:e===t}const fz=({extent:e,zoomLevels:t,dims:n,onApplyZoom:r})=>{function i(s,a){const l=t.reduce((y,_)=>y.duration<_.duration?_:y),d=dz(s.duration,e,l.duration);return M("div",{className:`zoom-level-button ${d?"active":""}`,x:"60",y:a*15+20,onClick:()=>r(s),children:s.label},a)}return t.length===0&&(t=cz),M("div",{className:"zoom-controls",children:t.map((s,a)=>i(s,a))})},hz=({styles:e,eventRadius:t,getEventX:n,getEventY:r,categories:i,transitionDuration:s,selected:a,dims:l,features:d})=>{function y(_,c){function f(g){return M("circle",{className:"timeline-marker",cx:0,cy:0,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeLinejoin:"round",strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px, ${g+40}px)`,WebkitTransition:`transform ${s/1e3}s ease`,MozTransition:"none",opacity:1},r:t*2},tn(c))}function w(){return M("rect",{className:"timeline-marker",x:0,y:l.marginTop,width:t/1.5,height:l.contentHeight-55,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px)`,opacity:.7}})}const v=La(c.latitude)&&Ra(c.longitude)||d.GRAPH_NONLOCATED&&c.projectOffset!==-1,m=zS(c,i).map(g=>r({...c,category:g}));function b(g){switch(c.shape){case"circle":case Tr.DIAMOND:case Tr.STAR:_.push(f(g));break;case Tr.BAR:_.push(w());break;default:return v?_.push(f(g)):_.push(w())}}return m.length>0?m.forEach(b):b(r(c)),_}return M("g",{clipPath:"url(#clip)",children:a.reduce(y,[])})},pz=({highlights:e,events:t,x:n,y:r,width:i,height:s,onSelect:a,styleProps:l,extraRender:d})=>{if(e.length===0)return M("rect",{onClick:a,className:"event",x:n,y:r,style:l,width:i,height:s});const y=s/e.length;return M(Ln,{children:e.map((_,c)=>M("rect",{onClick:a,className:"event",x:n,y:r-y+c*y+y/2,style:{...l,opacity:_?.3:.1},width:i,height:y}))})},wx=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>M("rect",{onClick:i,className:"event",x:e,y:t,style:s,width:n,height:n,transform:r}),mz=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>{const l=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e+l},${t-l} ${e-n},${t} ${e+n},${t} ${e-l},${t-l} ${e},${t+l}`,transform:r})},gz=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t-a} ${e-a},${t-a}`,transform:`rotate(180, ${e}, ${t})`})},vz=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t} ${e+a},${t-a} ${e-a},${t-a} ${e-a},${t}`,transform:`rotate(180, ${e}, ${t})`})},yz=({offset:e,id:t,start:n,end:r,getX:i,y:s,dims:a,colour:l,eventRadius:d,onClick:y})=>{const _=i(r)-i(n);return e===void 0?null:M("rect",{onClick:y,className:"project",x:i(n),y:a.marginTop+e,width:_,style:{fill:l,fillOpacity:.2},height:2*d})};function dv({radius:e,colorPercentMap:t,styles:n,className:r}){let i=0;const s=Object.keys(t);return M(Ln,{children:s.map((a,l)=>{const d=t[a],[y,_]=h0(e,i);i+=d;const[c,f]=h0(e,i),w=s.length===1||d>.5?1:0,v=[`M ${y} ${_}`,`A ${e} ${e} 0 ${w} 1 ${c} ${f}`,"L 0 0 ",`L ${y} ${_} Z`].join(" "),m={...n,fill:a};return M("path",{className:r,id:`arc_${l}`,d:v,style:m},`arc_${l}`)})})}const _z="#E31A1B";function ub(e,t,n){const r=wa([e],n.coloringSet);return M("g",{className:"timeline-event",onClick:n.onSelect,transform:`translate(${n.x}, ${n.y+40})`,children:M(dv,{radius:n.eventRadius,colorPercentMap:_a(n.filterColors,r),styles:{...t},className:"event"})},e.id)}function cb(e,t,n){const r=n.features.GRAPH_NONLOCATED?e.projectOffset>=0?t.opacity:.5:lg(1);return M(pz,{onSelect:n.onSelect,category:e.category,events:[e],x:n.x,y:n.dims.marginTop,width:n.eventRadius/4,height:n.dims.trackHeight,styleProps:{...t,fillOpacity:r},highlights:n.highlights})}function wz(e,t,n){return M(wx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius,r:1.8*n.eventRadius,styleProps:t,transform:`rotate(45, ${n.x}, ${n.y})`})}function bz(e,t,n){return M(wx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius/2,r:1.8*n.eventRadius,styleProps:t})}function Tz(e,t,n){return M(gz,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function Sz(e,t,n){return M(vz,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function Ez(e,t,n){return M(mz,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.8*n.eventRadius,styleProps:{...t,fillRule:"nonzero"},transform:`rotate(180, ${n.x}, ${n.y})`})}const xz=({events:e,projects:t,categories:n,narrative:r,getDatetimeX:i,getY:s,getCategoryColor:a,getHighlights:l,onSelect:d,transitionDuration:y,dims:_,features:c,setLoading:f,setNotLoading:w,eventRadius:v,filterColors:m,coloringSet:b,highlighted:g})=>{const p=r?r.steps.map(x=>x.id):[];function h(x,k){if(r&&!p.includes(k.id))return null;const P=La(k.latitude)&&Ra(k.longitude)||c.GRAPH_NONLOCATED&&k.projectOffset!==-1,{shape:E}=k;let A=P?ub:cb;E&&E.shape&&(E.shape===Tr.BAR?A=cb:E.shape===Tr.DIAMOND?A=wz:E.shape===Tr.STAR?A=Ez:E.shape===Tr.TRIANGLE?A=Tz:E.shape===Tr.PENTAGON?A=Sz:E.shape===Tr.SQUARE?A=bz:A=ub);const C=g&&g.length>0&&g.includes(k.civId),N=zS(k,n).map(F=>{const z=s({...k,category:F}),H={fill:C?_z:k.colour?k.colour:a(F.title),fillOpacity:z>0?lg(1):0,transition:`transform ${y/1e3}s ease`};return{y:z,styles:H}});function $(F,z){return A(k,z,{x:i(k.datetime),y:F,eventRadius:v,onSelect:()=>d(k),dims:_,highlights:c.HIGHLIGHT_GROUPS?l(k.filters[c.HIGHLIGHT_GROUPS.filterIndexIndicatingGroup]):[],features:c,filterColors:m,coloringSet:b})}return N.length===0?x.push($(s(k),{fill:a(null)})):N.forEach(F=>{x.push($(F.y,F.styles))}),x}let T=()=>null;return c.GRAPH_NONLOCATED&&(T=function(){return M(Ln,{children:Object.values(t).map(x=>M(yz,{...x,eventRadius:v,onClick:()=>console.log(x),getX:i,dims:_,colour:a(x.category)},x.id))})}),re("g",{clipPath:"url(#clip)",children:[T(),e.reduce(h,[])]})};class kz extends te.Component{constructor(t){super(t),this.grabRef=te.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){if(!this.state.isInitialized){const t=OI().on("start",this.props.onDragStart).on("drag",this.props.onDrag).on("end",this.props.onDragEnd);Bi(this.grabRef.current).call(t),this.setState({isInitialized:!0})}}renderCategory(t,n){const{features:r,dims:i}=this.props,s=1;return r.GRAPH_NONLOCATED&&r.GRAPH_NONLOCATED.categories&&r.GRAPH_NONLOCATED.categories.includes(t)?null:re(Ln,{children:[M("g",{className:"tick",style:{strokeWidth:s},opacity:"0.5",transform:"translate(0, 66)",children:M("line",{x1:i.marginLeft,x2:i.width-i.marginLeft})}),M("g",{className:"tick",opacity:"1",transform:"translate(0, 66)",children:M("text",{x:i.marginLeft-5,dy:"0.32em",children:t})})]})}render(){const{dims:t,categories:n,fallbackLabel:r}=this.props,s=n&&n.length>0?n.map((a,l)=>this.renderCategory(a,l)):this.renderCategory(r,0);return re("g",{className:"yAxis",children:[s,M("rect",{ref:this.grabRef,className:"drag-grabber",x:t.marginLeft,y:t.marginTop,width:Math.max(0,t.width-t.marginLeft*2),height:t.contentHeight})]})}}class Cz extends te.Component{constructor(t){super(t);let n=new URLSearchParams(window.location.href.split("?")[1]);this.styleDatetime=this.styleDatetime.bind(this),this.getDatetimeX=this.getDatetimeX.bind(this),this.getY=this.getY.bind(this),this.onApplyZoom=this.onApplyZoom.bind(this),this.onSelect=this.onSelect.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.svgRef=te.createRef(),this.state={isFolded:n.has("timeline")&&n.get("timeline")==="false",dims:t.dimensions,scaleX:null,scaleY:null,timerange:[null,null],dragPos0:null,transitionDuration:300}}componentDidMount(){this.addEventListeners()}UNSAFE_componentWillReceiveProps(t){if(tn(t)!==tn(this.props)&&(this.setState({timerange:t.app.timeline.range,scaleX:this.makeScaleX()}),(this==null?void 0:this.initialTimeRange)==null&&(this.initialTimeRange=t.app.timeline.range)),tn(t.activeCategories)!==tn(this.props.activeCategories)||tn(t.dimensions)!==tn(this.props.dimensions)){const{trackHeight:n,marginTop:r}=t.dimensions;this.setState({scaleY:this.makeScaleY(t.activeCategories,n,r)})}t.dimensions.trackHeight!==this.props.dimensions.trackHeight&&this.computeDims()}addEventListeners(){window.addEventListener("resize",()=>{this.computeDims()});const t=document.querySelector(".timeline-wrapper");t!==null&&t.addEventListener("transitionend",n=>{this.computeDims()})}makeScaleX(){return ZM().domain(this.state.timerange).range([this.state.dims.marginLeft,this.state.dims.width-this.state.dims.marginLeft])}makeScaleY(t,n,r){const{features:i}=this.props;i.GRAPH_NONLOCATED&&i.GRAPH_NONLOCATED.categories&&(t=t.filter(d=>!i.GRAPH_NONLOCATED.categories.includes(d.title)));const s=0,a=t.length>2?n/t.length:n/(t.length+1),l=t.map((d,y)=>(y+1)*a+r+s/2);return d=>{const y=t.indexOf(d);return l[y]}}componentDidUpdate(t,n){n.timerange!==this.state.timerange&&this.setState({scaleX:this.makeScaleX()})}getTimeScaleExtent(){if(!this.state.scaleX)return 0;const t=this.state.scaleX.domain();return(t[1].getTime()-t[0].getTime())/6e4}onClickArrow(){this.setState(t=>({isFolded:!t.isFolded}))}computeDims(){const t=this.props.ui.dom.timeline;if(document.querySelector(`#${t}`)!==null){const n=document.querySelector(`#${t}`).getBoundingClientRect();this.setState({dims:{...this.props.dimensions,width:n.width}},()=>{this.setState({scaleX:this.makeScaleX()})})}}onMoveTime(t){const n=this.getTimeScaleExtent(),r=Jt.offset(this.state.scaleX.domain()[0],n);let i=r,s=Jt.offset(r,n);t==="backwards"&&(i=Jt.offset(r,-(2*n)),s=Jt.offset(r,-n)),this.props.methods.onUpdateTimerange([i,s]),this.props.methods.onSelect([])}onCenterTime(t){const n=this.getTimeScaleExtent(),r=Jt.offset(t,-n/2),i=Jt.offset(t,+n/2);this.setState({timerange:[r,i]},()=>{this.props.methods.onUpdateTimerange(this.state.timerange)})}onSoftTimeRangeUpdate(t){this.setState({timerange:t})}onApplyZoom(t){const n=new Date,{rangeLimits:r}=this.props.app.timeline;let i=n,s=Jt.offset(n,-t.duration);if(r){const a=r[0],l=r[1];sl&&(i=l,s=Jt.offset(i,-t.duration))}this.setState({timerange:[s,i]},()=>{this.props.actions.updateTicks(15),this.props.methods.onUpdateTimerange(this.state.timerange)})}toggleTransition(t){this.setState({transitionDuration:t?300:0})}onDragStart(t){t.sourceEvent.stopPropagation(),this.setState({dragPos0:t.x},()=>{this.toggleTransition(!1)})}onDrag(t){const n=this.state.scaleX.invert(this.state.dragPos0).getTime(),r=this.state.scaleX.invert(t.x).getTime(),i=(n-r)/1e3,{range:s,rangeLimits:a}=this.props.app.timeline;let l=ei.offset(s[0],i),d=ei.offset(s[1],i);if(a){const y=a[0],_=a[1];l=l_?_:d}this.onSoftTimeRangeUpdate([l,d])}onDragEnd(){this.toggleTransition(!0),this.props.methods.onUpdateTimerange(this.state.timerange)}getDatetimeX(t){return this.state.scaleX(t)}getY(t){const{features:n,domain:r,activeCategories:i}=this.props,{USE_CATEGORIES:s,GRAPH_NONLOCATED:a}=n;if(!(s&&i&&i.length>0))return this.state.dims.trackHeight/1.5;const{category:d}=t;if(a&&a.categories.includes(d)){const{project:y}=t;return this.state.dims.marginTop+r.projects[y].offset+this.props.ui.eventRadius}return this.state.scaleY?this.state.scaleY(d):0}styleDatetime(t,n){return[null,null]}onSelect(t){if(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK){const n=Math.floor(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK/2),r=Jt.offset(t.datetime,-n),i=Jt.offset(t.datetime,n);this.props.actions.updateTicks(1),this.props.methods.onUpdateTimerange([r,i])}this.props.methods.onSelect(t)}render(){const{isNarrative:t,app:n,domain:r}=this.props,{timeline:i}=n;let s=`timeline-wrapper ${this.state.isFolded?" folded":""}`;s+=n.narrative!==null?" narrative-mode":"";const{dims:a}=this.state,l={height:a.contentHeight},{activeCategories:d}=this.props,y=ze[this.props.app.language].timeline.info.replace("%n",r.eventCountInTimeRange),_=ze[this.props.app.language].timeline.reset;return re("div",{className:s,onKeyDown:this.props.onKeyDown,tabIndex:"1",children:[M(sz,{title:y,from:this.state.timerange[0],to:this.state.timerange[1],onClick:()=>{this.onClickArrow()},hideInfo:t,resetTest:_,resetClick:()=>{this.setState({timerange:this.initialTimeRange},()=>{this.props.methods.onUpdateTimerange(this.state.timerange)}),this.computeDims()}}),M("div",{className:"timeline-content",children:re("div",{id:this.props.ui.dom.timeline,className:"timeline",children:[M("div",{className:"timeline-container",children:re("svg",{ref:this.svgRef,width:a.width,style:l,children:[M(uz,{dims:a}),M(lz,{ticks:i.dimensions.ticks,dims:a,extent:this.getTimeScaleExtent(),transitionDuration:this.state.transitionDuration,scaleX:this.state.scaleX}),M(kz,{dims:a,getCategoryY:c=>this.getY({category:c,project:null}),onDragStart:this.onDragStart,onDrag:this.onDrag,onDragEnd:this.onDragEnd,categories:d,features:this.props.features,fallbackLabel:ze[this.props.app.language].timeline.default_categories_label}),M(hz,{dims:a,selected:this.props.app.selected,getEventX:c=>this.getDatetimeX(c.datetime),getEventY:this.getY,categories:d,transitionDuration:this.state.transitionDuration,styles:this.props.ui.styles,features:this.props.features,eventRadius:this.props.ui.eventRadius}),M(xz,{events:this.props.domain.events,projects:this.props.domain.projects,categories:d,styleDatetime:this.styleDatetime,narrative:this.props.app.narrative,getDatetimeX:this.getDatetimeX,getY:this.getY,getHighlights:c=>c==="None"?[]:d.map(f=>f.group===c),getCategoryColor:this.props.methods.getCategoryColor,transitionDuration:this.state.transitionDuration,onSelect:this.onSelect,dims:a,features:this.props.features,setLoading:this.props.actions.setLoading,setNotLoading:this.props.actions.setNotLoading,eventRadius:this.props.ui.eventRadius,filterColors:this.props.ui.filterColors,coloringSet:this.props.app.coloringSet,highlighted:this.props.app.highlighted})]})}),re("div",{className:"timeline-bottom",children:[M(lb,{dims:a,onMoveTime:c=>{this.onMoveTime(c)},backward:!0}),M(fz,{extent:this.getTimeScaleExtent(),zoomLevels:i.zoomLevels,dims:a,onApplyZoom:this.onApplyZoom}),M(lb,{dims:a,onMoveTime:c=>{this.onMoveTime(c)},backward:!1})]})]})})]})}}function Az(e){return{dimensions:Np(e),isNarrative:!!e.app.associations.narrative,activeCategories:jg(e),domain:{events:P$(e),eventCountInTimeRange:C$(e),projects:L$(e),narratives:e.domain.narratives},app:{selected:e.app.selected,highlighted:e.app.highlighted,language:e.app.language,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,timeline:{zoomLevels:e.app.timeline.zoomLevels,dimensions:Np(e),ticks:e.app.timeline.ticks,range:zg(e),rangeLimits:sE(e)}},ui:{dom:e.ui.dom,styles:e.ui.style.selectedEvents,eventRadius:e.ui.eventRadius,filterColors:e.ui.coloring.colors},features:hr(e)}}function Pz(e){return{actions:Ko({setLoading:ZS,setNotLoading:GS,updateTicks:XS},e)}}const Lz=pi(Az,Pz)(Cz);var db={exports:{}};/* @preserve * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(Xr,function(n){var r="1.9.3";function i(o){var u,S,R,I;for(S=1,R=arguments.length;S"u"||!L||!L.Mixin)){o=h(o)?o:[o];for(var u=0;u0?Math.floor(o):Math.ceil(o)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(o){return this.clone()._add(G(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(G(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new V(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new V(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Y(this.x),this.y=Y(this.y),this},distanceTo:function(o){o=G(o);var u=o.x-this.x,S=o.y-this.y;return Math.sqrt(u*u+S*S)},equals:function(o){return o=G(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=G(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function G(o,u,S){return o instanceof V?o:h(o)?new V(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new V(o.x,o.y):new V(o,u,S)}function J(o,u){if(o)for(var S=u?[o,u]:o,R=0,I=S.length;R=this.min.x&&S.x<=this.max.x&&u.y>=this.min.y&&S.y<=this.max.y},intersects:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>=u.x&&R.x<=S.x,q=I.y>=u.y&&R.y<=S.y;return D&&q},overlaps:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>u.x&&R.xu.y&&R.y=u.lat&&I.lat<=S.lat&&R.lng>=u.lng&&I.lng<=S.lng},intersects:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>=u.lat&&R.lat<=S.lat,q=I.lng>=u.lng&&R.lng<=S.lng;return D&&q},overlaps:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>u.lat&&R.latu.lng&&R.lng1,Lk=function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",c,u),window.removeEventListener("testPassiveEventSupport",c,u)}catch{}return o}(),Rk=function(){return!!document.createElement("canvas").getContext}(),Gc=!!(document.createElementNS&&ve("svg").createSVGRect),Ik=!!Gc&&function(){var o=document.createElement("div");return o.innerHTML="",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Nk=!Gc&&function(){try{var o=document.createElement("div");o.innerHTML='';var u=o.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}}(),Ok=navigator.platform.indexOf("Mac")===0,Mk=navigator.platform.indexOf("Linux")===0;function Jn(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var we={ie:ft,ielt9:kt,edge:Be,webkit:Ue,android:qe,android23:xe,androidStock:Pe,opera:Je,chrome:Le,gecko:yi,safari:Ge,phantom:jr,opera12:cn,win:Ma,ie3d:ts,webkit3d:Zc,gecko3d:gv,any3d:Sk,mobile:ns,mobileWebkit:Ek,mobileWebkit3d:xk,msPointer:vv,pointer:yv,touch:kk,touchNative:_v,mobileOpera:Ck,mobileGecko:Ak,retina:Pk,passiveEvents:Lk,canvas:Rk,svg:Gc,vml:Nk,inlineSvg:Ik,mac:Ok,linux:Mk},wv=we.msPointer?"MSPointerDown":"pointerdown",bv=we.msPointer?"MSPointerMove":"pointermove",Tv=we.msPointer?"MSPointerUp":"pointerup",Sv=we.msPointer?"MSPointerCancel":"pointercancel",Yc={touchstart:wv,touchmove:bv,touchend:Tv,touchcancel:Sv},Ev={touchstart:Bk,touchmove:Da,touchend:Da,touchcancel:Da},eo={},xv=!1;function Dk(o,u,S){return u==="touchstart"&&zk(),Ev[u]?(S=Ev[u].bind(this,S),o.addEventListener(Yc[u],S,!1),S):(console.warn("wrong event specified:",u),c)}function $k(o,u,S){if(!Yc[u]){console.warn("wrong event specified:",u);return}o.removeEventListener(Yc[u],S,!1)}function Fk(o){eo[o.pointerId]=o}function jk(o){eo[o.pointerId]&&(eo[o.pointerId]=o)}function kv(o){delete eo[o.pointerId]}function zk(){xv||(document.addEventListener(wv,Fk,!0),document.addEventListener(bv,jk,!0),document.addEventListener(Tv,kv,!0),document.addEventListener(Sv,kv,!0),xv=!0)}function Da(o,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var S in eo)u.touches.push(eo[S]);u.changedTouches=[u],o(u)}}function Bk(o,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&$t(u),Da(o,u)}function Uk(o){var u={},S,R;for(R in o)S=o[R],u[R]=S&&S.bind?S.bind(o):S;return o=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var Hk=200;function Vk(o,u){o.addEventListener("dblclick",u);var S=0,R;function I(D){if(D.detail!==1){R=D.detail;return}if(!(D.pointerType==="mouse"||D.sourceCapabilities&&!D.sourceCapabilities.firesTouchEvents)){var q=Rv(D);if(!(q.some(function(X){return X instanceof HTMLLabelElement&&X.attributes.for})&&!q.some(function(X){return X instanceof HTMLInputElement||X instanceof HTMLSelectElement}))){var K=Date.now();K-S<=Hk?(R++,R===2&&u(Uk(D))):R=1,S=K}}}return o.addEventListener("click",I),{dblclick:u,simDblclick:I}}function Wk(o,u){o.removeEventListener("dblclick",u.dblclick),o.removeEventListener("click",u.simDblclick)}var Kc=ja(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),rs=ja(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Cv=rs==="webkitTransition"||rs==="OTransition"?rs+"End":"transitionend";function Av(o){return typeof o=="string"?document.getElementById(o):o}function is(o,u){var S=o.style[u]||o.currentStyle&&o.currentStyle[u];if((!S||S==="auto")&&document.defaultView){var R=document.defaultView.getComputedStyle(o,null);S=R?R[u]:null}return S==="auto"?null:S}function Fe(o,u,S){var R=document.createElement(o);return R.className=u||"",S&&S.appendChild(R),R}function st(o){var u=o.parentNode;u&&u.removeChild(o)}function $a(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function to(o){var u=o.parentNode;u&&u.lastChild!==o&&u.appendChild(o)}function no(o){var u=o.parentNode;u&&u.firstChild!==o&&u.insertBefore(o,u.firstChild)}function Xc(o,u){if(o.classList!==void 0)return o.classList.contains(u);var S=Fa(o);return S.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(S)}function Ae(o,u){if(o.classList!==void 0)for(var S=v(u),R=0,I=S.length;R0?2*window.devicePixelRatio:1;function Nv(o){return we.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/Gk:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function ud(o,u){var S=u.relatedTarget;if(!S)return!0;try{for(;S&&S!==o;)S=S.parentNode}catch{return!1}return S!==o}var Yk={__proto__:null,on:Ce,off:Ke,stopPropagation:bi,disableScrollPropagation:ld,disableClickPropagation:ls,preventDefault:$t,stop:Ti,getPropagationPath:Rv,getMousePosition:Iv,getWheelDelta:Nv,isExternalTarget:ud,addListener:Ce,removeListener:Ke},Ov=B.extend({run:function(o,u,S,R){this.stop(),this._el=o,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(R||.5,.2),this._startPos=wi(o),this._offset=u.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=N(this._animate,this),this._step()},_step:function(o){var u=+new Date-this._startTime,S=this._duration*1e3;uthis.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,u){this._enforcingBounds=!0;var S=this.getCenter(),R=this._limitCenter(S,this._zoom,fe(o));return S.equals(R)||this.panTo(R,u),this._enforcingBounds=!1,this},panInside:function(o,u){u=u||{};var S=G(u.paddingTopLeft||u.padding||[0,0]),R=G(u.paddingBottomRight||u.padding||[0,0]),I=this.project(this.getCenter()),D=this.project(o),q=this.getPixelBounds(),K=oe([q.min.add(S),q.max.subtract(R)]),X=K.getSize();if(!K.contains(D)){this._enforcingBounds=!0;var ie=D.subtract(K.getCenter()),he=K.extend(D).getSize().subtract(X);I.x+=ie.x<0?-he.x:he.x,I.y+=ie.y<0?-he.y:he.y,this.panTo(this.unproject(I),u),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),R=u.divideBy(2).round(),I=S.divideBy(2).round(),D=R.subtract(I);return!D.x&&!D.y?this:(o.animate&&o.pan?this.panBy(D):(o.pan&&this._rawPanBy(D),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=a(this._handleGeolocationResponse,this),S=a(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,S,o):navigator.geolocation.getCurrentPosition(u,S,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var u=o.code,S=o.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var u=o.coords.latitude,S=o.coords.longitude,R=new de(u,S),I=R.toBounds(o.coords.accuracy*2),D=this._locateOptions;if(D.setView){var q=this.getBoundsZoom(I);this.setView(R,D.maxZoom?Math.min(q,D.maxZoom):q)}var K={latlng:R,bounds:I,timestamp:o.timestamp};for(var X in o.coords)typeof o.coords[X]=="number"&&(K[X]=o.coords[X]);this.fire("locationfound",K)}},addHandler:function(o,u){if(!u)return this;var S=this[o]=new u(this);return this._handlers.push(S),this.options[o]&&S.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),st(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&($(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)st(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,u){var S="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),R=Fe("div",S,u||this._mapPane);return o&&(this._panes[o]=R),R},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),u=this.unproject(o.getBottomLeft()),S=this.unproject(o.getTopRight());return new ce(u,S)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,u,S){o=fe(o),S=G(S||[0,0]);var R=this.getZoom()||0,I=this.getMinZoom(),D=this.getMaxZoom(),q=o.getNorthWest(),K=o.getSouthEast(),X=this.getSize().subtract(S),ie=oe(this.project(K,R),this.project(q,R)).getSize(),he=we.any3d?this.options.zoomSnap:1,Se=X.x/ie.x,Re=X.y/ie.y,En=u?Math.max(Se,Re):Math.min(Se,Re);return R=this.getScaleZoom(En,R),he&&(R=Math.round(R/(he/100))*(he/100),R=u?Math.ceil(R/he)*he:Math.floor(R/he)*he),Math.max(I,Math.min(D,R))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,u){var S=this._getTopLeftPoint(o,u);return new J(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,u){var S=this.options.crs;return u=u===void 0?this._zoom:u,S.scale(o)/S.scale(u)},getScaleZoom:function(o,u){var S=this.options.crs;u=u===void 0?this._zoom:u;var R=S.zoom(o*S.scale(u));return isNaN(R)?1/0:R},project:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(ue(o),u)},unproject:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(G(o),u)},layerPointToLatLng:function(o){var u=G(o).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(o){var u=this.project(ue(o))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(ue(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(fe(o))},distance:function(o,u){return this.options.crs.distance(ue(o),ue(u))},containerPointToLayerPoint:function(o){return G(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return G(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var u=this.containerPointToLayerPoint(G(o));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ue(o)))},mouseEventToContainerPoint:function(o){return Iv(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var u=this._container=Av(o);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ce(u,"scroll",this._onScroll,this),this._containerId=d(u)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&we.any3d,Ae(o,"leaflet-container"+(we.touch?" leaflet-touch":"")+(we.retina?" leaflet-retina":"")+(we.ielt9?" leaflet-oldie":"")+(we.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=is(o,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Tt(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ae(o.markerPane,"leaflet-zoom-hide"),Ae(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,u,S){Tt(this._mapPane,new V(0,0));var R=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var I=this._zoom!==u;this._moveStart(I,S)._move(o,u)._moveEnd(I),this.fire("viewreset"),R&&this.fire("load")},_moveStart:function(o,u){return o&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(o,u,S,R){u===void 0&&(u=this._zoom);var I=this._zoom!==u;return this._zoom=u,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),R?S&&S.pinch&&this.fire("zoom",S):((I||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return $(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){Tt(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[d(this._container)]=this;var u=o?Ke:Ce;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),we.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){$(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,u){for(var S=[],R,I=u==="mouseout"||u==="mouseover",D=o.target||o.srcElement,q=!1;D;){if(R=this._targets[d(D)],R&&(u==="click"||u==="preclick")&&this._draggableMoved(R)){q=!0;break}if(R&&R.listens(u,!0)&&(I&&!ud(D,o)||(S.push(R),I))||D===this._container)break;D=D.parentNode}return!S.length&&!q&&!I&&this.listens(u,!0)&&(S=[this]),S},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var u=o.target||o.srcElement;if(!(!this._loaded||u._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(u))){var S=o.type;S==="mousedown"&&rd(u),this._fireDOMEvent(o,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,u,S){if(o.type==="click"){var R=i({},o);R.type="preclick",this._fireDOMEvent(R,R.type,S)}var I=this._findEventTargets(o,u);if(S){for(var D=[],q=0;q0?Math.round(o-u)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(u))},_limitZoom:function(o){var u=this.getMinZoom(),S=this.getMaxZoom(),R=we.any3d?this.options.zoomSnap:1;return R&&(o=Math.round(o/R)*R),Math.max(u,Math.min(S,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,u){var S=this._getCenterOffset(o)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,u),!0)},_createAnimProxy:function(){var o=this._proxy=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(u){var S=Kc,R=this._proxy.style[S];_i(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),R===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){st(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),u=this.getZoom();_i(this._proxy,this.project(o,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,u,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var R=this.getZoomScale(u),I=this._getCenterOffset(o)._divideBy(1-1/R);return S.animate!==!0&&!this.getSize().contains(I)?!1:(N(function(){this._moveStart(!0,!1)._animateZoom(o,u,!0)},this),!0)},_animateZoom:function(o,u,S,R){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=u,Ae(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:u,noUpdate:R}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Kk(o,u){return new Oe(o,u)}var Mn=z.extend({options:{position:"topright"},initialize:function(o){m(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var u=this._map;return u&&u.removeControl(this),this.options.position=o,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var u=this._container=this.onAdd(o),S=this.getPosition(),R=o._controlCorners[S];return Ae(u,"leaflet-control"),S.indexOf("bottom")!==-1?R.insertBefore(u,R.firstChild):R.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(st(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),us=function(o){return new Mn(o)};Oe.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},u="leaflet-",S=this._controlContainer=Fe("div",u+"control-container",this._container);function R(I,D){var q=u+I+" "+u+D;o[I+D]=Fe("div",q,S)}R("top","left"),R("top","right"),R("bottom","left"),R("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)st(this._controlCorners[o]);st(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mv=Mn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,u,S,R){return S1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=u&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var u=this._getLayer(d(o.target)),S=u.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;S&&this._map.fire(S,u)},_createRadioElement:function(o,u){var S='",R=document.createElement("div");return R.innerHTML=S,R.firstChild},_addItem:function(o){var u=document.createElement("label"),S=this._map.hasLayer(o.layer),R;o.overlay?(R=document.createElement("input"),R.type="checkbox",R.className="leaflet-control-layers-selector",R.defaultChecked=S):R=this._createRadioElement("leaflet-base-layers_"+d(this),S),this._layerControlInputs.push(R),R.layerId=d(o.layer),Ce(R,"click",this._onInputClick,this);var I=document.createElement("span");I.innerHTML=" "+o.name;var D=document.createElement("span");u.appendChild(D),D.appendChild(R),D.appendChild(I);var q=o.overlay?this._overlaysList:this._baseLayersList;return q.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){var o=this._layerControlInputs,u,S,R=[],I=[];this._handlingClick=!0;for(var D=o.length-1;D>=0;D--)u=o[D],S=this._getLayer(u.layerId).layer,u.checked?R.push(S):u.checked||I.push(S);for(D=0;D=0;I--)u=o[I],S=this._getLayer(u.layerId).layer,u.disabled=S.options.minZoom!==void 0&&RS.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;Ce(o,"click",$t),this.expand(),setTimeout(function(){Ke(o,"click",$t)})}}),Xk=function(o,u,S){return new Mv(o,u,S)},cd=Mn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(o){var u="leaflet-control-zoom",S=Fe("div",u+" leaflet-bar"),R=this.options;return this._zoomInButton=this._createButton(R.zoomInText,R.zoomInTitle,u+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(R.zoomOutText,R.zoomOutTitle,u+"-out",S,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,u,S,R,I){var D=Fe("a",S,R);return D.innerHTML=o,D.href="#",D.title=u,D.setAttribute("role","button"),D.setAttribute("aria-label",u),ls(D),Ce(D,"click",Ti),Ce(D,"click",I,this),Ce(D,"click",this._refocusOnMap,this),D},_updateDisabled:function(){var o=this._map,u="leaflet-disabled";_t(this._zoomInButton,u),_t(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(Ae(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(Ae(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});Oe.mergeOptions({zoomControl:!0}),Oe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new cd,this.addControl(this.zoomControl))});var Qk=function(o){return new cd(o)},Dv=Mn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var u="leaflet-control-scale",S=Fe("div",u),R=this.options;return this._addScales(R,u+"-line",S),o.on(R.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),S},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,u,S){o.metric&&(this._mScale=Fe("div",u,S)),o.imperial&&(this._iScale=Fe("div",u,S))},_update:function(){var o=this._map,u=o.getSize().y/2,S=o.distance(o.containerPointToLatLng([0,u]),o.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(S)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var u=this._getRoundNum(o),S=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,S,u/o)},_updateImperial:function(o){var u=o*3.2808399,S,R,I;u>5280?(S=u/5280,R=this._getRoundNum(S),this._updateScale(this._iScale,R+" mi",R/S)):(I=this._getRoundNum(u),this._updateScale(this._iScale,I+" ft",I/u))},_updateScale:function(o,u,S){o.style.width=Math.round(this.options.maxWidth*S)+"px",o.innerHTML=u},_getRoundNum:function(o){var u=Math.pow(10,(Math.floor(o)+"").length-1),S=o/u;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,u*S}}),Jk=function(o){return new Dv(o)},eC='',dd=Mn.extend({options:{position:"bottomright",prefix:'
'+(we.inlineSvg?eC+" ":"")+"Leaflet"},initialize:function(o){m(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),ls(this._container);for(var u in o._layers)o._layers[u].getAttribution&&this.addAttribution(o._layers[u].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var u in this._attributions)this._attributions[u]&&o.push(u);var S=[];this.options.prefix&&S.push(this.options.prefix),o.length&&S.push(o.join(", ")),this._container.innerHTML=S.join(' ')}}});Oe.mergeOptions({attributionControl:!0}),Oe.addInitHook(function(){this.options.attributionControl&&new dd().addTo(this)});var tC=function(o){return new dd(o)};Mn.Layers=Mv,Mn.Zoom=cd,Mn.Scale=Dv,Mn.Attribution=dd,us.layers=Xk,us.zoom=Qk,us.scale=Jk,us.attribution=tC;var tr=z.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tr.addTo=function(o,u){return o.addHandler(u,this),this};var nC={Events:H},$v=we.touch?"touchstart mousedown":"mousedown",zr=B.extend({options:{clickTolerance:3},initialize:function(o,u,S,R){m(this,R),this._element=o,this._dragStartTarget=u||o,this._preventOutline=S},enable:function(){this._enabled||(Ce(this._dragStartTarget,$v,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(zr._dragging===this&&this.finishDrag(!0),Ke(this._dragStartTarget,$v,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!Xc(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){zr._dragging===this&&this.finishDrag();return}if(!(zr._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(zr._dragging=this,this._preventOutline&&rd(this._element),ed(),os(),!this._moving)){this.fire("down");var u=o.touches?o.touches[0]:o,S=Pv(this._element);this._startPoint=new V(u.clientX,u.clientY),this._startPos=wi(this._element),this._parentScale=id(S);var R=o.type==="mousedown";Ce(document,R?"mousemove":"touchmove",this._onMove,this),Ce(document,R?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var u=o.touches&&o.touches.length===1?o.touches[0]:o,S=new V(u.clientX,u.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)D&&(q=K,D=X);D>S&&(u[q]=1,fd(o,u,S,R,q),fd(o,u,S,q,I))}function oC(o,u){for(var S=[o[0]],R=1,I=0,D=o.length;Ru&&(S.push(o[R]),I=R);return Iu.max.x&&(S|=2),o.yu.max.y&&(S|=8),S}function sC(o,u){var S=u.x-o.x,R=u.y-o.y;return S*S+R*R}function cs(o,u,S,R){var I=u.x,D=u.y,q=S.x-I,K=S.y-D,X=q*q+K*K,ie;return X>0&&(ie=((o.x-I)*q+(o.y-D)*K)/X,ie>1?(I=S.x,D=S.y):ie>0&&(I+=q*ie,D+=K*ie)),q=o.x-I,K=o.y-D,R?q*q+K*K:new V(I,D)}function Sn(o){return!h(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Uv(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Sn(o)}function Hv(o,u){var S,R,I,D,q,K,X,ie;if(!o||o.length===0)throw new Error("latlngs not passed");Sn(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var he=[];for(var Se in o)he.push(u.project(ue(o[Se])));var Re=he.length;for(S=0,R=0;SR){X=(D-R)/I,ie=[K.x-X*(K.x-q.x),K.y-X*(K.y-q.y)];break}return u.unproject(G(ie))}var aC={__proto__:null,simplify:Fv,pointToSegmentDistance:jv,closestPointOnSegment:rC,clipSegment:Bv,_getEdgeIntersection:Ua,_getBitCode:Si,_sqClosestPointOnSegment:cs,isFlat:Sn,_flat:Uv,polylineCenter:Hv};function Vv(o,u,S){var R,I=[1,4,2,8],D,q,K,X,ie,he,Se,Re;for(D=0,he=o.length;D1e-7;K++)ie=I*Math.sin(q),ie=Math.pow((1-ie)/(1+ie),I/2),X=Math.PI/2-2*Math.atan(D*ie)-q,q+=X;return new de(q*u,o.x*u/S)}},uC={__proto__:null,LonLat:hd,Mercator:pd,SphericalMercator:j},cC=i({},ne,{code:"EPSG:3395",projection:pd,transformation:function(){var o=.5/(Math.PI*pd.R);return Z(o,.5,-o,.5)}()}),qv=i({},ne,{code:"EPSG:4326",projection:hd,transformation:Z(1/180,1,-1/180,.5)}),dC=i({},be,{projection:hd,transformation:Z(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,u){var S=u.lng-o.lng,R=u.lat-o.lat;return Math.sqrt(S*S+R*R)},infinite:!0});be.Earth=ne,be.EPSG3395=cC,be.EPSG3857=Q,be.EPSG900913=ee,be.EPSG4326=qv,be.Simple=dC;var Dn=B.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[d(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[d(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var u=o.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var S=this.getEvents();u.on(S,this),this.once("remove",function(){u.off(S,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});Oe.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var u=d(o);return this._layers[u]?this:(this._layers[u]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var u=d(o);return this._layers[u]?(this._loaded&&o.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return d(o)in this._layers},eachLayer:function(o,u){for(var S in this._layers)o.call(u,this._layers[S]);return this},_addLayers:function(o){o=o?h(o)?o:[o]:[];for(var u=0,S=o.length;uthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&u[0]instanceof de&&u[0].equals(u[S-1])&&u.pop(),u},_setLatLngs:function(o){gr.prototype._setLatLngs.call(this,o),Sn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Sn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,u=this.options.weight,S=new V(u,u);if(o=new J(o.min.subtract(S),o.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var R=0,I=this._rings.length,D;Ro.y!=I.y>o.y&&o.x<(I.x-R.x)*(o.y-R.y)/(I.y-R.y)+R.x&&(u=!u);return u||gr.prototype._containsPoint.call(this,o,!0)}});function _C(o,u){return new oo(o,u)}var vr=mr.extend({initialize:function(o,u){m(this,u),this._layers={},o&&this.addData(o)},addData:function(o){var u=h(o)?o:o.features,S,R,I;if(u){for(S=0,R=u.length;S0?R:[u.src];return}h(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var D=0;DI?(u.height=I+"px",Ae(o,D)):_t(o,D),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),S=this._getAnchor();Tt(this._container,u.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,u=parseInt(is(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+u,R=this._containerWidth,I=new V(this._containerLeft,-S-this._containerBottom);I._add(wi(this._container));var D=o.layerPointToContainerPoint(I),q=G(this.options.autoPanPadding),K=G(this.options.autoPanPaddingTopLeft||q),X=G(this.options.autoPanPaddingBottomRight||q),ie=o.getSize(),he=0,Se=0;D.x+R+X.x>ie.x&&(he=D.x+R-ie.x+X.x),D.x-he-K.x<0&&(he=D.x-K.x),D.y+S+X.y>ie.y&&(Se=D.y+S-ie.y+X.y),D.y-Se-K.y<0&&(Se=D.y-K.y),(he||Se)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([he,Se]))}},_getAnchor:function(){return G(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),EC=function(o,u){return new Ka(o,u)};Oe.mergeOptions({closePopupOnClick:!0}),Oe.include({openPopup:function(o,u,S){return this._initOverlay(Ka,o,u,S).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),Dn.include({bindPopup:function(o,u){return this._popup=this._initOverlay(Ka,this._popup,o,u),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof mr||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Ti(o);var u=o.layer||o.target;if(this._popup._source===u&&!(u instanceof Br)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=u,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var Xa=nr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){nr.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){nr.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=nr.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",u=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Fe("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var u,S,R=this._map,I=this._container,D=R.latLngToContainerPoint(R.getCenter()),q=R.layerPointToContainerPoint(o),K=this.options.direction,X=I.offsetWidth,ie=I.offsetHeight,he=G(this.options.offset),Se=this._getAnchor();K==="top"?(u=X/2,S=ie):K==="bottom"?(u=X/2,S=0):K==="center"?(u=X/2,S=ie/2):K==="right"?(u=0,S=ie/2):K==="left"?(u=X,S=ie/2):q.xthis.options.maxZoom||SR?this._retainParent(I,D,q,R):!1)},_retainChildren:function(o,u,S,R){for(var I=2*o;I<2*o+2;I++)for(var D=2*u;D<2*u+2;D++){var q=new V(I,D);q.z=S+1;var K=this._tileCoordsToKey(q),X=this._tiles[K];if(X&&X.active){X.retain=!0;continue}else X&&X.loaded&&(X.retain=!0);S+1this.options.maxZoom||this.options.minZoom!==void 0&&I1){this._setView(o,S);return}for(var Se=I.min.y;Se<=I.max.y;Se++)for(var Re=I.min.x;Re<=I.max.x;Re++){var En=new V(Re,Se);if(En.z=this._tileZoom,!!this._isValidTile(En)){var Ei=this._tiles[this._tileCoordsToKey(En)];Ei?Ei.current=!0:q.push(En)}}if(q.sort(function(Ur,_d){return Ur.distanceTo(D)-_d.distanceTo(D)}),q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ja=document.createDocumentFragment();for(Re=0;ReS.max.x)||!u.wrapLat&&(o.yS.max.y))return!1}if(!this.options.bounds)return!0;var R=this._tileCoordsToBounds(o);return fe(this.options.bounds).overlaps(R)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var u=this._map,S=this.getTileSize(),R=o.scaleBy(S),I=R.add(S),D=u.unproject(R,o.z),q=u.unproject(I,o.z);return[D,q]},_tileCoordsToBounds:function(o){var u=this._tileCoordsToNwSe(o),S=new ce(u[0],u[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var u=o.split(":"),S=new V(+u[0],+u[1]);return S.z=+u[2],S},_removeTile:function(o){var u=this._tiles[o];u&&(st(u.el),delete this._tiles[o],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){Ae(o,"leaflet-tile");var u=this.getTileSize();o.style.width=u.x+"px",o.style.height=u.y+"px",o.onselectstart=c,o.onmousemove=c,we.ielt9&&this.options.opacity<1&&Tn(o,this.options.opacity)},_addTile:function(o,u){var S=this._getTilePos(o),R=this._tileCoordsToKey(o),I=this.createTile(this._wrapCoords(o),a(this._tileReady,this,o));this._initTile(I),this.createTile.length<2&&N(a(this._tileReady,this,o,null,I)),Tt(I,S),this._tiles[R]={el:I,coords:o,current:!0},u.appendChild(I),this.fire("tileloadstart",{tile:I,coords:o})},_tileReady:function(o,u,S){u&&this.fire("tileerror",{error:u,tile:S,coords:o});var R=this._tileCoordsToKey(o);S=this._tiles[R],S&&(S.loaded=+new Date,this._map._fadeAnimated?(Tn(S.el,0),$(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),u||(Ae(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),we.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var u=new V(this._wrapX?_(o.x,this._wrapX):o.x,this._wrapY?_(o.y,this._wrapY):o.y);return u.z=o.z,u},_pxBoundsToTileRange:function(o){var u=this.getTileSize();return new J(o.min.unscaleBy(u).floor(),o.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function CC(o){return new fs(o)}var ao=fs.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,u){this._url=o,u=m(this,u),u.detectRetina&&we.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,u){return this._url===o&&u===void 0&&(u=!0),this._url=o,u||this.redraw(),this},createTile:function(o,u){var S=document.createElement("img");return Ce(S,"load",a(this._tileOnLoad,this,u,S)),Ce(S,"error",a(this._tileOnError,this,u,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(o),S},getTileUrl:function(o){var u={r:we.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-o.y;this.options.tms&&(u.y=S),u["-y"]=S}return p(this._url,i(u,this.options))},_tileOnLoad:function(o,u){we.ielt9?setTimeout(a(o,this,null,u),0):o(null,u)},_tileOnError:function(o,u,S){var R=this.options.errorTileUrl;R&&u.getAttribute("src")!==R&&(u.src=R),o(S,u)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,u=this.options.maxZoom,S=this.options.zoomReverse,R=this.options.zoomOffset;return S&&(o=u-o),o+R},_getSubdomain:function(o){var u=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var o,u;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(u=this._tiles[o].el,u.onload=c,u.onerror=c,!u.complete)){u.src=x;var S=this._tiles[o].coords;st(u),delete this._tiles[o],this.fire("tileabort",{tile:u,coords:S})}},_removeTile:function(o){var u=this._tiles[o];if(u)return u.el.setAttribute("src",x),fs.prototype._removeTile.call(this,o)},_tileReady:function(o,u,S){if(!(!this._map||S&&S.getAttribute("src")===x))return fs.prototype._tileReady.call(this,o,u,S)}});function Jv(o,u){return new ao(o,u)}var ey=ao.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,u){this._url=o;var S=i({},this.defaultWmsParams);for(var R in u)R in this.options||(S[R]=u[R]);u=m(this,u);var I=u.detectRetina&&we.retina?2:1,D=this.getTileSize();S.width=D.x*I,S.height=D.y*I,this.wmsParams=S},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,ao.prototype.onAdd.call(this,o)},getTileUrl:function(o){var u=this._tileCoordsToNwSe(o),S=this._crs,R=oe(S.project(u[0]),S.project(u[1])),I=R.min,D=R.max,q=(this._wmsVersion>=1.3&&this._crs===qv?[I.y,I.x,D.y,D.x]:[I.x,I.y,D.x,D.y]).join(","),K=ao.prototype.getTileUrl.call(this,o);return K+b(this.wmsParams,K,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+q},setParams:function(o,u){return i(this.wmsParams,o),u||this.redraw(),this}});function AC(o,u){return new ey(o,u)}ao.WMS=ey,Jv.wms=AC;var yr=Dn.extend({options:{padding:.1},initialize:function(o){m(this,o),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Ae(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,u){var S=this._map.getZoomScale(u,this._zoom),R=this._map.getSize().multiplyBy(.5+this.options.padding),I=this._map.project(this._center,u),D=R.multiplyBy(-S).add(I).subtract(this._map._getNewPixelOrigin(o,u));we.any3d?_i(this._container,D,S):Tt(this._container,D)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,u=this._map.getSize(),S=this._map.containerPointToLayerPoint(u.multiplyBy(-o)).round();this._bounds=new J(S,S.add(u.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ty=yr.extend({options:{tolerance:0},getEvents:function(){var o=yr.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){yr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");Ce(o,"mousemove",this._onMouseMove,this),Ce(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ce(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){$(this._redrawRequest),delete this._ctx,st(this._container),Ke(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var u in this._layers)o=this._layers[u],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){yr.prototype._update.call(this);var o=this._bounds,u=this._container,S=o.getSize(),R=we.retina?2:1;Tt(u,o.min),u.width=R*S.x,u.height=R*S.y,u.style.width=S.x+"px",u.style.height=S.y+"px",we.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){yr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[d(o)]=o;var u=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var u=o._order,S=u.next,R=u.prev;S?S.prev=R:this._drawLast=R,R?R.next=S:this._drawFirst=S,delete o._order,delete this._layers[d(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var u=o.options.dashArray.split(/[, ]+/),S=[],R,I;for(I=0;I')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),PC={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(yr.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var u=o._container=hs("shape");Ae(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",o._path=hs("path"),u.appendChild(o._path),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){var u=o._container;this._container.appendChild(u),o.options.interactive&&o.addInteractiveTarget(u)},_removePath:function(o){var u=o._container;st(u),o.removeInteractiveTarget(u),delete this._layers[d(o)]},_updateStyle:function(o){var u=o._stroke,S=o._fill,R=o.options,I=o._container;I.stroked=!!R.stroke,I.filled=!!R.fill,R.stroke?(u||(u=o._stroke=hs("stroke")),I.appendChild(u),u.weight=R.weight+"px",u.color=R.color,u.opacity=R.opacity,R.dashArray?u.dashStyle=h(R.dashArray)?R.dashArray.join(" "):R.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=R.lineCap.replace("butt","flat"),u.joinstyle=R.lineJoin):u&&(I.removeChild(u),o._stroke=null),R.fill?(S||(S=o._fill=hs("fill")),I.appendChild(S),S.color=R.fillColor||R.color,S.opacity=R.fillOpacity):S&&(I.removeChild(S),o._fill=null)},_updateCircle:function(o){var u=o._point.round(),S=Math.round(o._radius),R=Math.round(o._radiusY||S);this._setPath(o,o._empty()?"M0 0":"AL "+u.x+","+u.y+" "+S+","+R+" 0,"+65535*360)},_setPath:function(o,u){o._path.v=u},_bringToFront:function(o){to(o._container)},_bringToBack:function(o){no(o._container)}},Qa=we.vml?hs:ve,ps=yr.extend({_initContainer:function(){this._container=Qa("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Qa("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){st(this._container),Ke(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){yr.prototype._update.call(this);var o=this._bounds,u=o.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,S.setAttribute("width",u.x),S.setAttribute("height",u.y)),Tt(S,o.min),S.setAttribute("viewBox",[o.min.x,o.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(o){var u=o._path=Qa("path");o.options.className&&Ae(u,o.options.className),o.options.interactive&&Ae(u,"leaflet-interactive"),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){st(o._path),o.removeInteractiveTarget(o._path),delete this._layers[d(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var u=o._path,S=o.options;u&&(S.stroke?(u.setAttribute("stroke",S.color),u.setAttribute("stroke-opacity",S.opacity),u.setAttribute("stroke-width",S.weight),u.setAttribute("stroke-linecap",S.lineCap),u.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?u.setAttribute("stroke-dasharray",S.dashArray):u.removeAttribute("stroke-dasharray"),S.dashOffset?u.setAttribute("stroke-dashoffset",S.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),S.fill?(u.setAttribute("fill",S.fillColor||S.color),u.setAttribute("fill-opacity",S.fillOpacity),u.setAttribute("fill-rule",S.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(o,u){this._setPath(o,se(o._parts,u))},_updateCircle:function(o){var u=o._point,S=Math.max(Math.round(o._radius),1),R=Math.max(Math.round(o._radiusY),1)||S,I="a"+S+","+R+" 0 1,0 ",D=o._empty()?"M0 0":"M"+(u.x-S)+","+u.y+I+S*2+",0 "+I+-S*2+",0 ";this._setPath(o,D)},_setPath:function(o,u){o._path.setAttribute("d",u)},_bringToFront:function(o){to(o._path)},_bringToBack:function(o){no(o._path)}});we.vml&&ps.include(PC);function ry(o){return we.svg||we.vml?new ps(o):null}Oe.include({getRenderer:function(o){var u=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var u=this._paneRenderers[o];return u===void 0&&(u=this._createRenderer({pane:o}),this._paneRenderers[o]=u),u},_createRenderer:function(o){return this.options.preferCanvas&&ny(o)||ry(o)}});var iy=oo.extend({initialize:function(o,u){oo.prototype.initialize.call(this,this._boundsToLatLngs(o),u)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=fe(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function LC(o,u){return new iy(o,u)}ps.create=Qa,ps.pointsToPath=se,vr.geometryToLayer=Wa,vr.coordsToLatLng=gd,vr.coordsToLatLngs=qa,vr.latLngToCoords=vd,vr.latLngsToCoords=Za,vr.getFeature=so,vr.asFeature=Ga,Oe.mergeOptions({boxZoom:!0});var oy=tr.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){Ce(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){st(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),os(),ed(),this._startPoint=this._map.mouseEventToContainerPoint(o),Ce(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),Ae(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var u=new J(this._point,this._startPoint),S=u.getSize();Tt(this._box,u.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(st(this._box),_t(this._container,"leaflet-crosshair")),ss(),td(),Ke(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var u=new ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Oe.addInitHook("addHandler","boxZoom",oy),Oe.mergeOptions({doubleClickZoom:!0});var sy=tr.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var u=this._map,S=u.getZoom(),R=u.options.zoomDelta,I=o.originalEvent.shiftKey?S-R:S+R;u.options.doubleClickZoom==="center"?u.setZoom(I):u.setZoomAround(o.containerPoint,I)}});Oe.addInitHook("addHandler","doubleClickZoom",sy),Oe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ay=tr.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new zr(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}Ae(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_t(this._map._container,"leaflet-grab"),_t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=fe(this._map.options.maxBounds);this._offsetLimit=oe(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var u=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(u),this._prunePositions(u)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,u){return o-(o-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;o.xu.max.x&&(o.x=this._viscousLimit(o.x,u.max.x)),o.y>u.max.y&&(o.y=this._viscousLimit(o.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,u=Math.round(o/2),S=this._initialWorldOffset,R=this._draggable._newPos.x,I=(R-u+S)%o+u-S,D=(R+u+S)%o-u-S,q=Math.abs(I+S)0?D:-D))-u;this._delta=0,this._startTime=null,q&&(o.options.scrollWheelZoom==="center"?o.setZoom(u+q):o.setZoomAround(this._lastMousePos,u+q))}});Oe.addInitHook("addHandler","scrollWheelZoom",uy);var RC=600;Oe.mergeOptions({tapHold:we.touchNative&&we.safari&&we.mobile,tapTolerance:15});var cy=tr.extend({addHooks:function(){Ce(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var u=o.touches[0];this._startPos=this._newPos=new V(u.clientX,u.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ce(document,"touchend",$t),Ce(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),RC),Ce(document,"touchend touchcancel contextmenu",this._cancel,this),Ce(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Ke(document,"touchend",$t),Ke(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)},_onMove:function(o){var u=o.touches[0];this._newPos=new V(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,u){var S=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});S._simulated=!0,u.target.dispatchEvent(S)}});Oe.addInitHook("addHandler","tapHold",cy),Oe.mergeOptions({touchZoom:we.touch,bounceAtZoomLimits:!0});var dy=tr.extend({addHooks:function(){Ae(this._map._container,"leaflet-touch-zoom"),Ce(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_t(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var u=this._map;if(!(!o.touches||o.touches.length!==2||u._animatingZoom||this._zooming)){var S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(S.add(R)._divideBy(2))),this._startDist=S.distanceTo(R),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),Ce(document,"touchmove",this._onTouchMove,this),Ce(document,"touchend touchcancel",this._onTouchEnd,this),$t(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var u=this._map,S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]),I=S.distanceTo(R)/this._startDist;if(this._zoom=u.getScaleZoom(I,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoomu.getMaxZoom()&&I>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,I===1)return}else{var D=S._add(R)._divideBy(2)._subtract(this._centerPoint);if(I===1&&D.x===0&&D.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(D),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),$(this._animRequest);var q=a(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(q,this,!0),$t(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,$(this._animRequest),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Oe.addInitHook("addHandler","touchZoom",dy),Oe.BoxZoom=oy,Oe.DoubleClickZoom=sy,Oe.Drag=ay,Oe.Keyboard=ly,Oe.ScrollWheelZoom=uy,Oe.TapHold=cy,Oe.TouchZoom=dy,n.Bounds=J,n.Browser=we,n.CRS=be,n.Canvas=ty,n.Circle=md,n.CircleMarker=Va,n.Class=z,n.Control=Mn,n.DivIcon=Qv,n.DivOverlay=nr,n.DomEvent=Yk,n.DomUtil=Zk,n.Draggable=zr,n.Evented=B,n.FeatureGroup=mr,n.GeoJSON=vr,n.GridLayer=fs,n.Handler=tr,n.Icon=io,n.ImageOverlay=Ya,n.LatLng=de,n.LatLngBounds=ce,n.Layer=Dn,n.LayerGroup=ro,n.LineUtil=aC,n.Map=Oe,n.Marker=Ha,n.Mixin=nC,n.Path=Br,n.Point=V,n.PolyUtil=lC,n.Polygon=oo,n.Polyline=gr,n.Popup=Ka,n.PosAnimation=Ov,n.Projection=uC,n.Rectangle=iy,n.Renderer=yr,n.SVG=ps,n.SVGOverlay=Xv,n.TileLayer=ao,n.Tooltip=Xa,n.Transformation=W,n.Util=F,n.VideoOverlay=Kv,n.bind=a,n.bounds=oe,n.canvas=ny,n.circle=vC,n.circleMarker=gC,n.control=us,n.divIcon=kC,n.extend=i,n.featureGroup=hC,n.geoJSON=Yv,n.geoJson=wC,n.gridLayer=CC,n.icon=pC,n.imageOverlay=bC,n.latLng=ue,n.latLngBounds=fe,n.layerGroup=fC,n.map=Kk,n.marker=mC,n.point=G,n.polygon=_C,n.polyline=yC,n.popup=EC,n.rectangle=LC,n.setOptions=m,n.stamp=d,n.svg=ry,n.svgOverlay=SC,n.tileLayer=Jv,n.tooltip=xC,n.transformation=Z,n.version=r,n.videoOverlay=TC;var IC=window.L;n.noConflict=function(){return window.L=IC,this},window.L=n})})(db,db.exports);function Dp(e,t,n,r,i,s){if(i-r<=n)return;const a=r+i>>1;bx(e,t,a,r,i,s%2),Dp(e,t,n,r,a-1,s+1),Dp(e,t,n,a+1,i,s+1)}function bx(e,t,n,r,i,s){for(;i>r;){if(i-r>600){const y=i-r+1,_=n-r+1,c=Math.log(y),f=.5*Math.exp(2*c/3),w=.5*Math.sqrt(c*f*(y-f)/y)*(_-y/2<0?-1:1),v=Math.max(r,Math.floor(n-_*f/y+w)),m=Math.min(i,Math.floor(n+(y-_)*f/y+w));bx(e,t,n,v,m,s)}const a=t[2*n+s];let l=r,d=i;for(Ps(e,t,r,n),t[2*i+s]>a&&Ps(e,t,r,i);la;)d--}t[2*r+s]===a?Ps(e,t,r,d):(d++,Ps(e,t,d,i)),d<=n&&(r=d+1),n<=d&&(i=d-1)}}function Ps(e,t,n,r){Sh(e,n,r),Sh(t,2*n,2*r),Sh(t,2*n+1,2*r+1)}function Sh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function R4(e,t,n,r,i,s,a){const l=[0,e.length-1,0],d=[];let y,_;for(;l.length;){const c=l.pop(),f=l.pop(),w=l.pop();if(f-w<=a){for(let b=w;b<=f;b++)y=t[2*b],_=t[2*b+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[b]);continue}const v=Math.floor((w+f)/2);y=t[2*v],_=t[2*v+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[v]);const m=(c+1)%2;(c===0?n<=y:r<=_)&&(l.push(w),l.push(v-1),l.push(m)),(c===0?i>=y:s>=_)&&(l.push(v+1),l.push(f),l.push(m))}return d}function I4(e,t,n,r,i,s){const a=[0,e.length-1,0],l=[],d=i*i;for(;a.length;){const y=a.pop(),_=a.pop(),c=a.pop();if(_-c<=s){for(let b=c;b<=_;b++)fb(t[2*b],t[2*b+1],n,r)<=d&&l.push(e[b]);continue}const f=Math.floor((c+_)/2),w=t[2*f],v=t[2*f+1];fb(w,v,n,r)<=d&&l.push(e[f]);const m=(y+1)%2;(y===0?n-i<=w:r-i<=v)&&(a.push(c),a.push(f-1),a.push(m)),(y===0?n+i>=w:r+i>=v)&&(a.push(f+1),a.push(_),a.push(m))}return l}function fb(e,t,n,r){const i=e-n,s=t-r;return i*i+s*s}const N4=e=>e[0],O4=e=>e[1];class hb{constructor(t,n=N4,r=O4,i=64,s=Float64Array){this.nodeSize=i,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),d=this.coords=new s(t.length*2);for(let y=0;ye},$u=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class D4{constructor(t){this.options=Gs(Object.create(M4),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:n,minZoom:r,maxZoom:i,nodeSize:s}=this.options;n&&console.time("total time");const a=`prepare ${t.length} points`;n&&console.time(a),this.points=t;let l=[];for(let d=0;d=r;d--){const y=+Date.now();l=this._cluster(l,d),this.trees[d]=new hb(l,mb,gb,s,Float32Array),n&&console.log("z%d: %d clusters in %dms",d,l.length,+Date.now()-y)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const _=this.getClusters([r,i,180,a],n),c=this.getClusters([-180,i,s,a],n);return _.concat(c)}const l=this.trees[this._limitZoom(n)],d=l.range(Gl(r),Yl(a),Gl(s),Yl(i)),y=[];for(const _ of d){const c=l.points[_];y.push(c.numPoints?pb(c):this.points[c.index])}return y}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),i="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(i);const a=s.points[n];if(!a)throw new Error(i);const l=this.options.radius/(this.options.extent*Math.pow(2,r-1)),d=s.within(a.x,a.y,l),y=[];for(const _ of d){const c=s.points[_];c.parentId===t&&y.push(c.numPoints?pb(c):this.points[c.index])}if(y.length===0)throw new Error(i);return y}getLeaves(t,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,t,n,r,0),i}getTile(t,n,r){const i=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:a,radius:l}=this.options,d=l/a,y=(r-d)/s,_=(r+1+d)/s,c={features:[]};return this._addTileFeatures(i.range((n-d)/s,y,(n+1+d)/s,_),i.points,n,r,s,c),n===0&&this._addTileFeatures(i.range(1-d/s,y,1,_),i.points,s,r,s,c),n===s-1&&this._addTileFeatures(i.range(0,y,d/s,_),i.points,-1,r,s,c),c.features.length?c:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,i,s){const a=this.getChildren(n);for(const l of a){const d=l.properties;if(d&&d.cluster?s+d.point_count<=i?s+=d.point_count:s=this._appendLeaves(t,d.cluster_id,r,i,s):sn&&(v+=b.numPoints||1)}if(v>w&&v>=l){let m=_.x*w,b=_.y*w,g=a&&w>1?this._map(_,!0):null;const p=(y<<5)+(n+1)+this.points.length;for(const h of f){const T=c.points[h];if(T.zoom<=n)continue;T.zoom=n;const x=T.numPoints||1;m+=T.x*x,b+=T.y*x,T.parentId=p,a&&(g||(g=this._map(_,!0)),a(g,this._map(T)))}_.parentId=p,r.push($4(m/v,b/v,p,v,g))}else if(r.push(_),v>1)for(const m of f){const b=c.points[m];b.zoom<=n||(b.zoom=n,r.push(b))}}return r}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n){if(t.numPoints)return n?Gs({},t.properties):t.properties;const r=this.points[t.index].properties,i=this.options.map(r);return n&&i===r?Gs({},i):i}}function $4(e,t,n,r,i){return{x:$u(e),y:$u(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function F4(e,t){const[n,r]=e.geometry.coordinates;return{x:$u(Gl(n)),y:$u(Yl(r)),zoom:1/0,index:t,parentId:-1}}function pb(e){return{type:"Feature",id:e.id,properties:Tx(e),geometry:{type:"Point",coordinates:[j4(e.x),z4(e.y)]}}}function Tx(e){const t=e.numPoints,n=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${Math.round(t/100)/10}k`:t;return Gs(Gs({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Gl(e){return e/360+.5}function Yl(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function j4(e){return(e-.5)*360}function z4(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Gs(e,t){for(const n in t)e[n]=t[n];return e}function mb(e){return e.x}function gb(e){return e.y}var ge={},$p={exports:{}};(function(e,t){(function(n,r){var i="0.7.33",s="",a="?",l="function",d="undefined",y="object",_="string",c="major",f="model",w="name",v="type",m="vendor",b="version",g="architecture",p="console",h="mobile",T="tablet",x="smarttv",k="wearable",P="embedded",E=350,A="Amazon",C="Apple",N="ASUS",$="BlackBerry",F="Browser",z="Chrome",U="Edge",H="Firefox",B="Google",V="Huawei",Y="LG",G="Microsoft",J="Motorola",oe="Opera",ce="Samsung",fe="Sharp",de="Sony",ue="Xiaomi",be="Zebra",ne="Facebook",O=function(xe,Ne){var Pe={};for(var Je in xe)Ne[Je]&&Ne[Je].length%2===0?Pe[Je]=Ne[Je].concat(xe[Je]):Pe[Je]=xe[Je];return Pe},j=function(xe){for(var Ne={},Pe=0;Pe0?Ge.length===2?typeof Ge[1]==l?this[Ge[0]]=Ge[1].call(this,cn):this[Ge[0]]=Ge[1]:Ge.length===3?typeof Ge[1]===l&&!(Ge[1].exec&&Ge[1].test)?this[Ge[0]]=cn?Ge[1].call(this,cn,Ge[2]):r:this[Ge[0]]=cn?cn.replace(Ge[1],Ge[2]):r:Ge.length===4&&(this[Ge[0]]=cn?Ge[3].call(this,cn.replace(Ge[1],Ge[2])):r):this[Ge]=cn||r;Pe+=2}},se=function(xe,Ne){for(var Pe in Ne)if(typeof Ne[Pe]===y&&Ne[Pe].length>0){for(var Je=0;JeE?ee(Le,E):Le,this},this.setUA(Pe),this};Be.VERSION=i,Be.BROWSER=j([w,b,c]),Be.CPU=j([g]),Be.DEVICE=j([f,m,v,p,h,x,T,k,P]),Be.ENGINE=Be.OS=j([w,b]),e.exports&&(t=e.exports=Be),t.UAParser=Be;var Ue=typeof n!==d&&(n.jQuery||n.Zepto);if(Ue&&!Ue.ua){var qe=new Be;Ue.ua=qe.getResult(),Ue.ua.get=function(){return qe.getUA()},Ue.ua.set=function(xe){qe.setUA(xe);var Ne=qe.getResult();for(var Pe in Ne)Ue.ua[Pe]=Ne[Pe]}}})(typeof window=="object"?window:Xr)})($p,$p.exports);var B4=$p.exports;Object.defineProperty(ge,"__esModule",{value:!0});function U4(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Zt=te,Qe=U4(Zt),Sx=B4,gi=new Sx,Yt=gi.getBrowser(),H4=gi.getCPU(),bn=gi.getDevice(),fv=gi.getEngine(),vi=gi.getOS(),Na=gi.getUA(),Ex=function(t){return gi.setUA(t)},Oa=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new Sx(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},xx=Object.freeze({ClientUAInstance:gi,browser:Yt,cpu:H4,device:bn,engine:fv,os:vi,ua:Na,setUa:Ex,parseUserAgent:Oa});function vb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function V4(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function On(e,t){if(e==null)return{};var n=Y4(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K4(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kl(e)}function X4(e,t){return Q4(e)||J4(e,t)||ez(e,t)||tz()}function Q4(e){if(Array.isArray(e))return e}function J4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){s=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function ez(e,t){if(e){if(typeof e=="string")return _b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _b(e,t)}}function _b(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},hv=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},pv=function(t){var n=hv();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},oz=function(t,n,r,i,s){return{isBrowser:t,browserMajorVersion:Ee(n.major),browserFullVersion:Ee(n.version),browserName:Ee(n.name),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}},wb=function(t,n,r,i){return V4({},t,{vendor:Ee(n.vendor),model:Ee(n.model),os:Ee(r.name),osVersion:Ee(r.version),ua:Ee(i)})},sz=function(t,n,r,i){return{isSmartTV:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},az=function(t,n,r,i){return{isConsole:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},lz=function(t,n,r,i){return{isWearable:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},uz=function(t,n,r,i,s){return{isEmbedded:t,vendor:Ee(n.vendor),model:Ee(n.model),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}};function cz(e){var t=e?Oa(e):xx,n=t.device,r=t.browser,i=t.engine,s=t.os,a=t.ua,l=rz(n.type),d=l.isBrowser,y=l.isMobile,_=l.isTablet,c=l.isSmartTV,f=l.isConsole,w=l.isWearable,v=l.isEmbedded;if(d)return oz(d,r,i,s,a);if(c)return sz(c,i,s,a);if(f)return az(f,i,s,a);if(y||_)return wb(l,n,s,a);if(w)return lz(w,i,s,a);if(v)return uz(v,n,i,s,a)}var kx=function(t){var n=t.type;return n===Wt.Mobile},Cx=function(t){var n=t.type;return n===Wt.Tablet},Ax=function(t){var n=t.type;return n===Wt.Mobile||n===Wt.Tablet},Px=function(t){var n=t.type;return n===Wt.SmartTv},Fu=function(t){var n=t.type;return n===Wt.Browser},Lx=function(t){var n=t.type;return n===Wt.Wearable},Rx=function(t){var n=t.type;return n===Wt.Console},Ix=function(t){var n=t.type;return n===Wt.Embedded},Nx=function(t){var n=t.vendor;return Ee(n)},Ox=function(t){var n=t.model;return Ee(n)},Mx=function(t){var n=t.type;return Ee(n,"browser")},Dx=function(t){var n=t.name;return n===es.Android},$x=function(t){var n=t.name;return n===es.Windows},Fx=function(t){var n=t.name;return n===es.MAC_OS},jx=function(t){var n=t.name;return n===es.WindowsPhone},zx=function(t){var n=t.name;return n===es.IOS},Bx=function(t){var n=t.version;return Ee(n)},Ux=function(t){var n=t.name;return Ee(n)},Hx=function(t){var n=t.name;return n===un.Chrome},Vx=function(t){var n=t.name;return n===un.Firefox},Wx=function(t){var n=t.name;return n===un.Chromium},ju=function(t){var n=t.name;return n===un.Edge},qx=function(t){var n=t.name;return n===un.Yandex},Zx=function(t){var n=t.name;return n===un.Safari||n===un.MobileSafari},Gx=function(t){var n=t.name;return n===un.MobileSafari},Yx=function(t){var n=t.name;return n===un.Opera},Kx=function(t){var n=t.name;return n===un.InternetExplorer||n===un.Ie},Xx=function(t){var n=t.name;return n===un.MIUI},Qx=function(t){var n=t.name;return n===un.SamsungBrowser},Jx=function(t){var n=t.version;return Ee(n)},ek=function(t){var n=t.major;return Ee(n)},tk=function(t){var n=t.name;return Ee(n)},nk=function(t){var n=t.name;return Ee(n)},rk=function(t){var n=t.version;return Ee(n)},ik=function(){var t=hv(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Oo=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},ok=function(){var t=hv();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},ar=function(){return pv("iPad")},sk=function(){return pv("iPhone")},ak=function(){return pv("iPod")},lk=function(t){return Ee(t)};function uk(e){var t=e||xx,n=t.device,r=t.browser,i=t.os,s=t.engine,a=t.ua;return{isSmartTV:Px(n),isConsole:Rx(n),isWearable:Lx(n),isEmbedded:Ix(n),isMobileSafari:Gx(r)||ar(),isChromium:Wx(r),isMobile:Ax(n)||ar(),isMobileOnly:kx(n),isTablet:Cx(n)||ar(),isBrowser:Fu(n),isDesktop:Fu(n),isAndroid:Dx(i),isWinPhone:jx(i),isIOS:zx(i)||ar(),isChrome:Hx(r),isFirefox:Vx(r),isSafari:Zx(r),isOpera:Yx(r),isIE:Kx(r),osVersion:Bx(i),osName:Ux(i),fullBrowserVersion:Jx(r),browserVersion:ek(r),browserName:tk(r),mobileVendor:Nx(n),mobileModel:Ox(n),engineName:nk(s),engineVersion:rk(s),getUA:lk(a),isEdge:ju(r)||Oo(a),isYandex:qx(r),deviceType:Mx(n),isIOS13:ok(),isIPad13:ar(),isIPhone13:sk(),isIPod13:ak(),isElectron:ik(),isEdgeChromium:Oo(a),isLegacyEdge:ju(r)&&!Oo(a),isWindows:$x(i),isMacOs:Fx(i),isMIUI:Xx(r),isSamsungBrowser:Qx(r)}}var ck=Px(bn),dk=Rx(bn),fk=Lx(bn),dz=Ix(bn),fz=Gx(Yt)||ar(),hz=Wx(Yt),qc=Ax(bn)||ar(),hk=kx(bn),pk=Cx(bn)||ar(),mk=Fu(bn),pz=Fu(bn),gk=Dx(vi),vk=jx(vi),yk=zx(vi)||ar(),mz=Hx(Yt),gz=Vx(Yt),vz=Zx(Yt),yz=Yx(Yt),_k=Kx(Yt),_z=Bx(vi),wz=Ux(vi),bz=Jx(Yt),Tz=ek(Yt),Sz=tk(Yt),Ez=Nx(bn),xz=Ox(bn),kz=nk(fv),Cz=rk(fv),Az=lk(Na),Pz=ju(Yt)||Oo(Na),Lz=qx(Yt),Rz=Mx(bn),Iz=ok(),Nz=ar(),Oz=sk(),Mz=ak(),Dz=ik(),$z=Oo(Na),Fz=ju(Yt)&&!Oo(Na),jz=$x(vi),zz=Fx(vi),Bz=Xx(Yt),Uz=Qx(Yt),Hz=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Oa(t),r=n.device,i=n.browser,s=n.os,a=n.engine,l=n.ua;return uk({device:r,browser:i,os:s,engine:a,ua:l})},Vz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return gk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Wz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return mk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},qz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return _k?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Zz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return yk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Gz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return qc?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Yz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return pk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Kz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return vk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Xz=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=On(t,["renderWithFragment","children","viewClassName","style"]);return hk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Qz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ck?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},Jz=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return dk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},eB=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return fk?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",i,r):null},tB=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=t.condition,s=On(t,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?Qe.createElement(Zt.Fragment,null,r):Qe.createElement("div",s,r):null};function nB(e){return function(t){G4(n,t);function n(r){var i;return W4(this,n),i=K4(this,jp(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(Kl(i)),i.onOrientationChange=i.onOrientationChange.bind(Kl(i)),i.onPageLoad=i.onPageLoad.bind(Kl(i)),i.state={isLandscape:!1,isPortrait:!1},i}return q4(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Ys(window))!==void 0&&qc&&(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 Qe.createElement(e,Fp({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Qe.Component)}function rB(){var e=Zt.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=X4(e,2),n=t[0],r=t[1],i=Zt.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return Zt.useEffect(function(){return(typeof window>"u"?"undefined":Ys(window))!==void 0&&qc&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function wk(e){var t=e||window.navigator.userAgent;return Oa(t)}function iB(e){var t=e||window.navigator.userAgent,n=wk(t),r=uk(n);return[r,n]}ge.AndroidView=Vz;ge.BrowserTypes=un;ge.BrowserView=Wz;ge.ConsoleView=Jz;ge.CustomView=tB;ge.IEView=qz;ge.IOSView=Zz;ge.MobileOnlyView=Xz;ge.MobileView=Gz;ge.OsTypes=es;ge.SmartTVView=Qz;ge.TabletView=Yz;ge.WearableView=eB;ge.WinPhoneView=Kz;ge.browserName=Sz;ge.browserVersion=Tz;ge.deviceDetect=cz;ge.deviceType=Rz;ge.engineName=kz;ge.engineVersion=Cz;ge.fullBrowserVersion=bz;ge.getSelectorsByUserAgent=Hz;ge.getUA=Az;ge.isAndroid=gk;ge.isBrowser=mk;ge.isChrome=mz;ge.isChromium=hz;ge.isConsole=dk;ge.isDesktop=pz;ge.isEdge=Pz;ge.isEdgeChromium=$z;ge.isElectron=Dz;ge.isEmbedded=dz;ge.isFirefox=gz;ge.isIE=_k;ge.isIOS=yk;ge.isIOS13=Iz;ge.isIPad13=Nz;ge.isIPhone13=Oz;ge.isIPod13=Mz;ge.isLegacyEdge=Fz;ge.isMIUI=Bz;ge.isMacOs=zz;ge.isMobile=qc;var oB=ge.isMobileOnly=hk;ge.isMobileSafari=fz;ge.isOpera=yz;ge.isSafari=vz;ge.isSamsungBrowser=Uz;ge.isSmartTV=ck;ge.isTablet=pk;ge.isWearable=fk;ge.isWinPhone=vk;ge.isWindows=jz;ge.isYandex=Lz;ge.mobileModel=xz;ge.mobileVendor=Ez;ge.osName=wz;ge.osVersion=_z;ge.parseUserAgent=Oa;ge.setUserAgent=iz;ge.useDeviceData=wk;ge.useDeviceSelectors=iB;ge.useMobileOrientation=rB;ge.withOrientationChange=nB;function sB({sites:e,projectPoint:t}){function n(r){const{x:i,y:s}=t([r.latitude,r.longitude]);return M("div",{className:"leaflet-tooltip site-label leaflet-zoom-animated leaflet-tooltip-top",style:{opacity:1,transform:`translate3d(calc(${i}px - 50%), ${s-25}px, 0px)`},children:r.site})}return!e||!e.length?null:M("div",{className:"sites-layer",children:e.map(n)})}class Zi extends te.Component{render(){const{children:t,node:n}=this.props;return n?fL.createPortal(t,n):null}}function aB({svg:e,regions:t,projectPoint:n,styles:r}){function i(s){const a=[],l=s.points.map(n);return l.forEach((d,y)=>{if(y{const y=s.name in r?r[s.name]:r.default;return M("line",{id:`${s.name}_style`,markerStart:"none",...d,style:y})})}return!t||!t.length?null:M(Zi,{node:e,children:M("g",{id:"regions-layer",className:"narrative",children:t.map(i)})})}const bb="#E31A1B";function lB({getCategoryColor:e,categories:t,projectPoint:n,styleLocation:r,selected:i,highlighted:s,narrative:a,onSelect:l,svg:d,locations:y,eventRadius:_,coloringSet:c,filterColors:f,features:w}){function v(p,h){const T=p.shiftKey?i.concat(h.events):h.events;l(T)}function m(){return M(Ln,{children:M("circle",{className:"event-hover",cx:"0",cy:"0",r:"10",stroke:qn.primaryHighlight,fillOpacity:"0.0"})})}function b(p){const h={stroke:qn.darkBackground,strokeWidth:0,fillOpacity:a?1:lg(p.events.length)},T=p.events.length,P=(s&&s.length>0?p.events.filter(C=>s.includes(C.civId)):[]).length/T,E=p.events.filter(C=>!s||!s.includes(C.civId));let A;if(P===1)A={[bb]:1};else if(P>0){const C={...p,events:E},$=wa([C],c).map(F=>F*(1-P));A=_a(f,$),A[bb]=P}else{const C=wa([p],c);A=_a(f,C)}return M(dv,{radius:_,colorPercentMap:A,styles:{...h},className:"location-event-marker"})}function g(p){if(!p.latitude||!p.longitude)return null;const{x:h,y:T}=n([p.latitude,p.longitude]);if(a){const{steps:E}=a,A=N=>E.map($=>$.id).includes(N.id);if(p.events.filter(A).length<=0)return null}const x=r?r(p):null,k=()=>M(Ln,{children:x[1]}),P=i.reduce((E,A)=>E||A.latitude===p.latitude&&A.longitude===p.longitude,!1);return M("svg",{children:re("g",{className:`location-event ${a?"no-hover":""}`,transform:`translate(${h}, ${T})`,onClick:E=>v(E,p),children:[b(p),k?k():null,P?null:m()]})},nn(p))}return M(Zi,{node:d,children:M("svg",{children:M("g",{className:"event-locations",children:y.map(g)})})})}const Tb="#E31A1B",uB=()=>M("defs",{children:re("radialGradient",{id:"clusterGradient",children:[M("stop",{offset:"10%",stopColor:"red"}),M("stop",{offset:"90%",stopColor:"transparent"})]})});function cB({cluster:e,size:t,projectPoint:n,totalPoints:r,styles:i,renderHover:s,onClick:a,getClusterChildren:l,coloringSet:d,filterColors:y,highlighted:_}){const{cluster_id:c}=e.properties,f=l(c),w=f.flatMap(C=>C.events),v=w.length,b=(_&&_.length>0?w.filter(C=>_.includes(C.civId)):[]).length,g=v>0?b/v:0;let p;if(g===1)p={[Tb]:1};else if(g>0){const C=f.map(F=>({...F,events:F.events.filter(z=>!_||!_.includes(z.civId))})).filter(F=>F.events.length>0),$=wa(C,d).map(F=>F*(1-g));p=_a(y,$),p[Tb]=g}else{const C=wa(f,d);p=_a(y,C)}const{coordinates:h}=e.geometry,[T,x]=h,{x:k,y:P}=n([x,T]),[E,A]=te.useState(!1);return!La(x)||!Ra(T)?null:M("svg",{children:re("g",{className:"cluster-event",transform:`translate(${k}, ${P})`,onClick:C=>a({id:c,latitude:x,longitude:T}),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),children:[M(dv,{radius:t,colorPercentMap:p,styles:{...i},className:"cluster-event-marker"}),E?s(e):null]})})}function dB({projectPoint:e,onSelect:t,getClusterChildren:n,coloringSet:r,isRadial:i,svg:s,clusters:a,filterColors:l,selected:d,highlighted:y}){const _=HS(a),c={fill:i?"url('#clusterGradient')":qn.fallbackEventColor,stroke:qn.darkBackground,strokeWidth:0};function f(w,v){return re(Ln,{children:[M("text",{textAnchor:"middle",y:"3px",style:{fontWeight:"bold",fill:"black",zIndex:1e4},children:w}),M("circle",{className:"event-hover",cx:"0",cy:"0",r:v+2,stroke:qn.primaryHighlight,fillOpacity:"0.0"})]})}return M(Zi,{node:s,children:M("svg",{children:re("g",{className:"cluster-locations",children:[i?M(uB,{}):null,a.map((w,v)=>{const m=w.properties.point_count,b=US(m,_);return M(cB,{onClick:t,getClusterChildren:n,coloringSet:r,cluster:w,filterColors:l,highlighted:y,size:b,projectPoint:e,totalPoints:_,styles:{...c,fillOpacity:pD(m,_)},renderHover:()=>f(m,b)},v)})]})})})}class fB extends te.Component{renderMarker(t){const{x:n,y:r}=this.props.projectPoint([t.latitude,t.longitude]),i=this.props.styles,s=t.radius?t.radius+5:24;return M("g",{className:"location-marker",transform:`translate(${n-s}, ${r})`,children:M("path",{className:"leaflet-interactive",stroke:i?i.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:i?i["stroke-width"]:2,strokeLinecap:"",strokeLinejoin:"round",strokeDasharray:i?i["stroke-dasharray"]:"2,2",fill:"none",d:`M0,0a${s},${s} 0 1,0 ${s*2},0 a${s},${s} 0 1,0 -${s*2},0 `})},nn(t))}render(){return M(Zi,{node:this.props.svg,children:this.props.selected.map(t=>this.renderMarker(t))})}}const hB={strokeOpacity:1,strokeWidth:0,strokeDasharray:"none",stroke:"none"};function pB({styles:e,onSelectNarrative:t,svg:n,narrative:r,narratives:i,projectPoint:s,features:a}){function l(b){const g=b&&b in e?b:"default";return e[g]}const d=i&&i.length!==0;function y(b){return b.latitude===""||b.longitude===""}function _(b,g,p){const h=Math.sqrt((g.x-b.x)*(g.x-b.x)+(g.y-b.y)*(g.y-b.y)),T=Math.atan2(g.y-b.y,g.x-b.x),x=Math.atan2(1,2),k=10,P=h<24?h/2:24,E={x:g.x-P*Math.cos(T),y:g.y-P*Math.sin(T)},A={x:E.x-k*Math.cos(-T-x),y:E.y+k*Math.sin(-T-x)},C={x:E.x-k*Math.cos(-T+x),y:E.y+k*Math.sin(-T+x)};return M("path",{className:"narrative-step-arrow",d:` + */(function(e,t){(function(n,r){r(t)})(Xr,function(n){var r="1.9.3";function i(o){var u,S,R,I;for(S=1,R=arguments.length;S"u"||!L||!L.Mixin)){o=h(o)?o:[o];for(var u=0;u0?Math.floor(o):Math.ceil(o)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(o){return this.clone()._add(G(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(G(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new V(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new V(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Y(this.x),this.y=Y(this.y),this},distanceTo:function(o){o=G(o);var u=o.x-this.x,S=o.y-this.y;return Math.sqrt(u*u+S*S)},equals:function(o){return o=G(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=G(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function G(o,u,S){return o instanceof V?o:h(o)?new V(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new V(o.x,o.y):new V(o,u,S)}function J(o,u){if(o)for(var S=u?[o,u]:o,R=0,I=S.length;R=this.min.x&&S.x<=this.max.x&&u.y>=this.min.y&&S.y<=this.max.y},intersects:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>=u.x&&R.x<=S.x,q=I.y>=u.y&&R.y<=S.y;return D&&q},overlaps:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>u.x&&R.xu.y&&R.y=u.lat&&I.lat<=S.lat&&R.lng>=u.lng&&I.lng<=S.lng},intersects:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>=u.lat&&R.lat<=S.lat,q=I.lng>=u.lng&&R.lng<=S.lng;return D&&q},overlaps:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>u.lat&&R.latu.lng&&R.lng1,Lk=function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",c,u),window.removeEventListener("testPassiveEventSupport",c,u)}catch{}return o}(),Rk=function(){return!!document.createElement("canvas").getContext}(),Gc=!!(document.createElementNS&&ve("svg").createSVGRect),Ik=!!Gc&&function(){var o=document.createElement("div");return o.innerHTML="",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Nk=!Gc&&function(){try{var o=document.createElement("div");o.innerHTML='';var u=o.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}}(),Ok=navigator.platform.indexOf("Mac")===0,Mk=navigator.platform.indexOf("Linux")===0;function Jn(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var we={ie:ft,ielt9:kt,edge:Ue,webkit:Be,android:qe,android23:xe,androidStock:Pe,opera:Je,chrome:Le,gecko:yi,safari:Ge,phantom:jr,opera12:cn,win:Ma,ie3d:ts,webkit3d:Zc,gecko3d:gv,any3d:Sk,mobile:ns,mobileWebkit:Ek,mobileWebkit3d:xk,msPointer:vv,pointer:yv,touch:kk,touchNative:_v,mobileOpera:Ck,mobileGecko:Ak,retina:Pk,passiveEvents:Lk,canvas:Rk,svg:Gc,vml:Nk,inlineSvg:Ik,mac:Ok,linux:Mk},wv=we.msPointer?"MSPointerDown":"pointerdown",bv=we.msPointer?"MSPointerMove":"pointermove",Tv=we.msPointer?"MSPointerUp":"pointerup",Sv=we.msPointer?"MSPointerCancel":"pointercancel",Yc={touchstart:wv,touchmove:bv,touchend:Tv,touchcancel:Sv},Ev={touchstart:Uk,touchmove:Da,touchend:Da,touchcancel:Da},eo={},xv=!1;function Dk(o,u,S){return u==="touchstart"&&zk(),Ev[u]?(S=Ev[u].bind(this,S),o.addEventListener(Yc[u],S,!1),S):(console.warn("wrong event specified:",u),c)}function $k(o,u,S){if(!Yc[u]){console.warn("wrong event specified:",u);return}o.removeEventListener(Yc[u],S,!1)}function Fk(o){eo[o.pointerId]=o}function jk(o){eo[o.pointerId]&&(eo[o.pointerId]=o)}function kv(o){delete eo[o.pointerId]}function zk(){xv||(document.addEventListener(wv,Fk,!0),document.addEventListener(bv,jk,!0),document.addEventListener(Tv,kv,!0),document.addEventListener(Sv,kv,!0),xv=!0)}function Da(o,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var S in eo)u.touches.push(eo[S]);u.changedTouches=[u],o(u)}}function Uk(o,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&Dt(u),Da(o,u)}function Bk(o){var u={},S,R;for(R in o)S=o[R],u[R]=S&&S.bind?S.bind(o):S;return o=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var Hk=200;function Vk(o,u){o.addEventListener("dblclick",u);var S=0,R;function I(D){if(D.detail!==1){R=D.detail;return}if(!(D.pointerType==="mouse"||D.sourceCapabilities&&!D.sourceCapabilities.firesTouchEvents)){var q=Rv(D);if(!(q.some(function(X){return X instanceof HTMLLabelElement&&X.attributes.for})&&!q.some(function(X){return X instanceof HTMLInputElement||X instanceof HTMLSelectElement}))){var K=Date.now();K-S<=Hk?(R++,R===2&&u(Bk(D))):R=1,S=K}}}return o.addEventListener("click",I),{dblclick:u,simDblclick:I}}function Wk(o,u){o.removeEventListener("dblclick",u.dblclick),o.removeEventListener("click",u.simDblclick)}var Kc=ja(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),rs=ja(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Cv=rs==="webkitTransition"||rs==="OTransition"?rs+"End":"transitionend";function Av(o){return typeof o=="string"?document.getElementById(o):o}function is(o,u){var S=o.style[u]||o.currentStyle&&o.currentStyle[u];if((!S||S==="auto")&&document.defaultView){var R=document.defaultView.getComputedStyle(o,null);S=R?R[u]:null}return S==="auto"?null:S}function Fe(o,u,S){var R=document.createElement(o);return R.className=u||"",S&&S.appendChild(R),R}function st(o){var u=o.parentNode;u&&u.removeChild(o)}function $a(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function to(o){var u=o.parentNode;u&&u.lastChild!==o&&u.appendChild(o)}function no(o){var u=o.parentNode;u&&u.firstChild!==o&&u.insertBefore(o,u.firstChild)}function Xc(o,u){if(o.classList!==void 0)return o.classList.contains(u);var S=Fa(o);return S.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(S)}function Ae(o,u){if(o.classList!==void 0)for(var S=v(u),R=0,I=S.length;R0?2*window.devicePixelRatio:1;function Nv(o){return we.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/Gk:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function ud(o,u){var S=u.relatedTarget;if(!S)return!0;try{for(;S&&S!==o;)S=S.parentNode}catch{return!1}return S!==o}var Yk={__proto__:null,on:Ce,off:Ke,stopPropagation:bi,disableScrollPropagation:ld,disableClickPropagation:ls,preventDefault:Dt,stop:Ti,getPropagationPath:Rv,getMousePosition:Iv,getWheelDelta:Nv,isExternalTarget:ud,addListener:Ce,removeListener:Ke},Ov=U.extend({run:function(o,u,S,R){this.stop(),this._el=o,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(R||.5,.2),this._startPos=wi(o),this._offset=u.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=N(this._animate,this),this._step()},_step:function(o){var u=+new Date-this._startTime,S=this._duration*1e3;uthis.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,u){this._enforcingBounds=!0;var S=this.getCenter(),R=this._limitCenter(S,this._zoom,fe(o));return S.equals(R)||this.panTo(R,u),this._enforcingBounds=!1,this},panInside:function(o,u){u=u||{};var S=G(u.paddingTopLeft||u.padding||[0,0]),R=G(u.paddingBottomRight||u.padding||[0,0]),I=this.project(this.getCenter()),D=this.project(o),q=this.getPixelBounds(),K=oe([q.min.add(S),q.max.subtract(R)]),X=K.getSize();if(!K.contains(D)){this._enforcingBounds=!0;var ie=D.subtract(K.getCenter()),he=K.extend(D).getSize().subtract(X);I.x+=ie.x<0?-he.x:he.x,I.y+=ie.y<0?-he.y:he.y,this.panTo(this.unproject(I),u),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),R=u.divideBy(2).round(),I=S.divideBy(2).round(),D=R.subtract(I);return!D.x&&!D.y?this:(o.animate&&o.pan?this.panBy(D):(o.pan&&this._rawPanBy(D),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=a(this._handleGeolocationResponse,this),S=a(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,S,o):navigator.geolocation.getCurrentPosition(u,S,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var u=o.code,S=o.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var u=o.coords.latitude,S=o.coords.longitude,R=new de(u,S),I=R.toBounds(o.coords.accuracy*2),D=this._locateOptions;if(D.setView){var q=this.getBoundsZoom(I);this.setView(R,D.maxZoom?Math.min(q,D.maxZoom):q)}var K={latlng:R,bounds:I,timestamp:o.timestamp};for(var X in o.coords)typeof o.coords[X]=="number"&&(K[X]=o.coords[X]);this.fire("locationfound",K)}},addHandler:function(o,u){if(!u)return this;var S=this[o]=new u(this);return this._handlers.push(S),this.options[o]&&S.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),st(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&($(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)st(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,u){var S="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),R=Fe("div",S,u||this._mapPane);return o&&(this._panes[o]=R),R},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),u=this.unproject(o.getBottomLeft()),S=this.unproject(o.getTopRight());return new ce(u,S)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,u,S){o=fe(o),S=G(S||[0,0]);var R=this.getZoom()||0,I=this.getMinZoom(),D=this.getMaxZoom(),q=o.getNorthWest(),K=o.getSouthEast(),X=this.getSize().subtract(S),ie=oe(this.project(K,R),this.project(q,R)).getSize(),he=we.any3d?this.options.zoomSnap:1,Se=X.x/ie.x,Re=X.y/ie.y,En=u?Math.max(Se,Re):Math.min(Se,Re);return R=this.getScaleZoom(En,R),he&&(R=Math.round(R/(he/100))*(he/100),R=u?Math.ceil(R/he)*he:Math.floor(R/he)*he),Math.max(I,Math.min(D,R))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,u){var S=this._getTopLeftPoint(o,u);return new J(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,u){var S=this.options.crs;return u=u===void 0?this._zoom:u,S.scale(o)/S.scale(u)},getScaleZoom:function(o,u){var S=this.options.crs;u=u===void 0?this._zoom:u;var R=S.zoom(o*S.scale(u));return isNaN(R)?1/0:R},project:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(ue(o),u)},unproject:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(G(o),u)},layerPointToLatLng:function(o){var u=G(o).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(o){var u=this.project(ue(o))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(ue(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(fe(o))},distance:function(o,u){return this.options.crs.distance(ue(o),ue(u))},containerPointToLayerPoint:function(o){return G(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return G(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var u=this.containerPointToLayerPoint(G(o));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ue(o)))},mouseEventToContainerPoint:function(o){return Iv(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var u=this._container=Av(o);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ce(u,"scroll",this._onScroll,this),this._containerId=d(u)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&we.any3d,Ae(o,"leaflet-container"+(we.touch?" leaflet-touch":"")+(we.retina?" leaflet-retina":"")+(we.ielt9?" leaflet-oldie":"")+(we.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=is(o,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Tt(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ae(o.markerPane,"leaflet-zoom-hide"),Ae(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,u,S){Tt(this._mapPane,new V(0,0));var R=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var I=this._zoom!==u;this._moveStart(I,S)._move(o,u)._moveEnd(I),this.fire("viewreset"),R&&this.fire("load")},_moveStart:function(o,u){return o&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(o,u,S,R){u===void 0&&(u=this._zoom);var I=this._zoom!==u;return this._zoom=u,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),R?S&&S.pinch&&this.fire("zoom",S):((I||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return $(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){Tt(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[d(this._container)]=this;var u=o?Ke:Ce;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),we.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){$(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,u){for(var S=[],R,I=u==="mouseout"||u==="mouseover",D=o.target||o.srcElement,q=!1;D;){if(R=this._targets[d(D)],R&&(u==="click"||u==="preclick")&&this._draggableMoved(R)){q=!0;break}if(R&&R.listens(u,!0)&&(I&&!ud(D,o)||(S.push(R),I))||D===this._container)break;D=D.parentNode}return!S.length&&!q&&!I&&this.listens(u,!0)&&(S=[this]),S},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var u=o.target||o.srcElement;if(!(!this._loaded||u._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(u))){var S=o.type;S==="mousedown"&&rd(u),this._fireDOMEvent(o,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,u,S){if(o.type==="click"){var R=i({},o);R.type="preclick",this._fireDOMEvent(R,R.type,S)}var I=this._findEventTargets(o,u);if(S){for(var D=[],q=0;q0?Math.round(o-u)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(u))},_limitZoom:function(o){var u=this.getMinZoom(),S=this.getMaxZoom(),R=we.any3d?this.options.zoomSnap:1;return R&&(o=Math.round(o/R)*R),Math.max(u,Math.min(S,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,u){var S=this._getCenterOffset(o)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,u),!0)},_createAnimProxy:function(){var o=this._proxy=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(u){var S=Kc,R=this._proxy.style[S];_i(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),R===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){st(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),u=this.getZoom();_i(this._proxy,this.project(o,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,u,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var R=this.getZoomScale(u),I=this._getCenterOffset(o)._divideBy(1-1/R);return S.animate!==!0&&!this.getSize().contains(I)?!1:(N(function(){this._moveStart(!0,!1)._animateZoom(o,u,!0)},this),!0)},_animateZoom:function(o,u,S,R){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=u,Ae(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:u,noUpdate:R}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Kk(o,u){return new Oe(o,u)}var Mn=z.extend({options:{position:"topright"},initialize:function(o){m(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var u=this._map;return u&&u.removeControl(this),this.options.position=o,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var u=this._container=this.onAdd(o),S=this.getPosition(),R=o._controlCorners[S];return Ae(u,"leaflet-control"),S.indexOf("bottom")!==-1?R.insertBefore(u,R.firstChild):R.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(st(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),us=function(o){return new Mn(o)};Oe.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},u="leaflet-",S=this._controlContainer=Fe("div",u+"control-container",this._container);function R(I,D){var q=u+I+" "+u+D;o[I+D]=Fe("div",q,S)}R("top","left"),R("top","right"),R("bottom","left"),R("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)st(this._controlCorners[o]);st(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mv=Mn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,u,S,R){return S1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=u&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var u=this._getLayer(d(o.target)),S=u.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;S&&this._map.fire(S,u)},_createRadioElement:function(o,u){var S='",R=document.createElement("div");return R.innerHTML=S,R.firstChild},_addItem:function(o){var u=document.createElement("label"),S=this._map.hasLayer(o.layer),R;o.overlay?(R=document.createElement("input"),R.type="checkbox",R.className="leaflet-control-layers-selector",R.defaultChecked=S):R=this._createRadioElement("leaflet-base-layers_"+d(this),S),this._layerControlInputs.push(R),R.layerId=d(o.layer),Ce(R,"click",this._onInputClick,this);var I=document.createElement("span");I.innerHTML=" "+o.name;var D=document.createElement("span");u.appendChild(D),D.appendChild(R),D.appendChild(I);var q=o.overlay?this._overlaysList:this._baseLayersList;return q.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){var o=this._layerControlInputs,u,S,R=[],I=[];this._handlingClick=!0;for(var D=o.length-1;D>=0;D--)u=o[D],S=this._getLayer(u.layerId).layer,u.checked?R.push(S):u.checked||I.push(S);for(D=0;D=0;I--)u=o[I],S=this._getLayer(u.layerId).layer,u.disabled=S.options.minZoom!==void 0&&RS.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;Ce(o,"click",Dt),this.expand(),setTimeout(function(){Ke(o,"click",Dt)})}}),Xk=function(o,u,S){return new Mv(o,u,S)},cd=Mn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(o){var u="leaflet-control-zoom",S=Fe("div",u+" leaflet-bar"),R=this.options;return this._zoomInButton=this._createButton(R.zoomInText,R.zoomInTitle,u+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(R.zoomOutText,R.zoomOutTitle,u+"-out",S,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,u,S,R,I){var D=Fe("a",S,R);return D.innerHTML=o,D.href="#",D.title=u,D.setAttribute("role","button"),D.setAttribute("aria-label",u),ls(D),Ce(D,"click",Ti),Ce(D,"click",I,this),Ce(D,"click",this._refocusOnMap,this),D},_updateDisabled:function(){var o=this._map,u="leaflet-disabled";_t(this._zoomInButton,u),_t(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(Ae(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(Ae(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});Oe.mergeOptions({zoomControl:!0}),Oe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new cd,this.addControl(this.zoomControl))});var Qk=function(o){return new cd(o)},Dv=Mn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var u="leaflet-control-scale",S=Fe("div",u),R=this.options;return this._addScales(R,u+"-line",S),o.on(R.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),S},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,u,S){o.metric&&(this._mScale=Fe("div",u,S)),o.imperial&&(this._iScale=Fe("div",u,S))},_update:function(){var o=this._map,u=o.getSize().y/2,S=o.distance(o.containerPointToLatLng([0,u]),o.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(S)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var u=this._getRoundNum(o),S=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,S,u/o)},_updateImperial:function(o){var u=o*3.2808399,S,R,I;u>5280?(S=u/5280,R=this._getRoundNum(S),this._updateScale(this._iScale,R+" mi",R/S)):(I=this._getRoundNum(u),this._updateScale(this._iScale,I+" ft",I/u))},_updateScale:function(o,u,S){o.style.width=Math.round(this.options.maxWidth*S)+"px",o.innerHTML=u},_getRoundNum:function(o){var u=Math.pow(10,(Math.floor(o)+"").length-1),S=o/u;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,u*S}}),Jk=function(o){return new Dv(o)},eC='',dd=Mn.extend({options:{position:"bottomright",prefix:''+(we.inlineSvg?eC+" ":"")+"Leaflet"},initialize:function(o){m(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),ls(this._container);for(var u in o._layers)o._layers[u].getAttribution&&this.addAttribution(o._layers[u].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var u in this._attributions)this._attributions[u]&&o.push(u);var S=[];this.options.prefix&&S.push(this.options.prefix),o.length&&S.push(o.join(", ")),this._container.innerHTML=S.join(' ')}}});Oe.mergeOptions({attributionControl:!0}),Oe.addInitHook(function(){this.options.attributionControl&&new dd().addTo(this)});var tC=function(o){return new dd(o)};Mn.Layers=Mv,Mn.Zoom=cd,Mn.Scale=Dv,Mn.Attribution=dd,us.layers=Xk,us.zoom=Qk,us.scale=Jk,us.attribution=tC;var tr=z.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tr.addTo=function(o,u){return o.addHandler(u,this),this};var nC={Events:H},$v=we.touch?"touchstart mousedown":"mousedown",zr=U.extend({options:{clickTolerance:3},initialize:function(o,u,S,R){m(this,R),this._element=o,this._dragStartTarget=u||o,this._preventOutline=S},enable:function(){this._enabled||(Ce(this._dragStartTarget,$v,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(zr._dragging===this&&this.finishDrag(!0),Ke(this._dragStartTarget,$v,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!Xc(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){zr._dragging===this&&this.finishDrag();return}if(!(zr._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(zr._dragging=this,this._preventOutline&&rd(this._element),ed(),os(),!this._moving)){this.fire("down");var u=o.touches?o.touches[0]:o,S=Pv(this._element);this._startPoint=new V(u.clientX,u.clientY),this._startPos=wi(this._element),this._parentScale=id(S);var R=o.type==="mousedown";Ce(document,R?"mousemove":"touchmove",this._onMove,this),Ce(document,R?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var u=o.touches&&o.touches.length===1?o.touches[0]:o,S=new V(u.clientX,u.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)D&&(q=K,D=X);D>S&&(u[q]=1,fd(o,u,S,R,q),fd(o,u,S,q,I))}function oC(o,u){for(var S=[o[0]],R=1,I=0,D=o.length;Ru&&(S.push(o[R]),I=R);return Iu.max.x&&(S|=2),o.yu.max.y&&(S|=8),S}function sC(o,u){var S=u.x-o.x,R=u.y-o.y;return S*S+R*R}function cs(o,u,S,R){var I=u.x,D=u.y,q=S.x-I,K=S.y-D,X=q*q+K*K,ie;return X>0&&(ie=((o.x-I)*q+(o.y-D)*K)/X,ie>1?(I=S.x,D=S.y):ie>0&&(I+=q*ie,D+=K*ie)),q=o.x-I,K=o.y-D,R?q*q+K*K:new V(I,D)}function Sn(o){return!h(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Bv(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Sn(o)}function Hv(o,u){var S,R,I,D,q,K,X,ie;if(!o||o.length===0)throw new Error("latlngs not passed");Sn(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var he=[];for(var Se in o)he.push(u.project(ue(o[Se])));var Re=he.length;for(S=0,R=0;SR){X=(D-R)/I,ie=[K.x-X*(K.x-q.x),K.y-X*(K.y-q.y)];break}return u.unproject(G(ie))}var aC={__proto__:null,simplify:Fv,pointToSegmentDistance:jv,closestPointOnSegment:rC,clipSegment:Uv,_getEdgeIntersection:Ba,_getBitCode:Si,_sqClosestPointOnSegment:cs,isFlat:Sn,_flat:Bv,polylineCenter:Hv};function Vv(o,u,S){var R,I=[1,4,2,8],D,q,K,X,ie,he,Se,Re;for(D=0,he=o.length;D1e-7;K++)ie=I*Math.sin(q),ie=Math.pow((1-ie)/(1+ie),I/2),X=Math.PI/2-2*Math.atan(D*ie)-q,q+=X;return new de(q*u,o.x*u/S)}},uC={__proto__:null,LonLat:hd,Mercator:pd,SphericalMercator:j},cC=i({},ne,{code:"EPSG:3395",projection:pd,transformation:function(){var o=.5/(Math.PI*pd.R);return Z(o,.5,-o,.5)}()}),qv=i({},ne,{code:"EPSG:4326",projection:hd,transformation:Z(1/180,1,-1/180,.5)}),dC=i({},be,{projection:hd,transformation:Z(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,u){var S=u.lng-o.lng,R=u.lat-o.lat;return Math.sqrt(S*S+R*R)},infinite:!0});be.Earth=ne,be.EPSG3395=cC,be.EPSG3857=Q,be.EPSG900913=ee,be.EPSG4326=qv,be.Simple=dC;var Dn=U.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[d(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[d(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var u=o.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var S=this.getEvents();u.on(S,this),this.once("remove",function(){u.off(S,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});Oe.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var u=d(o);return this._layers[u]?this:(this._layers[u]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var u=d(o);return this._layers[u]?(this._loaded&&o.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return d(o)in this._layers},eachLayer:function(o,u){for(var S in this._layers)o.call(u,this._layers[S]);return this},_addLayers:function(o){o=o?h(o)?o:[o]:[];for(var u=0,S=o.length;uthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&u[0]instanceof de&&u[0].equals(u[S-1])&&u.pop(),u},_setLatLngs:function(o){gr.prototype._setLatLngs.call(this,o),Sn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Sn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,u=this.options.weight,S=new V(u,u);if(o=new J(o.min.subtract(S),o.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var R=0,I=this._rings.length,D;Ro.y!=I.y>o.y&&o.x<(I.x-R.x)*(o.y-R.y)/(I.y-R.y)+R.x&&(u=!u);return u||gr.prototype._containsPoint.call(this,o,!0)}});function _C(o,u){return new oo(o,u)}var vr=mr.extend({initialize:function(o,u){m(this,u),this._layers={},o&&this.addData(o)},addData:function(o){var u=h(o)?o:o.features,S,R,I;if(u){for(S=0,R=u.length;S0?R:[u.src];return}h(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var D=0;DI?(u.height=I+"px",Ae(o,D)):_t(o,D),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),S=this._getAnchor();Tt(this._container,u.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,u=parseInt(is(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+u,R=this._containerWidth,I=new V(this._containerLeft,-S-this._containerBottom);I._add(wi(this._container));var D=o.layerPointToContainerPoint(I),q=G(this.options.autoPanPadding),K=G(this.options.autoPanPaddingTopLeft||q),X=G(this.options.autoPanPaddingBottomRight||q),ie=o.getSize(),he=0,Se=0;D.x+R+X.x>ie.x&&(he=D.x+R-ie.x+X.x),D.x-he-K.x<0&&(he=D.x-K.x),D.y+S+X.y>ie.y&&(Se=D.y+S-ie.y+X.y),D.y-Se-K.y<0&&(Se=D.y-K.y),(he||Se)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([he,Se]))}},_getAnchor:function(){return G(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),EC=function(o,u){return new Ka(o,u)};Oe.mergeOptions({closePopupOnClick:!0}),Oe.include({openPopup:function(o,u,S){return this._initOverlay(Ka,o,u,S).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),Dn.include({bindPopup:function(o,u){return this._popup=this._initOverlay(Ka,this._popup,o,u),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof mr||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Ti(o);var u=o.layer||o.target;if(this._popup._source===u&&!(u instanceof Ur)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=u,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var Xa=nr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){nr.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){nr.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=nr.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",u=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Fe("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var u,S,R=this._map,I=this._container,D=R.latLngToContainerPoint(R.getCenter()),q=R.layerPointToContainerPoint(o),K=this.options.direction,X=I.offsetWidth,ie=I.offsetHeight,he=G(this.options.offset),Se=this._getAnchor();K==="top"?(u=X/2,S=ie):K==="bottom"?(u=X/2,S=0):K==="center"?(u=X/2,S=ie/2):K==="right"?(u=0,S=ie/2):K==="left"?(u=X,S=ie/2):q.xthis.options.maxZoom||SR?this._retainParent(I,D,q,R):!1)},_retainChildren:function(o,u,S,R){for(var I=2*o;I<2*o+2;I++)for(var D=2*u;D<2*u+2;D++){var q=new V(I,D);q.z=S+1;var K=this._tileCoordsToKey(q),X=this._tiles[K];if(X&&X.active){X.retain=!0;continue}else X&&X.loaded&&(X.retain=!0);S+1this.options.maxZoom||this.options.minZoom!==void 0&&I1){this._setView(o,S);return}for(var Se=I.min.y;Se<=I.max.y;Se++)for(var Re=I.min.x;Re<=I.max.x;Re++){var En=new V(Re,Se);if(En.z=this._tileZoom,!!this._isValidTile(En)){var Ei=this._tiles[this._tileCoordsToKey(En)];Ei?Ei.current=!0:q.push(En)}}if(q.sort(function(Br,_d){return Br.distanceTo(D)-_d.distanceTo(D)}),q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ja=document.createDocumentFragment();for(Re=0;ReS.max.x)||!u.wrapLat&&(o.yS.max.y))return!1}if(!this.options.bounds)return!0;var R=this._tileCoordsToBounds(o);return fe(this.options.bounds).overlaps(R)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var u=this._map,S=this.getTileSize(),R=o.scaleBy(S),I=R.add(S),D=u.unproject(R,o.z),q=u.unproject(I,o.z);return[D,q]},_tileCoordsToBounds:function(o){var u=this._tileCoordsToNwSe(o),S=new ce(u[0],u[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var u=o.split(":"),S=new V(+u[0],+u[1]);return S.z=+u[2],S},_removeTile:function(o){var u=this._tiles[o];u&&(st(u.el),delete this._tiles[o],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){Ae(o,"leaflet-tile");var u=this.getTileSize();o.style.width=u.x+"px",o.style.height=u.y+"px",o.onselectstart=c,o.onmousemove=c,we.ielt9&&this.options.opacity<1&&Tn(o,this.options.opacity)},_addTile:function(o,u){var S=this._getTilePos(o),R=this._tileCoordsToKey(o),I=this.createTile(this._wrapCoords(o),a(this._tileReady,this,o));this._initTile(I),this.createTile.length<2&&N(a(this._tileReady,this,o,null,I)),Tt(I,S),this._tiles[R]={el:I,coords:o,current:!0},u.appendChild(I),this.fire("tileloadstart",{tile:I,coords:o})},_tileReady:function(o,u,S){u&&this.fire("tileerror",{error:u,tile:S,coords:o});var R=this._tileCoordsToKey(o);S=this._tiles[R],S&&(S.loaded=+new Date,this._map._fadeAnimated?(Tn(S.el,0),$(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),u||(Ae(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),we.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var u=new V(this._wrapX?_(o.x,this._wrapX):o.x,this._wrapY?_(o.y,this._wrapY):o.y);return u.z=o.z,u},_pxBoundsToTileRange:function(o){var u=this.getTileSize();return new J(o.min.unscaleBy(u).floor(),o.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function CC(o){return new fs(o)}var ao=fs.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,u){this._url=o,u=m(this,u),u.detectRetina&&we.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,u){return this._url===o&&u===void 0&&(u=!0),this._url=o,u||this.redraw(),this},createTile:function(o,u){var S=document.createElement("img");return Ce(S,"load",a(this._tileOnLoad,this,u,S)),Ce(S,"error",a(this._tileOnError,this,u,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(o),S},getTileUrl:function(o){var u={r:we.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-o.y;this.options.tms&&(u.y=S),u["-y"]=S}return p(this._url,i(u,this.options))},_tileOnLoad:function(o,u){we.ielt9?setTimeout(a(o,this,null,u),0):o(null,u)},_tileOnError:function(o,u,S){var R=this.options.errorTileUrl;R&&u.getAttribute("src")!==R&&(u.src=R),o(S,u)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,u=this.options.maxZoom,S=this.options.zoomReverse,R=this.options.zoomOffset;return S&&(o=u-o),o+R},_getSubdomain:function(o){var u=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var o,u;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(u=this._tiles[o].el,u.onload=c,u.onerror=c,!u.complete)){u.src=x;var S=this._tiles[o].coords;st(u),delete this._tiles[o],this.fire("tileabort",{tile:u,coords:S})}},_removeTile:function(o){var u=this._tiles[o];if(u)return u.el.setAttribute("src",x),fs.prototype._removeTile.call(this,o)},_tileReady:function(o,u,S){if(!(!this._map||S&&S.getAttribute("src")===x))return fs.prototype._tileReady.call(this,o,u,S)}});function Jv(o,u){return new ao(o,u)}var ey=ao.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,u){this._url=o;var S=i({},this.defaultWmsParams);for(var R in u)R in this.options||(S[R]=u[R]);u=m(this,u);var I=u.detectRetina&&we.retina?2:1,D=this.getTileSize();S.width=D.x*I,S.height=D.y*I,this.wmsParams=S},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,ao.prototype.onAdd.call(this,o)},getTileUrl:function(o){var u=this._tileCoordsToNwSe(o),S=this._crs,R=oe(S.project(u[0]),S.project(u[1])),I=R.min,D=R.max,q=(this._wmsVersion>=1.3&&this._crs===qv?[I.y,I.x,D.y,D.x]:[I.x,I.y,D.x,D.y]).join(","),K=ao.prototype.getTileUrl.call(this,o);return K+b(this.wmsParams,K,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+q},setParams:function(o,u){return i(this.wmsParams,o),u||this.redraw(),this}});function AC(o,u){return new ey(o,u)}ao.WMS=ey,Jv.wms=AC;var yr=Dn.extend({options:{padding:.1},initialize:function(o){m(this,o),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Ae(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,u){var S=this._map.getZoomScale(u,this._zoom),R=this._map.getSize().multiplyBy(.5+this.options.padding),I=this._map.project(this._center,u),D=R.multiplyBy(-S).add(I).subtract(this._map._getNewPixelOrigin(o,u));we.any3d?_i(this._container,D,S):Tt(this._container,D)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,u=this._map.getSize(),S=this._map.containerPointToLayerPoint(u.multiplyBy(-o)).round();this._bounds=new J(S,S.add(u.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ty=yr.extend({options:{tolerance:0},getEvents:function(){var o=yr.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){yr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");Ce(o,"mousemove",this._onMouseMove,this),Ce(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ce(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){$(this._redrawRequest),delete this._ctx,st(this._container),Ke(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var u in this._layers)o=this._layers[u],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){yr.prototype._update.call(this);var o=this._bounds,u=this._container,S=o.getSize(),R=we.retina?2:1;Tt(u,o.min),u.width=R*S.x,u.height=R*S.y,u.style.width=S.x+"px",u.style.height=S.y+"px",we.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){yr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[d(o)]=o;var u=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var u=o._order,S=u.next,R=u.prev;S?S.prev=R:this._drawLast=R,R?R.next=S:this._drawFirst=S,delete o._order,delete this._layers[d(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var u=o.options.dashArray.split(/[, ]+/),S=[],R,I;for(I=0;I')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),PC={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(yr.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var u=o._container=hs("shape");Ae(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",o._path=hs("path"),u.appendChild(o._path),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){var u=o._container;this._container.appendChild(u),o.options.interactive&&o.addInteractiveTarget(u)},_removePath:function(o){var u=o._container;st(u),o.removeInteractiveTarget(u),delete this._layers[d(o)]},_updateStyle:function(o){var u=o._stroke,S=o._fill,R=o.options,I=o._container;I.stroked=!!R.stroke,I.filled=!!R.fill,R.stroke?(u||(u=o._stroke=hs("stroke")),I.appendChild(u),u.weight=R.weight+"px",u.color=R.color,u.opacity=R.opacity,R.dashArray?u.dashStyle=h(R.dashArray)?R.dashArray.join(" "):R.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=R.lineCap.replace("butt","flat"),u.joinstyle=R.lineJoin):u&&(I.removeChild(u),o._stroke=null),R.fill?(S||(S=o._fill=hs("fill")),I.appendChild(S),S.color=R.fillColor||R.color,S.opacity=R.fillOpacity):S&&(I.removeChild(S),o._fill=null)},_updateCircle:function(o){var u=o._point.round(),S=Math.round(o._radius),R=Math.round(o._radiusY||S);this._setPath(o,o._empty()?"M0 0":"AL "+u.x+","+u.y+" "+S+","+R+" 0,"+65535*360)},_setPath:function(o,u){o._path.v=u},_bringToFront:function(o){to(o._container)},_bringToBack:function(o){no(o._container)}},Qa=we.vml?hs:ve,ps=yr.extend({_initContainer:function(){this._container=Qa("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Qa("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){st(this._container),Ke(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){yr.prototype._update.call(this);var o=this._bounds,u=o.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,S.setAttribute("width",u.x),S.setAttribute("height",u.y)),Tt(S,o.min),S.setAttribute("viewBox",[o.min.x,o.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(o){var u=o._path=Qa("path");o.options.className&&Ae(u,o.options.className),o.options.interactive&&Ae(u,"leaflet-interactive"),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){st(o._path),o.removeInteractiveTarget(o._path),delete this._layers[d(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var u=o._path,S=o.options;u&&(S.stroke?(u.setAttribute("stroke",S.color),u.setAttribute("stroke-opacity",S.opacity),u.setAttribute("stroke-width",S.weight),u.setAttribute("stroke-linecap",S.lineCap),u.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?u.setAttribute("stroke-dasharray",S.dashArray):u.removeAttribute("stroke-dasharray"),S.dashOffset?u.setAttribute("stroke-dashoffset",S.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),S.fill?(u.setAttribute("fill",S.fillColor||S.color),u.setAttribute("fill-opacity",S.fillOpacity),u.setAttribute("fill-rule",S.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(o,u){this._setPath(o,se(o._parts,u))},_updateCircle:function(o){var u=o._point,S=Math.max(Math.round(o._radius),1),R=Math.max(Math.round(o._radiusY),1)||S,I="a"+S+","+R+" 0 1,0 ",D=o._empty()?"M0 0":"M"+(u.x-S)+","+u.y+I+S*2+",0 "+I+-S*2+",0 ";this._setPath(o,D)},_setPath:function(o,u){o._path.setAttribute("d",u)},_bringToFront:function(o){to(o._path)},_bringToBack:function(o){no(o._path)}});we.vml&&ps.include(PC);function ry(o){return we.svg||we.vml?new ps(o):null}Oe.include({getRenderer:function(o){var u=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var u=this._paneRenderers[o];return u===void 0&&(u=this._createRenderer({pane:o}),this._paneRenderers[o]=u),u},_createRenderer:function(o){return this.options.preferCanvas&&ny(o)||ry(o)}});var iy=oo.extend({initialize:function(o,u){oo.prototype.initialize.call(this,this._boundsToLatLngs(o),u)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=fe(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function LC(o,u){return new iy(o,u)}ps.create=Qa,ps.pointsToPath=se,vr.geometryToLayer=Wa,vr.coordsToLatLng=gd,vr.coordsToLatLngs=qa,vr.latLngToCoords=vd,vr.latLngsToCoords=Za,vr.getFeature=so,vr.asFeature=Ga,Oe.mergeOptions({boxZoom:!0});var oy=tr.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){Ce(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){st(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),os(),ed(),this._startPoint=this._map.mouseEventToContainerPoint(o),Ce(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),Ae(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var u=new J(this._point,this._startPoint),S=u.getSize();Tt(this._box,u.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(st(this._box),_t(this._container,"leaflet-crosshair")),ss(),td(),Ke(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var u=new ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Oe.addInitHook("addHandler","boxZoom",oy),Oe.mergeOptions({doubleClickZoom:!0});var sy=tr.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var u=this._map,S=u.getZoom(),R=u.options.zoomDelta,I=o.originalEvent.shiftKey?S-R:S+R;u.options.doubleClickZoom==="center"?u.setZoom(I):u.setZoomAround(o.containerPoint,I)}});Oe.addInitHook("addHandler","doubleClickZoom",sy),Oe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ay=tr.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new zr(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}Ae(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_t(this._map._container,"leaflet-grab"),_t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=fe(this._map.options.maxBounds);this._offsetLimit=oe(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var u=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(u),this._prunePositions(u)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,u){return o-(o-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;o.xu.max.x&&(o.x=this._viscousLimit(o.x,u.max.x)),o.y>u.max.y&&(o.y=this._viscousLimit(o.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,u=Math.round(o/2),S=this._initialWorldOffset,R=this._draggable._newPos.x,I=(R-u+S)%o+u-S,D=(R+u+S)%o-u-S,q=Math.abs(I+S)0?D:-D))-u;this._delta=0,this._startTime=null,q&&(o.options.scrollWheelZoom==="center"?o.setZoom(u+q):o.setZoomAround(this._lastMousePos,u+q))}});Oe.addInitHook("addHandler","scrollWheelZoom",uy);var RC=600;Oe.mergeOptions({tapHold:we.touchNative&&we.safari&&we.mobile,tapTolerance:15});var cy=tr.extend({addHooks:function(){Ce(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var u=o.touches[0];this._startPos=this._newPos=new V(u.clientX,u.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ce(document,"touchend",Dt),Ce(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),RC),Ce(document,"touchend touchcancel contextmenu",this._cancel,this),Ce(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Ke(document,"touchend",Dt),Ke(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)},_onMove:function(o){var u=o.touches[0];this._newPos=new V(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,u){var S=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});S._simulated=!0,u.target.dispatchEvent(S)}});Oe.addInitHook("addHandler","tapHold",cy),Oe.mergeOptions({touchZoom:we.touch,bounceAtZoomLimits:!0});var dy=tr.extend({addHooks:function(){Ae(this._map._container,"leaflet-touch-zoom"),Ce(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_t(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var u=this._map;if(!(!o.touches||o.touches.length!==2||u._animatingZoom||this._zooming)){var S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(S.add(R)._divideBy(2))),this._startDist=S.distanceTo(R),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),Ce(document,"touchmove",this._onTouchMove,this),Ce(document,"touchend touchcancel",this._onTouchEnd,this),Dt(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var u=this._map,S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]),I=S.distanceTo(R)/this._startDist;if(this._zoom=u.getScaleZoom(I,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoomu.getMaxZoom()&&I>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,I===1)return}else{var D=S._add(R)._divideBy(2)._subtract(this._centerPoint);if(I===1&&D.x===0&&D.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(D),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),$(this._animRequest);var q=a(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(q,this,!0),Dt(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,$(this._animRequest),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Oe.addInitHook("addHandler","touchZoom",dy),Oe.BoxZoom=oy,Oe.DoubleClickZoom=sy,Oe.Drag=ay,Oe.Keyboard=ly,Oe.ScrollWheelZoom=uy,Oe.TapHold=cy,Oe.TouchZoom=dy,n.Bounds=J,n.Browser=we,n.CRS=be,n.Canvas=ty,n.Circle=md,n.CircleMarker=Va,n.Class=z,n.Control=Mn,n.DivIcon=Qv,n.DivOverlay=nr,n.DomEvent=Yk,n.DomUtil=Zk,n.Draggable=zr,n.Evented=U,n.FeatureGroup=mr,n.GeoJSON=vr,n.GridLayer=fs,n.Handler=tr,n.Icon=io,n.ImageOverlay=Ya,n.LatLng=de,n.LatLngBounds=ce,n.Layer=Dn,n.LayerGroup=ro,n.LineUtil=aC,n.Map=Oe,n.Marker=Ha,n.Mixin=nC,n.Path=Ur,n.Point=V,n.PolyUtil=lC,n.Polygon=oo,n.Polyline=gr,n.Popup=Ka,n.PosAnimation=Ov,n.Projection=uC,n.Rectangle=iy,n.Renderer=yr,n.SVG=ps,n.SVGOverlay=Xv,n.TileLayer=ao,n.Tooltip=Xa,n.Transformation=W,n.Util=F,n.VideoOverlay=Kv,n.bind=a,n.bounds=oe,n.canvas=ny,n.circle=vC,n.circleMarker=gC,n.control=us,n.divIcon=kC,n.extend=i,n.featureGroup=hC,n.geoJSON=Yv,n.geoJson=wC,n.gridLayer=CC,n.icon=pC,n.imageOverlay=bC,n.latLng=ue,n.latLngBounds=fe,n.layerGroup=fC,n.map=Kk,n.marker=mC,n.point=G,n.polygon=_C,n.polyline=yC,n.popup=EC,n.rectangle=LC,n.setOptions=m,n.stamp=d,n.svg=ry,n.svgOverlay=SC,n.tileLayer=Jv,n.tooltip=xC,n.transformation=Z,n.version=r,n.videoOverlay=TC;var IC=window.L;n.noConflict=function(){return window.L=IC,this},window.L=n})})(db,db.exports);function Dp(e,t,n,r,i,s){if(i-r<=n)return;const a=r+i>>1;bx(e,t,a,r,i,s%2),Dp(e,t,n,r,a-1,s+1),Dp(e,t,n,a+1,i,s+1)}function bx(e,t,n,r,i,s){for(;i>r;){if(i-r>600){const y=i-r+1,_=n-r+1,c=Math.log(y),f=.5*Math.exp(2*c/3),w=.5*Math.sqrt(c*f*(y-f)/y)*(_-y/2<0?-1:1),v=Math.max(r,Math.floor(n-_*f/y+w)),m=Math.min(i,Math.floor(n+(y-_)*f/y+w));bx(e,t,n,v,m,s)}const a=t[2*n+s];let l=r,d=i;for(Ps(e,t,r,n),t[2*i+s]>a&&Ps(e,t,r,i);la;)d--}t[2*r+s]===a?Ps(e,t,r,d):(d++,Ps(e,t,d,i)),d<=n&&(r=d+1),n<=d&&(i=d-1)}}function Ps(e,t,n,r){Sh(e,n,r),Sh(t,2*n,2*r),Sh(t,2*n+1,2*r+1)}function Sh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Rz(e,t,n,r,i,s,a){const l=[0,e.length-1,0],d=[];let y,_;for(;l.length;){const c=l.pop(),f=l.pop(),w=l.pop();if(f-w<=a){for(let b=w;b<=f;b++)y=t[2*b],_=t[2*b+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[b]);continue}const v=Math.floor((w+f)/2);y=t[2*v],_=t[2*v+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[v]);const m=(c+1)%2;(c===0?n<=y:r<=_)&&(l.push(w),l.push(v-1),l.push(m)),(c===0?i>=y:s>=_)&&(l.push(v+1),l.push(f),l.push(m))}return d}function Iz(e,t,n,r,i,s){const a=[0,e.length-1,0],l=[],d=i*i;for(;a.length;){const y=a.pop(),_=a.pop(),c=a.pop();if(_-c<=s){for(let b=c;b<=_;b++)fb(t[2*b],t[2*b+1],n,r)<=d&&l.push(e[b]);continue}const f=Math.floor((c+_)/2),w=t[2*f],v=t[2*f+1];fb(w,v,n,r)<=d&&l.push(e[f]);const m=(y+1)%2;(y===0?n-i<=w:r-i<=v)&&(a.push(c),a.push(f-1),a.push(m)),(y===0?n+i>=w:r+i>=v)&&(a.push(f+1),a.push(_),a.push(m))}return l}function fb(e,t,n,r){const i=e-n,s=t-r;return i*i+s*s}const Nz=e=>e[0],Oz=e=>e[1];class hb{constructor(t,n=Nz,r=Oz,i=64,s=Float64Array){this.nodeSize=i,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),d=this.coords=new s(t.length*2);for(let y=0;ye},$u=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class Dz{constructor(t){this.options=Gs(Object.create(Mz),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:n,minZoom:r,maxZoom:i,nodeSize:s}=this.options;n&&console.time("total time");const a=`prepare ${t.length} points`;n&&console.time(a),this.points=t;let l=[];for(let d=0;d=r;d--){const y=+Date.now();l=this._cluster(l,d),this.trees[d]=new hb(l,mb,gb,s,Float32Array),n&&console.log("z%d: %d clusters in %dms",d,l.length,+Date.now()-y)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const _=this.getClusters([r,i,180,a],n),c=this.getClusters([-180,i,s,a],n);return _.concat(c)}const l=this.trees[this._limitZoom(n)],d=l.range(Gl(r),Yl(a),Gl(s),Yl(i)),y=[];for(const _ of d){const c=l.points[_];y.push(c.numPoints?pb(c):this.points[c.index])}return y}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),i="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(i);const a=s.points[n];if(!a)throw new Error(i);const l=this.options.radius/(this.options.extent*Math.pow(2,r-1)),d=s.within(a.x,a.y,l),y=[];for(const _ of d){const c=s.points[_];c.parentId===t&&y.push(c.numPoints?pb(c):this.points[c.index])}if(y.length===0)throw new Error(i);return y}getLeaves(t,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,t,n,r,0),i}getTile(t,n,r){const i=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:a,radius:l}=this.options,d=l/a,y=(r-d)/s,_=(r+1+d)/s,c={features:[]};return this._addTileFeatures(i.range((n-d)/s,y,(n+1+d)/s,_),i.points,n,r,s,c),n===0&&this._addTileFeatures(i.range(1-d/s,y,1,_),i.points,s,r,s,c),n===s-1&&this._addTileFeatures(i.range(0,y,d/s,_),i.points,-1,r,s,c),c.features.length?c:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,i,s){const a=this.getChildren(n);for(const l of a){const d=l.properties;if(d&&d.cluster?s+d.point_count<=i?s+=d.point_count:s=this._appendLeaves(t,d.cluster_id,r,i,s):sn&&(v+=b.numPoints||1)}if(v>w&&v>=l){let m=_.x*w,b=_.y*w,g=a&&w>1?this._map(_,!0):null;const p=(y<<5)+(n+1)+this.points.length;for(const h of f){const T=c.points[h];if(T.zoom<=n)continue;T.zoom=n;const x=T.numPoints||1;m+=T.x*x,b+=T.y*x,T.parentId=p,a&&(g||(g=this._map(_,!0)),a(g,this._map(T)))}_.parentId=p,r.push($z(m/v,b/v,p,v,g))}else if(r.push(_),v>1)for(const m of f){const b=c.points[m];b.zoom<=n||(b.zoom=n,r.push(b))}}return r}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n){if(t.numPoints)return n?Gs({},t.properties):t.properties;const r=this.points[t.index].properties,i=this.options.map(r);return n&&i===r?Gs({},i):i}}function $z(e,t,n,r,i){return{x:$u(e),y:$u(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function Fz(e,t){const[n,r]=e.geometry.coordinates;return{x:$u(Gl(n)),y:$u(Yl(r)),zoom:1/0,index:t,parentId:-1}}function pb(e){return{type:"Feature",id:e.id,properties:Tx(e),geometry:{type:"Point",coordinates:[jz(e.x),zz(e.y)]}}}function Tx(e){const t=e.numPoints,n=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${Math.round(t/100)/10}k`:t;return Gs(Gs({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Gl(e){return e/360+.5}function Yl(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function jz(e){return(e-.5)*360}function zz(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Gs(e,t){for(const n in t)e[n]=t[n];return e}function mb(e){return e.x}function gb(e){return e.y}var ge={},$p={exports:{}};(function(e,t){(function(n,r){var i="0.7.33",s="",a="?",l="function",d="undefined",y="object",_="string",c="major",f="model",w="name",v="type",m="vendor",b="version",g="architecture",p="console",h="mobile",T="tablet",x="smarttv",k="wearable",P="embedded",E=350,A="Amazon",C="Apple",N="ASUS",$="BlackBerry",F="Browser",z="Chrome",B="Edge",H="Firefox",U="Google",V="Huawei",Y="LG",G="Microsoft",J="Motorola",oe="Opera",ce="Samsung",fe="Sharp",de="Sony",ue="Xiaomi",be="Zebra",ne="Facebook",O=function(xe,Ne){var Pe={};for(var Je in xe)Ne[Je]&&Ne[Je].length%2===0?Pe[Je]=Ne[Je].concat(xe[Je]):Pe[Je]=xe[Je];return Pe},j=function(xe){for(var Ne={},Pe=0;Pe0?Ge.length===2?typeof Ge[1]==l?this[Ge[0]]=Ge[1].call(this,cn):this[Ge[0]]=Ge[1]:Ge.length===3?typeof Ge[1]===l&&!(Ge[1].exec&&Ge[1].test)?this[Ge[0]]=cn?Ge[1].call(this,cn,Ge[2]):r:this[Ge[0]]=cn?cn.replace(Ge[1],Ge[2]):r:Ge.length===4&&(this[Ge[0]]=cn?Ge[3].call(this,cn.replace(Ge[1],Ge[2])):r):this[Ge]=cn||r;Pe+=2}},se=function(xe,Ne){for(var Pe in Ne)if(typeof Ne[Pe]===y&&Ne[Pe].length>0){for(var Je=0;JeE?ee(Le,E):Le,this},this.setUA(Pe),this};Ue.VERSION=i,Ue.BROWSER=j([w,b,c]),Ue.CPU=j([g]),Ue.DEVICE=j([f,m,v,p,h,x,T,k,P]),Ue.ENGINE=Ue.OS=j([w,b]),e.exports&&(t=e.exports=Ue),t.UAParser=Ue;var Be=typeof n!==d&&(n.jQuery||n.Zepto);if(Be&&!Be.ua){var qe=new Ue;Be.ua=qe.getResult(),Be.ua.get=function(){return qe.getUA()},Be.ua.set=function(xe){qe.setUA(xe);var Ne=qe.getResult();for(var Pe in Ne)Be.ua[Pe]=Ne[Pe]}}})(typeof window=="object"?window:Xr)})($p,$p.exports);var Uz=$p.exports;Object.defineProperty(ge,"__esModule",{value:!0});function Bz(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var qt=te,Qe=Bz(qt),Sx=Uz,gi=new Sx,Gt=gi.getBrowser(),Hz=gi.getCPU(),bn=gi.getDevice(),fv=gi.getEngine(),vi=gi.getOS(),Na=gi.getUA(),Ex=function(t){return gi.setUA(t)},Oa=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new Sx(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},xx=Object.freeze({ClientUAInstance:gi,browser:Gt,cpu:Hz,device:bn,engine:fv,os:vi,ua:Na,setUa:Ex,parseUserAgent:Oa});function vb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vz(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function On(e,t){if(e==null)return{};var n=Yz(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kz(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kl(e)}function Xz(e,t){return Qz(e)||Jz(e,t)||e4(e,t)||t4()}function Qz(e){if(Array.isArray(e))return e}function Jz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){s=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function e4(e,t){if(e){if(typeof e=="string")return _b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _b(e,t)}}function _b(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},hv=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},pv=function(t){var n=hv();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},o4=function(t,n,r,i,s){return{isBrowser:t,browserMajorVersion:Ee(n.major),browserFullVersion:Ee(n.version),browserName:Ee(n.name),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}},wb=function(t,n,r,i){return Vz({},t,{vendor:Ee(n.vendor),model:Ee(n.model),os:Ee(r.name),osVersion:Ee(r.version),ua:Ee(i)})},s4=function(t,n,r,i){return{isSmartTV:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},a4=function(t,n,r,i){return{isConsole:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},l4=function(t,n,r,i){return{isWearable:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},u4=function(t,n,r,i,s){return{isEmbedded:t,vendor:Ee(n.vendor),model:Ee(n.model),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}};function c4(e){var t=e?Oa(e):xx,n=t.device,r=t.browser,i=t.engine,s=t.os,a=t.ua,l=r4(n.type),d=l.isBrowser,y=l.isMobile,_=l.isTablet,c=l.isSmartTV,f=l.isConsole,w=l.isWearable,v=l.isEmbedded;if(d)return o4(d,r,i,s,a);if(c)return s4(c,i,s,a);if(f)return a4(f,i,s,a);if(y||_)return wb(l,n,s,a);if(w)return l4(w,i,s,a);if(v)return u4(v,n,i,s,a)}var kx=function(t){var n=t.type;return n===Vt.Mobile},Cx=function(t){var n=t.type;return n===Vt.Tablet},Ax=function(t){var n=t.type;return n===Vt.Mobile||n===Vt.Tablet},Px=function(t){var n=t.type;return n===Vt.SmartTv},Fu=function(t){var n=t.type;return n===Vt.Browser},Lx=function(t){var n=t.type;return n===Vt.Wearable},Rx=function(t){var n=t.type;return n===Vt.Console},Ix=function(t){var n=t.type;return n===Vt.Embedded},Nx=function(t){var n=t.vendor;return Ee(n)},Ox=function(t){var n=t.model;return Ee(n)},Mx=function(t){var n=t.type;return Ee(n,"browser")},Dx=function(t){var n=t.name;return n===es.Android},$x=function(t){var n=t.name;return n===es.Windows},Fx=function(t){var n=t.name;return n===es.MAC_OS},jx=function(t){var n=t.name;return n===es.WindowsPhone},zx=function(t){var n=t.name;return n===es.IOS},Ux=function(t){var n=t.version;return Ee(n)},Bx=function(t){var n=t.name;return Ee(n)},Hx=function(t){var n=t.name;return n===un.Chrome},Vx=function(t){var n=t.name;return n===un.Firefox},Wx=function(t){var n=t.name;return n===un.Chromium},ju=function(t){var n=t.name;return n===un.Edge},qx=function(t){var n=t.name;return n===un.Yandex},Zx=function(t){var n=t.name;return n===un.Safari||n===un.MobileSafari},Gx=function(t){var n=t.name;return n===un.MobileSafari},Yx=function(t){var n=t.name;return n===un.Opera},Kx=function(t){var n=t.name;return n===un.InternetExplorer||n===un.Ie},Xx=function(t){var n=t.name;return n===un.MIUI},Qx=function(t){var n=t.name;return n===un.SamsungBrowser},Jx=function(t){var n=t.version;return Ee(n)},ek=function(t){var n=t.major;return Ee(n)},tk=function(t){var n=t.name;return Ee(n)},nk=function(t){var n=t.name;return Ee(n)},rk=function(t){var n=t.version;return Ee(n)},ik=function(){var t=hv(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Oo=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},ok=function(){var t=hv();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},ar=function(){return pv("iPad")},sk=function(){return pv("iPhone")},ak=function(){return pv("iPod")},lk=function(t){return Ee(t)};function uk(e){var t=e||xx,n=t.device,r=t.browser,i=t.os,s=t.engine,a=t.ua;return{isSmartTV:Px(n),isConsole:Rx(n),isWearable:Lx(n),isEmbedded:Ix(n),isMobileSafari:Gx(r)||ar(),isChromium:Wx(r),isMobile:Ax(n)||ar(),isMobileOnly:kx(n),isTablet:Cx(n)||ar(),isBrowser:Fu(n),isDesktop:Fu(n),isAndroid:Dx(i),isWinPhone:jx(i),isIOS:zx(i)||ar(),isChrome:Hx(r),isFirefox:Vx(r),isSafari:Zx(r),isOpera:Yx(r),isIE:Kx(r),osVersion:Ux(i),osName:Bx(i),fullBrowserVersion:Jx(r),browserVersion:ek(r),browserName:tk(r),mobileVendor:Nx(n),mobileModel:Ox(n),engineName:nk(s),engineVersion:rk(s),getUA:lk(a),isEdge:ju(r)||Oo(a),isYandex:qx(r),deviceType:Mx(n),isIOS13:ok(),isIPad13:ar(),isIPhone13:sk(),isIPod13:ak(),isElectron:ik(),isEdgeChromium:Oo(a),isLegacyEdge:ju(r)&&!Oo(a),isWindows:$x(i),isMacOs:Fx(i),isMIUI:Xx(r),isSamsungBrowser:Qx(r)}}var ck=Px(bn),dk=Rx(bn),fk=Lx(bn),d4=Ix(bn),f4=Gx(Gt)||ar(),h4=Wx(Gt),qc=Ax(bn)||ar(),hk=kx(bn),pk=Cx(bn)||ar(),mk=Fu(bn),p4=Fu(bn),gk=Dx(vi),vk=jx(vi),yk=zx(vi)||ar(),m4=Hx(Gt),g4=Vx(Gt),v4=Zx(Gt),y4=Yx(Gt),_k=Kx(Gt),_4=Ux(vi),w4=Bx(vi),b4=Jx(Gt),T4=ek(Gt),S4=tk(Gt),E4=Nx(bn),x4=Ox(bn),k4=nk(fv),C4=rk(fv),A4=lk(Na),P4=ju(Gt)||Oo(Na),L4=qx(Gt),R4=Mx(bn),I4=ok(),N4=ar(),O4=sk(),M4=ak(),D4=ik(),$4=Oo(Na),F4=ju(Gt)&&!Oo(Na),j4=$x(vi),z4=Fx(vi),U4=Xx(Gt),B4=Qx(Gt),H4=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Oa(t),r=n.device,i=n.browser,s=n.os,a=n.engine,l=n.ua;return uk({device:r,browser:i,os:s,engine:a,ua:l})},V4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return gk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},W4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return mk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},q4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return _k?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},Z4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return yk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},G4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return qc?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},Y4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return pk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},K4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return vk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},X4=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=On(t,["renderWithFragment","children","viewClassName","style"]);return hk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},Q4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ck?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},J4=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return dk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},eU=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return fk?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",i,r):null},tU=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=t.condition,s=On(t,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?Qe.createElement(qt.Fragment,null,r):Qe.createElement("div",s,r):null};function nU(e){return function(t){Gz(n,t);function n(r){var i;return Wz(this,n),i=Kz(this,jp(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(Kl(i)),i.onOrientationChange=i.onOrientationChange.bind(Kl(i)),i.onPageLoad=i.onPageLoad.bind(Kl(i)),i.state={isLandscape:!1,isPortrait:!1},i}return qz(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Ys(window))!==void 0&&qc&&(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 Qe.createElement(e,Fp({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Qe.Component)}function rU(){var e=qt.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=Xz(e,2),n=t[0],r=t[1],i=qt.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return qt.useEffect(function(){return(typeof window>"u"?"undefined":Ys(window))!==void 0&&qc&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function wk(e){var t=e||window.navigator.userAgent;return Oa(t)}function iU(e){var t=e||window.navigator.userAgent,n=wk(t),r=uk(n);return[r,n]}ge.AndroidView=V4;ge.BrowserTypes=un;ge.BrowserView=W4;ge.ConsoleView=J4;ge.CustomView=tU;ge.IEView=q4;ge.IOSView=Z4;ge.MobileOnlyView=X4;ge.MobileView=G4;ge.OsTypes=es;ge.SmartTVView=Q4;ge.TabletView=Y4;ge.WearableView=eU;ge.WinPhoneView=K4;ge.browserName=S4;ge.browserVersion=T4;ge.deviceDetect=c4;ge.deviceType=R4;ge.engineName=k4;ge.engineVersion=C4;ge.fullBrowserVersion=b4;ge.getSelectorsByUserAgent=H4;ge.getUA=A4;ge.isAndroid=gk;ge.isBrowser=mk;ge.isChrome=m4;ge.isChromium=h4;ge.isConsole=dk;ge.isDesktop=p4;ge.isEdge=P4;ge.isEdgeChromium=$4;ge.isElectron=D4;ge.isEmbedded=d4;ge.isFirefox=g4;ge.isIE=_k;ge.isIOS=yk;ge.isIOS13=I4;ge.isIPad13=N4;ge.isIPhone13=O4;ge.isIPod13=M4;ge.isLegacyEdge=F4;ge.isMIUI=U4;ge.isMacOs=z4;ge.isMobile=qc;var oU=ge.isMobileOnly=hk;ge.isMobileSafari=f4;ge.isOpera=y4;ge.isSafari=v4;ge.isSamsungBrowser=B4;ge.isSmartTV=ck;ge.isTablet=pk;ge.isWearable=fk;ge.isWinPhone=vk;ge.isWindows=j4;ge.isYandex=L4;ge.mobileModel=x4;ge.mobileVendor=E4;ge.osName=w4;ge.osVersion=_4;ge.parseUserAgent=Oa;ge.setUserAgent=i4;ge.useDeviceData=wk;ge.useDeviceSelectors=iU;ge.useMobileOrientation=rU;ge.withOrientationChange=nU;function sU({sites:e,projectPoint:t}){function n(r){const{x:i,y:s}=t([r.latitude,r.longitude]);return M("div",{className:"leaflet-tooltip site-label leaflet-zoom-animated leaflet-tooltip-top",style:{opacity:1,transform:`translate3d(calc(${i}px - 50%), ${s-25}px, 0px)`},children:r.site})}return!e||!e.length?null:M("div",{className:"sites-layer",children:e.map(n)})}class Zi extends te.Component{render(){const{children:t,node:n}=this.props;return n?fL.createPortal(t,n):null}}function aU({svg:e,regions:t,projectPoint:n,styles:r}){function i(s){const a=[],l=s.points.map(n);return l.forEach((d,y)=>{if(y{const y=s.name in r?r[s.name]:r.default;return M("line",{id:`${s.name}_style`,markerStart:"none",...d,style:y})})}return!t||!t.length?null:M(Zi,{node:e,children:M("g",{id:"regions-layer",className:"narrative",children:t.map(i)})})}const bb="#E31A1B";function lU({getCategoryColor:e,categories:t,projectPoint:n,styleLocation:r,selected:i,highlighted:s,narrative:a,onSelect:l,svg:d,locations:y,eventRadius:_,coloringSet:c,filterColors:f,features:w}){function v(p,h){const T=p.shiftKey?i.concat(h.events):h.events;l(T)}function m(){return M(Ln,{children:M("circle",{className:"event-hover",cx:"0",cy:"0",r:"10",stroke:qn.primaryHighlight,fillOpacity:"0.0"})})}function b(p){const h={stroke:qn.darkBackground,strokeWidth:0,fillOpacity:a?1:lg(p.events.length)},T=p.events.length,P=(s&&s.length>0?p.events.filter(C=>s.includes(C.civId)):[]).length/T,E=p.events.filter(C=>!s||!s.includes(C.civId));let A;if(P===1)A={[bb]:1};else if(P>0){const C={...p,events:E},$=wa([C],c).map(F=>F*(1-P));A=_a(f,$),A[bb]=P}else{const C=wa([p],c);A=_a(f,C)}return M(dv,{radius:_,colorPercentMap:A,styles:{...h},className:"location-event-marker"})}function g(p){if(!p.latitude||!p.longitude)return null;const{x:h,y:T}=n([p.latitude,p.longitude]);if(a){const{steps:E}=a,A=N=>E.map($=>$.id).includes(N.id);if(p.events.filter(A).length<=0)return null}const x=r?r(p):null,k=()=>M(Ln,{children:x[1]}),P=i.reduce((E,A)=>E||A.latitude===p.latitude&&A.longitude===p.longitude,!1);return M("svg",{children:re("g",{className:`location-event ${a?"no-hover":""}`,transform:`translate(${h}, ${T})`,onClick:E=>v(E,p),children:[b(p),k?k():null,P?null:m()]})},tn(p))}return M(Zi,{node:d,children:M("svg",{children:M("g",{className:"event-locations",children:y.map(g)})})})}const Tb="#E31A1B",uU=()=>M("defs",{children:re("radialGradient",{id:"clusterGradient",children:[M("stop",{offset:"10%",stopColor:"red"}),M("stop",{offset:"90%",stopColor:"transparent"})]})});function cU({cluster:e,size:t,projectPoint:n,totalPoints:r,styles:i,renderHover:s,onClick:a,getClusterChildren:l,coloringSet:d,filterColors:y,highlighted:_}){const{cluster_id:c}=e.properties,f=l(c),w=f.flatMap(C=>C.events),v=w.length,b=(_&&_.length>0?w.filter(C=>_.includes(C.civId)):[]).length,g=v>0?b/v:0;let p;if(g===1)p={[Tb]:1};else if(g>0){const C=f.map(F=>({...F,events:F.events.filter(z=>!_||!_.includes(z.civId))})).filter(F=>F.events.length>0),$=wa(C,d).map(F=>F*(1-g));p=_a(y,$),p[Tb]=g}else{const C=wa(f,d);p=_a(y,C)}const{coordinates:h}=e.geometry,[T,x]=h,{x:k,y:P}=n([x,T]),[E,A]=te.useState(!1);return!La(x)||!Ra(T)?null:M("svg",{children:re("g",{className:"cluster-event",transform:`translate(${k}, ${P})`,onClick:C=>a({id:c,latitude:x,longitude:T}),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),children:[M(dv,{radius:t,colorPercentMap:p,styles:{...i},className:"cluster-event-marker"}),E?s(e):null]})})}function dU({projectPoint:e,onSelect:t,getClusterChildren:n,coloringSet:r,isRadial:i,svg:s,clusters:a,filterColors:l,selected:d,highlighted:y}){const _=HS(a),c={fill:i?"url('#clusterGradient')":qn.fallbackEventColor,stroke:qn.darkBackground,strokeWidth:0};function f(w,v){return re(Ln,{children:[M("text",{textAnchor:"middle",y:"3px",style:{fontWeight:"bold",fill:"black",zIndex:1e4},children:w}),M("circle",{className:"event-hover",cx:"0",cy:"0",r:v+2,stroke:qn.primaryHighlight,fillOpacity:"0.0"})]})}return M(Zi,{node:s,children:M("svg",{children:re("g",{className:"cluster-locations",children:[i?M(uU,{}):null,a.map((w,v)=>{const m=w.properties.point_count,b=BS(m,_);return M(cU,{onClick:t,getClusterChildren:n,coloringSet:r,cluster:w,filterColors:l,highlighted:y,size:b,projectPoint:e,totalPoints:_,styles:{...c,fillOpacity:pD(m,_)},renderHover:()=>f(m,b)},v)})]})})})}class fU extends te.Component{renderMarker(t){const{x:n,y:r}=this.props.projectPoint([t.latitude,t.longitude]),i=this.props.styles,s=t.radius?t.radius+5:24;return M("g",{className:"location-marker",transform:`translate(${n-s}, ${r})`,children:M("path",{className:"leaflet-interactive",stroke:i?i.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:i?i["stroke-width"]:2,strokeLinecap:"",strokeLinejoin:"round",strokeDasharray:i?i["stroke-dasharray"]:"2,2",fill:"none",d:`M0,0a${s},${s} 0 1,0 ${s*2},0 a${s},${s} 0 1,0 -${s*2},0 `})},tn(t))}render(){return M(Zi,{node:this.props.svg,children:this.props.selected.map(t=>this.renderMarker(t))})}}const hU={strokeOpacity:1,strokeWidth:0,strokeDasharray:"none",stroke:"none"};function pU({styles:e,onSelectNarrative:t,svg:n,narrative:r,narratives:i,projectPoint:s,features:a}){function l(b){const g=b&&b in e?b:"default";return e[g]}const d=i&&i.length!==0;function y(b){return b.latitude===""||b.longitude===""}function _(b,g,p){const h=Math.sqrt((g.x-b.x)*(g.x-b.x)+(g.y-b.y)*(g.y-b.y)),T=Math.atan2(g.y-b.y,g.x-b.x),x=Math.atan2(1,2),k=10,P=h<24?h/2:24,E={x:g.x-P*Math.cos(T),y:g.y-P*Math.sin(T)},A={x:E.x-k*Math.cos(-T-x),y:E.y+k*Math.sin(-T-x)},C={x:E.x-k*Math.cos(-T+x),y:E.y+k*Math.sin(-T+x)};return M("path",{className:"narrative-step-arrow",d:` M ${E.x} ${E.y} L ${A.x} ${A.y} L ${C.x} ${C.y} Z - `,style:{...p,fillOpacity:p.strokeOpacity,fill:p.stroke}})}function c(b,g,p){const{stroke:h,strokeWidth:T,strokeDasharray:x,strokeOpacity:k}=p;return re("g",{children:[M("line",{className:"narrative-step",x1:b.x,x2:g.x,y1:b.y,y2:g.y,markerStart:"none",onClick:P=>t(P),style:{strokeWidth:T,strokeDasharray:x,strokeOpacity:k,stroke:h}}),h!=="none"?_(b,g,p):""]})}function f(b,g,p){if(y(b)||y(g)||!b||!g)return null;const h=s([b.latitude,b.longitude]),T=s([g.latitude,g.longitude]);return c(h,T,{...hB,...p||{}})}function w(b){if(b===null||b.id!==r.id)return null;const g=[];for(let p=0;pM("svg",{children:re("defs",{children:[M("marker",{id:"arrow",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"red"}})}),M("marker",{id:"arrow-off",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"black",fillOpacity:.2}})})]})}),gB="/assets/map-98397b77.png",vB="/assets/sat-6c360e9c.png",yB=({isUsingSatellite:e,toggleSatellite:t})=>{const n=e?"satellite-overlay-toggle-map":"satellite-overlay-toggle-sat",r=e?gB:vB,i=e?ze[ht].tiles.default:ze[ht].tiles.satellite;return M("div",{id:"satellite-overlay-toggle",className:"satellite-overlay-toggle",children:M("button",{className:`satellite-overlay-toggle-button ${n}`,style:{backgroundImage:`url(${r}`},name:"satellite-toggle",onClick:t,children:M("div",{className:"label",children:i})})})},_B=["streets","satellite"],wB="your_token";let bB=class extends te.Component{constructor(){super(),this.projectPoint=this.projectPoint.bind(this),this.onClusterSelect=this.onClusterSelect.bind(this),this.loadClusterData=this.loadClusterData.bind(this),this.getClusterChildren=this.getClusterChildren.bind(this),this.svgRef=te.createRef(),this.map=null,this.superclusterIndex=null,this.tileLayer=null,this.state={mapTransformX:0,mapTransformY:0,indexLoaded:!1,clusters:[]},this.styleLocation=this.styleLocation.bind(this),this.syncMapViewToUrl=this.syncMapViewToUrl.bind(this)}componentDidMount(){this.map===null&&(this.initializeMap(),this.initializeTileLayer()),window.dispatchEvent(new Event("resize"))}componentDidUpdate(t){t.ui.tile!==this.props.ui.tile&&this.map&&this.initializeTileLayer()}UNSAFE_componentWillReceiveProps(t){xl(t.domain.locations,this.props.domain.locations)||this.loadClusterData(t.domain.locations);const{anchor:n,startZoom:r}=t.app.map,{anchor:i,startZoom:s}=this.props.app.map;if(this.map&&(!xl(n,i)||r!==s)){const l=this.map.getCenter(),d=this.map.getZoom();(Math.abs(l.lat-n[0])>1e-5||Math.abs(l.lng-n[1])>1e-5||d!==r)&&this.map.setView(n,r,{animate:!1})}const{bounds:a}=t.app.map;if(!xl(a,this.props.app.map.bounds)&&a!==null)this.map.fitBounds(a);else if(!xl(t.app.selected,this.props.app.selected)){const l=t.app.selected.length>0?t.app.selected[0]:null;l!==null&&l.latitude&&l.longitude&&this.map.setView([l.latitude,l.longitude],this.map.getZoom(),{animate:!0,pan:{duration:.7}})}}getTileUrl(t){return _B.indexOf(this.props.ui.tiles)!==-1&&Nt.MAPBOX_TOKEN&&Nt.MAPBOX_TOKEN!==wB?`http://a.tiles.mapbox.com/v4/mapbox.${t}/{z}/{x}/{y}@2x.png?access_token=${Nt.MAPBOX_TOKEN}`:`https://api.mapbox.com/styles/v1/${t}/tiles/256/{z}/{x}/{y}@2x?access_token=${Nt.MAPBOX_TOKEN}`}initializeTileLayer(){if(!this.map)return;const t=this.getTileUrl(this.props.ui.tile);this.tileLayer?this.tileLayer.setUrl(t):(this.tileLayer=L.tileLayer(t),this.tileLayer.addTo(this.map))}initializeMap(){const{map:t,cluster:n}=this.props.app,r=L.map(this.props.ui.dom.map).setView(t.anchor,t.startZoom).setMinZoom(t.minZoom).setMaxZoom(t.maxZoom).setMaxBounds(t.maxBounds);r.attributionControl.addAttribution(`© Mapbox © OpenStreetMap Improve this map`),this.superclusterIndex=new D4(n),r.keyboard.disable(),r.zoomControl.remove(),r.on("moveend",()=>{this.alignLayers(),this.updateClusters(),this.syncMapViewToUrl()}),r.on("zoomend viewreset",()=>{this.map.dragging.enable(),this.map.doubleClickZoom.enable(),this.map.scrollWheelZoom.enable(),nc.flushSync(()=>{this.alignLayers(),this.updateClusters()})}),r.on("zoomstart",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.add("hide")}),r.on("zoomend",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.remove("hide")}),window.addEventListener("resize",()=>{this.alignLayers()}),this.map=r}getMapDetails(){const t=this.map.getBounds(),n=[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()],r=this.map.getZoom();return[n,r]}syncMapViewToUrl(){if(!this.map)return;const t=this.map.getCenter(),n=this.map.getZoom(),r=Math.round(t.lat*1e5)/1e5,i=Math.round(t.lng*1e5)/1e5;this.props.actions.updateMapView(r,i,n)}updateClusters(){const[t,n]=this.getMapDetails();this.superclusterIndex&&this.state.indexLoaded&&this.setState({clusters:this.superclusterIndex.getClusters(t,n)})}loadClusterData(t){if(t&&t.length>0&&this.superclusterIndex){const n=t.reduce((r,i)=>{const{longitude:s,latitude:a}=i;if(La(a)&&Ra(s)){const d={type:"Feature",properties:{cluster:!1,id:i.label},geometry:{type:"Point",coordinates:[s,a]}};r.push(d)}return r},[]);this.superclusterIndex.load(n),this.setState({indexLoaded:!0},()=>{this.updateClusters()})}else this.setState({clusters:[]})}getClusterChildren(t){if(this.superclusterIndex)try{const n=this.superclusterIndex.getLeaves(t,1/0,0);return g0(n,this.props.domain.locations)}catch{return[]}return[]}getSelectedClusters(){const{selected:t}=this.props.app,n=t.map(r=>r.id);return this.state.clusters&&this.state.clusters.length>0?this.state.clusters.reduce((r,i)=>{if(i.properties.cluster){const s=this.getClusterChildren(i.properties.cluster_id);s&&s.length>0&&s.forEach(a=>{const l=r.findIndex(d=>d.id===i.id)>=0;n.includes(a.id)&&!l&&r.push(i)})}return r},[]):[]}alignLayers(){const t=document.querySelector(".leaflet-map-pane");if(t===null)return{transformX:0,transformY:0};const n=window.getComputedStyle(t).getPropertyValue("transform");this.setState({mapTransformX:+n.split(",")[4],mapTransformY:+n.split(",")[5].split(")")[0]})}projectPoint(t){const n=new L.LatLng(t[0],t[1]);return{x:this.map.latLngToLayerPoint(n).x+this.state.mapTransformX,y:this.map.latLngToLayerPoint(n).y+this.state.mapTransformY}}onClusterSelect({id:t,latitude:n,longitude:r}){const i=Math.max(this.superclusterIndex.getClusterExpansionZoom(parseInt(t)),this.superclusterIndex.options.minZoom),a=Math.max(i+2,this.props.app.cluster.maxZoom);this.map.dragging.disable(),this.map.doubleClickZoom.disable(),this.map.scrollWheelZoom.disable(),this.map.flyTo(new L.LatLng(n,r),a)}getClientDims(){const t=document.querySelector(`#${this.props.ui.dom.map}`).getBoundingClientRect();return{width:t.width,height:t.height}}renderTiles(){const t=this.map.getPanes().overlayPane,{width:n,height:r}=this.getClientDims();return this.map?M(Zi,{node:t,children:M("svg",{ref:this.svgRef,width:n,height:r,style:{transform:`translate3d(${-this.state.mapTransformX}px, ${-this.state.mapTransformY}px, 0)`},className:"leaflet-svg"})}):null}renderSites(){return M(sB,{sites:this.props.domain.sites,projectPoint:this.projectPoint,isEnabled:this.props.app.views.sites})}renderRegions(){return M(aB,{svg:this.svgRef.current,regions:this.props.domain.regions,projectPoint:this.projectPoint,styles:this.props.ui.regions})}renderNarratives(){const t=this.props.domain.narratives.length>0;return M(pB,{svg:this.svgRef.current,narratives:t?this.props.domain.narratives:[this.props.app.narrative],projectPoint:this.projectPoint,narrative:this.props.app.narrative,styles:this.props.ui.narratives,onSelectNarrative:this.props.methods.onSelectNarrative,features:this.props.features})}styleLocation(t){return[null,null]}styleCluster(t){return[null,null]}renderEvents(){const t=this.state.clusters.filter(r=>!r.properties.cluster),n=g0(t,this.props.domain.locations);return M(lB,{svg:this.svgRef.current,events:this.props.domain.events,locations:n,styleLocation:this.styleLocation,categories:this.props.domain.categories,projectPoint:this.projectPoint,selected:this.props.app.selected,highlighted:this.props.app.highlighted,narrative:this.props.app.narrative,onSelect:this.props.methods.onSelect,getCategoryColor:this.props.methods.getCategoryColor,eventRadius:this.props.ui.eventRadius,coloringSet:this.props.app.coloringSet,filterColors:this.props.ui.filterColors,features:this.props.features})}renderClusters(){const t=this.state.clusters.filter(n=>n.properties.cluster);return M(dB,{svg:this.svgRef.current,styleCluster:this.styleCluster,projectPoint:this.projectPoint,clusters:t,isRadial:this.props.ui.radial,onSelect:this.onClusterSelect,coloringSet:this.props.app.coloringSet,getClusterChildren:this.getClusterChildren,filterColors:this.props.ui.filterColors,highlighted:this.props.app.highlighted})}renderSelected(){const t=this.getSelectedClusters(),n=[];this.props.app.selected.forEach(i=>{const{latitude:s,longitude:a}=i;n.push({latitude:s,longitude:a,radius:this.props.ui.eventRadius})});const r=HS(this.state.clusters);return t.forEach(i=>{if(i.properties.cluster){const{coordinates:s}=i.geometry;n.push({latitude:String(s[1]),longitude:String(s[0]),radius:US(i.properties.point_count,r)})}}),M(fB,{svg:this.svgRef.current,selected:n,projectPoint:this.projectPoint,styles:this.props.ui.mapSelectedEvents})}renderMarkers(){return M(Zi,{node:this.svgRef.current,children:M(mB,{})})}render(){const{isShowingSites:t,isFetchingDomain:n}=this.props.app.flags,r=oB||window.innerWidth<600,i=(this.props.app.narrative?"map-wrapper narrative-mode":"map-wrapper")+(r?" mobile":""),s=this.map?re(Ln,{children:[this.renderTiles(),this.renderMarkers(),t?this.renderSites():null,this.renderRegions(),this.renderNarratives(),this.renderEvents(),this.renderClusters(),this.renderSelected()]}):null;return re("div",{className:i,onKeyDown:this.props.onKeyDown,tabIndex:"0",children:[M("div",{id:this.props.ui.dom.map}),M(_x,{isLoading:this.props.app.loading||n,ui:n,language:this.props.app.language}),this.props.features.USE_SATELLITE_OVERLAY_TOGGLE&&M(yB,{isUsingSatellite:this.props.ui.isUsingSatellite,toggleSatellite:this.props.actions.toggleTileOverlay}),s]})}};function TB(e){return{domain:{locations:A$(e),narratives:Ug(e),categories:tE(e),sites:T$(e),regions:S$(e)},app:{views:e.app.associations.views,selected:Hg(e),highlighted:e.app.highlighted,map:e.app.map,cluster:e.app.cluster,language:e.app.language,loading:e.app.loading,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,flags:{isShowingSites:e.app.flags.isShowingSites,isFetchingDomain:e.app.flags.isFetchingDomain}},ui:{tile:v$(e),isUsingSatellite:y$(e),dom:e.ui.dom,narratives:e.ui.style.narratives,mapSelectedEvents:e.ui.style.selectedEvents,regions:e.ui.style.regions,eventRadius:e.ui.eventRadius,radial:e.ui.style.clusters.radial,filterColors:e.ui.coloring.colors},features:hr(e)}}function SB(e){return{actions:Ko(Mc,e)}}const EB=pi(TB,SB)(bB),xB=e=>{switch(e.kind){default:return M(EB,{...e})}},kB=({query:e,eventObj:t,onSearchRowClick:n})=>{const{description:r,location:i,date:s}=t;function a(d,y){const _=d.split(new RegExp(`(${y})`,"gi"));return M("span",{children:_.map(c=>c.toLowerCase()===y.toLowerCase()?M("span",{style:{backgroundColor:"yellow",color:"black"},children:c}):c)})}function l(d,y){const _=new RegExp(`(([^ ]* ){0,6}[a-zA-Z]*${y.toLowerCase()}[a-zA-Z]*( [^ ]*){0,5})`,"gm"),c=d.toLowerCase().match(_);for(let w=0;w<(c?c.length:0);w++)c[w]="..."+c[w];const f=[d.match("(([^ ]* ){0,10})","m")[0]];return c||f}return re("div",{className:"search-row",onClick:()=>n([t]),children:[re("div",{className:"location-date-container",children:[re("div",{className:"date-container",children:[M("i",{className:"material-icons",children:"event"}),M("p",{children:a(s,e)})]}),re("div",{className:"location-container",children:[M("i",{className:"material-icons",children:"location_on"}),M("p",{children:a(i,e)})]})]}),M("p",{children:l(r,e).map(d=>re("span",{children:[a(d,e),"...",M("br",{})]}))})]})};class CB extends te.Component{constructor(t){super(t),this.state={isFolded:!0},this.onButtonClick=this.onButtonClick.bind(this),this.updateSearchQuery=this.updateSearchQuery.bind(this)}onButtonClick(){this.setState(t=>({isFolded:!t.isFolded}))}updateSearchQuery(t){const n=t.target.value;this.props.actions.updateSearchQuery(n)}render(){let t;const n=["description","location","category","date"];return this.props.queryString?t=this.props.events.filter(r=>n.some(i=>r[i].toLowerCase().includes(this.props.queryString.toLowerCase()))):t=[],re("div",{className:"search-outer-container"+(this.props.narrative?" narrative-mode ":""),children:[M("div",{id:"search-bar-icon-container",onClick:this.onButtonClick,children:M("i",{className:"material-icons",children:"search"})}),re("div",{className:"search-bar-overlay"+(this.state.isFolded?" folded":""),children:[re("div",{className:"search-input-container",children:[M("input",{className:"search-bar-input",onChange:this.updateSearchQuery,type:"text"}),M("i",{id:"close-search-overlay",className:"material-icons",onClick:this.onButtonClick,children:"close"})]}),M("div",{className:"search-results",children:t.map(r=>M(kB,{onSearchRowClick:this.props.onSearchRowClick,eventObj:r,query:this.props.queryString}))})]})]})}}function AB(e){return{actions:Ko(Mc,e)}}const PB=pi(e=>e,AB)(CB),Sb=({title:e,value:t,hoverValue:n=null})=>{const[r,i]=te.useState(!1);return re("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{className:"card-cell__text",style:{width:"fit-content"},children:M("div",{onMouseOver:()=>n&&i(!0),onMouseOut:()=>n&&i(!1),children:r?M("span",{style:{pointerEvents:"none",opacity:.8},children:M("em",{children:n})}):M("div",{style:{pointerEvents:"none",display:"inline-block",height:"1.1rem",borderBottom:n&&"1px rgb(235, 68, 62) dashed"},children:t})})})]})},LB=({title:e="Timestamp",timelabel:t,language:n,precision:r})=>{const i=ze[n].cardstack.unknown_time;return aD(t)?re("div",{className:"card-cell",children:[M("h4",{children:e}),t,r&&r!==""?` - ${r}`:null]}):re("div",{className:"card-cell",children:[M("h4",{children:e}),i]})},mv=({primary:e,backgroundColor:t,borderRadius:n,size:r,label:i,normalCursor:s,...a})=>{const l=e?"button--primary":"button--secondary";return M("button",{type:"button",className:["button",`button--${r}`,l,s?"no-hover":""].join(" "),style:{backgroundColor:t,borderRadius:n},...a,children:i})};mv.propTypes={primary:Sr.bool,backgroundColor:Sr.string,borderRadius:Sr.string,size:Sr.oneOf(["small","medium","large"]),label:Sr.string.isRequired,onClick:Sr.func};mv.defaultProps={backgroundColor:"red",borderRadius:"0%",primary:!1,size:"medium",onClick:void 0};const RB=({text:e,color:t="#000",onClick:n=()=>{},normalCursor:r})=>M(mv,{size:"small",backgroundColor:t,borderRadius:"12px",primary:!1,label:e,onClick:n,normalCursor:r}),IB=({isOpen:e,toggle:t})=>M("div",{className:"card-toggle",onClick:t,children:M("p",{children:M("i",{className:e?"arrow-down":"arrow-down folded"})})}),NB=({title:e,value:t})=>re("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{dangerouslySetInnerHTML:{__html:_e(`${t}`)}})]});var bk={exports:{}};/*! + `,style:{...p,fillOpacity:p.strokeOpacity,fill:p.stroke}})}function c(b,g,p){const{stroke:h,strokeWidth:T,strokeDasharray:x,strokeOpacity:k}=p;return re("g",{children:[M("line",{className:"narrative-step",x1:b.x,x2:g.x,y1:b.y,y2:g.y,markerStart:"none",onClick:P=>t(P),style:{strokeWidth:T,strokeDasharray:x,strokeOpacity:k,stroke:h}}),h!=="none"?_(b,g,p):""]})}function f(b,g,p){if(y(b)||y(g)||!b||!g)return null;const h=s([b.latitude,b.longitude]),T=s([g.latitude,g.longitude]);return c(h,T,{...hU,...p||{}})}function w(b){if(b===null||b.id!==r.id)return null;const g=[];for(let p=0;pM("svg",{children:re("defs",{children:[M("marker",{id:"arrow",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"red"}})}),M("marker",{id:"arrow-off",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"black",fillOpacity:.2}})})]})}),gU="/assets/map-98397b77.png",vU="/assets/sat-6c360e9c.png",yU=({isUsingSatellite:e,toggleSatellite:t})=>{const n=e?"satellite-overlay-toggle-map":"satellite-overlay-toggle-sat",r=e?gU:vU,i=e?ze[ht].tiles.default:ze[ht].tiles.satellite;return M("div",{id:"satellite-overlay-toggle",className:"satellite-overlay-toggle",children:M("button",{className:`satellite-overlay-toggle-button ${n}`,style:{backgroundImage:`url(${r}`},name:"satellite-toggle",onClick:t,children:M("div",{className:"label",children:i})})})};let _U=class extends te.Component{constructor(){super(),this.projectPoint=this.projectPoint.bind(this),this.onClusterSelect=this.onClusterSelect.bind(this),this.loadClusterData=this.loadClusterData.bind(this),this.getClusterChildren=this.getClusterChildren.bind(this),this.svgRef=te.createRef(),this.map=null,this.superclusterIndex=null,this.tileLayer=null,this.state={mapTransformX:0,mapTransformY:0,indexLoaded:!1,clusters:[]},this.styleLocation=this.styleLocation.bind(this),this.syncMapViewToUrl=this.syncMapViewToUrl.bind(this)}componentDidMount(){this.map===null&&(this.initializeMap(),this.initializeTileLayer()),window.dispatchEvent(new Event("resize"))}componentDidUpdate(t){t.ui.tile!==this.props.ui.tile&&this.map&&this.initializeTileLayer()}UNSAFE_componentWillReceiveProps(t){xl(t.domain.locations,this.props.domain.locations)||this.loadClusterData(t.domain.locations);const{anchor:n,startZoom:r}=t.app.map,{anchor:i,startZoom:s}=this.props.app.map;if(this.map&&(!xl(n,i)||r!==s)){const l=this.map.getCenter(),d=this.map.getZoom();(Math.abs(l.lat-n[0])>1e-5||Math.abs(l.lng-n[1])>1e-5||d!==r)&&this.map.setView(n,r,{animate:!1})}const{bounds:a}=t.app.map;if(!xl(a,this.props.app.map.bounds)&&a!==null)this.map.fitBounds(a);else if(!xl(t.app.selected,this.props.app.selected)){const l=t.app.selected.length>0?t.app.selected[0]:null;l!==null&&l.latitude&&l.longitude&&this.map.setView([l.latitude,l.longitude],this.map.getZoom(),{animate:!0,pan:{duration:.7}})}}getTileUrl(t){return t}initializeTileLayer(){if(!this.map)return;const t=this.getTileUrl(this.props.ui.tile);this.tileLayer?this.tileLayer.setUrl(t):(this.tileLayer=L.tileLayer(t),this.tileLayer.addTo(this.map))}initializeMap(){const{map:t,cluster:n}=this.props.app,r=L.map(this.props.ui.dom.map).setView(t.anchor,t.startZoom).setMinZoom(t.minZoom).setMaxZoom(t.maxZoom).setMaxBounds(t.maxBounds);r.attributionControl.addAttribution("Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"),this.superclusterIndex=new Dz(n),r.keyboard.disable(),r.zoomControl.remove(),r.on("moveend",()=>{this.alignLayers(),this.updateClusters(),this.syncMapViewToUrl()}),r.on("zoomend viewreset",()=>{this.map.dragging.enable(),this.map.doubleClickZoom.enable(),this.map.scrollWheelZoom.enable(),nc.flushSync(()=>{this.alignLayers(),this.updateClusters()})}),r.on("zoomstart",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.add("hide")}),r.on("zoomend",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.remove("hide")}),window.addEventListener("resize",()=>{this.alignLayers()}),this.map=r}getMapDetails(){const t=this.map.getBounds(),n=[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()],r=this.map.getZoom();return[n,r]}syncMapViewToUrl(){if(!this.map)return;const t=this.map.getCenter(),n=this.map.getZoom(),r=Math.round(t.lat*1e5)/1e5,i=Math.round(t.lng*1e5)/1e5;this.props.actions.updateMapView(r,i,n)}updateClusters(){const[t,n]=this.getMapDetails();this.superclusterIndex&&this.state.indexLoaded&&this.setState({clusters:this.superclusterIndex.getClusters(t,n)})}loadClusterData(t){if(t&&t.length>0&&this.superclusterIndex){const n=t.reduce((r,i)=>{const{longitude:s,latitude:a}=i;if(La(a)&&Ra(s)){const d={type:"Feature",properties:{cluster:!1,id:i.label},geometry:{type:"Point",coordinates:[s,a]}};r.push(d)}return r},[]);this.superclusterIndex.load(n),this.setState({indexLoaded:!0},()=>{this.updateClusters()})}else this.setState({clusters:[]})}getClusterChildren(t){if(this.superclusterIndex)try{const n=this.superclusterIndex.getLeaves(t,1/0,0);return g0(n,this.props.domain.locations)}catch{return[]}return[]}getSelectedClusters(){const{selected:t}=this.props.app,n=t.map(r=>r.id);return this.state.clusters&&this.state.clusters.length>0?this.state.clusters.reduce((r,i)=>{if(i.properties.cluster){const s=this.getClusterChildren(i.properties.cluster_id);s&&s.length>0&&s.forEach(a=>{const l=r.findIndex(d=>d.id===i.id)>=0;n.includes(a.id)&&!l&&r.push(i)})}return r},[]):[]}alignLayers(){const t=document.querySelector(".leaflet-map-pane");if(t===null)return{transformX:0,transformY:0};const n=window.getComputedStyle(t).getPropertyValue("transform");this.setState({mapTransformX:+n.split(",")[4],mapTransformY:+n.split(",")[5].split(")")[0]})}projectPoint(t){const n=new L.LatLng(t[0],t[1]);return{x:this.map.latLngToLayerPoint(n).x+this.state.mapTransformX,y:this.map.latLngToLayerPoint(n).y+this.state.mapTransformY}}onClusterSelect({id:t,latitude:n,longitude:r}){const i=Math.max(this.superclusterIndex.getClusterExpansionZoom(parseInt(t)),this.superclusterIndex.options.minZoom),a=Math.max(i+2,this.props.app.cluster.maxZoom);this.map.dragging.disable(),this.map.doubleClickZoom.disable(),this.map.scrollWheelZoom.disable(),this.map.flyTo(new L.LatLng(n,r),a)}getClientDims(){const t=document.querySelector(`#${this.props.ui.dom.map}`).getBoundingClientRect();return{width:t.width,height:t.height}}renderTiles(){const t=this.map.getPanes().overlayPane,{width:n,height:r}=this.getClientDims();return this.map?M(Zi,{node:t,children:M("svg",{ref:this.svgRef,width:n,height:r,style:{transform:`translate3d(${-this.state.mapTransformX}px, ${-this.state.mapTransformY}px, 0)`},className:"leaflet-svg"})}):null}renderSites(){return M(sU,{sites:this.props.domain.sites,projectPoint:this.projectPoint,isEnabled:this.props.app.views.sites})}renderRegions(){return M(aU,{svg:this.svgRef.current,regions:this.props.domain.regions,projectPoint:this.projectPoint,styles:this.props.ui.regions})}renderNarratives(){const t=this.props.domain.narratives.length>0;return M(pU,{svg:this.svgRef.current,narratives:t?this.props.domain.narratives:[this.props.app.narrative],projectPoint:this.projectPoint,narrative:this.props.app.narrative,styles:this.props.ui.narratives,onSelectNarrative:this.props.methods.onSelectNarrative,features:this.props.features})}styleLocation(t){return[null,null]}styleCluster(t){return[null,null]}renderEvents(){const t=this.state.clusters.filter(r=>!r.properties.cluster),n=g0(t,this.props.domain.locations);return M(lU,{svg:this.svgRef.current,events:this.props.domain.events,locations:n,styleLocation:this.styleLocation,categories:this.props.domain.categories,projectPoint:this.projectPoint,selected:this.props.app.selected,highlighted:this.props.app.highlighted,narrative:this.props.app.narrative,onSelect:this.props.methods.onSelect,getCategoryColor:this.props.methods.getCategoryColor,eventRadius:this.props.ui.eventRadius,coloringSet:this.props.app.coloringSet,filterColors:this.props.ui.filterColors,features:this.props.features})}renderClusters(){const t=this.state.clusters.filter(n=>n.properties.cluster);return M(dU,{svg:this.svgRef.current,styleCluster:this.styleCluster,projectPoint:this.projectPoint,clusters:t,isRadial:this.props.ui.radial,onSelect:this.onClusterSelect,coloringSet:this.props.app.coloringSet,getClusterChildren:this.getClusterChildren,filterColors:this.props.ui.filterColors,highlighted:this.props.app.highlighted})}renderSelected(){const t=this.getSelectedClusters(),n=[];this.props.app.selected.forEach(i=>{const{latitude:s,longitude:a}=i;n.push({latitude:s,longitude:a,radius:this.props.ui.eventRadius})});const r=HS(this.state.clusters);return t.forEach(i=>{if(i.properties.cluster){const{coordinates:s}=i.geometry;n.push({latitude:String(s[1]),longitude:String(s[0]),radius:BS(i.properties.point_count,r)})}}),M(fU,{svg:this.svgRef.current,selected:n,projectPoint:this.projectPoint,styles:this.props.ui.mapSelectedEvents})}renderMarkers(){return M(Zi,{node:this.svgRef.current,children:M(mU,{})})}render(){const{isShowingSites:t,isFetchingDomain:n}=this.props.app.flags,r=oU||window.innerWidth<600,i=(this.props.app.narrative?"map-wrapper narrative-mode":"map-wrapper")+(r?" mobile":""),s=this.map?re(Ln,{children:[this.renderTiles(),this.renderMarkers(),t?this.renderSites():null,this.renderRegions(),this.renderNarratives(),this.renderEvents(),this.renderClusters(),this.renderSelected()]}):null;return re("div",{className:i,onKeyDown:this.props.onKeyDown,tabIndex:"0",children:[M("div",{id:this.props.ui.dom.map}),M(_x,{isLoading:this.props.app.loading||n,ui:n,language:this.props.app.language}),this.props.features.USE_SATELLITE_OVERLAY_TOGGLE&&M(yU,{isUsingSatellite:this.props.ui.isUsingSatellite,toggleSatellite:this.props.actions.toggleTileOverlay}),s]})}};function wU(e){return{domain:{locations:A$(e),narratives:Bg(e),categories:tE(e),sites:T$(e),regions:S$(e)},app:{views:e.app.associations.views,selected:Hg(e),highlighted:e.app.highlighted,map:e.app.map,cluster:e.app.cluster,language:e.app.language,loading:e.app.loading,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,flags:{isShowingSites:e.app.flags.isShowingSites,isFetchingDomain:e.app.flags.isFetchingDomain}},ui:{tile:v$(e),isUsingSatellite:y$(e),dom:e.ui.dom,narratives:e.ui.style.narratives,mapSelectedEvents:e.ui.style.selectedEvents,regions:e.ui.style.regions,eventRadius:e.ui.eventRadius,radial:e.ui.style.clusters.radial,filterColors:e.ui.coloring.colors},features:hr(e)}}function bU(e){return{actions:Ko(Mc,e)}}const TU=pi(wU,bU)(_U),SU=e=>{switch(e.kind){default:return M(TU,{...e})}},EU=({query:e,eventObj:t,onSearchRowClick:n})=>{const{description:r,location:i,date:s}=t;function a(d,y){const _=d.split(new RegExp(`(${y})`,"gi"));return M("span",{children:_.map(c=>c.toLowerCase()===y.toLowerCase()?M("span",{style:{backgroundColor:"yellow",color:"black"},children:c}):c)})}function l(d,y){const _=new RegExp(`(([^ ]* ){0,6}[a-zA-Z]*${y.toLowerCase()}[a-zA-Z]*( [^ ]*){0,5})`,"gm"),c=d.toLowerCase().match(_);for(let w=0;w<(c?c.length:0);w++)c[w]="..."+c[w];const f=[d.match("(([^ ]* ){0,10})","m")[0]];return c||f}return re("div",{className:"search-row",onClick:()=>n([t]),children:[re("div",{className:"location-date-container",children:[re("div",{className:"date-container",children:[M("i",{className:"material-icons",children:"event"}),M("p",{children:a(s,e)})]}),re("div",{className:"location-container",children:[M("i",{className:"material-icons",children:"location_on"}),M("p",{children:a(i,e)})]})]}),M("p",{children:l(r,e).map(d=>re("span",{children:[a(d,e),"...",M("br",{})]}))})]})};class xU extends te.Component{constructor(t){super(t),this.state={isFolded:!0},this.onButtonClick=this.onButtonClick.bind(this),this.updateSearchQuery=this.updateSearchQuery.bind(this)}onButtonClick(){this.setState(t=>({isFolded:!t.isFolded}))}updateSearchQuery(t){const n=t.target.value;this.props.actions.updateSearchQuery(n)}render(){let t;const n=["description","location","category","date"];return this.props.queryString?t=this.props.events.filter(r=>n.some(i=>r[i].toLowerCase().includes(this.props.queryString.toLowerCase()))):t=[],re("div",{className:"search-outer-container"+(this.props.narrative?" narrative-mode ":""),children:[M("div",{id:"search-bar-icon-container",onClick:this.onButtonClick,children:M("i",{className:"material-icons",children:"search"})}),re("div",{className:"search-bar-overlay"+(this.state.isFolded?" folded":""),children:[re("div",{className:"search-input-container",children:[M("input",{className:"search-bar-input",onChange:this.updateSearchQuery,type:"text"}),M("i",{id:"close-search-overlay",className:"material-icons",onClick:this.onButtonClick,children:"close"})]}),M("div",{className:"search-results",children:t.map(r=>M(EU,{onSearchRowClick:this.props.onSearchRowClick,eventObj:r,query:this.props.queryString}))})]})]})}}function kU(e){return{actions:Ko(Mc,e)}}const CU=pi(e=>e,kU)(xU),Sb=({title:e,value:t,hoverValue:n=null})=>{const[r,i]=te.useState(!1);return re("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{className:"card-cell__text",style:{width:"fit-content"},children:M("div",{onMouseOver:()=>n&&i(!0),onMouseOut:()=>n&&i(!1),children:r?M("span",{style:{pointerEvents:"none",opacity:.8},children:M("em",{children:n})}):M("div",{style:{pointerEvents:"none",display:"inline-block",height:"1.1rem",borderBottom:n&&"1px rgb(235, 68, 62) dashed"},children:t})})})]})},AU=({title:e="Timestamp",timelabel:t,language:n,precision:r})=>{const i=ze[n].cardstack.unknown_time;return aD(t)?re("div",{className:"card-cell",children:[M("h4",{children:e}),t,r&&r!==""?` - ${r}`:null]}):re("div",{className:"card-cell",children:[M("h4",{children:e}),i]})},mv=({primary:e,backgroundColor:t,borderRadius:n,size:r,label:i,normalCursor:s,...a})=>{const l=e?"button--primary":"button--secondary";return M("button",{type:"button",className:["button",`button--${r}`,l,s?"no-hover":""].join(" "),style:{backgroundColor:t,borderRadius:n},...a,children:i})};mv.propTypes={primary:Sr.bool,backgroundColor:Sr.string,borderRadius:Sr.string,size:Sr.oneOf(["small","medium","large"]),label:Sr.string.isRequired,onClick:Sr.func};mv.defaultProps={backgroundColor:"red",borderRadius:"0%",primary:!1,size:"medium",onClick:void 0};const PU=({text:e,color:t="#000",onClick:n=()=>{},normalCursor:r})=>M(mv,{size:"small",backgroundColor:t,borderRadius:"12px",primary:!1,label:e,onClick:n,normalCursor:r}),LU=({isOpen:e,toggle:t})=>M("div",{className:"card-toggle",onClick:t,children:M("p",{children:M("i",{className:e?"arrow-down":"arrow-down folded"})})}),RU=({title:e,value:t})=>re("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{dangerouslySetInnerHTML:{__html:_e(`${t}`)}})]});var bk={exports:{}};/*! * $script.js JS loader & dependency manager * https://github.com/ded/script.js * (c) Dustin Diaz 2014 | License MIT - */(function(e){(function(t,n){e.exports?e.exports=n():this[t]=n()})("$script",function(){var t=document,n=t.getElementsByTagName("head")[0],r=!1,i="push",s="readyState",a="onreadystatechange",l={},d={},y={},_,c;function f(b,g){for(var p=0,h=b.length;p{var t=wt.useRef(null),n=wt.useState(!0),r=n[0],i=n[1];return wt.useEffect(function(){var s=!0;return MB(DB,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(s){if(!window.twttr.widgets[Eh]){console.error("Method "+Eh+" is not present anymore in twttr.widget api");return}window.twttr.widgets[Eh](e.tweetId,t==null?void 0:t.current,e.options).then(function(a){i(!1),e.onLoad&&e.onLoad(a)})}}),function(){s=!1}},[]),wt.createElement(wt.Fragment,null,r&&wt.createElement(wt.Fragment,null,e.placeholder),wt.createElement("div",{ref:t}))},FB={width:"100%",frameBorder:"0",scrolling:"no",border:"none",overflow:"hidden"},jB={};class zB extends te.Component{constructor(t){super(t),this.state={src:this.props.src,id:"",height:"80px"},this.messageHandler=this.messageHandler.bind(this),this.urlObj=document.createElement("a")}componentDidMount(){window.addEventListener("message",this.messageHandler),this.iFrame.addEventListener("load",()=>{this.checkFrame(this.state.id)})}componentWillUnmount(){window.removeEventListener("message",this.messageHandler)}messageHandler({data:t,source:n}){if(!t||typeof t!="string"||n!==this.iFrame.contentWindow)return;const r=JSON.parse(t);r.event==="resize"&&r.height&&this.setState({height:r.height+"px"})}checkFrame(t){this.iFrame.contentWindow.postMessage(JSON.stringify({event:"visible",frame:t}),"*")}UNSAFE_componentWillReceiveProps({src:t}){if(this.state.src!==t){this.urlObj.href=t;const n=`telegram-post${this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-")}`;this.setState({src:t,id:n},()=>this.checkFrame(n))}}render(){const{src:t,height:n}=this.state,{container:r}=this.props,i=new URL(t);return i.searchParams.append("embed","1"),M("div",{"data-sharing-id":r,style:jB,children:M("iframe",{title:t,ref:s=>this.iFrame=s,src:i.toString(),height:n,id:"telegram-post"+this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-"),style:FB})})}}const Eb=50,BB=({cardIdx:e,src:t,title:n,graphic:r})=>{const i=_=>{if(!r)return _;const c=`graphic${e}`,f=`overlay-${c}`;return re("div",{children:[M("div",{className:`card-cell media source-graphic ${f}`,children:re("h4",{onClick:()=>{Array.from(document.querySelectorAll("."+c)).map(w=>w.style.display="block"),Array.from(document.querySelectorAll("."+f)).map(w=>w.style.display="none")},children:["Graphic content",M("br",{}),"Click here to show"]})}),M("span",{className:c,style:{display:"none"},children:_})]})},s=te.useRef(),a=te.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.play()},[]),l=te.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.pause()},[]),d=BS(t),y=n&&n.length>Eb?`${n.slice(0,Eb+1)}...`:n;switch(d){case"Video":return i(re("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("video",{onMouseEnter:a,onMouseLeave:l,ref:s,disablePictureInPicture:!0,children:M("source",{src:t})})]}));case"Image":return i(re("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("div",{className:"img-wrapper",children:M("img",{src:t,alt:"an inline photograph for the event card component"})})]}));case"Telegram":if(t.includes("https://t.me/c/"))return re("div",{children:["Private ",M("a",{href:t,children:"telegram post"})]});try{return i(M("div",{className:"card-cell media embedded",children:M(zB,{src:t})}))}catch{return re("div",{children:["Unable to display ",M("a",{href:t,children:"telegram post"})]})}case"Tweet":const c=/https?:\/\/(mobile\.){0,1}twitter.com\/[0-9a-zA-Z_]{1,20}\/status\/([0-9]*)/.exec(t);if(!c||c.length<2)return null;const f=c[c.length-1];try{return i(M("div",{className:"card-cell media embedded",children:M($B,{tweetId:f,options:{conversation:"none"}})}))}catch{return re("div",{children:["Unable to display ",M("a",{href:t,children:"tweet"})]})}default:return t==="HIDDEN"?M("div",{className:"card-cell media source-hidden",children:re("h4",{children:["Source hidden",M("br",{}),"Privacy concerns"]})}):M("div",{children:M("a",{href:t,children:"other source"})})}},UB={basic:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"line-break",times:.4}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}]],sourced:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}],[{kind:"sources",values:e.sources.flatMap(t=>[t.paths.map(n=>({kind:"media",title:"Media",value:[{src:n,title:null,graphic:e.graphic==="TRUE"}]}))])}]]},HB=({content:e=[],isLoading:t=!0,cardIdx:n=-1,onSelect:r=()=>{},sources:i=[],isSelected:s=!1,language:a="en-US"})=>{const[l,d]=te.useState(!1),y=()=>d(!l),_=m=>M(LB,{language:a,timelabel:Lp(m.value),...m}),c=()=>i.length===0&&M(IB,{toggle:()=>y(),isOpen:l}),f=({media:m,idx:b,cardIdx:g})=>M(BB,{cardIdx:g,src:m.src,title:m.title,graphic:m.graphic},b);function w(m,b){switch(m.kind){case"media":return M("div",{className:"card-cell",children:m.value.map((p,h)=>f({media:p,idx:h,cardIdx:b}))});case"line":return M("div",{style:{height:"1rem",width:"100%"},children:M("hr",{})});case"line-break":return M("div",{style:{height:`${m.times||1}rem`,width:"100%"}});case"item":return null;case"markdown":return M(NB,{...m});case"tag":return M("div",{className:"card-cell m0",style:{textTransform:"uppercase",fontSize:".8em",lineHeight:".8em"},children:M("div",{style:{display:"flex",justifyContent:`flex-${m.align||"start"}`},children:m.value})});case"button":return re("div",{className:"card-cell",children:[m.title&&M("h4",{children:m.title}),m.value.map((p,h)=>M(RB,{...p},`card-button-${h}`))]});case"text":return!y0(m.value)&&M(Sb,{...m});case"date":return _(m);case"links":return re("div",{className:"card-cell",children:[m.title&&M("h4",{children:m.title}),M("div",{className:"card-row m0",children:m.value.map(({text:p,href:h},T)=>M("a",{href:h,children:p},`card-links-url-${T}`))})]});case"list":return!!m.value.length&&!!m.value.filter(p=>!y0(p)).length?re("div",{children:[m.title&&M("h4",{children:m.title}),M("div",{className:"card-row m0",children:m.value.map((p,h)=>M(Sb,{value:p,...p},`card-list-text-${h}`))})]}):null;default:return null}}function v(m,b,g){return M("div",{className:"card-row",children:m.map(p=>M("span",{children:w(p,b)},nn({...p,row:m})))},nn({...m,salt:g}))}return i=[],re("li",{className:`event-card ${s?"selected":""}`,onClick:r,children:[e.map((m,b)=>m[0].kind==="sources"&&m[0].values.length>0?M("div",{children:re("details",{open:!0,children:[re("summary",{children:[M("span",{className:"summary-line"}),re("span",{className:"summary-text",children:[M("span",{className:"summary-show",children:"Show"})," ",M("span",{className:"summary-hide",children:"Hide"})," sources (",m[0].values.length,")"]}),M("span",{className:"summary-line"})]}),m[0].values.map(g=>v(g,n,m[0]))]})},b):v(m,n)),i.length>0?c():null]},nn(e))};class VB extends te.Component{constructor(){super(),this.refs={},this.refCardStack=te.createRef(),this.refCardStackContent=te.createRef()}componentDidUpdate(){!!this.props.narrative&&this.scrollToCard()}scrollToCard(){const n=this.refCardStack.current,r=this.refs[this.props.narrative.current].current.offsetTop,i=n.scrollTop,s=r-i;let a=0;const l=20;Math.easeInOutQuad=function(y,_,c,f){return y/=f/2,y<1?c/2*y*y+_:(y-=1,-c/2*(y*(y-2)-1)+_)};const d=function(){a+=l;const y=Math.easeInOutQuad(a,i,s,500);n.scrollTop=y,a<500&&setTimeout(d,l)};d()}renderCards(t,n){n||(n=t.map(i=>!0)),this.refs=[];const r=UB[this.props.cardUI.layout.template];return t.map((i,s)=>{const a=te.createRef();this.refs[s]=a;const l=r({event:i,colors:this.props.colors,coloringSet:this.props.coloringSet,getFilterIdxFromColorSet:VS});return M(HB,{cardIdx:s,content:l,language:this.props.language,isLoading:this.props.isLoading,isSelected:n[s]},s)})}renderSelectedCards(){const{selected:t}=this.props;return t.length>0?this.renderCards(t):null}renderNarrativeCards(){const{narrative:t}=this.props,n=t.steps,r=n.map((i,s)=>s===t.current);return this.renderCards(n,r)}renderCardStackHeader(){const t=ze[this.props.language].cardstack.header;return re("div",{id:"card-stack-header",className:"card-stack-header",onClick:()=>this.props.onToggleCardstack(),children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("p",{className:"header-copy top",children:`${this.props.selected.length} ${t}`})]})}renderCardStackContent(){return M("div",{id:"card-stack-content",className:"card-stack-content scrollbar-black",children:M("ul",{children:this.renderSelectedCards()})})}renderNarrativeContent(){return M("div",{id:"card-stack-content",className:"card-stack-content",ref:this.refCardStackContent,children:M("ul",{children:this.renderNarrativeCards()})})}render(){const{isCardstack:t,selected:n,narrative:r}=this.props;return n.length>0?r?M("div",{id:"card-stack",ref:this.refCardStack,className:`card-stack narrative-mode - ${t?"":" folded"}`,children:this.renderNarrativeContent()}):re("div",{id:"card-stack",className:`card-stack ${t?"":" folded"}`,children:[this.renderCardStackHeader(),this.renderCardStackContent()]}):M("div",{})}}function WB(e){return{narrative:lE(e),selected:Hg(e),sourceError:e.app.errors.source,language:e.app.language,isCardstack:e.app.flags.isCardstack,isLoading:e.app.flags.isFetchingSources,cardUI:e.ui.card,colors:e.ui.coloring.colors,coloringSet:e.app.associations.coloringSet,features:e.features}}const qB=pi(WB)(VB);function ZB({narrative:e}){const{steps:t,current:n}=e;return t[n]?re("div",{className:"narrative-info",children:[re("div",{className:"narrative-info-header",children:[M("div",{className:"count-container",children:re("div",{className:"count",children:[n+1,"/",t.length]})}),M("div",{children:M("h3",{children:e.label})})]}),M("div",{className:"narrative-info-desc",children:M("p",{children:e.description})})]}):null}function GB(e){return{narrative:lE(e)}}const YB=pi(GB)(ZB),xb=({isDisabled:e,direction:t,onClickHandler:n})=>M("div",{className:`narrative-adjust ${t}`,onClick:e?null:n,children:M("i",{className:`material-icons ${e?"disabled":""}`,children:`chevron_${t}`})}),KB=({onClickHandler:e,closeMsg:t})=>re("div",{className:"narrative-close",onClick:e,children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("div",{className:"close-text",children:t})]}),XB=({narrative:e,methods:t})=>{if(!e)return null;const{current:n,steps:r}=e,i=n!==0,s=nt.onSelectNarrative(null),closeMsg:"-- exit from narrative --"})]})};class QB extends te.Component{constructor(t){super(t),this.handleViewSource=this.handleViewSource.bind(this),this.handleHighlight=this.handleHighlight.bind(this),this.setNarrative=this.setNarrative.bind(this),this.setNarrativeFromFilters=this.setNarrativeFromFilters.bind(this),this.handleSelect=this.handleSelect.bind(this),this.getCategoryColor=this.getCategoryColor.bind(this),this.findEventIdx=this.findEventIdx.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectNarrativeStep=this.selectNarrativeStep.bind(this)}componentDidMount(){this.props.actions.fetchDomain().then(t=>{this.props.actions.updateDomain({domain:t,features:this.props.features}),this.props.actions.rehydrateState()}),window.dispatchEvent(new Event("resize"))}handleHighlight(t){this.props.actions.updateHighlighted(t||null)}handleViewSource(t){this.props.actions.updateSource(t)}findEventIdx(t){const{events:n}=this.props.domain;return vD(n,t,(r,i)=>r.datetime-i.datetime)}handleSelect(t,n){if(t.length<=0){this.props.actions.updateSelected([]);return}const r=[];if(n===0){r.push(t);const{events:s}=this.props.domain,a=this.findEventIdx(t);s[a].id!==t.id&&r.push(s[a]);let l=a-1;for(;l>=0&&s[a].datetime.getTime()===s[l].datetime.getTime();)s[l].id!==t.id&&r.push(s[l]),l-=1;for(l=a+1;lr.push(a))}this.props.actions.updateSelected(r)}getCategoryColor(t){if(!this.props.features.USE_CATEGORIES)return qn.fallbackEventColor;const n=this.props.ui.style.categories[t];return n||this.props.ui.style.categories.default}setNarrative(t){t&&t.steps.length>=1&&this.handleSelect([t.steps[0]]),this.props.actions.updateNarrative(t)}setNarrativeFromFilters(t){const{app:n,domain:r}=this.props;let i=n.associations.filters;if(i.length===0){alert("No filters selected, cant narrativise");return}i=i.map(d=>({name:d}));const s=r.events.filter(d=>{let y=!1;for(let _=0;_d.name).join("-"),l=i.map(d=>d.description).join(` + */(function(e){(function(t,n){e.exports?e.exports=n():this[t]=n()})("$script",function(){var t=document,n=t.getElementsByTagName("head")[0],r=!1,i="push",s="readyState",a="onreadystatechange",l={},d={},y={},_,c;function f(b,g){for(var p=0,h=b.length;p{var t=wt.useRef(null),n=wt.useState(!0),r=n[0],i=n[1];return wt.useEffect(function(){var s=!0;return NU(OU,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(s){if(!window.twttr.widgets[Eh]){console.error("Method "+Eh+" is not present anymore in twttr.widget api");return}window.twttr.widgets[Eh](e.tweetId,t==null?void 0:t.current,e.options).then(function(a){i(!1),e.onLoad&&e.onLoad(a)})}}),function(){s=!1}},[]),wt.createElement(wt.Fragment,null,r&&wt.createElement(wt.Fragment,null,e.placeholder),wt.createElement("div",{ref:t}))},DU={width:"100%",frameBorder:"0",scrolling:"no",border:"none",overflow:"hidden"},$U={};class FU extends te.Component{constructor(t){super(t),this.state={src:this.props.src,id:"",height:"80px"},this.messageHandler=this.messageHandler.bind(this),this.urlObj=document.createElement("a")}componentDidMount(){window.addEventListener("message",this.messageHandler),this.iFrame.addEventListener("load",()=>{this.checkFrame(this.state.id)})}componentWillUnmount(){window.removeEventListener("message",this.messageHandler)}messageHandler({data:t,source:n}){if(!t||typeof t!="string"||n!==this.iFrame.contentWindow)return;const r=JSON.parse(t);r.event==="resize"&&r.height&&this.setState({height:r.height+"px"})}checkFrame(t){this.iFrame.contentWindow.postMessage(JSON.stringify({event:"visible",frame:t}),"*")}UNSAFE_componentWillReceiveProps({src:t}){if(this.state.src!==t){this.urlObj.href=t;const n=`telegram-post${this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-")}`;this.setState({src:t,id:n},()=>this.checkFrame(n))}}render(){const{src:t,height:n}=this.state,{container:r}=this.props,i=new URL(t);return i.searchParams.append("embed","1"),M("div",{"data-sharing-id":r,style:$U,children:M("iframe",{title:t,ref:s=>this.iFrame=s,src:i.toString(),height:n,id:"telegram-post"+this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-"),style:DU})})}}const Eb=50,jU=({cardIdx:e,src:t,title:n,graphic:r})=>{const i=_=>{if(!r)return _;const c=`graphic${e}`,f=`overlay-${c}`;return re("div",{children:[M("div",{className:`card-cell media source-graphic ${f}`,children:re("h4",{onClick:()=>{Array.from(document.querySelectorAll("."+c)).map(w=>w.style.display="block"),Array.from(document.querySelectorAll("."+f)).map(w=>w.style.display="none")},children:["Graphic content",M("br",{}),"Click here to show"]})}),M("span",{className:c,style:{display:"none"},children:_})]})},s=te.useRef(),a=te.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.play()},[]),l=te.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.pause()},[]),d=US(t),y=n&&n.length>Eb?`${n.slice(0,Eb+1)}...`:n;switch(d){case"Video":return i(re("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("video",{onMouseEnter:a,onMouseLeave:l,ref:s,disablePictureInPicture:!0,children:M("source",{src:t})})]}));case"Image":return i(re("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("div",{className:"img-wrapper",children:M("img",{src:t,alt:"an inline photograph for the event card component"})})]}));case"Telegram":if(t.includes("https://t.me/c/"))return re("div",{children:["Private ",M("a",{href:t,children:"telegram post"})]});try{return i(M("div",{className:"card-cell media embedded",children:M(FU,{src:t})}))}catch{return re("div",{children:["Unable to display ",M("a",{href:t,children:"telegram post"})]})}case"Tweet":const c=/https?:\/\/(mobile\.){0,1}twitter.com\/[0-9a-zA-Z_]{1,20}\/status\/([0-9]*)/.exec(t);if(!c||c.length<2)return null;const f=c[c.length-1];try{return i(M("div",{className:"card-cell media embedded",children:M(MU,{tweetId:f,options:{conversation:"none"}})}))}catch{return re("div",{children:["Unable to display ",M("a",{href:t,children:"tweet"})]})}default:return t==="HIDDEN"?M("div",{className:"card-cell media source-hidden",children:re("h4",{children:["Source hidden",M("br",{}),"Privacy concerns"]})}):M("div",{children:M("a",{href:t,children:"other source"})})}},zU={basic:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"line-break",times:.4}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}]],sourced:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}],[{kind:"sources",values:e.sources.flatMap(t=>[t.paths.map(n=>({kind:"media",title:"Media",value:[{src:n,title:null,graphic:e.graphic==="TRUE"}]}))])}]]},UU=({content:e=[],isLoading:t=!0,cardIdx:n=-1,onSelect:r=()=>{},sources:i=[],isSelected:s=!1,language:a="en-US"})=>{const[l,d]=te.useState(!1),y=()=>d(!l),_=m=>M(AU,{language:a,timelabel:Lp(m.value),...m}),c=()=>i.length===0&&M(LU,{toggle:()=>y(),isOpen:l}),f=({media:m,idx:b,cardIdx:g})=>M(jU,{cardIdx:g,src:m.src,title:m.title,graphic:m.graphic},b);function w(m,b){switch(m.kind){case"media":return M("div",{className:"card-cell",children:m.value.map((p,h)=>f({media:p,idx:h,cardIdx:b}))});case"line":return M("div",{style:{height:"1rem",width:"100%"},children:M("hr",{})});case"line-break":return M("div",{style:{height:`${m.times||1}rem`,width:"100%"}});case"item":return null;case"markdown":return M(RU,{...m});case"tag":return M("div",{className:"card-cell m0",style:{textTransform:"uppercase",fontSize:".8em",lineHeight:".8em"},children:M("div",{style:{display:"flex",justifyContent:`flex-${m.align||"start"}`},children:m.value})});case"button":return re("div",{className:"card-cell",children:[m.title&&M("h4",{children:m.title}),m.value.map((p,h)=>M(PU,{...p},`card-button-${h}`))]});case"text":return!y0(m.value)&&M(Sb,{...m});case"date":return _(m);case"links":return re("div",{className:"card-cell",children:[m.title&&M("h4",{children:m.title}),M("div",{className:"card-row m0",children:m.value.map(({text:p,href:h},T)=>M("a",{href:h,children:p},`card-links-url-${T}`))})]});case"list":return!!m.value.length&&!!m.value.filter(p=>!y0(p)).length?re("div",{children:[m.title&&M("h4",{children:m.title}),M("div",{className:"card-row m0",children:m.value.map((p,h)=>M(Sb,{value:p,...p},`card-list-text-${h}`))})]}):null;default:return null}}function v(m,b,g){return M("div",{className:"card-row",children:m.map(p=>M("span",{children:w(p,b)},tn({...p,row:m})))},tn({...m,salt:g}))}return i=[],re("li",{className:`event-card ${s?"selected":""}`,onClick:r,children:[e.map((m,b)=>m[0].kind==="sources"&&m[0].values.length>0?M("div",{children:re("details",{open:!0,children:[re("summary",{children:[M("span",{className:"summary-line"}),re("span",{className:"summary-text",children:[M("span",{className:"summary-show",children:"Show"})," ",M("span",{className:"summary-hide",children:"Hide"})," sources (",m[0].values.length,")"]}),M("span",{className:"summary-line"})]}),m[0].values.map(g=>v(g,n,m[0]))]})},b):v(m,n)),i.length>0?c():null]},tn(e))};class BU extends te.Component{constructor(){super(),this.refs={},this.refCardStack=te.createRef(),this.refCardStackContent=te.createRef()}componentDidUpdate(){!!this.props.narrative&&this.scrollToCard()}scrollToCard(){const n=this.refCardStack.current,r=this.refs[this.props.narrative.current].current.offsetTop,i=n.scrollTop,s=r-i;let a=0;const l=20;Math.easeInOutQuad=function(y,_,c,f){return y/=f/2,y<1?c/2*y*y+_:(y-=1,-c/2*(y*(y-2)-1)+_)};const d=function(){a+=l;const y=Math.easeInOutQuad(a,i,s,500);n.scrollTop=y,a<500&&setTimeout(d,l)};d()}renderCards(t,n){n||(n=t.map(i=>!0)),this.refs=[];const r=zU[this.props.cardUI.layout.template];return t.map((i,s)=>{const a=te.createRef();this.refs[s]=a;const l=r({event:i,colors:this.props.colors,coloringSet:this.props.coloringSet,getFilterIdxFromColorSet:VS});return M(UU,{cardIdx:s,content:l,language:this.props.language,isLoading:this.props.isLoading,isSelected:n[s]},s)})}renderSelectedCards(){const{selected:t}=this.props;return t.length>0?this.renderCards(t):null}renderNarrativeCards(){const{narrative:t}=this.props,n=t.steps,r=n.map((i,s)=>s===t.current);return this.renderCards(n,r)}renderCardStackHeader(){const t=ze[this.props.language].cardstack.header;return re("div",{id:"card-stack-header",className:"card-stack-header",onClick:()=>this.props.onToggleCardstack(),children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("p",{className:"header-copy top",children:`${this.props.selected.length} ${t}`})]})}renderCardStackContent(){return M("div",{id:"card-stack-content",className:"card-stack-content scrollbar-black",children:M("ul",{children:this.renderSelectedCards()})})}renderNarrativeContent(){return M("div",{id:"card-stack-content",className:"card-stack-content",ref:this.refCardStackContent,children:M("ul",{children:this.renderNarrativeCards()})})}render(){const{isCardstack:t,selected:n,narrative:r}=this.props;return n.length>0?r?M("div",{id:"card-stack",ref:this.refCardStack,className:`card-stack narrative-mode + ${t?"":" folded"}`,children:this.renderNarrativeContent()}):re("div",{id:"card-stack",className:`card-stack ${t?"":" folded"}`,children:[this.renderCardStackHeader(),this.renderCardStackContent()]}):M("div",{})}}function HU(e){return{narrative:lE(e),selected:Hg(e),sourceError:e.app.errors.source,language:e.app.language,isCardstack:e.app.flags.isCardstack,isLoading:e.app.flags.isFetchingSources,cardUI:e.ui.card,colors:e.ui.coloring.colors,coloringSet:e.app.associations.coloringSet,features:e.features}}const VU=pi(HU)(BU);function WU({narrative:e}){const{steps:t,current:n}=e;return t[n]?re("div",{className:"narrative-info",children:[re("div",{className:"narrative-info-header",children:[M("div",{className:"count-container",children:re("div",{className:"count",children:[n+1,"/",t.length]})}),M("div",{children:M("h3",{children:e.label})})]}),M("div",{className:"narrative-info-desc",children:M("p",{children:e.description})})]}):null}function qU(e){return{narrative:lE(e)}}const ZU=pi(qU)(WU),xb=({isDisabled:e,direction:t,onClickHandler:n})=>M("div",{className:`narrative-adjust ${t}`,onClick:e?null:n,children:M("i",{className:`material-icons ${e?"disabled":""}`,children:`chevron_${t}`})}),GU=({onClickHandler:e,closeMsg:t})=>re("div",{className:"narrative-close",onClick:e,children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("div",{className:"close-text",children:t})]}),YU=({narrative:e,methods:t})=>{if(!e)return null;const{current:n,steps:r}=e,i=n!==0,s=nt.onSelectNarrative(null),closeMsg:"-- exit from narrative --"})]})};class KU extends te.Component{constructor(t){super(t),this.handleViewSource=this.handleViewSource.bind(this),this.handleHighlight=this.handleHighlight.bind(this),this.setNarrative=this.setNarrative.bind(this),this.setNarrativeFromFilters=this.setNarrativeFromFilters.bind(this),this.handleSelect=this.handleSelect.bind(this),this.getCategoryColor=this.getCategoryColor.bind(this),this.findEventIdx=this.findEventIdx.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectNarrativeStep=this.selectNarrativeStep.bind(this)}componentDidMount(){this.props.actions.fetchDomain().then(t=>{this.props.actions.updateDomain({domain:t,features:this.props.features}),this.props.actions.rehydrateState()}),window.dispatchEvent(new Event("resize"))}handleHighlight(t){this.props.actions.updateHighlighted(t||null)}handleViewSource(t){this.props.actions.updateSource(t)}findEventIdx(t){const{events:n}=this.props.domain;return vD(n,t,(r,i)=>r.datetime-i.datetime)}handleSelect(t,n){if(t.length<=0){this.props.actions.updateSelected([]);return}const r=[];if(n===0){r.push(t);const{events:s}=this.props.domain,a=this.findEventIdx(t);s[a].id!==t.id&&r.push(s[a]);let l=a-1;for(;l>=0&&s[a].datetime.getTime()===s[l].datetime.getTime();)s[l].id!==t.id&&r.push(s[l]),l-=1;for(l=a+1;lr.push(a))}this.props.actions.updateSelected(r)}getCategoryColor(t){if(!this.props.features.USE_CATEGORIES)return qn.fallbackEventColor;const n=this.props.ui.style.categories[t];return n||this.props.ui.style.categories.default}setNarrative(t){t&&t.steps.length>=1&&this.handleSelect([t.steps[0]]),this.props.actions.updateNarrative(t)}setNarrativeFromFilters(t){const{app:n,domain:r}=this.props;let i=n.associations.filters;if(i.length===0){alert("No filters selected, cant narrativise");return}i=i.map(d=>({name:d}));const s=r.events.filter(d=>{let y=!1;for(let _=0;_d.name).join("-"),l=i.map(d=>d.description).join(` -`);this.setNarrative({id:a,label:a,description:l,withLines:t,steps:s.map(ag(r.sources))})}selectNarrativeStep(t){if(typeof t!="number"){const r=t[0]||t;if(this.props.app.associations.narrative){const{steps:i}=this.props.app.associations.narrative,s=r.id,a=i.find(d=>d.id===s),l=i.indexOf(a);l>-1&&(t=l)}}const{narrative:n}=this.props.app.associations;if(n!==null&&t=0){const r=n.steps[t];this.handleSelect([r]),this.props.actions.updateNarrativeStepIdx(t)}}onKeyDown(t){const{narrative:n,selected:r}=this.props.app,{events:i}=this.props.domain,s=l=>{n===null?this.handleSelect(i[l-1],0):this.selectNarrativeStep(this.props.narrativeIdx-1)},a=l=>{n===null?this.handleSelect(i[l+1],0):this.selectNarrativeStep(this.props.narrativeIdx+1)};if(r.length>0){const l=r[r.length-1],d=this.findEventIdx(l);switch(t.keyCode){case 37:case 38:if(d<=0)return;s(d);break;case 39:case 40:if(d<0||d>=this.props.domain.length-1)return;a(d);break}}}renderIntroPopup(t){const{app:n,actions:r}=this.props,i="rememberDismissedIntro2";let s=new URLSearchParams(window.location.href.split("?")[1]),a=localStorage.getItem(i)==="true";return(s.get("cover")==="true"||!a)&&!s.has("id")?M(FE,{title:"Introduction to the platform",theme:"dark",isOpen:n.flags.isIntropopup&&s.get("cover")!=="false",onClose:()=>{r.toggleIntroPopup(),localStorage.setItem(i,"true")},content:n.intro,styles:t}):null}render(){const{actions:t,app:n,domain:r,timeline:i,features:s}=this.props,a={};return re("div",{children:[M(bj,{isNarrative:!!n.associations.narrative,domain:r,methods:{onTitle:t.toggleCover,onSelectFilter:l=>t.toggleAssociations("filters",l),onCategoryFilter:l=>t.toggleAssociations("categories",l),onShapeFilter:t.toggleShapes,onSelectNarrative:this.setNarrative}}),M(xB,{kind:"map"in n?"map":"space3d",onKeyDown:this.onKeyDown,methods:{onSelectNarrative:this.setNarrative,getCategoryColor:this.getCategoryColor,onSelect:n.associations.narrative?this.selectNarrativeStep:l=>this.handleSelect(l,1)}}),M(L4,{onKeyDown:this.onKeyDown,methods:{onSelect:n.associations.narrative?this.selectNarrativeStep:l=>this.handleSelect(l,0),onUpdateTimerange:t.updateTimeRange,getCategoryColor:this.getCategoryColor}}),M(qB,{timelineDims:i.dimensions,onViewSource:this.handleViewSource,onSelect:n.associations.narrative?this.selectNarrativeStep:()=>null,onHighlight:this.handleHighlight,onToggleCardstack:()=>t.updateSelected([]),getCategoryColor:this.getCategoryColor}),M(XB,{narrative:n.associations.narrative?{...n.associations.narrative,current:this.props.narrativeIdx}:null,methods:{onNext:()=>this.selectNarrativeStep(this.props.narrativeIdx+1),onPrev:()=>this.selectNarrativeStep(this.props.narrativeIdx-1),onSelectNarrative:this.setNarrative}}),M(Sj,{language:n.language,styles:a,isOpen:n.flags.isInfopopup,onClose:t.toggleInfoPopup}),this.renderIntroPopup(a),n.debug?M(Ej,{isNotification:n.flags.isNotification,notifications:r.notifications,onToggle:t.markNotificationsRead}):null,s.USE_SEARCH&&M(PB,{narrative:n.narrative,queryString:n.searchQuery,events:r.events,onSearchRowClick:this.handleSelect}),n.source?M(yx,{source:n.source,onCancel:()=>{t.updateSource(null)}}):null,M(_x,{isLoading:n.loading||n.flags.isFetchingDomain,ui:n.flags.isFetchingDomain,language:n.language}),s.USE_COVER&&M(o4,{showing:n.flags.isCover,children:M(i4,{showing:n.flags.isCover,showAppHandler:t.toggleCover})})]})}}function JB(e){return{actions:Ko(Mc,e)}}const e5=pi(e=>({...e,timeline:{dimensions:Np(e)},narrativeIdx:aE(e),narratives:Ug(e),selected:Hg(e)}),JB)(QB);class t5 extends te.Component{render(){return M(e5,{})}}const n5=xh.createRoot(document.getElementById("explore-app"));n5.render(M(g2,{store:M3,children:M(t5,{})}));window.opr&&opr.addons||window.opera||navigator.userAgent.indexOf(" OPR/")>=0;/constructor/i.test(window.HTMLElement)||function(e){return e.toString()==="[object SafariRemoteNotification]"}(!window.safari||typeof safari<"u"&&safari.pushNotification);const Tk=!!document.documentMode,r5=!Tk&&!!window.StyleMedia;window.chrome&&window.chrome.webstore;(r5||Tk)&&alert("Please view this website in Opera for best viewing. It is untested in your browser."); +`);this.setNarrative({id:a,label:a,description:l,withLines:t,steps:s.map(ag(r.sources))})}selectNarrativeStep(t){if(typeof t!="number"){const r=t[0]||t;if(this.props.app.associations.narrative){const{steps:i}=this.props.app.associations.narrative,s=r.id,a=i.find(d=>d.id===s),l=i.indexOf(a);l>-1&&(t=l)}}const{narrative:n}=this.props.app.associations;if(n!==null&&t=0){const r=n.steps[t];this.handleSelect([r]),this.props.actions.updateNarrativeStepIdx(t)}}onKeyDown(t){const{narrative:n,selected:r}=this.props.app,{events:i}=this.props.domain,s=l=>{n===null?this.handleSelect(i[l-1],0):this.selectNarrativeStep(this.props.narrativeIdx-1)},a=l=>{n===null?this.handleSelect(i[l+1],0):this.selectNarrativeStep(this.props.narrativeIdx+1)};if(r.length>0){const l=r[r.length-1],d=this.findEventIdx(l);switch(t.keyCode){case 37:case 38:if(d<=0)return;s(d);break;case 39:case 40:if(d<0||d>=this.props.domain.length-1)return;a(d);break}}}renderIntroPopup(t){const{app:n,actions:r}=this.props,i="rememberDismissedIntro2";let s=new URLSearchParams(window.location.href.split("?")[1]),a=localStorage.getItem(i)==="true";return(s.get("cover")==="true"||!a)&&!s.has("id")?M(FE,{title:"Introduction to the platform",theme:"dark",isOpen:n.flags.isIntropopup&&s.get("cover")!=="false",onClose:()=>{r.toggleIntroPopup(),localStorage.setItem(i,"true")},content:n.intro,styles:t}):null}render(){const{actions:t,app:n,domain:r,timeline:i,features:s}=this.props,a={};return re("div",{children:[M(bj,{isNarrative:!!n.associations.narrative,domain:r,methods:{onTitle:t.toggleCover,onSelectFilter:l=>t.toggleAssociations("filters",l),onCategoryFilter:l=>t.toggleAssociations("categories",l),onShapeFilter:t.toggleShapes,onSelectNarrative:this.setNarrative}}),M(SU,{kind:"map"in n?"map":"space3d",onKeyDown:this.onKeyDown,methods:{onSelectNarrative:this.setNarrative,getCategoryColor:this.getCategoryColor,onSelect:n.associations.narrative?this.selectNarrativeStep:l=>this.handleSelect(l,1)}}),M(Lz,{onKeyDown:this.onKeyDown,methods:{onSelect:n.associations.narrative?this.selectNarrativeStep:l=>this.handleSelect(l,0),onUpdateTimerange:t.updateTimeRange,getCategoryColor:this.getCategoryColor}}),M(VU,{timelineDims:i.dimensions,onViewSource:this.handleViewSource,onSelect:n.associations.narrative?this.selectNarrativeStep:()=>null,onHighlight:this.handleHighlight,onToggleCardstack:()=>t.updateSelected([]),getCategoryColor:this.getCategoryColor}),M(YU,{narrative:n.associations.narrative?{...n.associations.narrative,current:this.props.narrativeIdx}:null,methods:{onNext:()=>this.selectNarrativeStep(this.props.narrativeIdx+1),onPrev:()=>this.selectNarrativeStep(this.props.narrativeIdx-1),onSelectNarrative:this.setNarrative}}),M(Sj,{language:n.language,styles:a,isOpen:n.flags.isInfopopup,onClose:t.toggleInfoPopup}),this.renderIntroPopup(a),n.debug?M(Ej,{isNotification:n.flags.isNotification,notifications:r.notifications,onToggle:t.markNotificationsRead}):null,s.USE_SEARCH&&M(CU,{narrative:n.narrative,queryString:n.searchQuery,events:r.events,onSearchRowClick:this.handleSelect}),n.source?M(yx,{source:n.source,onCancel:()=>{t.updateSource(null)}}):null,M(_x,{isLoading:n.loading||n.flags.isFetchingDomain,ui:n.flags.isFetchingDomain,language:n.language}),s.USE_COVER&&M(oz,{showing:n.flags.isCover,children:M(iz,{showing:n.flags.isCover,showAppHandler:t.toggleCover})})]})}}function XU(e){return{actions:Ko(Mc,e)}}const QU=pi(e=>({...e,timeline:{dimensions:Np(e)},narrativeIdx:aE(e),narratives:Bg(e),selected:Hg(e)}),XU)(KU);class JU extends te.Component{render(){return M(QU,{})}}const eB=xh.createRoot(document.getElementById("explore-app"));eB.render(M(g2,{store:M3,children:M(JU,{})}));window.opr&&opr.addons||window.opera||navigator.userAgent.indexOf(" OPR/")>=0;/constructor/i.test(window.HTMLElement)||function(e){return e.toString()==="[object SafariRemoteNotification]"}(!window.safari||typeof safari<"u"&&safari.pushNotification);const Tk=!!document.documentMode,tB=!Tk&&!!window.StyleMedia;window.chrome&&window.chrome.webstore;(tB||Tk)&&alert("Please view this website in Opera for best viewing. It is untested in your browser."); diff --git a/index.html b/index.html index 9f8118c..2561140 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ } } - +