@undrr/undrr-mangrove 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/components/BarChart.js +1 -1
- package/components/Fetcher.js +1 -1
- package/components/Gallery.js +1 -1
- package/components/IconCard.js +1 -1
- package/components/MapComponent.js +1 -1
- package/components/MegaMenu.js +1 -1
- package/components/Pager.js +1 -1
- package/components/QuoteHighlight.js +1 -1
- package/components/ScrollContainer.js +1 -1
- package/components/ShareButtons.js +1 -1
- package/components/StatsCard.js +1 -1
- package/components/SyndicationSearchWidget.js +2 -2
- package/css/style-irp.css +2 -2
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +2 -2
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +2 -2
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +2 -2
- package/css/style.css.map +1 -1
- package/error-pages/401.html +1 -1
- package/error-pages/403.html +1 -1
- package/error-pages/404.html +1 -1
- package/error-pages/429.html +1 -1
- package/error-pages/500.html +1 -1
- package/error-pages/502.html +1 -1
- package/error-pages/503.html +1 -1
- package/error-pages/504.html +1 -1
- package/error-pages/5xx.html +1 -1
- package/error-pages/challenge.html +12 -11
- package/error-pages/managed-challenge.html +12 -11
- package/package.json +1 -1
- package/scss/Components/ErrorPages/error-pages.scss +27 -0
- package/scss/Components/MegaMenu/megamenu.scss +5 -1
package/README.md
CHANGED
|
@@ -263,9 +263,9 @@ https://assets.undrr.org/static/mangrove/README.md
|
|
|
263
263
|
https://assets.undrr.org/static/mangrove/latest/css/style.css
|
|
264
264
|
https://assets.undrr.org/static/mangrove/latest/components/MegaMenu.js
|
|
265
265
|
https://assets.undrr.org/static/mangrove/latest/js/tabs.js
|
|
266
|
-
https://assets.undrr.org/static/mangrove/1.3.
|
|
267
|
-
https://assets.undrr.org/static/mangrove/1.3.
|
|
268
|
-
https://assets.undrr.org/static/mangrove/1.3.
|
|
266
|
+
https://assets.undrr.org/static/mangrove/1.3.1/css/style.css
|
|
267
|
+
https://assets.undrr.org/static/mangrove/1.3.1/components/MegaMenu.js
|
|
268
|
+
https://assets.undrr.org/static/mangrove/1.3.1/js/tabs.js
|
|
269
269
|
```
|
|
270
270
|
|
|
271
271
|
#### Bleeding edge test rep
|
|
@@ -273,7 +273,7 @@ https://assets.undrr.org/static/mangrove/1.3.0/js/tabs.js
|
|
|
273
273
|
```
|
|
274
274
|
https://assets.undrr.org/testing/static/sitemap.html#mangrove-1-2-4
|
|
275
275
|
https://assets.undrr.org/testing/static/mangrove/latest/css/style.css
|
|
276
|
-
https://assets.undrr.org/static/mangrove/1.3.
|
|
276
|
+
https://assets.undrr.org/static/mangrove/1.3.1/css/style.css
|
|
277
277
|
... etc
|
|
278
278
|
```
|
|
279
279
|
|
package/components/BarChart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
-
* Compiled on: 2026-02-
|
|
3
|
+
* Compiled on: 2026-02-17T21:57:02.659Z
|
|
4
4
|
*/
|
|
5
5
|
/*! For license information please see BarChart.js.LICENSE.txt */
|
|
6
6
|
import{useEffect as t,useRef as n,useState as e}from"react";var r={9698(t,n){var e=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),n.jsx=function(t,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:void 0!==n?n:null,props:r}}},4848(t,n,e){t.exports=e(9698)}},i={};function o(t){var n=i[t];if(void 0!==n)return n.exports;var e=i[t]={exports:{}};return r[t](e,e.exports,o),e.exports}function a(){}function u(t){return null==t?a:function(){return this.querySelector(t)}}function l(){return[]}function s(t){return function(n){return n.matches(t)}}o.d=(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);var c=Array.prototype.find;function h(){return this.firstElementChild}var f=Array.prototype.filter;function p(){return Array.from(this.children)}function d(t){return new Array(t.length)}function g(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function m(t,n,e,r,i,o){for(var a,u=0,l=n.length,s=o.length;u<s;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new g(t,o[u]);for(;u<l;++u)(a=n[u])&&(i[u]=a)}function y(t,n,e,r,i,o,a){var u,l,s,c=new Map,h=n.length,f=o.length,p=new Array(h);for(u=0;u<h;++u)(l=n[u])&&(p[u]=s=a.call(l,l.__data__,u,n)+"",c.has(s)?i[u]=l:c.set(s,l));for(u=0;u<f;++u)s=a.call(t,o[u],u,o)+"",(l=c.get(s))?(r[u]=l,l.__data__=o[u],c.delete(s)):e[u]=new g(t,o[u]);for(u=0;u<h;++u)(l=n[u])&&c.get(p[u])===l&&(i[u]=l)}function v(t){return t.__data__}function w(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function b(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}g.prototype={constructor:g,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var x="http://www.w3.org/1999/xhtml";const _={svg:"http://www.w3.org/2000/svg",xhtml:x,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function M(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),_.hasOwnProperty(n)?{space:_[n],local:t}:t}function k(t){return function(){this.removeAttribute(t)}}function A(t){return function(){this.removeAttributeNS(t.space,t.local)}}function N(t,n){return function(){this.setAttribute(t,n)}}function $(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function S(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function E(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function C(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function j(t){return function(){this.style.removeProperty(t)}}function O(t,n,e){return function(){this.style.setProperty(t,n,e)}}function R(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function L(t){return function(){delete this[t]}}function q(t,n){return function(){this[t]=n}}function I(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function P(t){return t.trim().split(/^|\s+/)}function D(t){return t.classList||new H(t)}function H(t){this._node=t,this._names=P(t.getAttribute("class")||"")}function z(t,n){for(var e=D(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function B(t,n){for(var e=D(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function F(t){return function(){z(this,t)}}function T(t){return function(){B(this,t)}}function V(t,n){return function(){(n.apply(this,arguments)?z:B)(this,t)}}function Y(){this.textContent=""}function U(t){return function(){this.textContent=t}}function X(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function G(){this.innerHTML=""}function Z(t){return function(){this.innerHTML=t}}function J(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function K(){this.nextSibling&&this.parentNode.appendChild(this)}function Q(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function W(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===x&&n.documentElement.namespaceURI===x?n.createElement(t):n.createElementNS(e,t)}}function tt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function nt(t){var n=M(t);return(n.local?tt:W)(n)}function et(){return null}function rt(){var t=this.parentNode;t&&t.removeChild(this)}function it(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ot(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function at(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function ut(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function lt(t,n,e){var r=C(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function st(t,n){return function(){return lt(this,t,n)}}function ct(t,n){return function(){return lt(this,t,n.apply(this,arguments))}}H.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ht=[null];function ft(t,n){this._groups=t,this._parents=n}function pt(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}ft.prototype=function(){return new ft([[document.documentElement]],ht)}.prototype={constructor:ft,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,l=n[i],s=l.length,c=r[i]=new Array(s),h=0;h<s;++h)(o=l[h])&&(a=t.call(o,o.__data__,h,l))&&("__data__"in o&&(a.__data__=o.__data__),c[h]=a);return new ft(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(n=t.apply(this,arguments))?[]:Array.isArray(n)?n:Array.from(n);var n}}(t):function(t){return null==t?l:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],s=u.length,c=0;c<s;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new ft(r,i)},selectChild:function(t){return this.select(null==t?h:function(t){return function(){return c.call(this.children,t)}}("function"==typeof t?t:s(t)))},selectChildren:function(t){return this.selectAll(null==t?p:function(t){return function(){return f.call(this.children,t)}}("function"==typeof t?t:s(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,l=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&l.push(o);return new ft(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,v);var e,r=n?y:m,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,u=new Array(a),l=new Array(a),s=new Array(a),c=0;c<a;++c){var h=i[c],f=o[c],p=f.length,d=w(t.call(h,h&&h.__data__,c,i)),g=d.length,b=l[c]=new Array(g),x=u[c]=new Array(g);r(h,f,b,x,s[c]=new Array(p),d,n);for(var _,M,k=0,A=0;k<g;++k)if(_=b[k]){for(k>=A&&(A=k+1);!(M=x[A])&&++A<g;);_._next=M||null}}return(u=new ft(u,i))._enter=l,u._exit=s,u},enter:function(){return new ft(this._enter||this._groups.map(d),this._parents)},exit:function(){return new ft(this._exit||this._groups.map(d),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),l=0;l<a;++l)for(var s,c=e[l],h=r[l],f=c.length,p=u[l]=new Array(f),d=0;d<f;++d)(s=c[d]||h[d])&&(p[d]=s);for(;l<i;++l)u[l]=e[l];return new ft(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=b);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],l=u.length,s=i[o]=new Array(l),c=0;c<l;++c)(a=u[c])&&(s[c]=a);s.sort(n)}return new ft(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=M(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?A:k:"function"==typeof n?e.local?E:S:e.local?$:N)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?j:"function"==typeof n?R:O)(t,n,null==e?"":e)):function(t,n){return t.style.getPropertyValue(n)||C(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?L:"function"==typeof n?I:q)(t,n)):this.node()[t]},classed:function(t,n){var e=P(t+"");if(arguments.length<2){for(var r=D(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?V:n?F:T)(e,n))},text:function(t){return arguments.length?this.each(null==t?Y:("function"==typeof t?X:U)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?G:("function"==typeof t?J:Z)(t)):this.node().innerHTML},raise:function(){return this.each(K)},lower:function(){return this.each(Q)},append:function(t){var n="function"==typeof t?t:nt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:nt(t),r=null==n?et:"function"==typeof n?n:u(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(rt)},clone:function(t){return this.select(t?ot:it)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?ut:at,r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var l,s=0,c=u.length;s<c;++s)for(r=0,l=u[s];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?ct:st)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};class dt extends Map{constructor(t,n=mt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(gt(this,t))}has(t){return super.has(gt(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}(this,t))}}function gt({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function mt(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const yt=Symbol("implicit");function vt(){var t=new dt,n=[],e=[],r=yt;function i(i){let o=t.get(i);if(void 0===o){if(r!==yt)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new dt;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return vt(n,e).unknown(r)},pt.apply(i,arguments),i}function wt(){var t,n,e=vt().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,l=0,s=0,c=.5;function h(){var e=r().length,h=a<o,f=h?a:o,p=h?o:a;t=(p-f)/Math.max(1,e-l+2*s),u&&(t=Math.floor(t)),f+=(p-f-t*(e-l))*c,n=t*(1-l),u&&(f=Math.round(f),n=Math.round(n));var d=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}(e).map(function(n){return f+t*n});return i(h?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),h()):r()},e.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},e.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,u=!0,h()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,h()):u},e.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),h()):l},e.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},e.paddingOuter=function(t){return arguments.length?(s=+t,h()):s},e.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},e.copy=function(){return wt(r(),[o,a]).round(u).paddingInner(l).paddingOuter(s).align(c)},pt.apply(h(),arguments)}const bt=Math.sqrt(50),xt=Math.sqrt(10),_t=Math.sqrt(2);function Mt(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=bt?10:o>=xt?5:o>=_t?2:1;let u,l,s;return i<0?(s=Math.pow(10,-i)/a,u=Math.round(t*s),l=Math.round(n*s),u/s<t&&++u,l/s>n&&--l,s=-s):(s=Math.pow(10,i)*a,u=Math.round(t/s),l=Math.round(n/s),u*s<t&&++u,l*s>n&&--l),l<u&&.5<=e&&e<2?Mt(t,n,2*e):[u,l,s]}function kt(t,n,e){return Mt(t=+t,n=+n,e=+e)[2]}function At(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function Nt(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function $t(t){let n,e,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==n(r,r))return o;do{const n=i+o>>>1;e(t[n],r)<0?i=n+1:o=n}while(i<o)}return i}return 2!==t.length?(n=At,e=(n,e)=>At(t(n),e),r=(n,e)=>t(n)-e):(n=t===At||t===Nt?t:St,e=t,r=t),{left:i,center:function(t,n,e=0,o=t.length){const a=i(t,n,e,o-1);return a>e&&r(t[a-1],n)>-r(t[a],n)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==n(r,r))return o;do{const n=i+o>>>1;e(t[n],r)<=0?i=n+1:o=n}while(i<o)}return i}}}function St(){return 0}const Et=$t(At),Ct=Et.right,jt=(Et.left,$t(function(t){return null===t?NaN:+t}).center,Ct);function Ot(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Rt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Lt(){}var qt=.7,It=1/qt,Pt="\\s*([+-]?\\d+)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zt=/^#([0-9a-f]{3,8})$/,Bt=new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`),Ft=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),Tt=new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${Dt}\\)$`),Vt=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${Dt}\\)$`),Yt=new RegExp(`^hsl\\(${Dt},${Ht},${Ht}\\)$`),Ut=new RegExp(`^hsla\\(${Dt},${Ht},${Ht},${Dt}\\)$`),Xt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Gt(){return this.rgb().formatHex()}function Zt(){return this.rgb().formatRgb()}function Jt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=zt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Kt(n):3===e?new tn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Qt(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Qt(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Bt.exec(t))?new tn(n[1],n[2],n[3],1):(n=Ft.exec(t))?new tn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Tt.exec(t))?Qt(n[1],n[2],n[3],n[4]):(n=Vt.exec(t))?Qt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Yt.exec(t))?un(n[1],n[2]/100,n[3]/100,1):(n=Ut.exec(t))?un(n[1],n[2]/100,n[3]/100,n[4]):Xt.hasOwnProperty(t)?Kt(Xt[t]):"transparent"===t?new tn(NaN,NaN,NaN,0):null}function Kt(t){return new tn(t>>16&255,t>>8&255,255&t,1)}function Qt(t,n,e,r){return r<=0&&(t=n=e=NaN),new tn(t,n,e,r)}function Wt(t,n,e,r){return 1===arguments.length?((i=t)instanceof Lt||(i=Jt(i)),i?new tn((i=i.rgb()).r,i.g,i.b,i.opacity):new tn):new tn(t,n,e,null==r?1:r);var i}function tn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function nn(){return`#${an(this.r)}${an(this.g)}${an(this.b)}`}function en(){const t=rn(this.opacity);return`${1===t?"rgb(":"rgba("}${on(this.r)}, ${on(this.g)}, ${on(this.b)}${1===t?")":`, ${t})`}`}function rn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function on(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function an(t){return((t=on(t))<16?"0":"")+t.toString(16)}function un(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new sn(t,n,e,r)}function ln(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(t instanceof Lt||(t=Jt(t)),!t)return new sn;if(t instanceof sn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new sn(a,u,l,t.opacity)}function sn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function cn(t){return(t=(t||0)%360)<0?t+360:t}function hn(t){return Math.max(0,Math.min(1,t||0))}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function pn(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}Ot(Lt,Jt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Gt,formatHex:Gt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ln(this).formatHsl()},formatRgb:Zt,toString:Zt}),Ot(tn,Wt,Rt(Lt,{brighter(t){return t=null==t?It:Math.pow(It,t),new tn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?qt:Math.pow(qt,t),new tn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new tn(on(this.r),on(this.g),on(this.b),rn(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:nn,formatHex:nn,formatHex8:function(){return`#${an(this.r)}${an(this.g)}${an(this.b)}${an(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:en,toString:en})),Ot(sn,function(t,n,e,r){return 1===arguments.length?ln(t):new sn(t,n,e,null==r?1:r)},Rt(Lt,{brighter(t){return t=null==t?It:Math.pow(It,t),new sn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?qt:Math.pow(qt,t),new sn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new tn(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new sn(cn(this.h),hn(this.s),hn(this.l),rn(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 t=rn(this.opacity);return`${1===t?"hsl(":"hsla("}${cn(this.h)}, ${100*hn(this.s)}%, ${100*hn(this.l)}%${1===t?")":`, ${t})`}`}}));const dn=t=>()=>t;function gn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):dn(isNaN(t)?n:t)}const mn=function t(n){var e=function(t){return 1===(t=+t)?gn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):dn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=Wt(t)).r,(n=Wt(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=gn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function yn(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=Wt(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function vn(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Nn(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function wn(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function bn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function xn(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Nn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}yn(function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return pn((e-r/n)*n,a,i,o,u)}}),yn(function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return pn((e-r/n)*n,i,o,a,u)}});var _n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mn=new RegExp(_n.source,"g");function kn(t,n){var e,r,i,o=_n.lastIndex=Mn.lastIndex=0,a=-1,u=[],l=[];for(t+="",n+="";(e=_n.exec(t))&&(r=Mn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:bn(e,r)})),o=Mn.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var e,r=0;r<n;++r)u[(e=l[r]).i]=e.x(t);return u.join("")})}function An(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function Nn(t,n){var e,r,i=typeof n;return null==n||"boolean"===i?dn(n):("number"===i?bn:"string"===i?(e=Jt(n))?(n=e,mn):kn:n instanceof Jt?mn:n instanceof Date?wn:(r=n,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(n)?vn:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?xn:bn:An))(t,n)}function $n(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function Sn(t){return+t}var En=[0,1];function Cn(t){return t}function jn(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function On(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=jn(i,r),o=e(a,o)):(r=jn(r,i),o=e(o,a)),function(t){return o(r(t))}}function Rn(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=jn(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=jt(t,n,1,r)-1;return o[e](i[e](n))}}var Ln,qn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function In(t){if(!(n=qn.exec(t)))throw new Error("invalid format: "+t);var n;return new Pn({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Pn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Dn(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Hn(t){return(t=Dn(Math.abs(t)))?t[1]:NaN}function zn(t,n){var e=Dn(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}In.prototype=Pn.prototype,Pn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Bn={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>zn(100*t,n),r:zn,s:function(t,n){var e=Dn(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Ln=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Dn(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Fn(t){return t}var Tn,Vn,Yn,Un=Array.prototype.map,Xn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gn(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){if(!((e=+e)>0))return[];if((t=+t)===(n=+n))return[t];const r=n<t,[i,o,a]=r?Mt(n,t,e):Mt(t,n,e);if(!(o>=i))return[];const u=o-i+1,l=new Array(u);if(r)if(a<0)for(let t=0;t<u;++t)l[t]=(o-t)/-a;else for(let t=0;t<u;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<u;++t)l[t]=(i+t)/-a;else for(let t=0;t<u;++t)l[t]=(i+t)*a;return l}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return function(t,n,e,r){var i,o=function(t,n,e){e=+e;const r=(n=+n)<(t=+t),i=r?kt(n,t,e):kt(t,n,e);return(r?-1:1)*(i<0?1/-i:i)}(t,n,e);switch((r=In(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hn(n)/3)))-Hn(Math.abs(t)))}(o,a))||(r.precision=i),Yn(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Hn(n)-Hn(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Hn(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Vn(r)}(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,l=o[a],s=o[u],c=10;for(s<l&&(i=l,l=s,s=i,i=a,a=u,u=i);c-- >0;){if((i=kt(l,s,e))===r)return o[a]=l,o[u]=s,n(o);if(i>0)l=Math.floor(l/i)*i,s=Math.ceil(s/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,s=Math.floor(s*i)/i}r=i}return t},t}function Zn(){var t=function(){var t,n,e,r,i,o,a=En,u=En,l=Nn,s=Cn;function c(){var t,n,e,l=Math.min(a.length,u.length);return s!==Cn&&(t=a[0],n=a[l-1],t>n&&(e=t,t=n,n=e),s=function(e){return Math.max(t,Math.min(n,e))}),r=l>2?Rn:On,i=o=null,h}function h(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,l)))(t(s(n)))}return h.invert=function(e){return s(n((o||(o=r(u,a.map(t),bn)))(e)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Sn),c()):a.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},h.rangeRound=function(t){return u=Array.from(t),l=$n,c()},h.clamp=function(t){return arguments.length?(s=!!t||Cn,c()):s!==Cn},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(e=t,h):e},function(e,r){return t=e,n=r,c()}}()(Cn,Cn);return t.copy=function(){return n=t,Zn().domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());var n},pt.apply(t,arguments),Gn(t)}function Jn(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function Kn(t){return t}Tn=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Fn:(n=Un.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Fn:function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(Un.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var n=(t=In(t)).fill,e=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,g=t.comma,m=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Bn[v]||(void 0===m&&(m=12),y=!0,v="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var w="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?o:/[%p]/.test(v)?l:"",x=Bn[v],_=/[defgprs%]/.test(v);function M(t){var i,o,l,f=w,M=b;if("c"===v)M=x(t)+M,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:x(Math.abs(t),m),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==h&&(k=!1),f=(k?"("===h?h:s:"-"===h||"("===h?"":h)+f,M=("s"===v?Xn[8+Ln/3]:"")+M+(k&&"("===h?")":""),_)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){M=(46===l?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var A=f.length+t.length+M.length,N=A<d?new Array(d-A+1).join(n):"";switch(g&&p&&(t=r(N+t,N.length?d-M.length:1/0),N=""),e){case"<":t=f+t+M+N;break;case"=":t=f+N+t+M;break;case"^":t=N.slice(0,A=N.length>>1)+f+t+M+N.slice(A);break;default:t=N+f+t+M}return u(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,n){var e=h(((t=In(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Hn(n)/3))),i=Math.pow(10,-r),o=Xn[8+r/3];return function(t){return e(i*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Vn=Tn.format,Yn=Tn.formatPrefix;var Qn=1e-6;function Wn(t){return"translate("+t+",0)"}function te(t){return"translate(0,"+t+")"}function ne(t){return n=>+t(n)}function ee(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function re(){return!this.__axis}function ie(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?Wn:te;function f(f){var p=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,d=null==i?n.tickFormat?n.tickFormat.apply(n,e):Kn:i,g=Math.max(o,0)+u,m=n.range(),y=+m[0]+l,v=+m[m.length-1]+l,w=(n.bandwidth?ee:ne)(n.copy(),l),b=f.selection?f.selection():f,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(p,n).order(),M=_.exit(),k=_.enter().append("g").attr("class","tick"),A=_.select("line"),N=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),N=N.merge(k.append("text").attr("fill","currentColor").attr(c,s*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==b&&(x=x.transition(f),_=_.transition(f),A=A.transition(f),N=N.transition(f),M=M.transition(f).attr("opacity",Qn).attr("transform",function(t){return isFinite(t=w(t))?h(t+l):this.getAttribute("transform")}),k.attr("opacity",Qn).attr("transform",function(t){var n=this.parentNode.__axis;return h((n&&isFinite(n=n(t))?n:w(t))+l)})),M.remove(),x.attr("d",4===t||2===t?a?"M"+s*a+","+y+"H"+l+"V"+v+"H"+s*a:"M"+l+","+y+"V"+v:a?"M"+y+","+s*a+"V"+l+"H"+v+"V"+s*a:"M"+y+","+l+"H"+v),_.attr("opacity",1).attr("transform",function(t){return h(w(t)+l)}),A.attr(c+"2",s*o),N.attr(c,s*g).text(d),b.filter(re).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each(function(){this.__axis=w})}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return e=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),f):e.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(u=+t,f):u},f.offset=function(t){return arguments.length?(l=+t,f):l},f}var oe=o(4848);function ae({data:r=[],cumulative:i="false",startYear:o=2015,endYear:a=2030,width:u=600,height:l=400,labelColor:s="#6B7280",backgroundColor:c="#FFFFFF",axisColor:h="#6B7280",tickColor:f="#6B7280",color:p="#4065A3",title:d="",xAxisLabel:g="",yAxisLabel:m="",dataSource:y="",ariaLabel:v="Bar chart showing data",ariaDescription:w="",apiData:b="false",type:x="",margin:_={top:40,right:30,bottom:70,left:70}}){const[M,k]=e(r),A=n();t(()=>{N()},[r,x]);const N=()=>{k(((t,n={})=>{const{startYear:e=2015,endYear:r=2030,defaultColor:i="#007bc8",cumulative:o=!1,graphType:a="COMMITMENTS",apiData:u=!1}=n;if("true"!=u)return t;const l={},s=new Set,c=new Set,h=new Set;let f;if("COMMITMENTS"===a)f=function(t){return 1};else if("ORGANIZATIONS"===a)f=function(t){let n=0;return t.organizations.forEach(t=>{c.has(t)||(c.add(t),n+=1)}),t.partners.split(", ").forEach(t=>{c.has(t)||(c.add(t),n+=1)}),n};else{if("DELIVERABLES"!==a)return console.error("Invalid graphType passed to mg-bar-chart",a),!1;f=function(t){return h.has(t.deliverable_id)?0:(h.add(t.deliverable_id),1)}}t.forEach(t=>{if(!s.has(t.node_id)||"DELIVERABLES"===a){s.add(t.node_id);const n=new Date(t.created_on).getFullYear();l[n]=(l[n]||0)+f(t)}});const p=Array.from({length:r-e+1},(t,n)=>e+n);t.length=0;let d=0;return p.map(t=>{const n=l[t]||0;return o?(d+=n,{label:t.toString(),value:d,color:i}):{label:t.toString(),value:n,color:i}})})(r,{graphType:x,defaultColor:p,apiData:b,startYear:o,endYear:a,cumulative:i}))};return t(()=>{const t=function(t){return"string"==typeof t?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],ht)}(A.current);t.selectAll("*").remove(),t.attr("width",u).attr("height",l).attr("role","img").attr("aria-label",v).attr("aria-describedby",w).style("background-color",c).style("overflow","visible");const n=u-_.left-_.right,e=l-_.top-_.bottom,r=t.append("g").attr("transform",`translate(${_.left},${_.top})`),i=wt().domain(M.map(t=>t.label)).range([0,n]).padding(.2),o=Zn().domain([0,Jn(M,t=>t.value)]).range([e,0]);var a;r.append("g").attr("class","x-axis").attr("transform",`translate(0, ${e})`).call((a=i,ie(3,a))).selectAll("line, path").attr("stroke",f),"none"!=f&&r.append("g").attr("class","y-axis").call(function(t){return ie(4,t)}(o).ticks(5)).selectAll("line, path").attr("stroke",f);const h=r.selectAll().data(M).enter().append("g").attr("key",t=>t.label);h.append("rect").attr("class","bar").attr("x",t=>i(t.label)).attr("y",t=>o(t.value)).attr("height",t=>e-o(t.value)).attr("width",i.bandwidth()).attr("fill",p).attr("tabindex",0).attr("role","listitem").attr("aria-label",t=>`Bar for ${t.label} with value ${t.value}`),h.append("text").attr("class","value").attr("x",t=>i(t.label)+i.bandwidth()/2).attr("y",t=>o(t.value)-5).attr("text-anchor","middle").style("fill",s).text(t=>0!==t.value?`${t.value}`:""),g&&r.append("text").attr("class","label").attr("x",n/2).attr("y",e+_.bottom-10).attr("text-anchor","middle").style("fill",s).text(g),m&&r.append("text").attr("class","label").attr("x",-e/2).attr("y",-_.left/2.4).attr("transform","rotate(-90)").attr("text-anchor","middle").style("fill",s).text(m),d&&t.append("text").attr("class","title").attr("x",n/2+_.left).attr("y",5).attr("text-anchor","middle").style("fill",s).style("font-size","22px").style("font-weight","600").text(d),y&&r.append("text").attr("class","source").attr("x",n).attr("y",e+_.bottom-5).attr("text-anchor","end").style("fill",s).style("font-size","10px").text(y)},[M,u,l,_,s,c,h,f,d,g,m,y,v,w]),(0,oe.jsx)("div",{children:(0,oe.jsx)("svg",{ref:A})})}export{ae as default};
|
package/components/Fetcher.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
-
* Compiled on: 2026-02-
|
|
3
|
+
* Compiled on: 2026-02-17T21:57:02.659Z
|
|
4
4
|
*/
|
|
5
5
|
/*! For license information please see Fetcher.js.LICENSE.txt */
|
|
6
6
|
import{useEffect as r,useState as e}from"react";var o={9698(r,e){var o=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),e.jsx=function(r,e,t){var a=null;if(void 0!==t&&(a=""+t),void 0!==e.key&&(a=""+e.key),"key"in e)for(var n in t={},e)"key"!==n&&(t[n]=e[n]);else t=e;return e=t.ref,{$$typeof:o,type:r,key:a,ref:void 0!==e?e:null,props:t}}},4848(r,e,o){r.exports=o(9698)}},t={};function a(r){var e=t[r];if(void 0!==e)return e.exports;var n=t[r]={exports:{}};return o[r](n,n.exports,a),n.exports}a.d=(r,e)=>{for(var o in e)a.o(e,o)&&!a.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},a.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var n=a(4848);const s={isLoading:!1,data:[]||0},i=r=>{const e=new URLSearchParams;for(const o in r)r.hasOwnProperty(o)&&void 0!==r[o]&&null!==r[o]&&e.append(o,r[o]);return e.toString()},c=({api:o,render:t,queryParams:a={},username:c,password:d})=>{const[f,p]=e(s);r(()=>(l().catch(r=>console.error(r)),()=>p(s)),[o,JSON.stringify(a)]);const l=async()=>{p(r=>({...r,isLoading:!0}));const r=i(a),e=r?`${o}?${r}`:o;try{const r=await fetch(e,{method:"GET"});if(!r.ok)throw new Error("Network response was not ok");const o=await r.json();p(r=>({...r,isLoading:!1,data:o.results}))}catch(r){console.error("Fetch error: ",r),p(r=>({...r,isLoading:!1,data:[]}))}};return(0,n.jsx)("div",{children:t(f)})};export{c as default,i as generateQueryParams};
|
package/components/Gallery.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
-
* Compiled on: 2026-02-
|
|
3
|
+
* Compiled on: 2026-02-17T21:57:02.659Z
|
|
4
4
|
*/
|
|
5
5
|
/*! For license information please see Gallery.js.LICENSE.txt */
|
|
6
6
|
import{default as e,useCallback as r,useEffect as l,useRef as t,useState as a}from"react";var n={2694(e,r,l){var t=l(6925);function a(){}function n(){}n.resetWarningCache=a,e.exports=function(){function e(e,r,l,a,n,i){if(i!==t){var o=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 o.name="Invariant Violation",o}}function r(){return e}e.isRequired=e;var l={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:a};return l.PropTypes=l,l}},5556(e,r,l){e.exports=l(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var l=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(e,r,t){var a=null;if(void 0!==t&&(a=""+t),void 0!==r.key&&(a=""+r.key),"key"in r)for(var n in t={},r)"key"!==n&&(t[n]=r[n]);else t=r;return r=t.ref,{$$typeof:l,type:e,key:a,ref:void 0!==r?r:null,props:t}}r.Fragment=t,r.jsx=a,r.jsxs=a},4848(e,r,l){e.exports=l(9698)}},i={};function o(e){var r=i[e];if(void 0!==r)return r.exports;var l=i[e]={exports:{}};return n[e](l,l.exports,o),l.exports}o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var l in r)o.o(r,l)&&!o.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:r[l]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var s=o(5556),c=o.n(s),m=o(4848);const d=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null;function g({media:e,initialIndex:n=0,showThumbnails:i=!0,thumbnailPosition:o="left",showArrows:s=!0,arrowStyle:c="overlay",showDescription:g=!0,enableKeyboard:u=!0,loop:p=!1,onMediaChange:y}){const[b,h]=a(n),[_,v]=a(!1),f=t(null),x=t(null),j=t(null),w=t([]),N=t(null),k=t(null),T=e[b];l(()=>{"video"===T.type||"embed"===T.type?v(!0):v(!1)},[b,T.type]);const O=r(r=>{h(r),y&&y(r,e[r]),w.current[r]&&w.current[r].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[e,y]),S=r(()=>{b<e.length-1?O(b+1):p&&O(0)},[b,e.length,O,p]),C=r(()=>{b>0?O(b-1):p&&O(e.length-1)},[b,O,p,e.length]),P=r(r=>{if(u)switch(r.key){case"ArrowLeft":r.preventDefault(),C();break;case"ArrowRight":r.preventDefault(),S();break;case"Home":r.preventDefault(),O(0);break;case"End":r.preventDefault(),O(e.length-1)}},[u,S,C,O,e.length]),D=d("mg-gallery","bottom"===o&&"mg-gallery--thumbnails-bottom");return(0,m.jsxs)("div",{ref:f,className:D,role:"region","aria-label":"Gallery",tabIndex:u?0:void 0,onKeyDown:P,children:[(0,m.jsxs)("div",{className:"mg-gallery__main",role:"group",children:[(0,m.jsxs)("div",{className:"mg-gallery__image-wrapper",onTouchStart:e=>{N.current=e.touches[0].clientX,k.current=null},onTouchMove:e=>{k.current=e.touches[0].clientX},onTouchEnd:()=>{if(!N.current||!k.current)return;const e=N.current-k.current;Math.abs(e)>50&&(e>0?S():C()),N.current=null,k.current=null},children:[(!T.type||"image"===T.type)&&(0,m.jsx)("img",{ref:x,src:T.src,alt:T.alt,className:"mg-gallery__image","aria-describedby":g&&T.description?"gallery-description":void 0}),"video"===T.type&&(0,m.jsxs)("video",{ref:x,src:T.src,className:"mg-gallery__image mg-gallery__video",controls:!0,poster:T.poster,onLoadedData:()=>v(!1),onLoadStart:()=>v(!0),"aria-describedby":g&&T.description?"gallery-description":void 0,children:[(0,m.jsx)("track",{kind:"captions"}),"Your browser does not support the video tag."]}),"embed"===T.type&&(0,m.jsx)("iframe",{ref:x,src:T.embedUrl||T.src,className:"mg-gallery__image mg-gallery__embed",title:T.title||T.alt,allowFullScreen:!0,onLoad:()=>v(!1),"aria-describedby":g&&T.description?"gallery-description":void 0}),"html"===T.type&&(0,m.jsx)("div",{ref:x,className:"mg-gallery__image mg-gallery__html",dangerouslySetInnerHTML:{__html:T.html},"aria-describedby":g&&T.description?"gallery-description":void 0}),_&&(0,m.jsx)("div",{className:"mg-gallery__loading","aria-live":"polite","aria-label":"Loading media",children:(0,m.jsx)("div",{className:"mg-gallery__spinner"})})]}),s&&"overlay"===c&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{className:"mg-gallery__arrow mg-gallery__arrow--prev",onClick:C,disabled:!p&&0===b,"aria-label":"Previous item",type:"button",children:"‹"}),(0,m.jsx)("button",{className:"mg-gallery__arrow mg-gallery__arrow--next",onClick:S,disabled:!p&&b===e.length-1,"aria-label":"Next item",type:"button",children:"›"})]}),s&&"corner"===c&&(0,m.jsxs)("div",{className:"mg-gallery__arrow-controls",children:[(0,m.jsx)("button",{className:"mg-gallery__arrow-button mg-gallery__arrow-button--prev",onClick:C,disabled:!p&&0===b,"aria-label":"Previous item",type:"button",children:"‹"}),(0,m.jsx)("button",{className:"mg-gallery__arrow-button mg-gallery__arrow-button--next",onClick:S,disabled:!p&&b===e.length-1,"aria-label":"Next item",type:"button",children:"›"})]})]}),g&&(T.title||T.description)&&(0,m.jsxs)("div",{className:"mg-gallery__description",id:"gallery-description",children:[T.title&&(0,m.jsx)("div",{className:"mg-gallery__title",children:T.title}),T.description&&(0,m.jsx)("p",{className:"mg-gallery__caption",children:T.description})]}),i&&(0,m.jsx)("div",{ref:j,className:"mg-gallery__thumbnails",role:"tablist","aria-label":"Gallery thumbnails",children:e.map((e,r)=>(0,m.jsxs)("button",{ref:e=>w.current[r]=e,className:d("mg-gallery__thumbnail",r===b&&"mg-gallery__thumbnail--active","html"===e.type&&!e.thumbnail&&"mg-gallery__thumbnail--html"),onClick:()=>O(r),role:"tab","aria-selected":r===b,"aria-current":r===b?"true":void 0,"aria-label":`View ${e.title||e.alt||"content"}`,type:"button",children:["html"===e.type&&!e.thumbnail&&e.html?(0,m.jsx)("div",{className:"mg-gallery__thumbnail-html-preview","aria-hidden":"true",children:(0,m.jsx)("div",{className:"mg-gallery__thumbnail-html-content",dangerouslySetInnerHTML:{__html:e.html}})}):e.thumbnail||e.src?(0,m.jsx)("img",{src:e.thumbnail||e.src,alt:"",loading:"lazy"}):(0,m.jsx)("span",{className:"mg-gallery__thumbnail-placeholder","aria-hidden":"true",children:"◫"}),("video"===e.type||"embed"===e.type)&&(0,m.jsx)("span",{className:"mg-gallery__thumbnail-indicator","aria-hidden":"true",children:"▶"})]},e.id))})]})}g.propTypes={media:c().arrayOf(c().shape({id:c().string.isRequired,type:c().oneOf(["image","video","embed","html"]),src:c().string,alt:c().string,title:c().string,description:c().string,thumbnail:c().string,poster:c().string,embedUrl:c().string,html:c().string})).isRequired,initialIndex:c().number,showThumbnails:c().bool,thumbnailPosition:c().oneOf(["left","bottom"]),showArrows:c().bool,arrowStyle:c().oneOf(["overlay","corner"]),showDescription:c().bool,enableKeyboard:c().bool,loop:c().bool,onMediaChange:c().func};const u=e.memo(g);export{u as Gallery};
|
package/components/IconCard.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
|
|
3
|
-
* Compiled on: 2026-02-
|
|
3
|
+
* Compiled on: 2026-02-17T21:57:02.659Z
|
|
4
4
|
*/
|
|
5
5
|
/*! For license information please see IconCard.js.LICENSE.txt */
|
|
6
6
|
import"react";var e={2694(e,t,n){var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(e,t,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:a,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=a,t.jsxs=a},4848(e,t,n){e.exports=n(9698)}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(5556),a=n.n(r);const{entries:o,setPrototypeOf:i,isFrozen:l,getPrototypeOf:c,getOwnPropertyDescriptor:s}=Object;let{freeze:m,seal:u,create:p}=Object,{apply:f,construct:d}="undefined"!=typeof Reflect&&Reflect;m||(m=function(e){return e}),u||(u=function(e){return e}),f||(f=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return e.apply(t,r)}),d||(d=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const g=R(Array.prototype.forEach),h=R(Array.prototype.lastIndexOf),y=R(Array.prototype.pop),T=R(Array.prototype.push),_=R(Array.prototype.splice),b=R(String.prototype.toLowerCase),E=R(String.prototype.toString),S=R(String.prototype.match),A=R(String.prototype.replace),N=R(String.prototype.indexOf),x=R(String.prototype.trim),v=R(Object.prototype.hasOwnProperty),O=R(RegExp.prototype.test),k=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(w,t)});var w;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return f(e,t,r)}}function D(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;i&&i(e,null);let r=t.length;for(;r--;){let a=t[r];if("string"==typeof a){const e=n(a);e!==a&&(l(t)||(t[r]=e),a=e)}e[a]=!0}return e}function C(e){for(let t=0;t<e.length;t++)v(e,t)||(e[t]=null);return e}function L(e){const t=p(null);for(const[n,r]of o(e))v(e,n)&&(Array.isArray(r)?t[n]=C(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=L(r):t[n]=r);return t}function I(e,t){for(;null!==e;){const n=s(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=c(e)}return function(){return null}}const M=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),P=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),z=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=m(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),H=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=m(["#text"]),B=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),W=m(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=u(/<%[\w\W]*|[\w\W]*%>/gm),X=u(/\$\{[\w\W]*/gm),K=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=u(/^aria-[\-\w]+$/),Z=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=u(/^(?:\w+script|data):/i),Q=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=u(/^html$/i),te=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var ne=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:te,DATA_ATTR:K,DOCTYPE_NAME:ee,ERB_EXPR:q,IS_ALLOWED_URI:Z,IS_SCRIPT_OR_DATA:J,MUSTACHE_EXPR:$,TMPLIT_EXPR:X});const re=function(){return"undefined"==typeof window?null:window};var ae=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const a=r,i=a.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:s,Element:u,NodeFilter:f,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:w,DOMParser:R,trustedTypes:C}=t,$=u.prototype,q=I($,"cloneNode"),X=I($,"remove"),K=I($,"nextSibling"),V=I($,"childNodes"),J=I($,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,te="";const{implementation:ae,createNodeIterator:oe,createDocumentFragment:ie,getElementsByTagName:le}=r,{importNode:ce}=a;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof o&&"function"==typeof J&&ae&&void 0!==ae.createHTMLDocument;const{MUSTACHE_EXPR:me,ERB_EXPR:ue,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:ye}=ne;let{IS_ALLOWED_URI:Te}=ne,_e=null;const be=D({},[...M,...P,...z,...F,...j]);let Ee=null;const Se=D({},[...B,...W,...G,...Y]);let Ae=Object.seal(p(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,xe=null;const ve=Object.seal(p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,ke=!0,we=!1,Re=!0,De=!1,Ce=!0,Le=!1,Ie=!1,Me=!1,Pe=!1,ze=!1,Ue=!1,Fe=!0,He=!1,je=!0,Be=!1,We={},Ge=null;const Ye=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const qe=D({},["audio","video","img","source","image","track"]);let Xe=null;const Ke=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=D({},[Ve,Ze,Je],E);let rt=D({},["mi","mo","mn","ms","mtext"]),at=D({},["annotation-xml"]);const ot=D({},["title","style","font","a","script"]);let it=null;const lt=["application/xhtml+xml","text/html"];let ct=null,st=null;const mt=r.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=L(e),it=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===it?E:b,_e=v(e,"ALLOWED_TAGS")?D({},e.ALLOWED_TAGS,ct):be,Ee=v(e,"ALLOWED_ATTR")?D({},e.ALLOWED_ATTR,ct):Se,tt=v(e,"ALLOWED_NAMESPACES")?D({},e.ALLOWED_NAMESPACES,E):nt,Xe=v(e,"ADD_URI_SAFE_ATTR")?D(L(Ke),e.ADD_URI_SAFE_ATTR,ct):Ke,$e=v(e,"ADD_DATA_URI_TAGS")?D(L(qe),e.ADD_DATA_URI_TAGS,ct):qe,Ge=v(e,"FORBID_CONTENTS")?D({},e.FORBID_CONTENTS,ct):Ye,Ne=v(e,"FORBID_TAGS")?D({},e.FORBID_TAGS,ct):L({}),xe=v(e,"FORBID_ATTR")?D({},e.FORBID_ATTR,ct):L({}),We=!!v(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,ze=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||Z,Qe=e.NAMESPACE||Je,rt=e.MATHML_TEXT_INTEGRATION_POINTS||rt,at=e.HTML_INTEGRATION_POINTS||at,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(ke=!1),ze&&(Pe=!0),We&&(_e=D({},j),Ee=[],!0===We.html&&(D(_e,M),D(Ee,B)),!0===We.svg&&(D(_e,P),D(Ee,W),D(Ee,Y)),!0===We.svgFilters&&(D(_e,z),D(Ee,W),D(Ee,Y)),!0===We.mathMl&&(D(_e,F),D(Ee,G),D(Ee,Y))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?ve.tagCheck=e.ADD_TAGS:(_e===be&&(_e=L(_e)),D(_e,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?ve.attributeCheck=e.ADD_ATTR:(Ee===Se&&(Ee=L(Ee)),D(Ee,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&D(Xe,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=L(Ge)),D(Ge,e.FORBID_CONTENTS,ct)),e.ADD_FORBID_CONTENTS&&(Ge===Ye&&(Ge=L(Ge)),D(Ge,e.ADD_FORBID_CONTENTS,ct)),je&&(_e["#text"]=!0),Le&&D(_e,["html","head","body"]),_e.table&&(D(_e,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,te=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(C,i)),null!==Q&&"string"==typeof te&&(te=Q.createHTML(""));m&&m(e),st=e}},ft=D({},[...P,...z,...U]),dt=D({},[...F,...H]),gt=function(e){T(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){X(e)}},ht=function(e,t){try{T(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||ze)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=S(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Qe===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=Q?Q.createHTML(e):e;if(Qe===Je)try{t=(new R).parseFromString(a,it)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?te:a}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Qe===Je?le.call(t,Le?"html":"body")[0]:Le?t.documentElement:o},Tt=function(e){return oe.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof w&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof s&&e instanceof s};function Et(e,t,r){g(e,e=>{e.call(n,t,r,st)})}const St=function(e){let t=null;if(Et(se.beforeSanitizeElements,e,null),_t(e))return gt(e),!0;const r=ct(e.nodeName);if(Et(se.uponSanitizeElement,e,{tagName:r,allowedTags:_e}),Ce&&e.hasChildNodes()&&!bt(e.firstElementChild)&&O(/<[/\w!]/g,e.innerHTML)&&O(/<[/\w!]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Ce&&8===e.nodeType&&O(/<[/\w]/g,e.data))return gt(e),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(r))&&(!_e[r]||Ne[r])){if(!Ne[r]&&Nt(r)){if(Ae.tagNameCheck instanceof RegExp&&O(Ae.tagNameCheck,r))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(r))return!1}if(je&&!Ge[r]){const t=J(e)||e.parentNode,n=V(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const a=q(n[r],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,K(e))}}return gt(e),!0}return e instanceof u&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=b(e.tagName),r=b(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(ft[n]):e.namespaceURI===Ve?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&at[r]:Boolean(dt[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!at[r])&&!(t.namespaceURI===Ve&&!rt[r])&&!dt[n]&&(ot[n]||!ft[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!O(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,g([me,ue,pe],e=>{t=A(t,e," ")}),e.textContent!==t&&(T(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(se.afterSanitizeElements,e,null),!1):(gt(e),!0)},At=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in r||n in mt))return!1;if(ke&&!xe[t]&&O(fe,t));else if(Oe&&O(de,t));else if(ve.attributeCheck instanceof Function&&ve.attributeCheck(t,e));else if(!Ee[t]||xe[t]){if(!(Nt(e)&&(Ae.tagNameCheck instanceof RegExp&&O(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&O(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t,e))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&O(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(Xe[t]);else if(O(Te,A(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==N(n,"data:")||!$e[e])if(we&&!O(ge,A(n,he,"")));else if(n)return!1;return!0},Nt=function(e){return"annotation-xml"!==e&&S(e,ye)},xt=function(e){Et(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let a=t.length;for(;a--;){const o=t[a],{name:i,namespaceURI:l,value:c}=o,s=ct(i),m=c;let u="value"===i?m:x(m);if(r.attrName=s,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Et(se.uponSanitizeAttribute,e,r),u=r.attrValue,!He||"id"!==s&&"name"!==s||(ht(i,e),u="user-content-"+u),Ce&&O(/((--!?|])>)|<\/(style|title|textarea)/i,u)){ht(i,e);continue}if("attributename"===s&&S(u,"href")){ht(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ht(i,e);continue}if(!Re&&O(/\/>/i,u)){ht(i,e);continue}De&&g([me,ue,pe],e=>{u=A(u,e," ")});const p=ct(e.nodeName);if(At(p,s,u)){if(Q&&"object"==typeof C&&"function"==typeof C.getAttributeType)if(l);else switch(C.getAttributeType(p,s)){case"TrustedHTML":u=Q.createHTML(u);break;case"TrustedScriptURL":u=Q.createScriptURL(u)}if(u!==m)try{l?e.setAttributeNS(l,i,u):e.setAttribute(i,u),_t(e)?gt(e):y(n.removed)}catch(t){ht(i,e)}}else ht(i,e)}Et(se.afterSanitizeAttributes,e,null)},vt=function e(t){let n=null;const r=Tt(t);for(Et(se.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Et(se.uponSanitizeShadowNode,n,null),St(n),xt(n),n.content instanceof l&&e(n.content);Et(se.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,i=null,c=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ie||pt(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=ct(e.nodeName);if(!_e[t]||Ne[t])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)r=yt("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Pe&&!De&&!Le&&-1===e.indexOf("<"))return Q&&Ue?Q.createHTML(e):e;if(r=yt(e),!r)return Pe?null:Ue?te:""}r&&Me&>(r.firstChild);const m=Tt(Be?e:r);for(;i=m.nextNode();)St(i),xt(i),i.content instanceof l&&vt(i.content);if(Be)return e;if(Pe){if(ze)for(c=ie.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(Ee.shadowroot||Ee.shadowrootmode)&&(c=ce.call(a,c,!0)),c}let u=Le?r.outerHTML:r.innerHTML;return Le&&_e["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&O(ee,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),De&&g([me,ue,pe],e=>{u=A(u,e," ")}),Q&&Ue?Q.createHTML(u):u},n.setConfig=function(){pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},n.clearConfig=function(){st=null,Ie=!1},n.isValidAttribute=function(e,t,n){st||pt({});const r=ct(e),a=ct(t);return At(r,a,n)},n.addHook=function(e,t){"function"==typeof t&&T(se[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=h(se[e],t);return-1===n?void 0:_(se[e],n,1)[0]}return y(se[e])},n.removeHooks=function(e){se[e]=[]},n.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),oe=n(4848);function ie({label:e,Type:t,State:n,For_Primary:r,...a}){const o="Secondary"==t?"secondary":"primary",i="Disabled"==n?"disabled":"",l="No Arrow"==r?"without-arrow":"arrow",c=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null;return(0,oe.jsx)("a",{..."Secondary"===t?{className:c("mg-button",`mg-button-${o}`,`${i}`)}:{className:c("mg-button",`mg-button-${o}`,`mg-button-${l}`,`${i}`)},role:"button",href:"#",...a,children:e})}const le=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null;function ce({data:e,centered:t=!1,variant:n="default"}){return(0,oe.jsx)(oe.Fragment,{children:e.map((e,r)=>(0,oe.jsxs)("article",{className:le("mg-card","mg-card__icon",t&&"mg-card__icon--centered",n&&"default"!==n&&`mg-card__icon--${n}`),children:[(e.icon||e.imgback)&&(0,oe.jsx)("div",{className:"mg-card__visual",children:e.srOnlyTitle&&e.link?(0,oe.jsx)("a",{href:e.link,className:"mg-card__visual-link",children:e.imgback?(0,oe.jsx)("img",{src:e.imgback,alt:e.imgalt||"",className:le("mg-card__image",e.imageScale&&`mg-card__image--${e.imageScale}`),...!e.imageScale&&{width:e.iconSize||72,height:e.iconSize||72}}):e.icon?(0,oe.jsx)("span",{className:le("mg-card__icon-wrap",e.imageScale&&`mg-card__icon-wrap--${e.imageScale}`),"aria-hidden":"true",children:(0,oe.jsx)("span",{className:e.icon})}):null}):e.imgback?(0,oe.jsx)("img",{src:e.imgback,alt:e.imgalt||"",className:le("mg-card__image",e.imageScale&&`mg-card__image--${e.imageScale}`),...!e.imageScale&&{width:e.iconSize||72,height:e.iconSize||72}}):e.icon?(0,oe.jsx)("span",{className:le("mg-card__icon-wrap",e.imageScale&&`mg-card__icon-wrap--${e.imageScale}`),"aria-hidden":"true",children:(0,oe.jsx)("span",{className:e.icon})}):null}),(0,oe.jsxs)("div",{className:"mg-card__content",children:[e.label&&(0,oe.jsx)("div",{className:"mg-card__meta",children:(0,oe.jsx)("span",{className:"mg-card__label",children:e.label})}),e.title&&(0,oe.jsx)("header",{className:le("mg-card__title",e.srOnlyTitle&&"mg-u-sr-only"),children:!e.link||e.button||e.srOnlyTitle?e.title:(0,oe.jsx)("a",{href:e.link,children:e.title})}),e.summaryText&&(0,oe.jsx)("p",{className:"mg-card__summary",dangerouslySetInnerHTML:{__html:ae.sanitize(e.summaryText)}}),e.button&&(0,oe.jsx)("div",{className:"mg-card__cta",children:(0,oe.jsx)(ie,{type:e.buttonType||"Primary",label:e.button,href:e.link})}),e.linkText&&!e.button&&(0,oe.jsx)("p",{className:"mg-card__link",children:(0,oe.jsx)("a",{href:e.link,children:e.linkText})})]})]},e.id||e.title||`icon-card-${r}`))})}ce.propTypes={data:a().arrayOf(a().shape({id:a().oneOfType([a().string,a().number]),icon:a().string,imgback:a().string,imgalt:a().string,iconSize:a().number,imageScale:a().oneOf(["small","medium","large","full"]),label:a().string,title:a().string.isRequired,srOnlyTitle:a().bool,summaryText:a().string,link:a().string,linkText:a().string,button:a().string,buttonType:a().oneOf(["Primary","Secondary"])})).isRequired,centered:a().bool,variant:a().oneOf(["default","negative"])};export{ce as IconCard};
|