@undrr/undrr-mangrove 2.2.0 → 2.4.0

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.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/components/BookCard.js +5 -2
  3. package/components/Breadcrumbs.js +2 -2
  4. package/components/Checkbox.js +3 -2
  5. package/components/Chips.js +2 -2
  6. package/components/ContentCard.js +8 -2
  7. package/components/ContentTeaser.js +8 -2
  8. package/components/CopyButton.js +3 -2
  9. package/components/CtaButton.js +3 -2
  10. package/components/Drawer.js +2 -2
  11. package/components/Drawer.js.LICENSE.txt +1 -1
  12. package/components/DrupalContentPatterns.js +1 -1
  13. package/components/EmbedContainer.js +3 -2
  14. package/components/Footer.js +2 -2
  15. package/components/FormAction.js +3 -2
  16. package/components/FormErrorSummary.js +2 -2
  17. package/components/FormGroup.js +3 -2
  18. package/components/FullWidth.js +3 -2
  19. package/components/Gallery.js +3 -2
  20. package/components/Hero.js +6 -2
  21. package/components/HighlightBox.js +3 -2
  22. package/components/HorizontalBookCard.js +6 -2
  23. package/components/HorizontalBookCard.js.LICENSE.txt +1 -1
  24. package/components/HorizontalCard.js +6 -2
  25. package/components/HorizontalCard.js.LICENSE.txt +1 -1
  26. package/components/IconCard.js +4 -2
  27. package/components/IconCard.js.LICENSE.txt +1 -1
  28. package/components/Legend.js +3 -2
  29. package/components/Loader.js +2 -2
  30. package/components/MegaMenu.js +7 -2
  31. package/components/Notice.js +3 -2
  32. package/components/PageHeader.js +4 -2
  33. package/components/Pager.js +7 -2
  34. package/components/ProgressBar.js +3 -2
  35. package/components/QuoteHighlight.js +3 -2
  36. package/components/QuoteHighlight.js.LICENSE.txt +1 -1
  37. package/components/Radio.js +3 -2
  38. package/components/Range.js +3 -2
  39. package/components/ScrollContainer.js +2 -2
  40. package/components/SegmentedControl.js +6 -2
  41. package/components/Select.js +3 -2
  42. package/components/ServiceNotice.js +4 -2
  43. package/components/ShareButtons.js +4 -2
  44. package/components/ShowMore.js +3 -2
  45. package/components/SkipLink.js +3 -2
  46. package/components/StatsCard.js +5 -2
  47. package/components/StatsCard.js.LICENSE.txt +1 -1
  48. package/components/SyndicationSearchWidget.js +31 -2
  49. package/components/Tab.js +7 -2
  50. package/components/TextCta.js +4 -2
  51. package/components/TextCta.js.LICENSE.txt +1 -1
  52. package/components/TextInput.js +3 -2
  53. package/components/Textarea.js +3 -2
  54. package/components/Tree.js +7 -2
  55. package/components/UserFeedback.js +2 -2
  56. package/components/VerticalCard.js +6 -2
  57. package/components/VerticalCard.js.LICENSE.txt +1 -1
  58. package/components/hydrate.js +2 -2
  59. package/css/style-all.css +16 -10
  60. package/css/style-all.css.map +1 -1
  61. package/css/style-delta.css +16 -10
  62. package/css/style-delta.css.map +1 -1
  63. package/css/style-gutenberg.css +1 -1
  64. package/css/style-irp.css +16 -10
  65. package/css/style-irp.css.map +1 -1
  66. package/css/style-mcr.css +16 -10
  67. package/css/style-mcr.css.map +1 -1
  68. package/css/style-preventionweb.css +16 -10
  69. package/css/style-preventionweb.css.map +1 -1
  70. package/css/style.css +16 -10
  71. package/css/style.css.map +1 -1
  72. package/docs/EDITORIAL-MANUAL.md +2 -2
  73. package/docs/llms-editorial-manual.txt +1 -1
  74. package/docs/llms-page-building.txt +4 -2
  75. package/docs/llms-search-widget.txt +3 -1
  76. package/error-pages/401.html +1 -1
  77. package/error-pages/403.html +1 -1
  78. package/error-pages/404.html +1 -1
  79. package/error-pages/429.html +1 -1
  80. package/error-pages/500.html +1 -1
  81. package/error-pages/502.html +1 -1
  82. package/error-pages/503.html +1 -1
  83. package/error-pages/504.html +1 -1
  84. package/error-pages/5xx.html +1 -1
  85. package/error-pages/challenge.html +1 -1
  86. package/error-pages/managed-challenge.html +1 -1
  87. package/js/dialog.js +205 -0
  88. package/package.json +1 -1
  89. package/scss/Atom/BaseTypography/Code/code.scss +0 -1
  90. package/scss/Atom/Table/table.scss +0 -1
  91. package/scss/Atom/Tag/tag.scss +0 -1
  92. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +18 -0
  93. package/scss/Components/Cards/StatsCard/stats-card.scss +0 -1
  94. package/scss/Components/Dialog/dialog.scss +87 -0
  95. package/scss/Components/MegaMenu/mega-menu.scss +460 -33
  96. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +70 -2
  97. package/scss/Patterns/Content/Publication/publication-record.scss +110 -0
  98. package/scss/Patterns/LandingPages/publication-example.scss +28 -0
  99. package/scss/assets/scss/_components.scss +1 -0
  100. package/scss/assets/scss/_variables.scss +1 -1
@@ -3,7 +3,8 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see QuoteHighlight.js.LICENSE.txt */
9
- import"react";var t={2694(t,e,n){var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==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 e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(t,e,n){t.exports=n(2694)()},6925(t){t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const e={};function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.cw=t=>{var e;return()=>{if(t){var n=t;t=0,e={exports:{}},n.call(e.exports,e,e.exports)}return e.exports}},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r=n.cw(function(t,e){var n=Symbol.for("react.transitional.element");function r(t,e,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==e.key&&(o=""+e.key),"key"in e)for(var i in r={},e)"key"!==i&&(r[i]=e[i]);else r=e;return e=r.ref,{$$typeof:n,type:t,key:o,ref:void 0!==e?e:null,props:r}}Symbol.for("react.fragment"),e.jsx=r,e.jsxs=r}),o=n.cw(function(t,e){t.exports=r()}),i=n(5556),a=n.n(i);function l(t,e){this.v=t,this.k=e}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){var e,n;function r(e,n){try{var i=t[e](n),a=i.value,c=a instanceof l;Promise.resolve(c?a.v:a).then(function(n){if(c){var l="return"===e&&a.k?e:"next";if(!a.k||n.done)return r(l,n);n=t[l](n).value}o(!!i.done,n)},function(t){r("throw",t)})}catch(t){o(2,t)}}function o(t,o){2===t?e.reject(o):e.resolve({value:o,done:t}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,o){return new Promise(function(i,a){var l={key:t,arg:o,resolve:i,reject:a,next:null};n?n=n.next=l:(e=n=l,r(t,o))})},"function"!=typeof t.return&&(this.return=void 0)}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(t){return this._invoke("next",t)},u.prototype.throw=function(t){return this._invoke("throw",t)},u.prototype.return=function(t){return this._invoke("return",t)};const f=Object.entries,p=Object.setPrototypeOf,m=Object.isFrozen,d=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let g=Object.freeze,y=Object.seal,b=Object.create,v="undefined"!=typeof Reflect&&Reflect,S=v.apply,T=v.construct;g||(g=function(t){return t}),y||(y=function(t){return t}),S||(S=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t.apply(e,r)}),T||(T=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const A=B(Array.prototype.forEach);Array.prototype.indexOf;const _=B(Array.prototype.lastIndexOf),w=B(Array.prototype.pop),x=B(Array.prototype.push);Array.prototype.slice;const E=B(Array.prototype.splice),O=Array.isArray,N=B(String.prototype.toLowerCase),k=B(String.prototype.toString),D=B(String.prototype.match),C=B(String.prototype.replace),R=B(String.prototype.indexOf),I=B(String.prototype.trim),L=B(Number.prototype.toString),z=B(Boolean.prototype.toString),M="undefined"==typeof BigInt?null:B(BigInt.prototype.toString),P="undefined"==typeof Symbol?null:B(Symbol.prototype.toString),j=B(Object.prototype.hasOwnProperty),U=B(Object.prototype.toString),F=B(RegExp.prototype.test),H=($=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return T($,e)});var $;function B(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return S(t,e,r)}}function W(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N;if(p&&p(t,null),!O(e))return t;let r=e.length;for(;r--;){let o=e[r];if("string"==typeof o){const t=n(o);t!==o&&(m(e)||(e[r]=t),o=t)}t[o]=!0}return t}function Y(t){for(let e=0;e<t.length;e++)j(t,e)||(t[e]=null);return t}function q(t){const e=b(null);for(const r of f(t)){var n=s(r,2);const o=n[0],i=n[1];j(t,o)&&(O(i)?e[o]=Y(i):i&&"object"==typeof i&&i.constructor===Object?e[o]=q(i):e[o]=i)}return e}function G(t,e){for(;null!==t;){const n=h(t,e);if(n){if(n.get)return B(n.get);if("function"==typeof n.value)return B(n.value)}t=d(t)}return function(){return null}}const X=g(["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"]),K=g(["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"]),V=g(["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"]),Q=g(["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"]),Z=g(["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"]),J=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),tt=g(["#text"]),et=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),nt=g(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),rt=g(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),ot=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),it=y(/{{[\w\W]*|^[\w\W]*}}/g),at=y(/<%[\w\W]*|^[\w\W]*%>/g),lt=y(/\${[\w\W]*/g),ct=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),st=y(/^aria-[\-\w]+$/),ut=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ft=y(/^(?:\w+script|data):/i),pt=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mt=y(/^html$/i),dt=y(/^[a-z][.\w]*(-[.\w]+)+$/i),ht=y(/<[/\w!]/g),gt=y(/<[/\w]/g),yt=y(/<\/no(script|embed|frames)/i),bt=y(/\/>/i),vt=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],St=g(W({},vt)),Tt=function(){const t={};return A(vt,e=>{t[e]=y(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),g(t)}(),At=function(){return"undefined"==typeof window?null:window},_t=function(t,e,n,r){return j(t,e)&&O(t[e])?W(r.base?q(r.base):{},t[e],r.transform):n},wt=function(t,e,n){const r=j(t,e)?t[e]:void 0;return r&&"object"==typeof r?q(r):n()};var xt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At();const n=e=>t(e);if(n.version="3.4.16",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let r=e.document;const o=r,i=o.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,l=e.Node,c=e.Element,s=e.NodeFilter;void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,p=e.trustedTypes,m=c.prototype,d=G(m,"cloneNode"),h=G(m,"remove"),v=G(m,"removeAttributeNode"),S=G(m,"nextSibling"),T=G(m,"childNodes"),$=G(m,"parentNode"),B=G(m,"shadowRoot"),Y=G(m,"attributes"),vt=l&&l.prototype?G(l.prototype,"nodeType"):null,xt=l&&l.prototype?G(l.prototype,"nodeName"):null,Et=l&&l.prototype?G(l.prototype,"ownerDocument"):null,Ot=function(t){return vt?vt(t):t.nodeType},Nt=function(t){return xt?xt(t):t.nodeName};if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let kt,Dt,Ct="",Rt=!1,It=0;const Lt=function(){if(It>0)throw H('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},zt=function(t){Lt(),It++;try{return kt.createHTML(t)}finally{It--}},Mt=r,Pt=Mt.implementation,jt=Mt.createNodeIterator,Ut=Mt.createDocumentFragment,Ft=Mt.getElementsByTagName,Ht=o.importNode;let $t={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof f&&"function"==typeof $&&Pt&&void 0!==Pt.createHTMLDocument;const Bt=it,Wt=at,Yt=lt,qt=ct,Gt=st,Xt=ft,Kt=pt,Vt=dt;let Qt=ut,Zt=null;const Jt=W({},[...X,...K,...V,...Z,...tt]);let te=null;const ee=W({},[...et,...nt,...rt,...ot]);let ne=Object.seal(b(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}})),re=null,oe=null;const ie=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ae=!0,le=!0,ce=!1,se=!0,ue=!1,fe=!0,pe=!1,me=!1,de=null,he=null,ge=!1,ye=!1,be=!1,ve=!1,Se=!0,Te=!1;const Ae="user-content-";let _e=!0,we=!1,xe={},Ee=null;const Oe=W({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ne=null;const ke=W({},["audio","video","img","source","image","track"]);let De=null;const Ce=W({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Re="http://www.w3.org/1998/Math/MathML",Ie="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml";let ze=Le,Me=!1,Pe=null;const je=W({},[Re,Ie,Le],k),Ue=g(["mi","mo","mn","ms","mtext"]);let Fe=W({},Ue);const He=g(["annotation-xml"]);let $e=W({},He);const Be=W({},["title","style","font","a","script"]);let We=null;const Ye=["application/xhtml+xml","text/html"];let qe=null,Ge=null;const Xe=r.createElement("form"),Ke=function(t){return t instanceof RegExp||t instanceof Function},Ve=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ge&&Ge===t)return;t&&"object"==typeof t||(t={}),t=q(t),We=-1===Ye.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,qe="application/xhtml+xml"===We?k:N,Zt=_t(t,"ALLOWED_TAGS",Jt,{transform:qe}),te=_t(t,"ALLOWED_ATTR",ee,{transform:qe}),Pe=_t(t,"ALLOWED_NAMESPACES",je,{transform:k}),De=_t(t,"ADD_URI_SAFE_ATTR",Ce,{transform:qe,base:Ce}),Ne=_t(t,"ADD_DATA_URI_TAGS",ke,{transform:qe,base:ke}),Ee=_t(t,"FORBID_CONTENTS",Oe,{transform:qe}),re=_t(t,"FORBID_TAGS",q({}),{transform:qe}),oe=_t(t,"FORBID_ATTR",q({}),{transform:qe}),xe=!!j(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?q(t.USE_PROFILES):t.USE_PROFILES),ae=!1!==t.ALLOW_ARIA_ATTR,le=!1!==t.ALLOW_DATA_ATTR,ce=t.ALLOW_UNKNOWN_PROTOCOLS||!1,se=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,ue=t.SAFE_FOR_TEMPLATES||!1,fe=!1!==t.SAFE_FOR_XML,pe=t.WHOLE_DOCUMENT||!1,ye=t.RETURN_DOM||!1,be=t.RETURN_DOM_FRAGMENT||!1,ve=t.RETURN_TRUSTED_TYPE||!1,ge=t.FORCE_BODY||!1,Se=!1!==t.SANITIZE_DOM,Te=t.SANITIZE_NAMED_PROPS||!1,_e=!1!==t.KEEP_CONTENT,we=t.IN_PLACE||!1,Qt=function(t){try{return F(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:ut,ze="string"==typeof t.NAMESPACE?t.NAMESPACE:Le,Fe=wt(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>W({},Ue)),$e=wt(t,"HTML_INTEGRATION_POINTS",()=>W({},He));const e=wt(t,"CUSTOM_ELEMENT_HANDLING",()=>b(null));if(ne=b(null),j(e,"tagNameCheck")&&Ke(e.tagNameCheck)&&(ne.tagNameCheck=e.tagNameCheck),j(e,"attributeNameCheck")&&Ke(e.attributeNameCheck)&&(ne.attributeNameCheck=e.attributeNameCheck),j(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ne.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),y(ne),ue&&(le=!1),be&&(ye=!0),xe&&(Zt=W({},tt),te=b(null),!0===xe.html&&(W(Zt,X),W(te,et)),!0===xe.svg&&(W(Zt,K),W(te,nt),W(te,ot)),!0===xe.svgFilters&&(W(Zt,V),W(te,nt),W(te,ot)),!0===xe.mathMl&&(W(Zt,Z),W(te,rt),W(te,ot))),ie.tagCheck=null,ie.attributeCheck=null,j(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?ie.tagCheck=t.ADD_TAGS:O(t.ADD_TAGS)&&(Zt===Jt&&(Zt=q(Zt)),W(Zt,t.ADD_TAGS,qe))),j(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?ie.attributeCheck=t.ADD_ATTR:O(t.ADD_ATTR)&&(te===ee&&(te=q(te)),W(te,t.ADD_ATTR,qe))),j(t,"ADD_FORBID_CONTENTS")&&O(t.ADD_FORBID_CONTENTS)&&(Ee===Oe&&(Ee=q(Ee)),W(Ee,t.ADD_FORBID_CONTENTS,qe)),_e&&(Zt["#text"]=!0),pe&&W(Zt,["html","head","body"]),Zt.table&&(W(Zt,["tbody"]),delete re.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw H('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw H('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=kt;kt=t.TRUSTED_TYPES_POLICY;try{Ct=zt("")}catch(t){throw kt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(kt=void 0,Ct=""):(void 0===kt&&(Rt||(Dt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i),Rt=!0),kt=Dt),kt&&"string"==typeof Ct&&(Ct=zt("")));g&&g(t),Ge=t},Qe=W({},[...K,...V,...Q]),Ze=W({},[...Z,...J]),Je=function(t){x(n.removed,{element:t});try{$(t).removeChild(t)}catch(e){if(h(t),!$(t))throw H("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tn=function(t,e,n){try{v(t,e)}catch(e){try{t.removeAttribute(n)}catch(t){}}},en=function(t){on(t);const e=T(t);if(e){const t=[];A(e,e=>{x(t,e)}),A(t,t=>{try{h(t)}catch(t){}})}const n=Y(t);if(n)for(let e=n.length-1;e>=0;--e){const r=n[e],o=r&&r.name;"string"==typeof o&&tn(t,r,o)}},nn=function(t,e,r){if(!r)try{r=e.getAttributeNode(t)}catch(t){r=null}x(n.removed,{attribute:r||null,from:e});try{r?v(e,r):e.removeAttribute(t)}catch(n){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(ye||be)try{Je(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},rn=function(t){const e=Y(t);if(e)for(let n=e.length-1;n>=0;--n){const r=e[n],o=r&&r.name;"string"!=typeof o||te[qe(o)]||tn(t,r,o)}},on=function(t){const e=[t];for(;e.length>0;){const t=e.pop();1===Ot(t)&&rn(t);const n=T(t);if(n)for(let t=n.length-1;t>=0;--t)e.push(n[t])}},an=function(t,e){return!!fe&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},ln=function(t){let e=null,n=null;if(ge)t="<remove></remove>"+t;else{const e=D(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===We&&ze===Le&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=kt?zt(t):t;if(ze===Le)try{e=(new u).parseFromString(o,We)}catch(t){}if(!e||!e.documentElement){e=Pt.createDocument(ze,"template",null);try{e.documentElement.innerHTML=Me?Ct:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ze===Le?Ft.call(e,pe?"html":"body")[0]:pe?e.documentElement:i},cn=function(t){const e=Et?Et(t):t.ownerDocument;return jt.call(e||t,t,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},sn=function(t){return t=C(t,Bt," "),t=C(t,Wt," "),C(t,Yt," ")},un=function(t){var e;t.normalize();const n=Et?Et(t):t.ownerDocument,r=jt.call(n||t,t,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let o=r.nextNode();for(;o;)o.data=sn(o.data),o=r.nextNode();const i=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");i&&A(i,t=>{pn(t.content)&&un(t.content)})},fn=function(t){const e=xt?xt(t):null;return"string"==typeof e&&"form"===qe(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==Y(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.removeAttributeNode||"function"!=typeof t.getAttributeNode||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==vt(t)||t.childNodes!==T(t))},pn=function(t){if(!vt||"object"!=typeof t||null===t)return!1;try{return 11===vt(t)}catch(t){return!1}},mn=function(t){if(!vt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof vt(t)}catch(t){return!1}};function dn(t,e,r){0!==t.length&&A(t,t=>{t.call(n,e,r,Ge)})}const hn=function(t,e){if(t instanceof RegExp)return F(t,e);if(t instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Boolean(t(e,...r))}return!1},gn=function(t,e,n,r){return 0===t.length?e:e===n||e===r?q(e):e},yn=function(t,e){return t!==e&&null===$(t)&&(we&&on(t),!0)},bn=function(t,e){if(dn($t.beforeSanitizeElements,t,null),yn(t,e))return!0;if(fn(t))return Je(t),!0;const r=qe(Nt(t));if(Zt=gn($t.uponSanitizeElement,Zt,Jt,de),dn($t.uponSanitizeElement,t,{tagName:r,allowedTags:Zt}),yn(t,e))return!0;if(function(t,e){return!!(fe&&t.hasChildNodes()&&!mn(t.firstElementChild)&&F(ht,t.textContent)&&F(ht,t.innerHTML))||!!(fe&&t.namespaceURI===Le&&St[e]&&(mn(t.firstElementChild)||"string"==typeof t.textContent&&F(Tt[e],t.textContent)))||7===t.nodeType||!(!fe||8!==t.nodeType||!F(gt,t.data))}(t,r))return Je(t),!0;if(re[r]||!(ie.tagCheck instanceof Function&&ie.tagCheck(r))&&!Zt[r]){const n=function(t,e,n){if(!re[e]&&Tn(e)&&hn(ne.tagNameCheck,e))return!1;if(_e&&!Ee[e]){const e=$(t),r=T(t);if(r&&e)for(let o=r.length-1;o>=0;--o){const i=t===n?d(r[o],!0):r[o];e.insertBefore(i,S(t))}}return Je(t),!0}(t,r,e);return!(!1!==n||(dn($t.afterSanitizeElements,t,null),!yn(t,e)))||n}if(1===Ot(t)&&!function(t){let e=$(t);e&&e.tagName||(e={namespaceURI:ze,tagName:"template"});const n=N(t.tagName),r=N(e.tagName);return!!Pe[t.namespaceURI]&&(t.namespaceURI===Ie?function(t,e,n){return e.namespaceURI===Le?"svg"===t:e.namespaceURI===Re?"svg"===t&&("annotation-xml"===n||Fe[n]):Boolean(Qe[t])}(n,e,r):t.namespaceURI===Re?function(t,e,n){return e.namespaceURI===Le?"math"===t:e.namespaceURI===Ie?"math"===t&&$e[n]:Boolean(Ze[t])}(n,e,r):t.namespaceURI===Le?function(t,e,n){return!(e.namespaceURI===Ie&&!$e[n])&&!(e.namespaceURI===Re&&!Fe[n])&&!Ze[t]&&(Be[t]||!Qe[t])}(n,e,r):!("application/xhtml+xml"!==We||!Pe[t.namespaceURI]))}(t))return Je(t),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&F(yt,t.innerHTML))return Je(t),!0;if(ue&&3===t.nodeType){const e=sn(t.textContent);t.textContent!==e&&(x(n.removed,{element:t.cloneNode()}),t.textContent=e)}return dn($t.afterSanitizeElements,t,null),yn(t,e)},vn=function(t,e,n){if(oe[e])return!1;if(an(e,t))return!1;if(Se&&("id"===e||"name"===e)&&(n in r||n in Xe))return!1;const o=te[e]||ie.attributeCheck instanceof Function&&ie.attributeCheck(e,t);return!(!le||!F(qt,e))||!(!ae||!F(Gt,e))||(o?!(!De[e]&&!F(Qt,C(n,Kt,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==R(n,"data:")||!Ne[t])&&(!ce||F(Xt,C(n,Kt,"")))&&n):Tn(t)&&hn(ne.tagNameCheck,t)&&hn(ne.attributeNameCheck,e,t)||"is"===e&&ne.allowCustomizedBuiltInElements&&hn(ne.tagNameCheck,n))},Sn=W({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tn=function(t){return!Sn[N(t)]&&F(Vt,t)},An=function(t,e,n,r){if(kt&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(t,e)){case"TrustedHTML":return zt(r);case"TrustedScriptURL":return function(t){Lt(),It++;try{return kt.createScriptURL(t)}finally{It--}}(r)}return r},_n=function(t,e,n,r){try{return n?t.setAttributeNS(n,e,r):t.setAttribute(e,r),!fn(t)||(Je(t),!1)}catch(n){return nn(e,t),!1}},wn=function(t,e){if(dn($t.beforeSanitizeAttributes,t,null),yn(t,e))return;const r=t.attributes;if(!r||fn(t))return;te=gn($t.uponSanitizeAttribute,te,ee,he);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let i=r.length;const a=qe(t.nodeName);for(;i--;){const e=r[i],l=e.name,c=e.namespaceURI,s=e.value,u=qe(l),f=s;let p="value"===l?f:I(f),m=!1;o.attrName=u,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,dn($t.uponSanitizeAttribute,t,o),p=o.attrValue,!Te||"id"!==u&&"name"!==u||0===R(p,Ae)||(nn(l,t,e),p=Ae+p,m=!0),fe&&F(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===u&&D(p,"href")?nn(l,t,e):o.forceKeepAttr||(!o.keepAttr||!se&&F(bt,p)?nn(l,t,e):(ue&&(p=sn(p)),vn(a,u,p)?(p=An(a,u,c,p),p!==f&&_n(t,l,c,p)&&m&&w(n.removed)):nn(l,t,e)))}dn($t.afterSanitizeAttributes,t,null),yn(t,e)},xn=function(t){let e=null;const n=cn(t);for(dn($t.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(dn($t.uponSanitizeShadowNode,e,null),bn(e,t),wn(e,t),pn(e.content)&&xn(e.content),1===Ot(e)){const t=B(e);pn(t)&&(En(t),xn(t))}dn($t.afterSanitizeShadowDOM,t,null)},En=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){xn(t.shadow);continue}const n=t.node,r=1===Ot(n),o=T(n);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(r){const t=xt?xt(n):null;if("string"==typeof t&&"template"===qe(t)){const t=n.content;pn(t)&&e.push({node:t,shadow:null})}}if(r){const t=B(n);pn(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Me=!t,Me&&(t="\x3c!--\x3e"),"string"!=typeof t&&!mn(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return L(t);case"boolean":return z(t);case"bigint":return M?M(t):"0";case"symbol":return P?P(t):"Symbol()";case"undefined":default:return U(t);case"function":case"object":{if(null===t)return U(t);const e=t,n=G(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:U(t)}return U(t)}}}(t)))throw H("dirty is not a string, aborting");if(!n.isSupported)return t;me?(Zt=de,te=he):Ve(e),($t.uponSanitizeElement.length>0||$t.uponSanitizeAttribute.length>0)&&(Zt=q(Zt)),$t.uponSanitizeAttribute.length>0&&(te=q(te)),n.removed=[];const c=we&&"string"!=typeof t&&mn(t);if(c){!function(t){if(!fe)return;const e=[t];for(;e.length>0;){const t=e.pop(),n=Ot(t);if(7===n||8===n&&F(gt,t.data)){try{h(t)}catch(t){}continue}if(1===n){const e=t,n=qe(Nt(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&an("for",n)&&e.removeAttribute("for")}catch(t){}}const r=T(t);if(r)for(let t=r.length-1;t>=0;--t)e.push(r[t])}}(t);const e=Nt(t);if("string"==typeof e){const n=qe(e);if(!Zt[n]||re[n])throw en(t),H("root node is forbidden and cannot be sanitized in-place")}if(fn(t))throw en(t),H("root node is clobbered and cannot be sanitized in-place");try{En(t)}catch(e){throw en(t),e}}else if(mn(t))r=ln("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),En(r);else{if(!ye&&!ue&&!pe&&-1===t.indexOf("<"))return kt&&ve?zt(t):t;if(r=ln(t),!r)return ye?null:ve?Ct:""}r&&ge&&Je(r.firstChild);const s=c?t:r;try{const t=cn(s);for(;a=t.nextNode();)bn(a,s),wn(a,s),pn(a.content)&&xn(a.content)}catch(e){throw c&&(en(t),A(n.removed,t=>{t.element&&on(t.element)})),e}if(c){let e=!1;if(A(n.removed,n=>{n.element&&(n.element===t&&(e=!0),on(n.element))}),e)throw H("a node selected for removal could not be safely returned; refusing to sanitize in place");return ue&&un(t),t}if(ye){if(ue&&un(r),be)for(l=Ut.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(te.shadowroot||te.shadowrootmode)&&(l=Ht.call(o,l,!0)),l}let u=pe?r.outerHTML:r.innerHTML;return pe&&Zt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&F(mt,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),ue&&(u=sn(u)),kt&&ve?zt(u):u},n.setConfig=function(){Ve(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),me=!0,de=Zt,he=te},n.clearConfig=function(){Ge=null,me=!1,de=null,he=null,kt=Dt,Ct=""},n.isValidAttribute=function(t,e,n){Ge||Ve({});const r=qe(t),o=qe(e);return vn(r,o,n)},n.addHook=function(t,e){"function"==typeof e&&j($t,t)&&x($t[t],e)},n.removeHook=function(t,e){if(j($t,t)){if(void 0!==e){const n=_($t[t],e);return-1===n?void 0:E($t[t],n,1)[0]}return w($t[t])}},n.removeHooks=function(t){j($t,t)&&($t[t]=[])},n.removeAllHooks=function(){$t={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();o();const Et=({quote:t,attribution:e,attributionTitle:n,imageSrc:o,imageAlt:i,backgroundColor:a="light",variant:l="line",alignment:c="full",className:s="",...u})=>{const f="mg-quote-highlight",p=!!o;return(0,r().jsxs)("section",{className:`${f} ${f}--${a} ${f}--${l} ${f}--${c} ${p?`${f}--has-image`:""} ${s}`,...u,children:[(0,r().jsxs)("div",{className:`${f}__content`,children:[(0,r().jsx)("blockquote",{className:`${f}__quote`,children:"string"!=typeof t||t.includes("<")?(0,r().jsx)("span",{dangerouslySetInnerHTML:{__html:xt.sanitize(t)}}):(0,r().jsx)("p",{children:t})}),"line"===l&&(0,r().jsx)("div",{className:`${f}__separator`}),(e||n||p)&&(0,r().jsx)("div",{className:`${f}__attribution`,children:(0,r().jsxs)("div",{className:`${f}__attribution-wrapper`,children:[p&&(0,r().jsx)("div",{className:`${f}__portrait-container`,children:(0,r().jsx)("img",{src:o,alt:i||`${e||"Quote"} image`,className:`${f}__portrait`})}),(e||n)&&(0,r().jsxs)("div",{className:`${f}__attribution-text`,children:[e&&(0,r().jsx)("p",{className:`${f}__attribution-name`,dangerouslySetInnerHTML:{__html:xt.sanitize(e)}}),n&&(0,r().jsx)("p",{className:`${f}__attribution-title`,dangerouslySetInnerHTML:{__html:xt.sanitize(n)}})]})]})})]}),"image"===l&&p&&(0,r().jsx)("div",{className:`${f}__image-container`,children:(0,r().jsx)("img",{src:o,alt:i||`${e||"Quote"} image`,className:`${f}__image`})})]})};Et.propTypes={quote:a().string.isRequired,attribution:a().string,attributionTitle:a().string,imageSrc:a().string,imageAlt:a().string,backgroundColor:a().oneOf(["light","dark","bright"]),variant:a().oneOf(["line","image"]),alignment:a().oneOf(["full","left","right"]),className:a().string};const Ot=Et;function Nt(t){const{dataset:e}=t;return{quote:e.quote||"",attribution:e.attribution||void 0,attributionTitle:e.attributionTitle||void 0,imageSrc:e.imageSrc||void 0,imageAlt:e.imageAlt||void 0,backgroundColor:e.backgroundColor||"light",variant:e.variant||"line",alignment:e.alignment||"full"}}export{Ot as default,Nt as fromElement};
9
+ import"react";var t={2694(t,e,n){var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==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 e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(t,e,n){t.exports=n(2694)()},6925(t){t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const e={};function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.cw=t=>{var e;return()=>{if(t){var n=t;t=0,e={exports:{}},n.call(e.exports,e,e.exports)}return e.exports}},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r=/*#__PURE__*/n.cw((t,e)=>{var n=Symbol.for("react.transitional.element");function r(t,e,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==e.key&&(o=""+e.key),"key"in e)for(var i in r={},e)"key"!==i&&(r[i]=e[i]);else r=e;return e=r.ref,{$$typeof:n,type:t,key:o,ref:void 0!==e?e:null,props:r}}Symbol.for("react.fragment"),e.jsx=r,e.jsxs=r}),o=/*#__PURE__*/n.cw(t=>{t.exports=r()}),i=/*#__PURE__*/n(5556),a=/*#__PURE__*/n.n(i);function l(t,e){this.v=t,this.k=e}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){var e,n;function r(e,n){try{var i=t[e](n),a=i.value,c=a instanceof l;Promise.resolve(c?a.v:a).then(function(n){if(c){var l="return"===e&&a.k?e:"next";if(!a.k||n.done)return r(l,n);n=t[l](n).value}o(!!i.done,n)},function(t){r("throw",t)})}catch(t){o(2,t)}}function o(t,o){2===t?e.reject(o):e.resolve({value:o,done:t}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,o){return new Promise(function(i,a){var l={key:t,arg:o,resolve:i,reject:a,next:null};n?n=n.next=l:(e=n=l,r(t,o))})},"function"!=typeof t.return&&(this.return=void 0)}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(t){return this._invoke("next",t)},u.prototype.throw=function(t){return this._invoke("throw",t)},u.prototype.return=function(t){return this._invoke("return",t)};const f=Object.entries,p=Object.setPrototypeOf,m=Object.isFrozen,d=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let g=Object.freeze,y=Object.seal,b=Object.create,S="undefined"!=typeof Reflect&&Reflect,v=S.apply,T=S.construct;g||(g=function(t){return t}),y||(y=function(t){return t}),v||(v=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t.apply(e,r)}),T||(T=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const A=q(Array.prototype.forEach);Array.prototype.indexOf;const _=q(Array.prototype.lastIndexOf),w=q(Array.prototype.pop),x=q(Array.prototype.push),E=q(Array.prototype.slice),O=q(Array.prototype.splice),N=Array.isArray,k=G(Set),D=q(Set.prototype.add),C=q(Set.prototype.has),R=q(String.prototype.toLowerCase),I=q(String.prototype.toString),L=q(String.prototype.match),z=q(String.prototype.replace),M=q(String.prototype.indexOf),P=q(String.prototype.trim),j=q(Number.prototype.toString),U=q(Boolean.prototype.toString),F="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),H="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),$=q(Object.prototype.hasOwnProperty),B=q(Object.prototype.toString),W=q(RegExp.prototype.test),Y=G(TypeError);function q(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return v(t,e,r)}}function G(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return T(t,n)}}function X(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R;if(p&&p(t,null),!N(e))return t;let r=e.length;for(;r--;){let o=e[r];if("string"==typeof o){const t=n(o);t!==o&&(m(e)||(e[r]=t),o=t)}t[o]=!0}return t}function K(t){for(let e=0;e<t.length;e++)$(t,e)||(t[e]=null);return t}function V(t){const e=b(null);for(const r of f(t)){var n=s(r,2);const o=n[0],i=n[1];$(t,o)&&(N(i)?e[o]=K(i):i&&"object"==typeof i&&i.constructor===Object?e[o]=V(i):e[o]=i)}return e}function Q(t,e){for(;null!==t;){const n=h(t,e);if(n){if(n.get)return q(n.get);if("function"==typeof n.value)return q(n.value)}t=d(t)}return function(){return null}}const Z=g(["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"]),J=g(["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"]),tt=g(["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"]),et=g(["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"]),nt=g(["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"]),rt=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ot=g(["#text"]),it=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),at=g(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),lt=g(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),ct=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),st=y(/{{[\w\W]*|^[\w\W]*}}/g),ut=y(/<%[\w\W]*|^[\w\W]*%>/g),ft=y(/\${[\w\W]*/g),pt=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),mt=y(/^aria-[\-\w]+$/),dt=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ht=y(/^(?:\w+script|data):/i),gt=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yt=y(/^html$/i),bt=y(/^[a-z][.\w]*(-[.\w]+)+$/i),St=y(/<[/\w!]/g),vt=y(/<[/\w]/g),Tt=y(/<\/no(script|embed|frames)/i),At=y(/\/>/i),_t=g(X({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),wt=function(){return"undefined"==typeof window?null:window},xt=function(t,e,n,r){return $(t,e)&&N(t[e])?X(r.base?V(r.base):{},t[e],r.transform):n},Et=function(t,e,n){const r=$(t,e)?t[e]:void 0;return r&&"object"==typeof r?V(r):n()};var Ot=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt();const n=e=>t(e);if(n.version="3.4.17",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let r=e.document;const o=r,i=o.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,l=e.Node,c=e.Element,s=e.NodeFilter;void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,p=e.trustedTypes,m=c.prototype,S=Q(m,"cloneNode"),v=Q(m,"remove"),T=Q(m,"removeAttributeNode"),G=Q(m,"nextSibling"),K=Q(m,"childNodes"),Ot=Q(m,"parentNode"),Nt=Q(m,"shadowRoot"),kt=Q(m,"attributes"),Dt=l&&l.prototype?Q(l.prototype,"nodeType"):null,Ct=l&&l.prototype?Q(l.prototype,"nodeName"):null,Rt=l&&l.prototype?Q(l.prototype,"ownerDocument"):null,It=function(t){return Dt?Dt(t):t.nodeType},Lt=function(t){return Ct?Ct(t):t.nodeName},zt=function(t){for(;null!==t;){const e=h(t,"namespaceURI");if(e)return e.get?q(e.get):null;t=d(t)}return null}(m),Mt=function(t){return zt?zt(t):t.namespaceURI};if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let Pt,jt,Ut="",Ft=!1,Ht=0;const $t=function(){if(Ht>0)throw Y('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Bt=function(t){$t(),Ht++;try{return Pt.createHTML(t)}finally{Ht--}},Wt=r,Yt=Wt.implementation,qt=Wt.createNodeIterator,Gt=Wt.createDocumentFragment,Xt=Wt.getElementsByTagName,Kt=o.importNode;let Vt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof f&&"function"==typeof Ot&&Yt&&void 0!==Yt.createHTMLDocument;const Qt=st,Zt=ut,Jt=ft,te=pt,ee=mt,ne=ht,re=gt,oe=bt;let ie=dt,ae=null;const le=X({},[...Z,...J,...tt,...nt,...ot]);let ce=null;const se=X({},[...it,...at,...lt,...ct]);let ue=Object.seal(b(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}})),fe=null,pe=null;const me=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let de=!0,he=!0,ge=!1,ye=!0,be=!1,Se=!0,ve=!1,Te=!1,Ae=null,_e=null,we=!1,xe=!1,Ee=!1,Oe=!1,Ne=!0,ke=!1;const De="user-content-";let Ce=!0,Re=!1,Ie=null,Le={},ze=null;const Me=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Pe=null;const je=X({},["audio","video","img","source","image","track"]);let Ue=null;const Fe=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let We=Be,Ye=!1,qe=null;const Ge=X({},[He,$e,Be],I),Xe=g(["mi","mo","mn","ms","mtext"]);let Ke=X({},Xe);const Ve=g(["annotation-xml"]);let Qe=X({},Ve);const Ze=X({},["title","style","font","a","script"]);let Je=null;const tn=["application/xhtml+xml","text/html"];let en=null,nn=null;const rn=r.createElement("form"),on=function(t){return t instanceof RegExp||t instanceof Function},an=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(nn&&nn===t)return;t&&"object"==typeof t||(t={}),t=V(t),Je=-1===tn.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,en="application/xhtml+xml"===Je?I:R,ae=xt(t,"ALLOWED_TAGS",le,{transform:en}),ce=xt(t,"ALLOWED_ATTR",se,{transform:en}),qe=xt(t,"ALLOWED_NAMESPACES",Ge,{transform:I}),Ue=xt(t,"ADD_URI_SAFE_ATTR",Fe,{transform:en,base:Fe}),Pe=xt(t,"ADD_DATA_URI_TAGS",je,{transform:en,base:je}),ze=xt(t,"FORBID_CONTENTS",Me,{transform:en}),fe=xt(t,"FORBID_TAGS",V({}),{transform:en}),pe=xt(t,"FORBID_ATTR",V({}),{transform:en}),Le=!!$(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?V(t.USE_PROFILES):t.USE_PROFILES),de=!1!==t.ALLOW_ARIA_ATTR,he=!1!==t.ALLOW_DATA_ATTR,ge=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ye=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,be=t.SAFE_FOR_TEMPLATES||!1,Se=!1!==t.SAFE_FOR_XML,ve=t.WHOLE_DOCUMENT||!1,xe=t.RETURN_DOM||!1,Ee=t.RETURN_DOM_FRAGMENT||!1,Oe=t.RETURN_TRUSTED_TYPE||!1,we=t.FORCE_BODY||!1,Ne=!1!==t.SANITIZE_DOM,ke=t.SANITIZE_NAMED_PROPS||!1,Ce=!1!==t.KEEP_CONTENT,Re=t.IN_PLACE||!1,ie=function(t){try{return W(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:dt,We="string"==typeof t.NAMESPACE?t.NAMESPACE:Be,Ke=Et(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>X({},Xe)),Qe=Et(t,"HTML_INTEGRATION_POINTS",()=>X({},Ve));const e=Et(t,"CUSTOM_ELEMENT_HANDLING",()=>b(null));if(ue=b(null),$(e,"tagNameCheck")&&on(e.tagNameCheck)&&(ue.tagNameCheck=e.tagNameCheck),$(e,"attributeNameCheck")&&on(e.attributeNameCheck)&&(ue.attributeNameCheck=e.attributeNameCheck),$(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ue.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),y(ue),be&&(he=!1),Ee&&(xe=!0),Le&&(ae=X({},ot),ce=b(null),!0===Le.html&&(X(ae,Z),X(ce,it)),!0===Le.svg&&(X(ae,J),X(ce,at),X(ce,ct)),!0===Le.svgFilters&&(X(ae,tt),X(ce,at),X(ce,ct)),!0===Le.mathMl&&(X(ae,nt),X(ce,lt),X(ce,ct))),me.tagCheck=null,me.attributeCheck=null,$(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?me.tagCheck=t.ADD_TAGS:N(t.ADD_TAGS)&&(ae===le&&(ae=V(ae)),X(ae,t.ADD_TAGS,en))),$(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?me.attributeCheck=t.ADD_ATTR:N(t.ADD_ATTR)&&(ce===se&&(ce=V(ce)),X(ce,t.ADD_ATTR,en))),$(t,"ADD_FORBID_CONTENTS")&&N(t.ADD_FORBID_CONTENTS)&&(ze===Me&&(ze=V(ze)),X(ze,t.ADD_FORBID_CONTENTS,en)),Ce&&(ae["#text"]=!0),ve&&X(ae,["html","head","body"]),ae.table&&(X(ae,["tbody"]),delete fe.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw Y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw Y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Pt;Pt=t.TRUSTED_TYPES_POLICY;try{Ut=Bt("")}catch(t){throw Pt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(Pt=void 0,Ut=""):(void 0===Pt&&(Ft||(jt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i),Ft=!0),Pt=jt),Pt&&"string"==typeof Ut&&(Ut=Bt("")));g&&g(t),nn=t},ln=X({},[...J,...tt,...et]),cn=X({},[...nt,...rt]),sn=function(t){x(n.removed,{element:t});try{Ot(t).removeChild(t)}catch(e){if(v(t),!Ot(t))throw Y("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},un=function(t,e,n){try{T(t,e)}catch(e){try{t.removeAttribute(n)}catch(t){}}},fn=function(t){hn(t);const e=K(t);e&&A(E(e),t=>{try{v(t)}catch(t){}});const n=1===It(t)?kt(t):null;if(n)for(let e=n.length-1;e>=0;--e){const r=n[e],o=r&&r.name;"string"==typeof o&&un(t,r,o)}},pn=function(t,e,r){if(!r)try{r=e.getAttributeNode(t)}catch(t){r=null}x(n.removed,{attribute:r||null,from:e});try{r?T(e,r):e.removeAttribute(t)}catch(n){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(xe||Ee)try{sn(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},mn=function(t){const e=kt(t);if(e)for(let n=e.length-1;n>=0;--n){const r=e[n],o=r&&r.name;"string"!=typeof o||ce[en(o)]||un(t,r,o)}},dn=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[t];for(;r.length>0;){const t=r.pop();if(!1===e(t))continue;if(n&&1===It(t)){const e=Nt(t);En(e)&&r.push(e)}const o=K(t);if(o)for(let t=o.length-1;t>=0;--t)r.push(o[t])}},hn=function(t){dn(t,t=>{1===It(t)&&mn(t)})},gn=function(t){const e=[];return dn(t,t=>{e.push(t)},!0),e},yn=function(t,e){let r=!1;return A(n.removed,e=>{e.element&&(r=r||e.element===t,hn(e.element))}),function(t,e){const n=k();A(gn(t),t=>{1===It(t)&&D(n,t)}),A(e,t=>{1!==It(t)||C(n,t)||mn(t)})}(t,e),r},bn=function(t,e,n,r){const o=Tn(t);let i;for(;i=o.nextNode();)C(r,i)&&!C(Ie,i)&&(e&&Nn(Vt.uponSanitizeShadowNode,i,null),Rn(i,n),Un(i,n),En(i.content)&&Fn(i.content))},Sn=function(t,e){return!!Se&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},vn=function(t){let e=null,n=null;if(we)t="<remove></remove>"+t;else{const e=L(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Je&&We===Be&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Pt?Bt(t):t;if(We===Be)try{e=(new u).parseFromString(o,Je)}catch(t){}if(!e||!e.documentElement){e=Yt.createDocument(We,"template",null);try{e.documentElement.innerHTML=Ye?Ut:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),We===Be?Xt.call(e,ve?"html":"body")[0]:ve?e.documentElement:i},Tn=function(t){const e=Rt?Rt(t):t.ownerDocument;return qt.call(e||t,t,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},An=function(t){return t=z(t,Qt," "),t=z(t,Zt," "),z(t,Jt," ")},_n=function(t){var e;wn(t);const n=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");n&&A(n,t=>{En(t.content)&&_n(t.content)})},wn=function(t){t.normalize();const e=Rt?Rt(t):t.ownerDocument,n=qt.call(e||t,t,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=An(r.data),r=n.nextNode()},xn=function(t){const e=Ct?Ct(t):null;return"string"==typeof e&&"form"===en(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==kt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.removeAttributeNode||"function"!=typeof t.getAttributeNode||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Dt(t)||t.childNodes!==K(t))},En=function(t){if(!Dt||"object"!=typeof t||null===t)return!1;try{return 11===Dt(t)}catch(t){return!1}},On=function(t){if(!Dt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Dt(t)}catch(t){return!1}};function Nn(t,e,r){0!==t.length&&A(t,t=>{t.call(n,e,r,nn)})}const kn=function(t,e){if(t instanceof RegExp)return W(t,e);if(t instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Boolean(t(e,...r))}return!1},Dn=function(t,e,n,r){return 0===t.length?e:e===n||e===r?V(e):e},Cn=function(t,e){return t!==e&&null===Ot(t)&&(Re&&hn(t),!0)},Rn=function(t,e){if(Ie&&D(Ie,t),Nn(Vt.beforeSanitizeElements,t,null),Cn(t,e))return!0;if(xn(t))return sn(t),!0;const r=en(Lt(t));if(ae=Dn(Vt.uponSanitizeElement,ae,le,Ae),Nn(Vt.uponSanitizeElement,t,{tagName:r,allowedTags:ae}),Cn(t,e))return!0;if(function(t,e){return!!(Se&&t.hasChildNodes()&&!On(t.firstElementChild)&&W(St,t.textContent)&&W(St,t.innerHTML))||!!(Se&&_t[e]&&1===It(t)&&Mt(t)===Be&&(On(t.firstElementChild)||"string"==typeof t.textContent&&W(St,t.textContent)))||7===t.nodeType||!(!Se||8!==t.nodeType||!W(vt,t.data))}(t,r))return sn(t),!0;if(fe[r]||!(me.tagCheck instanceof Function&&me.tagCheck(r))&&!ae[r]){const n=function(t,e,n){if(!fe[e]&&zn(e)&&kn(ue.tagNameCheck,e))return!1;if(Ce&&!ze[e]&&!ze[R(e)]){const e=Ot(t),r=K(t);if(r&&e)for(let o=r.length-1;o>=0;--o){const i=t===n?S(r[o],!0):r[o];e.insertBefore(i,G(t))}}return sn(t),!0}(t,r,e);return!(!1!==n||(Nn(Vt.afterSanitizeElements,t,null),!Cn(t,e)))||n}if(1===It(t)&&!function(t){const e=Mt(t),n=R(Lt(t)),r=Ot(t);let o,i;return r&&1===It(r)?(o={namespaceURI:Mt(r)},i=R(Lt(r))):(o={namespaceURI:We},i="template"),!!qe[e]&&(e===$e?function(t,e,n){return e.namespaceURI===Be?"svg"===t:e.namespaceURI===He?"svg"===t&&("annotation-xml"===n||Ke[n]):Boolean(ln[t])}(n,o,i):e===He?function(t,e,n){return e.namespaceURI===Be?"math"===t:e.namespaceURI===$e?"math"===t&&Qe[n]:Boolean(cn[t])}(n,o,i):e===Be?function(t,e,n){return!(e.namespaceURI===$e&&!Qe[n])&&!(e.namespaceURI===He&&!Ke[n])&&!cn[t]&&(Ze[t]||!ln[t])}(n,o,i):!("application/xhtml+xml"!==Je||!qe[e]))}(t))return sn(t),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&W(Tt,t.innerHTML))return sn(t),!0;if(be&&3===t.nodeType){const e=An(t.textContent);t.textContent!==e&&(x(n.removed,{element:t.cloneNode()}),t.textContent=e)}return Nn(Vt.afterSanitizeElements,t,null),Cn(t,e)},In=function(t,e,n){if(pe[e])return!1;if(Sn(e,t))return!1;if(Ne&&("id"===e||"name"===e)&&(n in r||n in rn))return!1;const o=ce[e]||me.attributeCheck instanceof Function&&me.attributeCheck(e,t);return!(!he||!W(te,e))||!(!de||!W(ee,e))||(o?!(!Ue[e]&&!W(ie,z(n,re,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==M(n,"data:")||!Pe[t])&&(!ge||W(ne,z(n,re,"")))&&n):zn(t)&&kn(ue.tagNameCheck,t)&&kn(ue.attributeNameCheck,e,t)||"is"===e&&ue.allowCustomizedBuiltInElements&&kn(ue.tagNameCheck,n))},Ln=X({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),zn=function(t){return!Ln[R(t)]&&W(oe,t)},Mn=function(t,e,n,r){if(Pt&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(t,e)){case"TrustedHTML":return Bt(r);case"TrustedScriptURL":return function(t){$t(),Ht++;try{return Pt.createScriptURL(t)}finally{Ht--}}(r)}return r},Pn=function(t,e,n,r){try{return n?t.setAttributeNS(n,e,r):t.setAttribute(e,r),!xn(t)||(sn(t),!1)}catch(n){return pn(e,t),!1}},jn=function(t,e){return!(!Se||!W(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e))||"attributename"===R(t)&&null!==L(e,"href")},Un=function(t,e){if(Nn(Vt.beforeSanitizeAttributes,t,null),Cn(t,e))return;const r=t.attributes;if(!r||xn(t))return;ce=Dn(Vt.uponSanitizeAttribute,ce,se,_e);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0};let i=r.length;const a=en(t.nodeName);for(;i--;){const e=r[i],l=e.name,c=e.namespaceURI,s=e.value,u=en(l),f=s;let p="value"===l?f:P(f),m=!1;o.attrName=u,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,Nn(Vt.uponSanitizeAttribute,t,o),p=o.attrValue,!ke||"id"!==u&&"name"!==u||0===M(p,De)||(pn(l,t,e),p=De+p,m=!0),jn(l,p)?pn(l,t,e):o.forceKeepAttr||(!o.keepAttr||!ye&&W(At,p)?pn(l,t,e):(be&&(p=An(p)),In(a,u,p)?(p=Mn(a,u,c,p),p!==f&&Pn(t,l,c,p)&&m&&w(n.removed)):pn(l,t,e)))}Nn(Vt.afterSanitizeAttributes,t,null),Cn(t,e)},Fn=function(t){let e=null;const n=Tn(t);for(Nn(Vt.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(Nn(Vt.uponSanitizeShadowNode,e,null),Rn(e,t),Un(e,t),En(e.content)&&Fn(e.content),1===It(e)){const t=Nt(e);En(t)&&(Hn(t),Fn(t))}be&&wn(t),Nn(Vt.afterSanitizeShadowDOM,t,null)},Hn=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){Fn(t.shadow);continue}const n=t.node,r=1===It(n),o=K(n);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(r){const t=Ct?Ct(n):null;if("string"==typeof t&&"template"===en(t)){const t=n.content;En(t)&&e.push({node:t,shadow:null})}}if(r){const t=Nt(n);En(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Ye=!t,Ye&&(t="\x3c!--\x3e"),"string"!=typeof t&&!On(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return j(t);case"boolean":return U(t);case"bigint":return F?F(t):"0";case"symbol":return H?H(t):"Symbol()";case"undefined":default:return B(t);case"function":case"object":{if(null===t)return B(t);const e=t,n=Q(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:B(t)}return B(t)}}}(t)))throw Y("dirty is not a string, aborting");if(!n.isSupported)return t;Te?(ae=Ae,ce=_e):an(e),(Vt.uponSanitizeElement.length>0||Vt.uponSanitizeAttribute.length>0)&&(ae=V(ae)),Vt.uponSanitizeAttribute.length>0&&(ce=V(ce)),n.removed=[];const c=Re&&"string"!=typeof t&&On(t);let s=[];const u=Ie;if(c){Se&&dn(t,t=>{const e=It(t);if(7===e||8===e&&W(vt,t.data)){try{v(t)}catch(t){}return!1}if(1===e){const e=t,n=en(Lt(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&Sn("for",n)&&e.removeAttribute("for")}catch(t){}}return!0});const e=Lt(t);if("string"==typeof e){const n=en(e);if(!ae[n]||fe[n])throw fn(t),Y("root node is forbidden and cannot be sanitized in-place")}if(xn(t))throw fn(t),Y("root node is clobbered and cannot be sanitized in-place");s=gn(t),Ie=k()}else if(On(t))r=vn("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),Hn(r);else{if(!xe&&!be&&!ve&&-1===t.indexOf("<"))return Pt&&Oe?Bt(t):t;if(r=vn(t),!r)return xe?null:Oe?Ut:""}r&&we&&sn(r.firstChild);const f=c?t:r;try{c&&Hn(t);const e=Tn(f);for(;a=e.nextNode();)Rn(a,f),Un(a,f),En(a.content)&&Fn(a.content);c&&function(t,e){const n=Ie;let r=null;const o=()=>(r||(r=k(),A(e,t=>{D(r,t)})),r);for(let e=0;;e++){const r=gn(t),i=[t];let a=!1;if(A(r,t=>{11===It(t)?x(i,t):a||C(n,t)||(a=C(o(),t))}),!a)return;if(e>=8)throw Y("the tree kept changing during in-place sanitization; refusing to return it");A(i,(e,n)=>{bn(e,n>0,t,o())})}}(t,s)}catch(e){throw c&&(fn(t),yn(t,s)),e}finally{Ie=u}if(c){if(yn(t,s))throw Y("a node selected for removal could not be safely returned; refusing to sanitize in place");return be&&_n(t),t}if(xe){if(be&&_n(r),Ee)for(l=Gt.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(ce.shadowroot||ce.shadowrootmode)&&(l=Kt.call(o,l,!0)),l}let p=ve?r.outerHTML:r.innerHTML;return ve&&ae["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&W(yt,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),be&&(p=An(p)),Pt&&Oe?Bt(p):p},n.setConfig=function(){an(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Te=!0,Ae=ae,_e=ce},n.clearConfig=function(){nn=null,Te=!1,Ae=null,_e=null,Pt=jt,Ut=""},n.isValidAttribute=function(t,e,n){nn||an({});const r=en(t),o=en(e);return("string"!=typeof n||!(jn(e,n)||!ye&&W(At,n)))&&In(r,o,n)},n.addHook=function(t,e){"function"==typeof e&&$(Vt,t)&&x(Vt[t],e)},n.removeHook=function(t,e){if($(Vt,t)){if(void 0!==e){const n=_(Vt[t],e);return-1===n?void 0:O(Vt[t],n,1)[0]}return w(Vt[t])}},n.removeHooks=function(t){$(Vt,t)&&(Vt[t]=[])},n.removeAllHooks=function(){Vt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();o();const Nt=({quote:t,attribution:e,attributionTitle:n,imageSrc:o,imageAlt:i,backgroundColor:a="light",variant:l="line",alignment:c="full",className:s="",...u})=>{const f="mg-quote-highlight",p=!!o;/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,r().jsxs)("section",{className:`${f} ${f}--${a} ${f}--${l} ${f}--${c} ${p?`${f}--has-image`:""} ${s}`,...u,children:[/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)("div",{className:`${f}__content`,children:[/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("blockquote",{className:`${f}__quote`,children:"string"!=typeof t||t.includes("<")?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("span",{dangerouslySetInnerHTML:{__html:Ot.sanitize(t)}}):/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("p",{children:t})}),"line"===l&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("div",{className:`${f}__separator`}),(e||n||p)&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("div",{className:`${f}__attribution`,children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)("div",{className:`${f}__attribution-wrapper`,children:[p&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("div",{className:`${f}__portrait-container`,children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("img",{src:o,alt:i||`${e||"Quote"} image`,className:`${f}__portrait`})}),(e||n)&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)("div",{className:`${f}__attribution-text`,children:[e&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("p",{className:`${f}__attribution-name`,dangerouslySetInnerHTML:{__html:Ot.sanitize(e)}}),n&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("p",{className:`${f}__attribution-title`,dangerouslySetInnerHTML:{__html:Ot.sanitize(n)}})]})]})})]}),"image"===l&&p&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("div",{className:`${f}__image-container`,children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("img",{src:o,alt:i||`${e||"Quote"} image`,className:`${f}__image`})})]})};Nt.propTypes={quote:a().string.isRequired,attribution:a().string,attributionTitle:a().string,imageSrc:a().string,imageAlt:a().string,backgroundColor:a().oneOf(["light","dark","bright"]),variant:a().oneOf(["line","image"]),alignment:a().oneOf(["full","left","right"]),className:a().string};const kt=Nt;function Dt(t){const{dataset:e}=t;return{quote:e.quote||"",attribution:e.attribution||void 0,attributionTitle:e.attributionTitle||void 0,imageSrc:e.imageSrc||void 0,imageAlt:e.imageAlt||void 0,backgroundColor:e.backgroundColor||"light",variant:e.variant||"line",alignment:e.alignment||"full"}}export{kt as default,Dt as fromElement};
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */
1
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
2
2
 
3
3
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
4
4
 
@@ -3,7 +3,8 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see Radio.js.LICENSE.txt */
9
- import{useId as e}from"react";var r={2694(e,r,o){var t=o(6925);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,r,o,n,a,i){if(i!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var o={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:a,resetWarningCache:n};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function t(e){const n=o[e];if(void 0!==n)return n.exports;const a=o[e]={exports:{}};return r[e](a,a.exports,t),a.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var o=Symbol.for("react.transitional.element");function t(e,r,t){var n=null;if(void 0!==t&&(n=""+t),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in t={},r)"key"!==a&&(t[a]=r[a]);else t=r;return r=t.ref,{$$typeof:o,type:e,key:n,ref:void 0!==r?r:null,props:t}}Symbol.for("react.fragment"),r.jsx=t,r.jsxs=t}),a=t.cw(function(e,r){e.exports=n()}),i=t(5556),s=t.n(i);function c({id:r,name:o,label:t,value:a,checked:i,defaultChecked:s,onChange:c,disabled:l=!1,error:p=!1,errorText:f,labelPosition:d="after",className:u,...m}){const b=e(),h=r||b,y=p&&f?`${h}-error`:void 0,g=["mg-form-check__input","mg-form-check__input--radio",l&&"mg-form-check__input--disabled",p&&"mg-form-check__input--error"].filter(Boolean).join(" "),v=t&&(0,n().jsx)("label",{className:"mg-form-check__label",htmlFor:h,children:t});return(0,n().jsxs)("div",{className:["mg-form-check",u].filter(Boolean).join(" "),children:["before"===d&&v,(0,n().jsx)("input",{className:g,type:"radio",id:h,name:o,value:a,checked:i,defaultChecked:s,onChange:c,disabled:l,"aria-invalid":p||void 0,"aria-describedby":y,...t?{}:{"aria-label":a},...m}),"after"===d&&v,p&&f&&(0,n().jsx)("p",{className:"mg-form-error",id:y,role:"alert",children:f})]})}a(),c.propTypes={id:s().string,name:s().string,label:s().string,value:s().string,checked:s().bool,defaultChecked:s().bool,onChange:s().func,disabled:s().bool,error:s().bool,errorText:s().string,labelPosition:s().oneOf(["before","after"]),className:s().string};const l=c;export{c as Radio,l as default};
9
+ import{useId as e}from"react";var r={2694(e,r,o){var t=o(6925);function a(){}function n(){}n.resetWarningCache=a,e.exports=function(){function e(e,r,o,a,n,i){if(i!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){return e}e.isRequired=e;var o={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 o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function t(e){const a=o[e];if(void 0!==a)return a.exports;const n=o[e]={exports:{}};return r[e](n,n.exports,t),n.exports}t.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a=/*#__PURE__*/t.cw((e,r)=>{var o=Symbol.for("react.transitional.element");function t(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:o,type:e,key:a,ref:void 0!==r?r:null,props:t}}Symbol.for("react.fragment"),r.jsx=t,r.jsxs=t}),n=/*#__PURE__*/t.cw(e=>{e.exports=a()}),i=/*#__PURE__*/t(5556),s=/*#__PURE__*/t.n(i);function l({id:r,name:o,label:t,value:n,checked:i,defaultChecked:s,onChange:l,disabled:c=!1,error:p=!1,errorText:f,labelPosition:d="after",className:u,...m}){const b=e(),h=r||b,y=p&&f?`${h}-error`:void 0,g=["mg-form-check__input","mg-form-check__input--radio",c&&"mg-form-check__input--disabled",p&&"mg-form-check__input--error"].filter(Boolean).join(" "),v=t&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("label",{className:"mg-form-check__label",htmlFor:h,children:t});/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,a().jsxs)("div",{className:["mg-form-check",u].filter(Boolean).join(" "),children:["before"===d&&v,/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("input",{className:g,type:"radio",id:h,name:o,value:n,checked:i,defaultChecked:s,onChange:l,disabled:c,"aria-invalid":p||void 0,"aria-describedby":y,...t?{}:{"aria-label":n},...m}),"after"===d&&v,p&&f&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("p",{className:"mg-form-error",id:y,role:"alert",children:f})]})}n(),l.propTypes={id:s().string,name:s().string,label:s().string,value:s().string,checked:s().bool,defaultChecked:s().bool,onChange:s().func,disabled:s().bool,error:s().bool,errorText:s().string,labelPosition:s().oneOf(["before","after"]),className:s().string};const c=l;export{l as Radio,c as default};
@@ -3,7 +3,8 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see Range.js.LICENSE.txt */
9
- import"react";var e={2694(e,r,n){var t=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,r,n,a,o,i){if(i!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){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:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,r,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,r){var n;!function(){var t={}.hasOwnProperty;function a(){for(var e="",r=0;r<arguments.length;r++){var n=arguments[r];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var n in e)t.call(e,n)&&e[n]&&(r=i(r,n));return r}function i(e,r){return r?e?e+" "+r:e+r:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(r,[]))||(e.exports=n)}()}};const r={};function n(t){const a=r[t];if(void 0!==a)return a.exports;const o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.cw=e=>{var r;return()=>{if(e){var n=e;e=0,r={exports:{}},n.call(r.exports,r,r.exports)}return r.exports}},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var t=n.cw(function(e,r){var n=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 o in t={},r)"key"!==o&&(t[o]=r[o]);else t=r;return r=t.ref,{$$typeof:n,type:e,key:a,ref:void 0!==r?r:null,props:t}}r.Fragment=t,r.jsx=a,r.jsxs=a}),a=n.cw(function(e,r){e.exports=t()}),o=n(5556),i=n.n(o),s=n(6942),p=n.n(s);a();const l=({id:e,name:r,min:n=0,max:a=100,step:o,value:i,defaultValue:s,disabled:l=!1,onChange:u,className:c,ticks:f,...d})=>{const y=f&&f.length>0,m=i??s,g=y&&void 0!==m?f.find(e=>String(e.value)===String(m)):void 0;return(0,t().jsxs)("div",{className:p()("mg-range-wrapper",c),children:[(0,t().jsx)("input",{type:"range",id:e,name:r,min:n,max:a,step:o,value:i,defaultValue:s,disabled:l,onChange:u,className:p()("mg-range",{"mg-range--stepped":y}),list:y?`${e}-ticks`:void 0,"aria-valuetext":g?.label,...d}),y&&(0,t().jsxs)(t().Fragment,{children:[(0,t().jsx)("datalist",{id:`${e}-ticks`,children:f.map((e,r)=>(0,t().jsx)("option",{value:e.value,label:e.label},r))}),(0,t().jsx)("div",{className:"mg-range__ticks","aria-hidden":"true",children:f.map((e,r)=>(0,t().jsx)("span",{children:e.label},r))})]})]})};l.propTypes={id:i().string.isRequired,name:i().string,min:i().oneOfType([i().number,i().string]),max:i().oneOfType([i().number,i().string]),step:i().oneOfType([i().number,i().string]),value:i().oneOfType([i().number,i().string]),defaultValue:i().oneOfType([i().number,i().string]),disabled:i().bool,onChange:i().func,className:i().string,ticks:i().arrayOf(i().shape({value:i().oneOfType([i().number,i().string]).isRequired,label:i().string}))};export{l as Range};
9
+ import"react";var e={2694(e,r,n){var t=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,r,n,a,o,i){if(i!==t){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function r(){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:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,r,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,r){var n;!function(){var t={}.hasOwnProperty;function a(){for(var e="",r=0;r<arguments.length;r++){var n=arguments[r];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var n in e)t.call(e,n)&&e[n]&&(r=i(r,n));return r}function i(e,r){return r?e?e+" "+r:e+r:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(r,[]))||(e.exports=n)}()}};const r={};function n(t){const a=r[t];if(void 0!==a)return a.exports;const o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.cw=e=>{var r;return()=>{if(e){var n=e;e=0,r={exports:{}},n.call(r.exports,r,r.exports)}return r.exports}},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var t=/*#__PURE__*/n.cw((e,r)=>{var n=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 o in t={},r)"key"!==o&&(t[o]=r[o]);else t=r;return r=t.ref,{$$typeof:n,type:e,key:a,ref:void 0!==r?r:null,props:t}}r.Fragment=t,r.jsx=a,r.jsxs=a}),a=/*#__PURE__*/n.cw(e=>{e.exports=t()}),o=/*#__PURE__*/n(5556),i=/*#__PURE__*/n.n(o),s=n(6942),p=/*#__PURE__*/n.n(s);a();const l=({id:e,name:r,min:n=0,max:a=100,step:o,value:i,defaultValue:s,disabled:l=!1,onChange:u,className:c,ticks:f,...d})=>{const y=f&&f.length>0,m=i??s,g=y&&void 0!==m?f.find(e=>String(e.value)===String(m)):void 0;/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,t().jsxs)("div",{className:p()("mg-range-wrapper",c),children:[/*#__PURE__*/ /*#__PURE__*/(0,t().jsx)("input",{type:"range",id:e,name:r,min:n,max:a,step:o,value:i,defaultValue:s,disabled:l,onChange:u,className:p()("mg-range",{"mg-range--stepped":y}),list:y?`${e}-ticks`:void 0,"aria-valuetext":g?.label,...d}),y&&/*#__PURE__*/ /*#__PURE__*/(0,t().jsxs)(t().Fragment,{children:[/*#__PURE__*/ /*#__PURE__*/(0,t().jsx)("datalist",{id:`${e}-ticks`,children:f.map((e,r)=>/*#__PURE__*/ /*#__PURE__*/(0,t().jsx)("option",{value:e.value,label:e.label},r))}),/*#__PURE__*/ /*#__PURE__*/(0,t().jsx)("div",{className:"mg-range__ticks","aria-hidden":"true",children:f.map((e,r)=>/*#__PURE__*/ /*#__PURE__*/(0,t().jsx)("span",{children:e.label},r))})]})]})};l.propTypes={id:i().string.isRequired,name:i().string,min:i().oneOfType([i().number,i().string]),max:i().oneOfType([i().number,i().string]),step:i().oneOfType([i().number,i().string]),value:i().oneOfType([i().number,i().string]),defaultValue:i().oneOfType([i().number,i().string]),disabled:i().bool,onChange:i().func,className:i().string,ticks:i().arrayOf(i().shape({value:i().oneOfType([i().number,i().string]).isRequired,label:i().string}))};export{l as Range};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see ScrollContainer.js.LICENSE.txt */
9
- import{default as e,useCallback as r,useEffect as t,useMemo as n,useRef as o}from"react";var s={2694(e,r,t){var n=t(6925);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,s,l){if(l!==n){var i=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 i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={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:s,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const l={};function i(e){const r=l[e];if(void 0!==r)return r.exports;const t=l[e]={exports:{}};return s[e](t,t.exports,i),t.exports}i.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a=i.cw(function(e,r){var t=Symbol.for("react.transitional.element");function n(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var s in n={},r)"key"!==s&&(n[s]=r[s]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}Symbol.for("react.fragment"),r.jsx=n,r.jsxs=n}),c=i.cw(function(e,r){e.exports=a()}),u=i(5556),d=i.n(u);c();const m={scrollLeftLabel:"Scroll left",scrollRightLabel:"Scroll right"},g=e.memo(({onScroll:e,leftButtonRef:r,rightButtonRef:t,navigationLabel:n,scrollLeftLabel:o="Scroll left",scrollRightLabel:s="Scroll right"})=>(0,a().jsxs)("nav",{className:"mg-scroll__nav","aria-label":n,children:[(0,a().jsx)("button",{ref:r,className:"mg-scroll__nav-button",onClick:()=>e("left"),"aria-label":o,children:"←"}),(0,a().jsx)("button",{ref:t,className:"mg-scroll__nav-button",onClick:()=>e("right"),"aria-label":s,children:"→"})]}));g.propTypes={onScroll:d().func.isRequired,leftButtonRef:d().object.isRequired,rightButtonRef:d().object.isRequired,navigationLabel:d().string.isRequired,scrollLeftLabel:d().string,scrollRightLabel:d().string};const h=({children:s,height:l="auto",minWidth:i="auto",itemWidth:c="auto",padding:u="0",className:d="",showArrows:h=!1,stretchItems:p=!1,stepSize:f=null,ariaLabel:v="Scrollable content",labels:b={},...L})=>{const{scrollLeftLabel:w,scrollRightLabel:y}={...m,...b},_=o(null),x=o(null),S=o(null),E=o(null),R=o(!1),j=o({isDragging:!1,hasDragged:!1,startX:0,startScrollLeft:0}),T=r(()=>{R.current="ontouchstart"in window&&/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)},[]),k=r(e=>{if(!_.current)return;const r=f||_.current.clientWidth/2,t=_.current.scrollLeft+("right"===e?r:-r),n=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;_.current.scrollTo({left:t,behavior:n?"auto":"smooth"})},[f]),A=r(()=>{if(!_.current||!h||R.current)return;const{scrollLeft:e,scrollWidth:r,clientWidth:t}=_.current,n=e>0,o=e+t<r;S.current&&(S.current.disabled=!n),E.current&&(E.current.disabled=!o)},[h]),D=r(e=>{!_.current||e.type.includes("mouse")&&R.current||e.type.includes("mouse")&&(j.current={...j.current,isDragging:!0,hasDragged:!1,startX:e.pageX,startScrollLeft:_.current.scrollLeft},e.preventDefault())},[]),O=r(e=>{if(j.current.isDragging&&_.current&&(!e.type.includes("mouse")||!R.current)&&e.type.includes("mouse")){const r=e.pageX;if(Math.abs(j.current.startX-r)>10){e.preventDefault(),j.current.hasDragged=!0;const t=j.current.startX-r;_.current.scrollLeft=j.current.startScrollLeft+t,A()}}},[A]),W=r(e=>{j.current.isDragging&&(j.current.isDragging=!1);const r=e.pageX;Math.abs(j.current.startX-r)<2&&e.target.href&&(window.parent.location.href=e.target.href)},[]),I=r(e=>{j.current.hasDragged&&(e.preventDefault(),e.stopPropagation())},[]),N=n(()=>({"--scroll-height":l,"--scroll-min-width":i,"--scroll-padding":u,"--scroll-item-width":c}),[l,i,u,c]),P=n(()=>["mg-scroll__container",l&&"mg-scroll__container--custom-height",i&&"mg-scroll__container--custom-width",u&&"mg-scroll__container--custom-padding",c&&"mg-scroll__container--custom-item-width",R.current&&"mg-scroll__container--mobile",d].filter(Boolean).join(" "),[l,i,u,c,d]);return t(()=>{T(),A();const e=_.current,r=x.current,t="undefined"==typeof ResizeObserver?null:new ResizeObserver(A);return e&&(e.addEventListener("scroll",A,{passive:!0}),window.addEventListener("resize",A,{passive:!0}),R.current||(e.addEventListener("mousedown",D),window.addEventListener("mousemove",O),window.addEventListener("mouseup",W),window.addEventListener("mouseleave",W)),e.addEventListener("click",I,{capture:!0}),t?.observe(e),r&&t?.observe(r)),()=>{e&&(e.removeEventListener("scroll",A),window.removeEventListener("resize",A),R.current||(e.removeEventListener("mousedown",D),window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",W),window.removeEventListener("mouseleave",W)),e.removeEventListener("click",I,{capture:!0})),t?.disconnect()}},[T,A,D,O,W,I]),(0,a().jsxs)("section",{className:"mg-scroll"+(R.current?" mg-scroll--mobile":""),children:[h&&!R.current&&(0,a().jsx)(g,{onScroll:k,leftButtonRef:S,rightButtonRef:E,navigationLabel:`${v} navigation`,scrollLeftLabel:w,scrollRightLabel:y}),(0,a().jsx)("div",{ref:_,className:P,style:N,tabIndex:0,...L,children:(0,a().jsx)("div",{ref:x,className:`mg-scroll__content${p?" mg-scroll__content--stretch":""}${R.current?"":" mg-grid"}`,children:Array.isArray(s)&&!e.isValidElement(s[0])?s.map((e,r)=>(0,a().jsx)("div",{className:"mg-scroll__item-wrapper",children:(0,a().jsx)("div",{dangerouslySetInnerHTML:{__html:String(e)}})},r)):e.Children.map(s,e=>(0,a().jsx)("div",{className:"mg-scroll__item-wrapper",children:e}))})})]})};h.propTypes={children:d().node.isRequired,height:d().string,minWidth:d().string,itemWidth:d().string,padding:d().string,className:d().string,showArrows:d().bool,stretchItems:d().bool,stepSize:d().number,ariaLabel:d().string,labels:d().shape({scrollLeftLabel:d().string,scrollRightLabel:d().string})};const p=e.memo(h),f="mg-scroll__content";function v(e){const{dataset:r}=e,t={height:r.height||"auto",minWidth:r.minWidth||"auto",itemWidth:r.itemWidth||"auto",padding:r.padding||"0",showArrows:"true"===r.showArrows,stretchItems:"true"===r.stretchItems,stepSize:r.stepSize?parseInt(r.stepSize,10):null,ariaLabel:r.ariaLabel||"Scrollable content"},n=[],o=function(e){return Array.from(e.children).find(e=>e.classList.contains(f))||Array.from(e.querySelectorAll(`.${f}`)).find(r=>{let t=r.parentElement;for(;t&&t!==e;){if(t.hasAttribute("data-mg-scroll-container"))return!1;t=t.parentElement}return t===e})||null}(e);return o?Array.from(o.children).forEach(e=>{n.push(e.outerHTML)}):e.innerHTML.trim()&&n.push(e.innerHTML),t.children=n,t}export{p as default,v as fromElement};
9
+ import{default as e,useCallback as r,useEffect as t,useMemo as n,useRef as a}from"react";var l={2694(e,r,t){var n=t(6925);function a(){}function l(){}l.resetWarningCache=a,e.exports=function(){function e(e,r,t,a,l,i){if(i!==n){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 t={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:l,resetWarningCache:a};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const i={};function o(e){const r=i[e];if(void 0!==r)return r.exports;const t=i[e]={exports:{}};return l[e](t,t.exports,o),t.exports}o.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.cw=e=>{var r;return()=>{if(e){var t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var s=/*#__PURE__*/o.cw((e,r)=>{var t=Symbol.for("react.transitional.element");function n(e,r,n){var a=null;if(void 0!==n&&(a=""+n),void 0!==r.key&&(a=""+r.key),"key"in r)for(var l in n={},r)"key"!==l&&(n[l]=r[l]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:a,ref:void 0!==r?r:null,props:n}}Symbol.for("react.fragment"),r.jsx=n,r.jsxs=n}),c=/*#__PURE__*/o.cw(e=>{e.exports=s()});const u={en:"ltr",ar:"rtl",es:"ltr",fr:"ltr",ja:"ltr",ru:"ltr",zh:"ltr"};function d(e="en"){return String(e).trim().toLowerCase().split(/[-_]/)[0]}function g(e,r){const t=d(e),n=void 0!==e&&Object.hasOwn(u,t)?u[t]:void 0,a=void 0===r?n:r;return{...void 0===e?{}:{lang:e},...void 0===a?{}:{dir:a}}}const b=(m={ariaLabel:"Scrollable content",navigationLabel:"{label} navigation",scrollLeftLabel:"Scroll left",scrollRightLabel:"Scroll right"},f={ar:{ariaLabel:"محتوى قابل للتمرير",navigationLabel:"التنقل في {label}",scrollLeftLabel:"التمرير لليسار",scrollRightLabel:"التمرير لليمين"},es:{ariaLabel:"Contenido desplazable",navigationLabel:"Navegación de {label}",scrollLeftLabel:"Desplazar a la izquierda",scrollRightLabel:"Desplazar a la derecha"},fr:{ariaLabel:"Contenu défilant",navigationLabel:"Navigation : {label}",scrollLeftLabel:"Faire défiler à gauche",scrollRightLabel:"Faire défiler à droite"},ja:{ariaLabel:"スクロール可能なコンテンツ",navigationLabel:"{label}のナビゲーション",scrollLeftLabel:"左にスクロール",scrollRightLabel:"右にスクロール"},ru:{ariaLabel:"Прокручиваемое содержимое",navigationLabel:"Навигация: {label}",scrollLeftLabel:"Прокрутить влево",scrollRightLabel:"Прокрутить вправо"},zh:{ariaLabel:"可滚动内容",navigationLabel:"{label}导航",scrollLeftLabel:"向左滚动",scrollRightLabel:"向右滚动"}},(e,r)=>{const t=d(e),n=Object.hasOwn(f,t)?f[t]:void 0,a=Object.fromEntries(Object.entries(r??{}).filter(([,e])=>void 0!==e));return{...m,...n,...a}});var m,f,h=/*#__PURE__*/o(5556),p=/*#__PURE__*/o.n(h);c();const L=/*#__PURE__*/e.memo(({onScroll:e,leftButtonRef:r,rightButtonRef:t,navigationLabel:n,scrollLeftLabel:a="Scroll left",scrollRightLabel:l="Scroll right"})=>/*#__PURE__*/ /*#__PURE__*/(0,s().jsxs)("nav",{className:"mg-scroll__nav","aria-label":n,children:[/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("button",{ref:r,className:"mg-scroll__nav-button",onClick:()=>e("left"),"aria-label":a,children:"←"}),/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("button",{ref:t,className:"mg-scroll__nav-button",onClick:()=>e("right"),"aria-label":l,children:"→"})]}));L.propTypes={onScroll:p().func.isRequired,leftButtonRef:p().object.isRequired,rightButtonRef:p().object.isRequired,navigationLabel:p().string.isRequired,scrollLeftLabel:p().string,scrollRightLabel:p().string};const v=({children:l,height:i="auto",minWidth:o="auto",itemWidth:c="auto",padding:u="0",className:d="",showArrows:m=!1,stretchItems:f=!1,stepSize:h=null,ariaLabel:p,lang:v,dir:w,labels:y,..._})=>{const{ariaLabel:R,navigationLabel:x,scrollLeftLabel:S,scrollRightLabel:j}=b(v,y),E=p??R,O=a(null),A=a(null),T=a(null),D=a(null),z=a(!1),k=a({isDragging:!1,hasDragged:!1,startX:0,startScrollLeft:0}),N=r(()=>{z.current="ontouchstart"in window&&/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)},[]),W=r(e=>{if(!O.current)return;const r=h||O.current.clientWidth/2,t=O.current.scrollLeft+("right"===e?r:-r),n=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;O.current.scrollTo({left:t,behavior:n?"auto":"smooth"})},[h]),C=r(()=>{if(!O.current||!m||z.current)return;const{scrollLeft:e,scrollWidth:r,clientWidth:t}=O.current,n=e>0,a=e+t<r;T.current&&(T.current.disabled=!n),D.current&&(D.current.disabled=!a)},[m]),I=r(e=>{!O.current||e.type.includes("mouse")&&z.current||e.type.includes("mouse")&&(k.current={...k.current,isDragging:!0,hasDragged:!1,startX:e.pageX,startScrollLeft:O.current.scrollLeft},e.preventDefault())},[]),P=r(e=>{if(k.current.isDragging&&O.current&&(!e.type.includes("mouse")||!z.current)&&e.type.includes("mouse")){const r=e.pageX;if(Math.abs(k.current.startX-r)>10){e.preventDefault(),k.current.hasDragged=!0;const t=k.current.startX-r;O.current.scrollLeft=k.current.startScrollLeft+t,C()}}},[C]),M=r(e=>{k.current.isDragging&&(k.current.isDragging=!1);const r=e.pageX;Math.abs(k.current.startX-r)<2&&e.target.href&&(window.parent.location.href=e.target.href)},[]),q=r(e=>{k.current.hasDragged&&(e.preventDefault(),e.stopPropagation())},[]),B=n(()=>({"--scroll-height":i,"--scroll-min-width":o,"--scroll-padding":u,"--scroll-item-width":c}),[i,o,u,c]),X=n(()=>["mg-scroll__container",i&&"mg-scroll__container--custom-height",o&&"mg-scroll__container--custom-width",u&&"mg-scroll__container--custom-padding",c&&"mg-scroll__container--custom-item-width",z.current&&"mg-scroll__container--mobile",d].filter(Boolean).join(" "),[i,o,u,c,d]);return t(()=>{N(),C();const e=O.current,r=A.current,t="undefined"==typeof ResizeObserver?null:new ResizeObserver(C);return e&&(e.addEventListener("scroll",C,{passive:!0}),window.addEventListener("resize",C,{passive:!0}),z.current||(e.addEventListener("mousedown",I),window.addEventListener("mousemove",P),window.addEventListener("mouseup",M),window.addEventListener("mouseleave",M)),e.addEventListener("click",q,{capture:!0}),t?.observe(e),r&&t?.observe(r)),()=>{e&&(e.removeEventListener("scroll",C),window.removeEventListener("resize",C),z.current||(e.removeEventListener("mousedown",I),window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",M),window.removeEventListener("mouseleave",M)),e.removeEventListener("click",q,{capture:!0})),t?.disconnect()}},[N,C,I,P,M,q]),/*#__PURE__*/ /*#__PURE__*/(0,s().jsxs)("section",{...g(v,w),className:"mg-scroll"+(z.current?" mg-scroll--mobile":""),children:[m&&!z.current&&/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)(L,{onScroll:W,leftButtonRef:T,rightButtonRef:D,navigationLabel:x.replace("{label}",()=>E),scrollLeftLabel:S,scrollRightLabel:j}),/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("div",{ref:O,className:X,style:B,tabIndex:0,..._,children:/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("div",{ref:A,className:`mg-scroll__content${f?" mg-scroll__content--stretch":""}${z.current?"":" mg-grid"}`,children:Array.isArray(l)&&!/*#__PURE__*/e.isValidElement(l[0])?l.map((e,r)=>/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("div",{className:"mg-scroll__item-wrapper",children:/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("div",{dangerouslySetInnerHTML:{__html:String(e)}})},r)):e.Children.map(l,e=>/*#__PURE__*/ /*#__PURE__*/(0,s().jsx)("div",{className:"mg-scroll__item-wrapper",children:e}))})})]})};v.propTypes={children:p().node.isRequired,height:p().string,minWidth:p().string,itemWidth:p().string,padding:p().string,className:p().string,showArrows:p().bool,stretchItems:p().bool,stepSize:p().number,ariaLabel:p().string,lang:p().string,dir:p().oneOf(["ltr","rtl","auto"]),labels:p().shape({ariaLabel:p().string,navigationLabel:p().string,scrollLeftLabel:p().string,scrollRightLabel:p().string})};const w=/*#__PURE__*/e.memo(v),y="mg-scroll__content";function _(e){const{dataset:r}=e,t=function(e){const r=e.dataset.lang??e.closest("[lang]")?.getAttribute("lang"),t=e.getAttribute("dir")?.toLowerCase();return{...null==r?{}:{lang:r},...["ltr","rtl","auto"].includes(t)?{dir:t}:{}}}(e),n=function(e){try{const r=JSON.parse(e.dataset.labels);return r&&"object"==typeof r&&!Array.isArray(r)?r:void 0}catch{return}}(e),a={...t,...n?{labels:n}:{},height:r.height||"auto",minWidth:r.minWidth||"auto",itemWidth:r.itemWidth||"auto",padding:r.padding||"0",showArrows:"true"===r.showArrows,stretchItems:"true"===r.stretchItems,stepSize:r.stepSize?parseInt(r.stepSize,10):null,ariaLabel:r.ariaLabel??b(t.lang,n).ariaLabel},l=[],i=function(e){return Array.from(e.children).find(e=>e.classList.contains(y))||Array.from(e.querySelectorAll(`.${y}`)).find(r=>{let t=r.parentElement;for(;t&&t!==e;){if(t.hasAttribute("data-mg-scroll-container"))return!1;t=t.parentElement}return t===e})||null}(e);return i?Array.from(i.children).forEach(e=>{l.push(e.outerHTML)}):e.innerHTML.trim()&&l.push(e.innerHTML),a.children=l,a}export{w as default,_ as fromElement,b as getScrollContainerLabels};
@@ -3,7 +3,11 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see SegmentedControl.js.LICENSE.txt */
9
- import{default as e,useId as n}from"react";var r={2694(e,n,r){var t=r(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,n,r,o,a,s){if(s!==t){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 n(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},5556(e,n,r){e.exports=r(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const t={};function o(e){const n=t[e];if(void 0!==n)return n.exports;const a=t[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.n=e=>{const n=e&&e.__esModule?()=>e.default:()=>e;return o.d(n,{a:n}),n},o.cw=e=>{var n;return()=>{if(e){var r=e;e=0,n={exports:{}},r.call(n.exports,n,n.exports)}return n.exports}},o.d=(e,n)=>{for(var r in n)o.o(n,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var a=o.cw(function(e,n){var r=Symbol.for("react.transitional.element");function t(e,n,t){var o=null;if(void 0!==t&&(o=""+t),void 0!==n.key&&(o=""+n.key),"key"in n)for(var a in t={},n)"key"!==a&&(t[a]=n[a]);else t=n;return n=t.ref,{$$typeof:r,type:e,key:o,ref:void 0!==n?n:null,props:t}}Symbol.for("react.fragment"),n.jsx=t,n.jsxs=t}),s=o.cw(function(e,n){e.exports=a()}),l=o(5556),i=o.n(l);function c({legend:r,name:t,options:o,value:s,defaultValue:l,onChange:i,hideLegend:c=!1,fullWidth:d=!1,size:u="default",className:p,...f}){const m=n(),g=void 0!==s,y=["mg-segmented-control",d&&"mg-segmented-control--full-width","small"===u&&"mg-segmented-control--small",p].filter(Boolean).join(" "),h=["mg-segmented-control__legend",c&&"mg-u-sr-only"].filter(Boolean).join(" ");return(0,a().jsxs)("fieldset",{className:y,...f,children:[(0,a().jsx)("legend",{className:h,children:r}),(0,a().jsx)("div",{className:"mg-segmented-control__group",children:o.map(n=>{const r=`${m}-${n.value}`,o=g?{checked:s===n.value}:{defaultChecked:l===n.value};return(0,a().jsxs)(e.Fragment,{children:[(0,a().jsx)("input",{className:"mg-segmented-control__input",type:"radio",id:r,name:t,value:n.value,disabled:n.disabled,onChange:i,...o}),(0,a().jsx)("label",{className:"mg-segmented-control__label",htmlFor:r,children:n.label})]},n.value)})})]})}s(),c.propTypes={legend:i().string.isRequired,name:i().string.isRequired,options:i().arrayOf(i().shape({label:i().string.isRequired,value:i().string.isRequired,disabled:i().bool})).isRequired,value:i().string,defaultValue:i().string,onChange:i().func,hideLegend:i().bool,fullWidth:i().bool,size:i().oneOf(["default","small"]),className:i().string};const d=c;export{c as SegmentedControl,d as default};
9
+ import{default as e,useId as r}from"react";var n={2694(e,r,n){var t=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,n,o,a,s){if(s!==t){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 r(){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:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,r,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const t={};function o(e){const r=t[e];if(void 0!==r)return r.exports;const a=t[e]={exports:{}};return n[e](a,a.exports,o),a.exports}o.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.cw=e=>{var r;return()=>{if(e){var n=e;e=0,r={exports:{}},n.call(r.exports,r,r.exports)}return r.exports}},o.d=(e,r)=>{for(var n in r)o.o(r,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var a=/*#__PURE__*/o.cw((e,r)=>{var n=Symbol.for("react.transitional.element");function t(e,r,t){var o=null;if(void 0!==t&&(o=""+t),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in t={},r)"key"!==a&&(t[a]=r[a]);else t=r;return r=t.ref,{$$typeof:n,type:e,key:o,ref:void 0!==r?r:null,props:t}}Symbol.for("react.fragment"),r.jsx=t,r.jsxs=t}),s=/*#__PURE__*/o.cw(e=>{e.exports=a()}),l=/*#__PURE__*/o(5556),i=/*#__PURE__*/o.n(l);function c({legend:n,name:t,options:o,value:s,defaultValue:l,onChange:i,hideLegend:c=!1,fullWidth:d=!1,size:u="default",className:p,...f}){const m=r(),g=void 0!==s,y=["mg-segmented-control",d&&"mg-segmented-control--full-width","small"===u&&"mg-segmented-control--small",p].filter(Boolean).join(" "),h=["mg-segmented-control__legend",c&&"mg-u-sr-only"].filter(Boolean).join(" ");/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,a().jsxs)("fieldset",{className:y,...f,children:[/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("legend",{className:h,children:n}),/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("div",{className:"mg-segmented-control__group",children:o.map(r=>{const n=`${m}-${r.value}`,o=g?{checked:s===r.value}:{defaultChecked:l===r.value};
11
+ /*#__PURE__*/
12
+ /*#__PURE__*/
13
+ return(0,a().jsxs)(e.Fragment,{children:[/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("input",{className:"mg-segmented-control__input",type:"radio",id:n,name:t,value:r.value,disabled:r.disabled,onChange:i,...o}),/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("label",{className:"mg-segmented-control__label",htmlFor:n,children:r.label})]},r.value)})})]})}s(),c.propTypes={legend:i().string.isRequired,name:i().string.isRequired,options:i().arrayOf(i().shape({label:i().string.isRequired,value:i().string.isRequired,disabled:i().bool})).isRequired,value:i().string,defaultValue:i().string,onChange:i().func,hideLegend:i().bool,fullWidth:i().bool,size:i().oneOf(["default","small"]),className:i().string};const d=c;export{c as SegmentedControl,d as default};
@@ -3,7 +3,8 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see Select.js.LICENSE.txt */
9
- import{useId as e}from"react";var r={2694(e,r,o){var a=o(6925);function l(){}function t(){}t.resetWarningCache=l,e.exports=function(){function e(e,r,o,l,t,n){if(n!==a){var i=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 i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var o={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:t,resetWarningCache:l};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function a(e){const l=o[e];if(void 0!==l)return l.exports;const t=o[e]={exports:{}};return r[e](t,t.exports,a),t.exports}a.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},a.d=(e,r)=>{for(var o in r)a.o(r,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var l=a.cw(function(e,r){var o=Symbol.for("react.transitional.element");function a(e,r,a){var l=null;if(void 0!==a&&(l=""+a),void 0!==r.key&&(l=""+r.key),"key"in r)for(var t in a={},r)"key"!==t&&(a[t]=r[t]);else a=r;return r=a.ref,{$$typeof:o,type:e,key:l,ref:void 0!==r?r:null,props:a}}Symbol.for("react.fragment"),r.jsx=a,r.jsxs=a}),t=a.cw(function(e,r){e.exports=l()}),n=a(5556),i=a.n(n);t();const s=[];function d({id:r,name:o,label:a,hideLabel:t=!1,options:n=s,placeholder:i,value:d,defaultValue:c,onChange:p,disabled:u=!1,required:f=!1,helpText:m,error:b=!1,errorText:g,className:h,...v}){const y=e(),x=r||y,j=m?`${x}-help`:void 0,T=b&&g?`${x}-error`:void 0,O=[j,T].filter(Boolean).join(" ")||void 0,_=["mg-form-select",u&&"mg-form-select--disabled",b&&"mg-form-select--error"].filter(Boolean).join(" "),k=["mg-form-label",t&&"mg-u-sr-only",u&&"mg-form-label--disabled",f&&"mg-form-label--required"].filter(Boolean).join(" ");return(0,l().jsxs)("div",{className:["mg-form-field",h].filter(Boolean).join(" "),children:[a&&(0,l().jsx)("label",{className:k,htmlFor:x,children:a}),(0,l().jsxs)("select",{className:_,id:x,name:o,value:d,defaultValue:c,onChange:p,disabled:u,required:f,"aria-describedby":O,"aria-invalid":b||void 0,...a?{}:{"aria-label":i||"Select"},...v,children:[i&&(0,l().jsx)("option",{value:"",disabled:!0,children:i}),n.map(e=>(0,l().jsx)("option",{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),m&&(0,l().jsx)("p",{className:"mg-form-help",id:j,children:m}),b&&g&&(0,l().jsx)("p",{className:"mg-form-error",id:T,role:"alert",children:g})]})}d.propTypes={id:i().string,name:i().string,label:i().string,hideLabel:i().bool,options:i().arrayOf(i().shape({value:i().string.isRequired,label:i().string.isRequired,disabled:i().bool})),placeholder:i().string,value:i().string,defaultValue:i().string,onChange:i().func,disabled:i().bool,required:i().bool,helpText:i().string,error:i().bool,errorText:i().string,className:i().string};const c=d;export{d as Select,c as default};
9
+ import{useId as e}from"react";var r={2694(e,r,o){var a=o(6925);function l(){}function t(){}t.resetWarningCache=l,e.exports=function(){function e(e,r,o,l,t,n){if(n!==a){var i=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 i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var o={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:t,resetWarningCache:l};return o.PropTypes=o,o}},5556(e,r,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function a(e){const l=o[e];if(void 0!==l)return l.exports;const t=o[e]={exports:{}};return r[e](t,t.exports,a),t.exports}a.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.cw=e=>{var r;return()=>{if(e){var o=e;e=0,r={exports:{}},o.call(r.exports,r,r.exports)}return r.exports}},a.d=(e,r)=>{for(var o in r)a.o(r,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var l=/*#__PURE__*/a.cw((e,r)=>{var o=Symbol.for("react.transitional.element");function a(e,r,a){var l=null;if(void 0!==a&&(l=""+a),void 0!==r.key&&(l=""+r.key),"key"in r)for(var t in a={},r)"key"!==t&&(a[t]=r[t]);else a=r;return r=a.ref,{$$typeof:o,type:e,key:l,ref:void 0!==r?r:null,props:a}}Symbol.for("react.fragment"),r.jsx=a,r.jsxs=a}),t=/*#__PURE__*/a.cw(e=>{e.exports=l()}),n=/*#__PURE__*/a(5556),i=/*#__PURE__*/a.n(n);t();const s=[];function d({id:r,name:o,label:a,hideLabel:t=!1,options:n=s,placeholder:i,value:d,defaultValue:c,onChange:p,disabled:u=!1,required:f=!1,helpText:m,error:b=!1,errorText:g,className:h,...v}){const y=e(),x=r||y,j=m?`${x}-help`:void 0,T=b&&g?`${x}-error`:void 0,O=[j,T].filter(Boolean).join(" ")||void 0,_=["mg-form-select",u&&"mg-form-select--disabled",b&&"mg-form-select--error"].filter(Boolean).join(" "),k=["mg-form-label",t&&"mg-u-sr-only",u&&"mg-form-label--disabled",f&&"mg-form-label--required"].filter(Boolean).join(" ");/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,l().jsxs)("div",{className:["mg-form-field",h].filter(Boolean).join(" "),children:[a&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("label",{className:k,htmlFor:x,children:a}),/*#__PURE__*/ /*#__PURE__*/(0,l().jsxs)("select",{className:_,id:x,name:o,value:d,defaultValue:c,onChange:p,disabled:u,required:f,"aria-describedby":O,"aria-invalid":b||void 0,...a?{}:{"aria-label":i||"Select"},...v,children:[i&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("option",{value:"",disabled:!0,children:i}),n.map(e=>/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("option",{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),m&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("p",{className:"mg-form-help",id:j,children:m}),b&&g&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("p",{className:"mg-form-error",id:T,role:"alert",children:g})]})}d.propTypes={id:i().string,name:i().string,label:i().string,hideLabel:i().bool,options:i().arrayOf(i().shape({value:i().string.isRequired,label:i().string.isRequired,disabled:i().bool})),placeholder:i().string,value:i().string,defaultValue:i().string,onChange:i().func,disabled:i().bool,required:i().bool,helpText:i().string,error:i().bool,errorText:i().string,className:i().string};const c=d;export{d as Select,c as default};
@@ -3,7 +3,9 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-11-09T16:21:46.474Z
7
7
  */
8
8
  /*! For license information please see ServiceNotice.js.LICENSE.txt */
9
- import{useEffect as e,useRef as t,useState as n}from"react";var o={2694(e,t,n){var o=n(6925);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,i){if(i!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function 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:s,resetWarningCache:r};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"},6942(e,t){var n;!function(){var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}};const r={};function s(e){const t=r[e];if(void 0!==t)return t.exports;const n=r[e]={exports:{}};return o[e](n,n.exports,s),n.exports}s.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=s.cw(function(e,t){var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function r(e,t,o){var r=null;if(void 0!==o&&(r=""+o),void 0!==t.key&&(r=""+t.key),"key"in t)for(var s in o={},t)"key"!==s&&(o[s]=t[s]);else o=t;return t=o.ref,{$$typeof:n,type:e,key:r,ref:void 0!==t?t:null,props:o}}t.Fragment=o,t.jsx=r,t.jsxs=r}),a=s.cw(function(e,t){e.exports=i()}),l=s(5556),c=s.n(l),u=s(6942),d=s.n(u);a();const m=["info","warning","negative","positive"],p=()=>(0,i().jsx)("svg",{viewBox:"0 0 24 24",focusable:"false","aria-hidden":"true",children:(0,i().jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})}),f={info:"mg-icon-info-circle",warning:"mg-icon-exclamation-triangle",negative:"mg-icon-exclamation-triangle",positive:(0,i().jsx)(p,{})},g=["h2","h3","h4","h5","h6"],y=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex^="-"])'].join(",");function b(e){return!e.hidden&&!e.closest('[aria-hidden="true"], [inert]')&&("function"!=typeof e.checkVisibility||e.checkVisibility())}const h=({title:o,description:r,children:s,variant:a="info",icon:l=!0,headingLevel:c="h3",isCompact:u=!1,isProminent:p=!1,isOverlay:h=!1,isDismissible:v=!1,onDismiss:x,dismissLabel:_="Dismiss notification",actions:N,headerContent:O,role:j,className:w,...L})=>{const[S,C]=n(!1),R=t(null),T=t(null);if(e(()=>{T.current=document.activeElement},[]),S)return null;const E=m.includes(a)?a:"info",P=void 0===j?"negative"===E?"alert":"status":j||void 0,k=g.includes(c)?c:"h3",I=d()("mg-notice",`mg-notice--${E}`,{"mg-notice--compact":u,"mg-notice--prominent":p,"mg-notice--overlay":h},w);let U=null;!0===l?U=f[E]:l&&(U=l);const D=s||r;return(0,i().jsxs)("div",{ref:R,className:I,role:P,...L,children:[(o||U||v||O)&&(0,i().jsxs)("div",{className:"mg-notice__header",children:["string"==typeof U&&(0,i().jsx)("span",{className:d()("mg-icon mg-notice__icon",U),"aria-hidden":"true"}),U&&"string"!=typeof U&&(0,i().jsx)("span",{className:"mg-notice__icon","aria-hidden":"true",children:U}),o&&(0,i().jsx)(k,{className:"mg-notice__title",children:o}),O,v&&(0,i().jsx)("button",{type:"button",className:"mg-icon-button mg-icon-button--small mg-notice__dismiss",onClick:e=>{const t=R.current;if(t&&t.contains(document.activeElement)){const e=function(e,t){if(t&&t.isConnected&&t!==document.body&&!e.contains(t)&&"function"==typeof t.focus&&b(t))return t;let n=e.parentElement;for(;n;){let t=null,o=null;for(const r of n.querySelectorAll(y)){if(e.contains(r)||!b(r))continue;const n=e.compareDocumentPosition(r);n&Node.DOCUMENT_POSITION_PRECEDING?t=r:!o&&n&Node.DOCUMENT_POSITION_FOLLOWING&&(o=r)}if(t||o)return t||o;if(n===document.body)break;n=n.parentElement}return null}(t,T.current);e?e.focus():document.activeElement.blur()}T.current=null,C(!0),x&&x(e)},"aria-label":_,children:(0,i().jsx)("span",{className:"mg-icon mg-icon-close","aria-hidden":"true"})})]}),D&&(0,i().jsx)("div",{className:"mg-notice__description",children:"string"==typeof D?(0,i().jsx)("p",{children:D}):D}),N&&(0,i().jsx)("div",{className:"mg-notice__actions mg-buttons",children:N})]})};h.propTypes={title:c().node,description:c().node,children:c().node,variant:c().oneOf(m),icon:c().oneOfType([c().bool,c().string,c().node]),headingLevel:c().oneOf(g),isCompact:c().bool,isProminent:c().bool,isOverlay:c().bool,isDismissible:c().bool,onDismiss:c().func,dismissLabel:c().string,actions:c().node,headerContent:c().node,role:c().string,className:c().string};const v={retryLabel:"Retry connection",statusUrlLabel:"View status page",opensInNewTab:"(opens in a new tab)",statusDegraded:"Degraded",statusOffline:"Offline",countdownPrefix:"Next automatic retry in",countdownAnnouncement:"Retrying automatically in {seconds} seconds",autoRetryStopped:"Automatic retries stopped. Use the retry button to try again"},x={},_=({title:o,description:r,status:s="degraded",headingLevel:a="h3",isCompact:l=!1,isOverlay:c=!1,onRetry:u,retryLabel:m,statusUrl:p,statusUrlLabel:f,countdownSeconds:g=null,maxAutoRetries:y=3,labels:b=x,className:_,...N})=>{const O="offline"===s,j={...v,...b},w=m||j.retryLabel,L=f||j.statusUrlLabel,S=O?j.statusOffline:j.statusDegraded,C=p&&(e=>{try{const t="undefined"!=typeof window?window.location.href:"https://localhost/",{protocol:n}=new URL(e,t);return"http:"===n||"https:"===n}catch{return!1}})(p)?p:null,R=t(u);R.current=u;const T="function"==typeof u&&g>0,[E,P]=n(0),[k,I]=n(g);k!==g&&(I(g),P(0));const[U,D]=n(null),[A,F]=n(!1),M=T&&E>=y,q=T?g*2**E:null;e(()=>{F(!0)},[]),e(()=>{if(!T||E>=y)return void D(null);let e=g*2**E;D(e);const t=setInterval(()=>{e-=1,e>0?D(e):(clearInterval(t),D(null),R.current&&R.current(),P(e=>e+1))},1e3);return()=>clearInterval(t)},[T,g,E,y]);let V="";if(A){const e=[S];"string"==typeof o&&e.push(o),M?e.push(j.autoRetryStopped):T&&e.push(j.countdownAnnouncement.replace("{seconds}",String(q))),V=e.join(". ")}const W=null!=U&&U>0,z=u||C?(0,i().jsxs)(i().Fragment,{children:[u&&(0,i().jsxs)("button",{type:"button",className:"mg-button mg-button-primary",onClick:u,children:[(0,i().jsx)("span",{className:"mg-icon mg-icon-refresh mg-button__icon","aria-hidden":"true"}),w]}),C&&(0,i().jsxs)("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:"mg-button mg-button-secondary mg-button-outline",children:[L," ",(0,i().jsx)("span",{className:"mg-u-sr-only",children:j.opensInNewTab}),(0,i().jsx)("span",{className:"mg-icon mg-icon-external-link mg-button__icon","aria-hidden":"true"})]}),W&&(0,i().jsxs)("p",{className:"mg-notice__meta","aria-hidden":"true",children:[j.countdownPrefix," ",(0,i().jsxs)("strong",{children:[U,"s"]})]})]}):null;return(0,i().jsx)(h,{...N,role:null,variant:O?"negative":"warning",icon:O?"mg-icon-power-off":"mg-icon-exclamation-triangle",title:o,headingLevel:a,description:r,isCompact:l,isOverlay:c,actions:z,className:_,headerContent:(0,i().jsxs)(i().Fragment,{children:[(0,i().jsxs)("span",{className:d()("mg-status-label",O?"mg-status-label--negative":"mg-status-label--warning"),children:[(0,i().jsx)("span",{className:"mg-status-label__indicator","aria-hidden":"true"}),S]}),(0,i().jsx)("span",{className:"mg-u-sr-only",role:"status",children:V})]})})};function N(e){const{dataset:t}=e;let n={};if(t.labels)try{n=JSON.parse(t.labels)}catch{}const o=t.title||e.querySelector(".mg-notice__title")?.textContent?.trim()||null,r=t.description||e.querySelector(".mg-notice__description")?.textContent?.trim()||null,s=e=>{const t=parseInt(e,10);return Number.isNaN(t)?void 0:t},i=e.classList.contains("mg-notice--compact"),a=e.classList.contains("mg-notice--overlay");e.classList.remove("mg-notice--compact","mg-notice--overlay");const l="retry"in t?()=>e.dispatchEvent(new CustomEvent("mg-service-notice:retry",{bubbles:!0})):void 0;return{title:o,description:r,status:"offline"===t.status?"offline":"degraded",headingLevel:t.headingLevel||void 0,isCompact:"true"===t.isCompact||i,isOverlay:"true"===t.isOverlay||a,onRetry:l,retryLabel:t.retryLabel||void 0,statusUrl:t.statusUrl||void 0,statusUrlLabel:t.statusUrlLabel||void 0,countdownSeconds:s(t.countdownSeconds)??null,maxAutoRetries:s(t.maxAutoRetries),labels:Object.keys(n).length>0?n:void 0}}_.propTypes={title:c().node,description:c().node,status:c().oneOf(["degraded","offline"]),headingLevel:c().oneOf(["h2","h3","h4","h5","h6"]),isCompact:c().bool,isOverlay:c().bool,onRetry:c().func,retryLabel:c().string,statusUrl:c().string,statusUrlLabel:c().string,countdownSeconds:c().number,maxAutoRetries:c().number,labels:c().shape({retryLabel:c().string,statusUrlLabel:c().string,opensInNewTab:c().string,statusDegraded:c().string,statusOffline:c().string,countdownPrefix:c().string,countdownAnnouncement:c().string,autoRetryStopped:c().string}),className:c().string};export{_ as ServiceNotice,_ as default,N as fromElement};
9
+ import{useEffect as e,useRef as t,useState as n}from"react";var o={2694(e,t,n){var o=n(6925);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,a){if(a!==o){var i=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 i.name="Invariant Violation",i}}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:s,resetWarningCache:r};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"},6942(e,t){var n;!function(){var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}};const r={};function s(e){const t=r[e];if(void 0!==t)return t.exports;const n=r[e]={exports:{}};return o[e](n,n.exports,s),n.exports}s.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a=/*#__PURE__*/s.cw((e,t)=>{var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function r(e,t,o){var r=null;if(void 0!==o&&(r=""+o),void 0!==t.key&&(r=""+t.key),"key"in t)for(var s in o={},t)"key"!==s&&(o[s]=t[s]);else o=t;return t=o.ref,{$$typeof:n,type:e,key:r,ref:void 0!==t?t:null,props:o}}t.Fragment=o,t.jsx=r,t.jsxs=r}),i=/*#__PURE__*/s.cw(e=>{e.exports=a()});const l={en:"ltr",ar:"rtl",es:"ltr",fr:"ltr",ja:"ltr",ru:"ltr",zh:"ltr"};function c(e="en"){return String(e).trim().toLowerCase().split(/[-_]/)[0]}function u(e,t){const n=c(e),o=void 0!==e&&Object.hasOwn(l,n)?l[n]:void 0,r=void 0===t?o:t;return{...void 0===e?{}:{lang:e},...void 0===r?{}:{dir:r}}}function d(e){const t=e.dataset.lang??e.closest("[lang]")?.getAttribute("lang"),n=e.getAttribute("dir")?.toLowerCase();return{...null==t?{}:{lang:t},...["ltr","rtl","auto"].includes(n)?{dir:n}:{}}}const m=(p={retryLabel:"Retry connection",statusUrlLabel:"View status page",opensInNewTab:"(opens in a new tab)",statusDegraded:"Degraded",statusOffline:"Offline",countdownPrefix:"Next automatic retry in",countdownAnnouncement:"Retrying automatically in {seconds} seconds",autoRetryStopped:"Automatic retries stopped. Use the retry button to try again"},f={ar:{retryLabel:"إعادة محاولة الاتصال",statusUrlLabel:"عرض صفحة الحالة",opensInNewTab:"(يفتح في علامة تبويب جديدة)",statusDegraded:"أداء منخفض",statusOffline:"غير متصل",countdownPrefix:"المحاولة التلقائية التالية خلال",countdownAnnouncement:"إعادة المحاولة تلقائيًا خلال {seconds} ثانية",autoRetryStopped:"توقفت المحاولات التلقائية. استخدم زر إعادة المحاولة للمحاولة مرة أخرى"},es:{retryLabel:"Reintentar conexión",statusUrlLabel:"Ver página de estado",opensInNewTab:"(se abre en una pestaña nueva)",statusDegraded:"Rendimiento reducido",statusOffline:"Fuera de servicio",countdownPrefix:"Próximo reintento automático en",countdownAnnouncement:"Reintento automático en {seconds} segundos",autoRetryStopped:"Se detuvieron los reintentos automáticos. Use el botón de reintento para volver a intentarlo"},fr:{retryLabel:"Réessayer la connexion",statusUrlLabel:"Voir la page de statut",opensInNewTab:"(s'ouvre dans un nouvel onglet)",statusDegraded:"Performances réduites",statusOffline:"Hors ligne",countdownPrefix:"Prochaine tentative automatique dans",countdownAnnouncement:"Nouvelle tentative automatique dans {seconds} secondes",autoRetryStopped:"Tentatives automatiques arrêtées. Utilisez le bouton pour réessayer"},ja:{retryLabel:"接続を再試行",statusUrlLabel:"ステータスページを表示",opensInNewTab:"(新しいタブで開きます)",statusDegraded:"パフォーマンス低下",statusOffline:"オフライン",countdownPrefix:"次の自動再試行まで",countdownAnnouncement:"{seconds}秒後に自動的に再試行します",autoRetryStopped:"自動再試行を停止しました。再試行ボタンを使用してください"},ru:{retryLabel:"Повторить подключение",statusUrlLabel:"Страница статуса",opensInNewTab:"(откроется в новой вкладке)",statusDegraded:"Снижена производительность",statusOffline:"Офлайн",countdownPrefix:"Следующая автоматическая попытка через",countdownAnnouncement:"Автоматическая повторная попытка через {seconds} с",autoRetryStopped:"Автоматические попытки остановлены. Используйте кнопку повтора"},zh:{retryLabel:"重试连接",statusUrlLabel:"查看状态页面",opensInNewTab:"(在新标签页中打开)",statusDegraded:"性能下降",statusOffline:"离线",countdownPrefix:"距下次自动重试",countdownAnnouncement:"将在 {seconds} 秒后自动重试",autoRetryStopped:"已停止自动重试。请使用重试按钮再次尝试"}},(e,t)=>{const n=c(e),o=Object.hasOwn(f,n)?f[n]:void 0,r=Object.fromEntries(Object.entries(t??{}).filter(([,e])=>void 0!==e));return{...p,...o,...r}});var p,f,g=/*#__PURE__*/s(5556),b=/*#__PURE__*/s.n(g),y=s(6942),v=/*#__PURE__*/s.n(y);i();const h=["info","warning","negative","positive"],x=()=>/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("svg",{viewBox:"0 0 24 24",focusable:"false","aria-hidden":"true",children:/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})}),w={info:"mg-icon-info-circle",warning:"mg-icon-exclamation-triangle",negative:"mg-icon-exclamation-triangle",positive:/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)(x,{})},O=["h2","h3","h4","h5","h6"],L=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex^="-"])'].join(",");function N(e){return!e.hidden&&!e.closest('[aria-hidden="true"], [inert]')&&("function"!=typeof e.checkVisibility||e.checkVisibility())}const j=({title:o,description:r,children:s,variant:i="info",icon:l=!0,headingLevel:c="h3",isCompact:u=!1,isProminent:d=!1,isOverlay:m=!1,isDismissible:p=!1,onDismiss:f,dismissLabel:g="Dismiss notification",actions:b,headerContent:y,role:x,className:j,..._})=>{const[S,R]=n(!1),P=t(null),T=t(null);if(e(()=>{T.current=document.activeElement},[]),S)return null;const C=h.includes(i)?i:"info",U=void 0===x?"negative"===C?"alert":"status":x||void 0,I=O.includes(c)?c:"h3",A=v()("mg-notice",`mg-notice--${C}`,{"mg-notice--compact":u,"mg-notice--prominent":d,"mg-notice--overlay":m},j);let D=null;!0===l?D=w[C]:l&&(D=l);const E=s||r;/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,a().jsxs)("div",{ref:P,className:A,role:U,..._,children:[(o||D||p||y)&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)("div",{className:"mg-notice__header",children:["string"==typeof D&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:v()("mg-icon mg-notice__icon",D),"aria-hidden":"true"}),D&&"string"!=typeof D&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-notice__icon","aria-hidden":"true",children:D}),o&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)(I,{className:"mg-notice__title",children:o}),y,p&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("button",{type:"button",className:"mg-icon-button mg-icon-button--small mg-notice__dismiss",onClick:e=>{const t=P.current;if(t&&t.contains(document.activeElement)){const e=function(e,t){if(t&&t.isConnected&&t!==document.body&&!e.contains(t)&&"function"==typeof t.focus&&N(t))return t;let n=e.parentElement;for(;n;){let t=null,o=null;for(const r of n.querySelectorAll(L)){if(e.contains(r)||!N(r))continue;const n=e.compareDocumentPosition(r);n&Node.DOCUMENT_POSITION_PRECEDING?t=r:!o&&n&Node.DOCUMENT_POSITION_FOLLOWING&&(o=r)}if(t||o)return t||o;if(n===document.body)break;n=n.parentElement}return null}(t,T.current);e?e.focus():document.activeElement.blur()}T.current=null,R(!0),f&&f(e)},"aria-label":g,children:/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-icon mg-icon-close","aria-hidden":"true"})})]}),E&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("div",{className:"mg-notice__description",children:"string"==typeof E?/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("p",{children:E}):E}),b&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("div",{className:"mg-notice__actions mg-buttons",children:b})]})};j.propTypes={title:b().node,description:b().node,children:b().node,variant:b().oneOf(h),icon:b().oneOfType([b().bool,b().string,b().node]),headingLevel:b().oneOf(O),isCompact:b().bool,isProminent:b().bool,isOverlay:b().bool,isDismissible:b().bool,onDismiss:b().func,dismissLabel:b().string,actions:b().node,headerContent:b().node,role:b().string,className:b().string};const _=({title:o,description:r,status:s="degraded",headingLevel:i="h3",isCompact:l=!1,isOverlay:c=!1,onRetry:d,retryLabel:p,statusUrl:f,statusUrlLabel:g,countdownSeconds:b=null,maxAutoRetries:y=3,lang:h,dir:x,labels:w,className:O,...L})=>{const N="offline"===s,_=m(h,w),S=p||_.retryLabel||m(h).retryLabel,R=g||_.statusUrlLabel||m(h).statusUrlLabel,P=N?_.statusOffline:_.statusDegraded,T=f&&(e=>{try{const t="undefined"!=typeof window?window.location.href:"https://localhost/",{protocol:n}=new URL(e,t);return"http:"===n||"https:"===n}catch{return!1}})(f)?f:null,C=t(d);C.current=d;const U="function"==typeof d&&b>0,[I,A]=n(0),[D,E]=n(b);D!==b&&(E(b),A(0));const[k,q]=n(null),[z,F]=n(!1),V=U&&I>=y,M=U?b*2**I:null;e(()=>{F(!0)},[]),e(()=>{if(!U||I>=y)return void q(null);let e=b*2**I;q(e);const t=setInterval(()=>{e-=1,e>0?q(e):(clearInterval(t),q(null),C.current&&C.current(),A(e=>e+1))},1e3);return()=>clearInterval(t)},[U,b,I,y]);let W="";if(z){const e=[P];"string"==typeof o&&e.push(o),V?e.push(_.autoRetryStopped):U&&e.push(_.countdownAnnouncement.replace("{seconds}",String(M))),W=e.join(". ")}const $=null!=k&&k>0,B=d||T?/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)(a().Fragment,{children:[d&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)("button",{type:"button",className:"mg-button mg-button-primary",onClick:d,children:[/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-icon mg-icon-refresh mg-button__icon","aria-hidden":"true"}),S]}),T&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"mg-button mg-button-secondary mg-button-outline",children:[R," ",/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-u-sr-only",children:_.opensInNewTab}),/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-icon mg-icon-external-link mg-button__icon","aria-hidden":"true"})]}),$&&/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)("p",{className:"mg-notice__meta","aria-hidden":"true",children:[_.countdownPrefix," ",/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)("strong",{children:[k,"s"]})]})]}):null;/*#__PURE__*/ /*#__PURE__*/
11
+ return(0,a().jsx)(j,{...u(h,x),...L,role:null,variant:N?"negative":"warning",icon:N?"mg-icon-power-off":"mg-icon-exclamation-triangle",title:o,headingLevel:i,description:r,isCompact:l,isOverlay:c,actions:B,className:O,headerContent:/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)(a().Fragment,{children:[/*#__PURE__*/ /*#__PURE__*/(0,a().jsxs)("span",{className:v()("mg-status-label",N?"mg-status-label--negative":"mg-status-label--warning"),children:[/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-status-label__indicator","aria-hidden":"true"}),P]}),/*#__PURE__*/ /*#__PURE__*/(0,a().jsx)("span",{className:"mg-u-sr-only",role:"status",children:W})]})})};function S(e){const{dataset:t}=e,n=function(e){try{const t=JSON.parse(e.dataset.labels);return t&&"object"==typeof t&&!Array.isArray(t)?t:void 0}catch{return}}(e)??{},o=t.title||e.querySelector(".mg-notice__title")?.textContent?.trim()||null,r=t.description||e.querySelector(".mg-notice__description")?.textContent?.trim()||null,s=e=>{const t=parseInt(e,10);return Number.isNaN(t)?void 0:t},a=e.classList.contains("mg-notice--compact"),i=e.classList.contains("mg-notice--overlay");e.classList.remove("mg-notice--compact","mg-notice--overlay");const l="retry"in t?()=>e.dispatchEvent(new CustomEvent("mg-service-notice:retry",{bubbles:!0})):void 0;return{...d(e),title:o,description:r,status:"offline"===t.status?"offline":"degraded",headingLevel:t.headingLevel||void 0,isCompact:"true"===t.isCompact||a,isOverlay:"true"===t.isOverlay||i,onRetry:l,retryLabel:t.retryLabel??void 0,statusUrl:t.statusUrl||void 0,statusUrlLabel:t.statusUrlLabel??void 0,countdownSeconds:s(t.countdownSeconds)??null,maxAutoRetries:s(t.maxAutoRetries),labels:Object.keys(n).length>0?n:void 0}}_.propTypes={title:b().node,description:b().node,status:b().oneOf(["degraded","offline"]),headingLevel:b().oneOf(["h2","h3","h4","h5","h6"]),isCompact:b().bool,isOverlay:b().bool,onRetry:b().func,retryLabel:b().string,statusUrl:b().string,statusUrlLabel:b().string,countdownSeconds:b().number,maxAutoRetries:b().number,lang:b().string,dir:b().oneOf(["ltr","rtl","auto"]),labels:b().shape({retryLabel:b().string,statusUrlLabel:b().string,opensInNewTab:b().string,statusDegraded:b().string,statusOffline:b().string,countdownPrefix:b().string,countdownAnnouncement:b().string,autoRetryStopped:b().string}),className:b().string};export{_ as ServiceNotice,_ as default,S as fromElement,m as getServiceNoticeLabels};