@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,13 @@
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 ContentTeaser.js.LICENSE.txt */
9
- import{default as e}from"react";var t={2694(e,t,n){var a=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,o){if(o!==a){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 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:i,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"}};const n={};function a(e){const r=n[e];if(void 0!==r)return r.exports;const i=n[e]={exports:{}};return t[e](i,i.exports,a),i.exports}a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=a.cw(function(e,t){var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(e,t,a){var r=null;if(void 0!==a&&(r=""+a),void 0!==t.key&&(r=""+t.key),"key"in t)for(var i in a={},t)"key"!==i&&(a[i]=t[i]);else a=t;return t=a.ref,{$$typeof:n,type:e,key:r,ref:void 0!==t?t:null,props:a}}t.Fragment=a,t.jsx=r,t.jsxs=r}),i=a.cw(function(e,t){e.exports=r()}),o=a(5556),s=a.n(o);i(),s().string,s().string,s().string,s().string,s().string,s().string;const d=["labels","resourceType","location","eventLocation","organizationType","organizationLabels","classification","topics","published","deadline","event","schedule","exhibitions","bucket","sessionBucket","sessionTypes","room","format","freshness","sources","authors","summary","delivery","identifier","scope","status","language"],l=Object.fromEntries([{id:"article",name:"Article",model:{status:"provisional",intent:"An editorial account that reports, explains or interprets a subject. News, research briefs and attributed commentary share this purpose while differing in voice and evidence.",readerNeeds:["Understand the subject, editorial purpose and publication context before opening the full account.","Distinguish reporting from opinion and identify authors, sources and relevant dates.","Read the account and follow supporting evidence or related coverage where supplied."]},presentations:{fullPage:{status:"reference",intent:"Existing article-page reference; a shared article domain contract and adapter are still provisional.",reference:{kind:"Patterns/Content/Article/Full page",story:"Large, prominent image",id:"patterns-article-story--large-image"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"News",id:"patterns-content-teaser--news"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},book:{kind:"Patterns/Content card",story:"News book",id:"patterns-content-card--news-book"}},basis:"audited-card-selection"}},defaultProfile:"news",profiles:{news:{name:"News",intent:"An editorial news item with release date, attribution and media.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"News",id:"patterns-content-teaser--news"},fields:{before:["labels","published"],after:["summary","sources","language"],useShortTitle:!0,media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},fields:{media:"photo",before:["labels"],after:[],useShortTitle:!0},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},book:{kind:"Patterns/Content card",story:"News book",id:"patterns-content-card--news-book"}},basis:"audited-card-selection"}}},commentary:{name:"Commentary",intent:"An authored opinion or reflection with author attribution and publication date.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Blog",id:"patterns-content-teaser--blog"},fields:{before:["labels","published","authors"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Commentary",id:"patterns-content-card--commentary"},fields:{media:"photo",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Commentary",id:"patterns-content-card--commentary"},book:{kind:"Patterns/Content card",story:"Commentary book",id:"patterns-content-card--commentary-book"}},basis:"audited-card-selection"}}}}},{id:"publication",name:"Publication",model:{status:"provisional",intent:"A published document with a stable bibliographic identity, including reports, educational materials, policies, statements and resolutions.",readerNeeds:["Assess the subject, document type, issuing organizations, language and relevance.","Identify authors, publication dates, identifiers and editions for attribution and citation; distinguish policy periods or statement dates from publication dates.","Read or download available documents and supporting materials, with clear format and access information."]},presentations:{fullPage:{status:"reference",intent:"Existing report/publication page reference; it is not a complete bibliographic detail-page contract.",reference:{kind:"Patterns/Content/Publication/Full page",story:"Report or publication",id:"patterns-landing-pages--report-landing"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Publication",id:"patterns-content-teaser--publication"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},book:{kind:"Patterns/Content card",story:"Publication book",id:"patterns-content-card--publication-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A published document with bibliographic identity, complete cover and source organizations.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Publication",id:"patterns-content-teaser--publication"},fields:{before:["labels","published"],after:["identifier","summary","sources","language"],media:"cover"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},fields:{media:"cover",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},book:{kind:"Patterns/Content card",story:"Publication book",id:"patterns-content-card--publication-book"}},basis:"audited-card-selection"}}}}},{id:"resource",name:"Resource",model:{status:"provisional",intent:"Something readers can use, learn from or apply, including practical tools, case studies, academic programmes and on-demand learning. Its purpose and delivery matter more than its source system.",readerNeeds:["Understand the intended use, audience and provider, and assess relevance to a task or learning goal.","Assess format, delivery, location and access; include level and duration when relevant to learning resources.","Reach the resource or provider and understand the next step."]},presentations:{fullPage:{status:"stub",intent:"A full resource page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Resource",id:"patterns-content-teaser--resource"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},book:{kind:"Patterns/Content card",story:"Resource book",id:"patterns-content-card--resource-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A reusable resource with format, availability and source organizations.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Resource",id:"patterns-content-teaser--resource"},fields:{before:["labels","resourceType","location","delivery"],after:["summary","sources","language"],media:"none"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},fields:{media:"photo",before:["resourceType"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},book:{kind:"Patterns/Content card",story:"Resource book",id:"patterns-content-card--resource-book"}},basis:"audited-card-selection"}}}}},{id:"event",name:"Event",model:{status:"provisional",intent:"A scheduled opportunity to attend or participate, from a standalone conference or training course to a session within a larger programme.",readerNeeds:["Understand the purpose, audience, organizers and relationship to a parent event or programme.","Plan participation using occurrence dates, time zone, venue or online format, languages and accessibility information where relevant.","Find registration or joining instructions, then recordings and materials when available. Programme sessions may need distinct session and exhibition schedules, rooms and speaker information."]},presentations:{fullPage:{status:"stub",intent:"A full event page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Event",id:"patterns-content-teaser--event"}},card:{status:"experimental",intent:"Show occurrence dates or programme schedules and supplied status to support participation decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},book:{kind:"Patterns/Content card",story:"Event book",id:"patterns-content-card--event-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}},defaultProfile:"general",profiles:{general:{name:"General",intent:"An event with occurrence dates, location and participation information.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Event",id:"patterns-content-teaser--event"},fields:{before:["labels","eventLocation","event","delivery"],after:["summary","language"],media:"none"}},card:{status:"experimental",intent:"Show occurrence dates or programme schedules and supplied status to support participation decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},fields:{media:"photo",before:["labels"],after:["event","status","published"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},book:{kind:"Patterns/Content card",story:"Event book",id:"patterns-content-card--event-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}}},"programme-session":{name:"Programme session",intent:"A scheduled contribution within a larger programme, with its own purpose and participation context.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Conference session",id:"patterns-content-teaser--conference-session"},fields:{before:["bucket","schedule","exhibitions","room","format"],after:["summary","topics"],media:"photo"}},card:{status:"experimental",intent:"Show occurrence dates or programme schedules and supplied status to support participation decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Programme session",id:"patterns-content-card--programme-session"},fields:{media:"photo",before:["sessionBucket","sessionTypes"],after:["schedule","exhibitions","status","published"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Programme session",id:"patterns-content-card--programme-session"},book:{kind:"Patterns/Content card",story:"Programme session book",id:"patterns-content-card--programme-session-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}}}}},{id:"organization",name:"Organization",model:{status:"provisional",intent:"An entity involved in disaster risk reduction, described through its identity, mandate, activities and relationships. A coordination platform emphasizes its country, remit and hosting body.",readerNeeds:["Identify the organization, its role, geographic scope and areas of work.","Understand relevant affiliations, partnerships and contributions; distinguish a coordination platform from its host.","Find published websites, participation routes or appropriate public contact information."]},presentations:{fullPage:{status:"stub",intent:"A full organization page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Organization",id:"patterns-content-teaser--organization"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},book:{kind:"Patterns/Content card",story:"Organization book",id:"patterns-content-card--organization-book"}},basis:"audited-card-selection"}},defaultProfile:"general",profiles:{general:{name:"General",intent:"An organization described through its mandate, activities and areas of work.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Organization",id:"patterns-content-teaser--organization"},fields:{before:["location"],after:["summary","organizationType"],media:"logo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},fields:{media:"logo",before:["organizationLabels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},book:{kind:"Patterns/Content card",story:"Organization book",id:"patterns-content-card--organization-book"}},basis:"audited-card-selection"}}},"coordination-platform":{name:"Coordination platform",intent:"A national coordination platform with its own identity and explanatory content.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"National platform",id:"patterns-content-teaser--national-platform"},fields:{before:["labels"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Coordination platform",id:"patterns-content-card--coordination-platform"},fields:{media:"none",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Coordination platform",id:"patterns-content-card--coordination-platform"},book:{kind:"Patterns/Content card",story:"Coordination platform book",id:"patterns-content-card--coordination-platform-book"}},basis:"proposed-card-selection"}}}}},{id:"collection",name:"Collection",model:{status:"provisional",intent:"A deliberately assembled set of related content, with an explanation of its scope and why the items belong together.",readerNeeds:["Understand the collection’s purpose, selection and coverage before exploring its members.","Browse related items and assess their relevance; use filtering or grouping when the collection warrants it.","Understand freshness and completeness where known, and distinguish a single collection from an index of collections."]},presentations:{fullPage:{additionalReferences:[{kind:"Patterns/Content/Collection/Full page/Collection index",story:"Collection index",id:"patterns-landing-pages--index-landing",intent:"A directory into several grouped collections, distinct from a curated single-collection page."}],status:"reference",intent:"Existing collection-page reference with listing behaviour; canonical content-contract alignment remains open.",reference:{kind:"Patterns/Content/Collection/Full page/Curated collection",story:"Collection page",id:"patterns-collection-page--typical"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Collection",id:"patterns-content-teaser--collection"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},book:{kind:"Patterns/Content card",story:"Collection book",id:"patterns-content-card--collection-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A curated collection whose freshness reflects its linked content.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Collection",id:"patterns-content-teaser--collection"},fields:{before:["labels","freshness"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},fields:{media:"photo",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},book:{kind:"Patterns/Content card",story:"Collection book",id:"patterns-content-card--collection-book"}},basis:"audited-card-selection"}}}}},{id:"opportunity",name:"Opportunity",model:{status:"provisional",intent:"An invitation to apply, contribute or take part, with conditions and a decision window. Jobs are the initial editorial profile.",readerNeeds:["Assess the role or opportunity, offering organization, location and participation conditions.","Understand eligibility, deadlines and current availability before investing in an application.","Find application instructions and supporting details; distinguish a closing deadline from a publication date."]},presentations:{fullPage:{status:"stub",intent:"A full opportunity page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Vacancy",id:"patterns-content-teaser--vacancy"}},card:{status:"experimental",intent:"Show the closing deadline and supplied status to support application decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},book:{kind:"Patterns/Content card",story:"Job book",id:"patterns-content-card--job-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}},defaultProfile:"job",profiles:{job:{name:"Job",intent:"A job opportunity with location, closing deadline and supplied status.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Vacancy",id:"patterns-content-teaser--vacancy"},fields:{before:["labels","location","deadline","status"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Show the closing deadline and supplied status to support application decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},fields:{media:"none",before:[],after:["deadline","status","published"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},book:{kind:"Patterns/Content card",story:"Job book",id:"patterns-content-card--job-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}}}}},{id:"reference-entry",name:"Reference entry",model:{status:"provisional",intent:"An explanation intended for lookup and reuse, from a concise term definition to an authoritative hazard profile with scientific evidence and risk context.",readerNeeds:["Find and understand the term or hazard, its scope, synonyms and classification where relevant.","Identify authoritative sources and stable identifiers for attribution and citation.","Explore related concepts. Hazard profiles may also explain drivers, impacts, monitoring, risk management and relationships between hazards."]},presentations:{fullPage:{status:"stub",intent:"A full reference-entry page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Terminology",id:"patterns-content-teaser--terminology"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},book:{kind:"Patterns/Content card",story:"Definition book",id:"patterns-content-card--definition-book"}},basis:"proposed-card-selection"}},defaultProfile:"definition",profiles:{definition:{name:"Definition",intent:"A reference term with a definition and stable identity.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Terminology",id:"patterns-content-teaser--terminology"},fields:{before:["labels"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},fields:{media:"none",before:["labels"],after:["summary"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},book:{kind:"Patterns/Content card",story:"Definition book",id:"patterns-content-card--definition-book"}},basis:"proposed-card-selection"}}},"hazard-profile":{name:"Hazard profile",intent:"A reference hazard definition with classification and stable notation.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Hazard profile",id:"patterns-content-teaser--hazard-profile"},fields:{before:["classification","identifier"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Hazard profile",id:"patterns-content-card--hazard-profile"},fields:{media:"none",before:["classification","identifier"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Hazard profile",id:"patterns-content-card--hazard-profile"},book:{kind:"Patterns/Content card",story:"Hazard profile book",id:"patterns-content-card--hazard-profile-book"}},basis:"proposed-card-selection"}}}}},{id:"commitment",name:"Commitment",model:{status:"provisional",intent:"An initiative undertaken by one or more entities to contribute to disaster risk reduction, with a scope, intended outcomes and evidence of progress.",readerNeeds:["Understand who is responsible, what is promised, where it applies and the intended timeframe.","Assess status, deliverables, beneficiaries and alignment with relevant goals when published.","Follow public progress reports and supporting evidence."]},presentations:{fullPage:{status:"stub",intent:"A full commitment page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Commitment",id:"patterns-content-teaser--commitment"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},book:{kind:"Patterns/Content card",story:"Commitment book",id:"patterns-content-card--commitment-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A voluntary commitment with geographic scope, progress status and publication metadata.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Commitment",id:"patterns-content-teaser--commitment"},fields:{before:["scope","status","published"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},fields:{media:"photo",before:[],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},book:{kind:"Patterns/Content card",story:"Commitment book",id:"patterns-content-card--commitment-book"}},basis:"audited-card-selection"}}}}},{id:"landing-page",name:"Landing page",model:{status:"provisional",intent:"An orientation and wayfinding page for a topic, initiative or audience. A content hub is a variant for ongoing exploration with a consistent context and navigation.",readerNeeds:["Understand the page’s purpose and whether it addresses the reader’s needs.","Identify prioritized routes to relevant content, services or actions.","Explore related material and retain orientation across a hub where persistent navigation is appropriate."]},presentations:{fullPage:{additionalReferences:[{kind:"Patterns/Content/Landing page/Full page/Content hub",story:"Hub home",id:"patterns-content-hub--hub-home",intent:"Hub-home variant with persistent identity and section navigation; detail-page examples demonstrate the shared navigation composition."}],status:"reference",intent:"Existing topic/initiative landing-page reference; family-specific contract alignment remains open.",reference:{kind:"Patterns/Content/Landing page/Full page/Topic or initiative",story:"Topic or initiative",id:"patterns-landing-pages--topic-landing"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Landing page",id:"patterns-content-teaser--landing-page"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},book:{kind:"Patterns/Content card",story:"Landing page book",id:"patterns-content-card--landing-page-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"An editorial entry point that introduces a subject and offers routes to related material.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Landing page",id:"patterns-content-teaser--landing-page"},fields:{before:["labels"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},fields:{media:"photo",before:[],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},book:{kind:"Patterns/Content card",story:"Landing page book",id:"patterns-content-card--landing-page-book"}},basis:"audited-card-selection"}}}}},{id:"person",name:"Person",model:{status:"provisional",intent:"A public profile that establishes a person’s identity, role, affiliations and relevant experience or contributions.",readerNeeds:["Identify the person and understand their role, organization and expertise.","Explore their biography, activities and contributions where published.","Follow relevant public professional links while respecting the intended visibility of personal information."]},presentations:{fullPage:{status:"stub",intent:"A full person page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Person",id:"patterns-content-teaser--person"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},book:{kind:"Patterns/Content card",story:"Person book",id:"patterns-content-card--person-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A person with identity and biographical content; individual presentations choose which profile fields to expose.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Person",id:"patterns-content-teaser--person"},fields:{before:[],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},fields:{media:"photo",before:[],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},book:{kind:"Patterns/Content card",story:"Person book",id:"patterns-content-card--person-book"}},basis:"audited-card-selection"}}}}}].map(e=>[e.id,e]));function c(e){const t=function(e){return"string"==typeof e&&""!==e.trim()?e:null}(e)?.trim();if(!t||[...t].some(e=>e.charCodeAt(0)<=32||"\\"===e)||!/^(https?:\/\/|\/(?!\/))/i.test(t))return null;try{const e=new URL(t,"https://mangrove.invalid");return["https:","http:"].includes(e.protocol)?t:null}catch{return null}}const p=s().shape({dateTime:s().string.isRequired,text:s().string.isRequired,label:s().string}),u=s().oneOfType([s().string,s().shape({label:s().string.isRequired,link:s().string})]),f=s().shape({start:p,end:p,timeZone:s().string,label:s().string}),m=e=>Boolean(e?.dateTime&&e?.text?.trim()),b=e=>m(e?.start),h=e=>"string"==typeof e&&e.trim()?e:null;function y(e){const t=new Set;return e.flat().filter(Boolean).map(e=>"string"==typeof e?{label:e}:e).filter(e=>{if(!h(e.label))return!1;const n=JSON.stringify([e.label,c(e.link)]);return!t.has(n)&&(t.add(n),!0)})}function g({value:e}){return(0,r().jsxs)("span",{children:[e.label&&(0,r().jsxs)(r().Fragment,{children:[e.label," "]}),(0,r().jsx)("time",{dateTime:e.dateTime,dir:"auto",children:e.text})]})}function k({value:e}){return(0,r().jsxs)("span",{children:[e.label&&(0,r().jsxs)(r().Fragment,{children:[e.label," "]}),(0,r().jsx)(g,{value:e.start}),m(e.end)&&(0,r().jsxs)(r().Fragment,{children:["–",(0,r().jsx)(g,{value:e.end})]}),e.timeZone&&(0,r().jsxs)(r().Fragment,{children:[" (",e.timeZone,")"]})]})}function v({items:t,compact:n=!0}){return(0,r().jsx)("span",{className:"mg-content-meta__group",children:t.map((t,a)=>{const i=c(t.link);return(0,r().jsxs)(e.Fragment,{children:[a>0&&" ",i?(0,r().jsx)("a",{href:i,className:[n&&"mg-card__label","mg-content-meta__metadata-link"].filter(Boolean).join(" "),children:t.label}):(0,r().jsx)("span",{className:n?"mg-card__label":void 0,children:t.label})]},JSON.stringify([t.label,i]))})})}function P({items:t}){return(0,r().jsx)("ul",{className:"mg-content-meta__attribution",children:t.map((t,n)=>(0,r().jsxs)(e.Fragment,{children:[n>0&&" ",(0,r().jsx)("li",{children:t})]},t))})}function C(e,t){if("labels"===t)return y([e.typeLabel,...e.labels||[]]);if("location"===t)return y([e.location]);if("resourceType"===t)return y([e.resourceType]);if("eventLocation"===t)return y([e.event?.location]);if("organizationLabels"===t)return y([e.organizationType]);if("sessionBucket"===t)return y([e.session?.bucket]);if("sessionTypes"===t)return y(e.session?.types||[]);if("organizationType"===t||"status"===t)return y([e[t]]);if("classification"===t||"topics"===t)return y(e[t]||[]);if("published"===t||"deadline"===t)return m(e[t])?e[t]:null;if("event"===t)return b(e.event)?e.event:null;if("schedule"===t||"exhibitions"===t)return(e.session?.[t]||[]).filter(b);if(["bucket","room","format"].includes(t))return h(e.session?.[t]);if("freshness"===t)return["updated","created"].includes(e.freshness?.kind)&&m(e.freshness?.date)?e.freshness:null;if("sources"===t||"authors"===t){const n=e[t]??("sources"===t&&e.source?[e.source]:[]);return[...new Set(n.filter(e=>h(e)))]}if(!d.includes(t))throw new TypeError("Unknown content presentation field.");return h(e[t])}function x({field:t,value:n}){return["labels","resourceType","eventLocation","organizationLabels","sessionBucket","sessionTypes","location","classification","topics","organizationType","status"].includes(t)?(0,r().jsx)(v,{items:n,compact:["labels","resourceType","organizationLabels","sessionBucket","sessionTypes","classification","topics"].includes(t)}):"published"===t||"deadline"===t?(0,r().jsx)(g,{value:n}):"event"===t?(0,r().jsx)(k,{value:n}):"schedule"===t||"exhibitions"===t?(0,r().jsx)("span",{className:"mg-content-meta__group",children:n.map((t,n)=>(0,r().jsxs)(e.Fragment,{children:[n>0&&" ",(0,r().jsx)(k,{value:t})]},JSON.stringify(t)))}):"freshness"===t?(0,r().jsx)("span",{"data-freshness-kind":n.kind,children:(0,r().jsx)(g,{value:n.date})}):"sources"===t||"authors"===t?(0,r().jsx)(P,{items:n}):(0,r().jsx)("span",{children:n})}function w(e,t){return t.map(t=>({field:t,value:C(e,t)})).filter(({value:e})=>Array.isArray(e)?e.length>0:Boolean(e))}function T({content:t,headingLevel:n=3,className:a,presentation:i,layout:o}){const s="card"===i?"ContentCard":"ContentTeaser",{type:p,profile:u,title:f,shortTitle:m,link:b,image:y,lang:g,dir:k}=t,v=function(e,t,n){if(!Object.hasOwn(l,e))return null;const a=l[e],r=void 0===t?a.defaultProfile:t;if(!Object.hasOwn(a.profiles,r))return null;const i=a.profiles[r].presentations[n];if(!i||"experimental"!==i.status||!i.fields)return null;if(![...i.fields.before,...i.fields.after].every(e=>d.includes(e)))throw new TypeError("Unknown content presentation field.");return{profile:r,...i}}(p,u,i),P=v?.fields,C=c(b);if(!P||!f?.trim()||!C)throw new TypeError(`${s} requires a supported type/profile, title and resolved HTTP(S) or root-relative link.`);if(![2,3,4,5,6].includes(n))throw new TypeError(`${s} headingLevel must be between 2 and 6.`);const T=`h${n}`,z="none"===P.media?"none":["photo","cover","logo"].includes(y?.kind)?y.kind:P.media,R="none"!==z?c(y?.src):null,j=w(t,P.before),O=w(t,P.after);return function(e,t){const n=(e,n)=>{if(!h(e?.label))throw new TypeError(`${t} requires a caller-localized ${n}.label to identify the date's meaning.`)},a=Object.fromEntries(e.map(({field:e,value:t})=>[e,t]));("ContentCard"===t||Boolean(a.published&&(a.event||a.deadline||a.schedule?.length||a.exhibitions?.length)))&&(a.published&&n(a.published,"published"),a.event&&n(a.event,"event"),a.schedule?.forEach(e=>n(e,"session.schedule[]")),a.exhibitions?.forEach(e=>n(e,"session.exhibitions[]"))),a.deadline&&n(a.deadline,"deadline"),a.freshness&&n(a.freshness.date,"freshness.date"),a.exhibitions?.length&&(a.exhibitions.forEach(e=>n(e,"session.exhibitions[]")),a.schedule?.forEach(e=>n(e,"session.schedule[]")))}([...j,...O],s),(0,r().jsxs)("article",{lang:g,dir:k||(g?"auto":void 0),"data-content-type":p,"data-content-profile":v.profile,"data-content-presentation":i,"data-content-layout":o,"data-content-media":z,className:["mg-card","teaser"===i?"mg-card__hc mg-card-book__hc mg-content-teaser":"mg-card__vc mg-content-card","card"===i&&`mg-content-card--${o}`,"card"===i&&"cover"===z&&"mg-card__book","logo"===z&&"mg-content-pattern--logo",a].filter(Boolean).join(" "),children:[R&&(0,r().jsx)("div",{className:"mg-card__visual",children:(0,r().jsx)("img",{src:R,alt:y.alt??"",className:"mg-card__image",loading:"lazy"})}),(0,r().jsxs)("div",{className:"mg-card__content",children:[j.length>0&&(0,r().jsx)("div",{className:"mg-card__meta mg-content-meta__before-title",children:j.map(({field:t,value:n},a)=>(0,r().jsxs)(e.Fragment,{children:[a>0&&" ",(0,r().jsx)(x,{field:t,value:n})]},t))}),(0,r().jsx)(T,{className:"mg-card__title",children:(0,r().jsx)("a",{href:C,children:P.useShortTitle&&m?.trim()||f})}),O.map(({field:e,value:t})=>["sources","authors"].includes(e)?(0,r().jsx)(x,{field:e,value:t},e):(0,r().jsx)("p",{className:"summary"===e?"mg-card__summary":"mg-content-meta__metadata",children:(0,r().jsx)(x,{field:e,value:t})},e))]})]})}g.propTypes={value:p.isRequired},k.propTypes={value:f.isRequired},v.propTypes={compact:s().bool,items:s().arrayOf(u).isRequired},P.propTypes={items:s().arrayOf(s().string).isRequired},x.propTypes={field:s().string.isRequired,value:s().any.isRequired},T.propTypes={content:s().object.isRequired,headingLevel:s().oneOf([2,3,4,5,6]),className:s().string,presentation:s().oneOf(["teaser","card"]).isRequired,layout:s().oneOf(["horizontal","vertical","book"]).isRequired};const z=s().shape({dateTime:s().string.isRequired,text:s().string.isRequired,label:s().string}),R=s().oneOfType([s().string,s().arrayOf(s().string)]),j=s().oneOfType([s().string,s().shape({label:s().string.isRequired,link:s().string})]),O=s().shape({start:z,end:z,timeZone:s().string,label:s().string});function A({content:e,headingLevel:t=3,className:n}){return(0,r().jsx)(T,{content:e,headingLevel:t,className:n,presentation:"teaser",layout:"horizontal"})}A.propTypes={content:s().shape({type:s().oneOf(["article","publication","resource","event","organization","collection","opportunity","reference-entry","commitment","landing-page","person"]).isRequired,profile:s().string,title:s().string.isRequired,shortTitle:s().string,link:s().string.isRequired,image:s().shape({src:s().string.isRequired,alt:s().string.isRequired,kind:s().oneOf(["photo","cover","logo"])}),summary:s().string,labels:s().arrayOf(j),typeLabel:s().string,published:z,event:s().shape({start:z,end:z,timeZone:s().string,location:s().string,label:s().string}),resourceType:s().oneOfType([j,s().arrayOf(j)]),location:s().oneOfType([j,s().arrayOf(j)]),delivery:s().string,identifier:s().string,sources:s().arrayOf(s().string),authors:s().arrayOf(s().string),source:s().string,organizationType:R,scope:s().string,status:R,deadline:z,freshness:s().shape({kind:s().oneOf(["updated","created"]).isRequired,date:z.isRequired}),classification:s().arrayOf(j),topics:s().arrayOf(j),session:s().shape({bucket:s().string,types:s().arrayOf(j),schedule:s().arrayOf(O),exhibitions:s().arrayOf(O),room:s().string,format:s().string}),language:s().string,lang:s().string,dir:s().oneOf(["ltr","rtl","auto"])}).isRequired,headingLevel:s().oneOf([2,3,4,5,6]),className:s().string};export{A as ContentTeaser,c as resolveTeaserUrl};
9
+ import{default as e}from"react";var t={2694(e,t,n){var a=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,o){if(o!==a){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 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:i,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"}};const n={};function a(e){const r=n[e];if(void 0!==r)return r.exports;const i=n[e]={exports:{}};return t[e](i,i.exports,a),i.exports}a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=/*#__PURE__*/a.cw((e,t)=>{var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(e,t,a){var r=null;if(void 0!==a&&(r=""+a),void 0!==t.key&&(r=""+t.key),"key"in t)for(var i in a={},t)"key"!==i&&(a[i]=t[i]);else a=t;return t=a.ref,{$$typeof:n,type:e,key:r,ref:void 0!==t?t:null,props:a}}t.Fragment=a,t.jsx=r,t.jsxs=r}),i=/*#__PURE__*/a.cw(e=>{e.exports=r()}),o=/*#__PURE__*/a(5556),s=/*#__PURE__*/a.n(o);i(),s().string,s().string,s().string,s().string,s().string,s().string;const d=["labels","resourceType","location","eventLocation","organizationType","organizationLabels","classification","topics","published","deadline","event","schedule","exhibitions","bucket","sessionBucket","sessionTypes","room","format","freshness","sources","authors","summary","delivery","identifier","scope","status","language"],l=Object.fromEntries([{id:"article",name:"Article",model:{status:"provisional",intent:"An editorial account that reports, explains or interprets a subject. News, research briefs and attributed commentary share this purpose while differing in voice and evidence.",readerNeeds:["Understand the subject, editorial purpose and publication context before opening the full account.","Distinguish reporting from opinion and identify authors, sources and relevant dates.","Read the account and follow supporting evidence or related coverage where supplied."]},presentations:{fullPage:{status:"reference",intent:"Existing article-page reference; a shared article domain contract and adapter are still provisional.",reference:{kind:"Patterns/Content/Article/Full page",story:"Large, prominent image",id:"patterns-article-story--large-image"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"News",id:"patterns-content-teaser--news"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},book:{kind:"Patterns/Content card",story:"News book",id:"patterns-content-card--news-book"}},basis:"audited-card-selection"}},defaultProfile:"news",profiles:{news:{name:"News",intent:"An editorial news item with release date, attribution and media.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"News",id:"patterns-content-teaser--news"},fields:{before:["labels","published"],after:["summary","sources","language"],useShortTitle:!0,media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},fields:{media:"photo",before:["labels"],after:[],useShortTitle:!0},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"News",id:"patterns-content-card--news"},book:{kind:"Patterns/Content card",story:"News book",id:"patterns-content-card--news-book"}},basis:"audited-card-selection"}}},commentary:{name:"Commentary",intent:"An authored opinion or reflection with author attribution and publication date.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Blog",id:"patterns-content-teaser--blog"},fields:{before:["labels","published","authors"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Commentary",id:"patterns-content-card--commentary"},fields:{media:"photo",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Commentary",id:"patterns-content-card--commentary"},book:{kind:"Patterns/Content card",story:"Commentary book",id:"patterns-content-card--commentary-book"}},basis:"audited-card-selection"}}}}},{id:"publication",name:"Publication",model:{status:"provisional",intent:"A published document with a stable bibliographic identity, including reports, educational materials, policies, statements and resolutions.",readerNeeds:["Assess the subject, document type, issuing organizations, language and relevance.","Identify authors, publication dates, identifiers and editions for attribution and citation; distinguish policy periods or statement dates from publication dates.","Read or download available documents and supporting materials, with clear format and access information."]},presentations:{fullPage:{status:"reference",intent:"Existing curated report landing page reference. The ordinary bibliographic publication record is a separate experimental story-only composition within this archetype; production adapter, reusable renderer and canonical contract remain unimplemented. This reference describes the report landing only.",reference:{kind:"Patterns/Content/Publication/Full page",story:"Report landing page",id:"patterns-landing-pages--report-landing"},additionalReferences:[{kind:"Patterns/Content/Publication/Record",story:"Experimental publication record",id:"patterns-publication-record--standard",intent:"Implemented experimental story-only bibliographic composition; no published import, production adapter or canonical record schema. See its documentation and source-grounded specification before adaptation."}]},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Publication",id:"patterns-content-teaser--publication"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},book:{kind:"Patterns/Content card",story:"Publication book",id:"patterns-content-card--publication-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A published document with bibliographic identity, complete cover and source organizations.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Publication",id:"patterns-content-teaser--publication"},fields:{before:["labels","published"],after:["identifier","summary","sources","language"],media:"cover"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},fields:{media:"cover",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Publication",id:"patterns-content-card--publication"},book:{kind:"Patterns/Content card",story:"Publication book",id:"patterns-content-card--publication-book"}},basis:"audited-card-selection"}}}}},{id:"resource",name:"Resource",model:{status:"provisional",intent:"Something readers can use, learn from or apply, including practical tools, case studies, academic programmes and on-demand learning. Its purpose and delivery matter more than its source system.",readerNeeds:["Understand the intended use, audience and provider, and assess relevance to a task or learning goal.","Assess format, delivery, location and access; include level and duration when relevant to learning resources.","Reach the resource or provider and understand the next step."]},presentations:{fullPage:{status:"stub",intent:"A full resource page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Resource",id:"patterns-content-teaser--resource"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},book:{kind:"Patterns/Content card",story:"Resource book",id:"patterns-content-card--resource-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A reusable resource with format, availability and source organizations.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Resource",id:"patterns-content-teaser--resource"},fields:{before:["labels","resourceType","location","delivery"],after:["summary","sources","language"],media:"none"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},fields:{media:"photo",before:["resourceType"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Resource",id:"patterns-content-card--resource"},book:{kind:"Patterns/Content card",story:"Resource book",id:"patterns-content-card--resource-book"}},basis:"audited-card-selection"}}}}},{id:"event",name:"Event",model:{status:"provisional",intent:"A scheduled opportunity to attend or participate, from a standalone conference or training course to a session within a larger programme.",readerNeeds:["Understand the purpose, audience, organizers and relationship to a parent event or programme.","Plan participation using occurrence dates, time zone, venue or online format, languages and accessibility information where relevant.","Find registration or joining instructions, then recordings and materials when available. Programme sessions may need distinct session and exhibition schedules, rooms and speaker information."]},presentations:{fullPage:{status:"stub",intent:"A full event page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Event",id:"patterns-content-teaser--event"}},card:{status:"experimental",intent:"Show occurrence dates or programme schedules and supplied status to support participation decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},book:{kind:"Patterns/Content card",story:"Event book",id:"patterns-content-card--event-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}},defaultProfile:"general",profiles:{general:{name:"General",intent:"An event with occurrence dates, location and participation information.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Event",id:"patterns-content-teaser--event"},fields:{before:["labels","eventLocation","event","delivery"],after:["summary","language"],media:"none"}},card:{status:"experimental",intent:"Show occurrence dates or programme schedules and supplied status to support participation decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},fields:{media:"photo",before:["labels"],after:["event","status","published"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Event",id:"patterns-content-card--event"},book:{kind:"Patterns/Content card",story:"Event book",id:"patterns-content-card--event-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}}},"programme-session":{name:"Programme session",intent:"A scheduled contribution within a larger programme, with its own purpose and participation context.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Conference session",id:"patterns-content-teaser--conference-session"},fields:{before:["bucket","schedule","exhibitions","room","format"],after:["summary","topics"],media:"photo"}},card:{status:"experimental",intent:"Show occurrence dates or programme schedules and supplied status to support participation decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Programme session",id:"patterns-content-card--programme-session"},fields:{media:"photo",before:["sessionBucket","sessionTypes"],after:["schedule","exhibitions","status","published"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Programme session",id:"patterns-content-card--programme-session"},book:{kind:"Patterns/Content card",story:"Programme session book",id:"patterns-content-card--programme-session-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}}}}},{id:"organization",name:"Organization",model:{status:"provisional",intent:"An entity involved in disaster risk reduction, described through its identity, mandate, activities and relationships. A coordination platform emphasizes its country, remit and hosting body.",readerNeeds:["Identify the organization, its role, geographic scope and areas of work.","Understand relevant affiliations, partnerships and contributions; distinguish a coordination platform from its host.","Find published websites, participation routes or appropriate public contact information."]},presentations:{fullPage:{status:"stub",intent:"A full organization page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Organization",id:"patterns-content-teaser--organization"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},book:{kind:"Patterns/Content card",story:"Organization book",id:"patterns-content-card--organization-book"}},basis:"audited-card-selection"}},defaultProfile:"general",profiles:{general:{name:"General",intent:"An organization described through its mandate, activities and areas of work.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Organization",id:"patterns-content-teaser--organization"},fields:{before:["location"],after:["summary","organizationType"],media:"logo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},fields:{media:"logo",before:["organizationLabels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Organization",id:"patterns-content-card--organization"},book:{kind:"Patterns/Content card",story:"Organization book",id:"patterns-content-card--organization-book"}},basis:"audited-card-selection"}}},"coordination-platform":{name:"Coordination platform",intent:"A national coordination platform with its own identity and explanatory content.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"National platform",id:"patterns-content-teaser--national-platform"},fields:{before:["labels"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Coordination platform",id:"patterns-content-card--coordination-platform"},fields:{media:"none",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Coordination platform",id:"patterns-content-card--coordination-platform"},book:{kind:"Patterns/Content card",story:"Coordination platform book",id:"patterns-content-card--coordination-platform-book"}},basis:"proposed-card-selection"}}}}},{id:"collection",name:"Collection",model:{status:"provisional",intent:"A deliberately assembled set of related content, with an explanation of its scope and why the items belong together.",readerNeeds:["Understand the collection’s purpose, selection and coverage before exploring its members.","Browse related items and assess their relevance; use filtering or grouping when the collection warrants it.","Understand freshness and completeness where known, and distinguish a single collection from an index of collections."]},presentations:{fullPage:{additionalReferences:[{kind:"Patterns/Content/Collection/Full page/Collection index",story:"Collection index",id:"patterns-landing-pages--index-landing",intent:"A directory into several grouped collections, distinct from a curated single-collection page."}],status:"reference",intent:"Existing collection-page reference with listing behaviour; canonical content-contract alignment remains open.",reference:{kind:"Patterns/Content/Collection/Full page/Curated collection",story:"Collection page",id:"patterns-collection-page--typical"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Collection",id:"patterns-content-teaser--collection"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},book:{kind:"Patterns/Content card",story:"Collection book",id:"patterns-content-card--collection-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A curated collection whose freshness reflects its linked content.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Collection",id:"patterns-content-teaser--collection"},fields:{before:["labels","freshness"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},fields:{media:"photo",before:["labels"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Collection",id:"patterns-content-card--collection"},book:{kind:"Patterns/Content card",story:"Collection book",id:"patterns-content-card--collection-book"}},basis:"audited-card-selection"}}}}},{id:"opportunity",name:"Opportunity",model:{status:"provisional",intent:"An invitation to apply, contribute or take part, with conditions and a decision window. Jobs are the initial editorial profile.",readerNeeds:["Assess the role or opportunity, offering organization, location and participation conditions.","Understand eligibility, deadlines and current availability before investing in an application.","Find application instructions and supporting details; distinguish a closing deadline from a publication date."]},presentations:{fullPage:{status:"stub",intent:"A full opportunity page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Vacancy",id:"patterns-content-teaser--vacancy"}},card:{status:"experimental",intent:"Show the closing deadline and supplied status to support application decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},book:{kind:"Patterns/Content card",story:"Job book",id:"patterns-content-card--job-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}},defaultProfile:"job",profiles:{job:{name:"Job",intent:"A job opportunity with location, closing deadline and supplied status.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Vacancy",id:"patterns-content-teaser--vacancy"},fields:{before:["labels","location","deadline","status"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Show the closing deadline and supplied status to support application decisions; optionally show a separately labelled publication date.",reference:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},fields:{media:"none",before:[],after:["deadline","status","published"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Job",id:"patterns-content-card--job"},book:{kind:"Patterns/Content card",story:"Job book",id:"patterns-content-card--job-book"}},basis:"audited-card-selection",departures:["Add decision dates, supplied status and an optional labelled publication date beyond the Drupal card selection."]}}}}},{id:"reference-entry",name:"Reference entry",model:{status:"provisional",intent:"An explanation intended for lookup and reuse, from a concise term definition to an authoritative hazard profile with scientific evidence and risk context.",readerNeeds:["Find and understand the term or hazard, its scope, synonyms and classification where relevant.","Identify authoritative sources and stable identifiers for attribution and citation.","Explore related concepts. Hazard profiles may also explain drivers, impacts, monitoring, risk management and relationships between hazards."]},presentations:{fullPage:{status:"stub",intent:"A full reference-entry page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Terminology",id:"patterns-content-teaser--terminology"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},book:{kind:"Patterns/Content card",story:"Definition book",id:"patterns-content-card--definition-book"}},basis:"proposed-card-selection"}},defaultProfile:"definition",profiles:{definition:{name:"Definition",intent:"A reference term with a definition and stable identity.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Terminology",id:"patterns-content-teaser--terminology"},fields:{before:["labels"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},fields:{media:"none",before:["labels"],after:["summary"]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Definition",id:"patterns-content-card--definition"},book:{kind:"Patterns/Content card",story:"Definition book",id:"patterns-content-card--definition-book"}},basis:"proposed-card-selection"}}},"hazard-profile":{name:"Hazard profile",intent:"A reference hazard definition with classification and stable notation.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Hazard profile",id:"patterns-content-teaser--hazard-profile"},fields:{before:["classification","identifier"],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Mangrove proposal: no explicit Drupal card display exists for this profile. Vertical and book layouts share this compact selection.",reference:{kind:"Patterns/Content card",story:"Hazard profile",id:"patterns-content-card--hazard-profile"},fields:{media:"none",before:["classification","identifier"],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Hazard profile",id:"patterns-content-card--hazard-profile"},book:{kind:"Patterns/Content card",story:"Hazard profile book",id:"patterns-content-card--hazard-profile-book"}},basis:"proposed-card-selection"}}}}},{id:"commitment",name:"Commitment",model:{status:"provisional",intent:"An initiative undertaken by one or more entities to contribute to disaster risk reduction, with a scope, intended outcomes and evidence of progress.",readerNeeds:["Understand who is responsible, what is promised, where it applies and the intended timeframe.","Assess status, deliverables, beneficiaries and alignment with relevant goals when published.","Follow public progress reports and supporting evidence."]},presentations:{fullPage:{status:"stub",intent:"A full commitment page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Commitment",id:"patterns-content-teaser--commitment"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},book:{kind:"Patterns/Content card",story:"Commitment book",id:"patterns-content-card--commitment-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A voluntary commitment with geographic scope, progress status and publication metadata.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Commitment",id:"patterns-content-teaser--commitment"},fields:{before:["scope","status","published"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},fields:{media:"photo",before:[],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Commitment",id:"patterns-content-card--commitment"},book:{kind:"Patterns/Content card",story:"Commitment book",id:"patterns-content-card--commitment-book"}},basis:"audited-card-selection"}}}}},{id:"landing-page",name:"Landing page",model:{status:"provisional",intent:"An orientation and wayfinding page for a topic, initiative or audience. A content hub is a variant for ongoing exploration with a consistent context and navigation.",readerNeeds:["Understand the page’s purpose and whether it addresses the reader’s needs.","Identify prioritized routes to relevant content, services or actions.","Explore related material and retain orientation across a hub where persistent navigation is appropriate."]},presentations:{fullPage:{additionalReferences:[{kind:"Patterns/Content/Landing page/Full page/Content hub",story:"Hub home",id:"patterns-content-hub--hub-home",intent:"Hub-home variant with persistent identity and section navigation; detail-page examples demonstrate the shared navigation composition."}],status:"reference",intent:"Existing topic/initiative landing-page reference; family-specific contract alignment remains open.",reference:{kind:"Patterns/Content/Landing page/Full page/Topic or initiative",story:"Topic or initiative",id:"patterns-landing-pages--topic-landing"}},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Landing page",id:"patterns-content-teaser--landing-page"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},book:{kind:"Patterns/Content card",story:"Landing page book",id:"patterns-content-card--landing-page-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"An editorial entry point that introduces a subject and offers routes to related material.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Landing page",id:"patterns-content-teaser--landing-page"},fields:{before:["labels"],after:["summary"],media:"photo"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},fields:{media:"photo",before:[],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Landing page",id:"patterns-content-card--landing-page"},book:{kind:"Patterns/Content card",story:"Landing page book",id:"patterns-content-card--landing-page-book"}},basis:"audited-card-selection"}}}}},{id:"person",name:"Person",model:{status:"provisional",intent:"A public profile that establishes a person’s identity, role, affiliations and relevant experience or contributions.",readerNeeds:["Identify the person and understand their role, organization and expertise.","Explore their biography, activities and contributions where published.","Follow relevant public professional links while respecting the intended visibility of personal information."]},presentations:{fullPage:{status:"stub",intent:"A full person page. The full-page information hierarchy, detailed content selection, actions and responsive behaviour have not been designed."},teaser:{status:"experimental",intent:"Horizontal listing/search presentation. Profiles select editorial metadata; layout is shared. This input is not a canonical domain model.",reference:{kind:"Patterns/Content teaser",story:"Person",id:"patterns-content-teaser--person"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},book:{kind:"Patterns/Content card",story:"Person book",id:"patterns-content-card--person-book"}},basis:"audited-card-selection"}},defaultProfile:"default",profiles:{default:{name:"Default",intent:"A person with identity and biographical content; individual presentations choose which profile fields to expose.",presentations:{teaser:{status:"experimental",reference:{kind:"Patterns/Content teaser",story:"Person",id:"patterns-content-teaser--person"},fields:{before:[],after:["summary"],media:"none"}},card:{status:"experimental",intent:"Compact card selection; vertical and book are alternate layouts of this presentation.",reference:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},fields:{media:"photo",before:[],after:[]},layouts:["vertical","book"],layoutReferences:{vertical:{kind:"Patterns/Content card",story:"Person",id:"patterns-content-card--person"},book:{kind:"Patterns/Content card",story:"Person book",id:"patterns-content-card--person-book"}},basis:"audited-card-selection"}}}}}].map(e=>[e.id,e]));function c(e){const t=function(e){return"string"==typeof e&&""!==e.trim()?e:null}(e)?.trim();if(!t||[...t].some(e=>e.charCodeAt(0)<=32||"\\"===e)||!/^(https?:\/\/|\/(?!\/))/i.test(t))return null;try{const e=new URL(t,"https://mangrove.invalid");return["https:","http:"].includes(e.protocol)?t:null}catch{return null}}const p=s().shape({dateTime:s().string.isRequired,text:s().string.isRequired,label:s().string}),u=s().oneOfType([s().string,s().shape({label:s().string.isRequired,link:s().string})]),f=s().shape({start:p,end:p,timeZone:s().string,label:s().string}),m=e=>Boolean(e?.dateTime&&e?.text?.trim()),b=e=>m(e?.start),h=e=>"string"==typeof e&&e.trim()?e:null;function y(e){const t=new Set;return e.flat().filter(Boolean).map(e=>"string"==typeof e?{label:e}:e).filter(e=>{if(!h(e.label))return!1;const n=JSON.stringify([e.label,c(e.link)]);return!t.has(n)&&(t.add(n),!0)})}function g({value:e}){/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,r().jsxs)("span",{children:[e.label&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(r().Fragment,{children:[e.label," "]}),/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("time",{dateTime:e.dateTime,dir:"auto",children:e.text})]})}function k({value:e}){/*#__PURE__*/ /*#__PURE__*/
11
+ return(0,r().jsxs)("span",{children:[e.label&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(r().Fragment,{children:[e.label," "]}),/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(g,{value:e.start}),m(e.end)&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(r().Fragment,{children:["–",/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(g,{value:e.end})]}),e.timeZone&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(r().Fragment,{children:[" (",e.timeZone,")"]})]})}function v({items:t,compact:n=!0}){/*#__PURE__*/ /*#__PURE__*/
12
+ return(0,r().jsx)("span",{className:"mg-content-meta__group",children:t.map((t,a)=>{const i=c(t.link);/*#__PURE__*/ /*#__PURE__*/
13
+ return(0,r().jsxs)(e.Fragment,{children:[a>0&&" ",i?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("a",{href:i,className:[n&&"mg-card__label","mg-content-meta__metadata-link"].filter(Boolean).join(" "),children:t.label}):/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("span",{className:n?"mg-card__label":void 0,children:t.label})]},JSON.stringify([t.label,i]))})})}function P({items:t}){/*#__PURE__*/ /*#__PURE__*/
14
+ return(0,r().jsx)("ul",{className:"mg-content-meta__attribution",children:t.map((t,n)=>/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(e.Fragment,{children:[n>0&&" ",/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("li",{children:t})]},t))})}function C(e,t){if("labels"===t)return y([e.typeLabel,...e.labels||[]]);if("location"===t)return y([e.location]);if("resourceType"===t)return y([e.resourceType]);if("eventLocation"===t)return y([e.event?.location]);if("organizationLabels"===t)return y([e.organizationType]);if("sessionBucket"===t)return y([e.session?.bucket]);if("sessionTypes"===t)return y(e.session?.types||[]);if("organizationType"===t||"status"===t)return y([e[t]]);if("classification"===t||"topics"===t)return y(e[t]||[]);if("published"===t||"deadline"===t)return m(e[t])?e[t]:null;if("event"===t)return b(e.event)?e.event:null;if("schedule"===t||"exhibitions"===t)return(e.session?.[t]||[]).filter(b);if(["bucket","room","format"].includes(t))return h(e.session?.[t]);if("freshness"===t)return["updated","created"].includes(e.freshness?.kind)&&m(e.freshness?.date)?e.freshness:null;if("sources"===t||"authors"===t){const n=e[t]??("sources"===t&&e.source?[e.source]:[]);return[...new Set(n.filter(e=>h(e)))]}if(!d.includes(t))throw new TypeError("Unknown content presentation field.");return h(e[t])}function x({field:t,value:n}){return["labels","resourceType","eventLocation","organizationLabels","sessionBucket","sessionTypes","location","classification","topics","organizationType","status"].includes(t)?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(v,{items:n,compact:["labels","resourceType","organizationLabels","sessionBucket","sessionTypes","classification","topics"].includes(t)}):"published"===t||"deadline"===t?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(g,{value:n}):"event"===t?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(k,{value:n}):"schedule"===t||"exhibitions"===t?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("span",{className:"mg-content-meta__group",children:n.map((t,n)=>/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(e.Fragment,{children:[n>0&&" ",/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(k,{value:t})]},JSON.stringify(t)))}):"freshness"===t?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("span",{"data-freshness-kind":n.kind,children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(g,{value:n.date})}):"sources"===t||"authors"===t?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(P,{items:n}):/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("span",{children:n})}function w(e,t){return t.map(t=>({field:t,value:C(e,t)})).filter(({value:e})=>Array.isArray(e)?e.length>0:Boolean(e))}function T({content:t,headingLevel:n=3,className:a,presentation:i,layout:o}){const s="card"===i?"ContentCard":"ContentTeaser",{type:p,profile:u,title:f,shortTitle:m,link:b,image:y,lang:g,dir:k}=t,v=function(e,t,n){if(!Object.hasOwn(l,e))return null;const a=l[e],r=void 0===t?a.defaultProfile:t;if(!Object.hasOwn(a.profiles,r))return null;const i=a.profiles[r].presentations[n];if(!i||"experimental"!==i.status||!i.fields)return null;if(![...i.fields.before,...i.fields.after].every(e=>d.includes(e)))throw new TypeError("Unknown content presentation field.");return{profile:r,...i}}(p,u,i),P=v?.fields,C=c(b);if(!P||!f?.trim()||!C)throw new TypeError(`${s} requires a supported type/profile, title and resolved HTTP(S) or root-relative link.`);if(![2,3,4,5,6].includes(n))throw new TypeError(`${s} headingLevel must be between 2 and 6.`);const T=`h${n}`,R="none"===P.media?"none":["photo","cover","logo"].includes(y?.kind)?y.kind:P.media,z="none"!==R?c(y?.src):null,j=w(t,P.before),O=w(t,P.after);return function(e,t){const n=(e,n)=>{if(!h(e?.label))throw new TypeError(`${t} requires a caller-localized ${n}.label to identify the date's meaning.`)},a=Object.fromEntries(e.map(({field:e,value:t})=>[e,t]));("ContentCard"===t||Boolean(a.published&&(a.event||a.deadline||a.schedule?.length||a.exhibitions?.length)))&&(a.published&&n(a.published,"published"),a.event&&n(a.event,"event"),a.schedule?.forEach(e=>n(e,"session.schedule[]")),a.exhibitions?.forEach(e=>n(e,"session.exhibitions[]"))),a.deadline&&n(a.deadline,"deadline"),a.freshness&&n(a.freshness.date,"freshness.date"),a.exhibitions?.length&&(a.exhibitions.forEach(e=>n(e,"session.exhibitions[]")),a.schedule?.forEach(e=>n(e,"session.schedule[]")))}([...j,...O],s),/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)("article",{lang:g,dir:k||(g?"auto":void 0),"data-content-type":p,"data-content-profile":v.profile,"data-content-presentation":i,"data-content-layout":o,"data-content-media":R,className:["mg-card","teaser"===i?"mg-card__hc mg-card-book__hc mg-content-teaser":"mg-card__vc mg-content-card","card"===i&&`mg-content-card--${o}`,"card"===i&&"cover"===R&&"mg-card__book","logo"===R&&"mg-content-pattern--logo",a].filter(Boolean).join(" "),children:[z&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("div",{className:"mg-card__visual",children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("img",{src:z,alt:y.alt??"",className:"mg-card__image",loading:"lazy"})}),/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)("div",{className:"mg-card__content",children:[j.length>0&&/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("div",{className:"mg-card__meta mg-content-meta__before-title",children:j.map(({field:t,value:n},a)=>/*#__PURE__*/ /*#__PURE__*/(0,r().jsxs)(e.Fragment,{children:[a>0&&" ",/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(x,{field:t,value:n})]},t))}),/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(T,{className:"mg-card__title",children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("a",{href:C,children:P.useShortTitle&&m?.trim()||f})}),O.map(({field:e,value:t})=>["sources","authors"].includes(e)?/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(x,{field:e,value:t},e):/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)("p",{className:"summary"===e?"mg-card__summary":"mg-content-meta__metadata",children:/*#__PURE__*/ /*#__PURE__*/(0,r().jsx)(x,{field:e,value:t})},e))]})]})}g.propTypes={value:p.isRequired},k.propTypes={value:f.isRequired},v.propTypes={compact:s().bool,items:s().arrayOf(u).isRequired},P.propTypes={items:s().arrayOf(s().string).isRequired},x.propTypes={field:s().string.isRequired,value:s().any.isRequired},T.propTypes={content:s().object.isRequired,headingLevel:s().oneOf([2,3,4,5,6]),className:s().string,presentation:s().oneOf(["teaser","card"]).isRequired,layout:s().oneOf(["horizontal","vertical","book"]).isRequired};const R=s().shape({dateTime:s().string.isRequired,text:s().string.isRequired,label:s().string}),z=s().oneOfType([s().string,s().arrayOf(s().string)]),j=s().oneOfType([s().string,s().shape({label:s().string.isRequired,link:s().string})]),O=s().shape({start:R,end:R,timeZone:s().string,label:s().string});function A({content:e,headingLevel:t=3,className:n}){/*#__PURE__*/ /*#__PURE__*/
15
+ return(0,r().jsx)(T,{content:e,headingLevel:t,className:n,presentation:"teaser",layout:"horizontal"})}A.propTypes={content:s().shape({type:s().oneOf(["article","publication","resource","event","organization","collection","opportunity","reference-entry","commitment","landing-page","person"]).isRequired,profile:s().string,title:s().string.isRequired,shortTitle:s().string,link:s().string.isRequired,image:s().shape({src:s().string.isRequired,alt:s().string.isRequired,kind:s().oneOf(["photo","cover","logo"])}),summary:s().string,labels:s().arrayOf(j),typeLabel:s().string,published:R,event:s().shape({start:R,end:R,timeZone:s().string,location:s().string,label:s().string}),resourceType:s().oneOfType([j,s().arrayOf(j)]),location:s().oneOfType([j,s().arrayOf(j)]),delivery:s().string,identifier:s().string,sources:s().arrayOf(s().string),authors:s().arrayOf(s().string),source:s().string,organizationType:z,scope:s().string,status:z,deadline:R,freshness:s().shape({kind:s().oneOf(["updated","created"]).isRequired,date:R.isRequired}),classification:s().arrayOf(j),topics:s().arrayOf(j),session:s().shape({bucket:s().string,types:s().arrayOf(j),schedule:s().arrayOf(O),exhibitions:s().arrayOf(O),room:s().string,format:s().string}),language:s().string,lang:s().string,dir:s().oneOf(["ltr","rtl","auto"])}).isRequired,headingLevel:s().oneOf([2,3,4,5,6]),className:s().string};export{A as ContentTeaser,c as resolveTeaserUrl};
@@ -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 CopyButton.js.LICENSE.txt */
9
- import{useEffect as e,useRef as t,useState as o}from"react";var a={2694(e,t,o){var a=o(6925);function r(){}function n(){}n.resetWarningCache=r,e.exports=function(){function e(e,t,o,r,n,i){if(i!==a){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={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:n,resetWarningCache:r};return o.PropTypes=o,o}},5556(e,t,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,t){var o;!function(){var a={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=i(e,n(o)))}return e}function n(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 o in e)a.call(e,o)&&e[o]&&(t=i(t,o));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()}};const r={};function n(e){const t=r[e];if(void 0!==t)return t.exports;const o=r[e]={exports:{}};return a[e](o,o.exports,n),o.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.cw=e=>{var t;return()=>{if(e){var o=e;e=0,t={exports:{}},o.call(t.exports,t,t.exports)}return t.exports}},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=n.cw(function(e,t){var o=Symbol.for("react.transitional.element");function a(e,t,a){var r=null;if(void 0!==a&&(r=""+a),void 0!==t.key&&(r=""+t.key),"key"in t)for(var n in a={},t)"key"!==n&&(a[n]=t[n]);else a=t;return t=a.ref,{$$typeof:o,type:e,key:r,ref:void 0!==t?t:null,props:a}}Symbol.for("react.fragment"),t.jsx=a,t.jsxs=a}),l=n.cw(function(e,t){e.exports=i()}),s=n(5556),c=n.n(s),p=n(6942),u=n.n(p);l();const b={},d={outline:"mg-button-primary mg-button-outline",primary:"mg-button-primary",secondary:"mg-button-secondary mg-button-outline"},f=({textToCopy:a="",className:r,labels:n=b,ariaLabel:l,copiedLabel:s,tooltipLabel:c,variant:p="outline",size:f})=>{const y=l||n.ariaLabel||"Copy to clipboard",m=s||n.copiedLabel||"Copied to clipboard.",g=c||n.tooltipLabel||"Copied!",[v,L]=o("idle"),x="copied"===v,T="failed"===v,h=n.failedLabel||"Copy failed. Select the text and copy it manually.",_=n.failedTooltipLabel||"Copy failed",O=t(null);e(()=>()=>{O.current&&clearTimeout(O.current)},[]);const k=(e,t)=>{L(e),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{L("idle")},t)};return(0,i().jsxs)("button",{type:"button",className:u()("mg-button",d[p]||d.outline,"mg-button--icon",{"mg-button--small":"small"===f,"mg-button--large":"large"===f,"mg-copy-button--copied":x},"mg-copy-button",r),onClick:async()=>{try{await navigator.clipboard.writeText(a),k("copied",2e3)}catch(e){console.error("Failed to copy!",e),k("failed",5e3)}},"aria-label":y,children:[(0,i().jsx)("span",{className:"mg-icon mg-icon-copy mg-button__icon","aria-hidden":"true"}),(0,i().jsx)("span",{className:u()("mg-copy-button__feedback",{"mg-copy-button__feedback--visible":x||T,"mg-copy-button__feedback--error":T}),"aria-hidden":"true",children:T?_:g}),(0,i().jsxs)("span",{className:"mg-u-sr-only","aria-live":"polite",children:[x?m:"",T?h:""]})]})};function y(e){const{dataset:t}=e;let o={};if(t.labels)try{o=JSON.parse(t.labels)}catch{o={}}const a=e.getAttribute("aria-label")||t.ariaLabel||t.label||t.copyLabel||o.ariaLabel||void 0,r=t.copiedLabel||t.ariaLiveText||o.copiedLabel||void 0,n=t.tooltipLabel||t.feedbackText||o.tooltipLabel||void 0;return{textToCopy:t.textToCopy||t.text||t.copyText||"",ariaLabel:a,copiedLabel:r,tooltipLabel:n,labels:(()=>{const e={...o};return t.failedLabel&&(e.failedLabel=t.failedLabel),t.failedTooltipLabel&&(e.failedTooltipLabel=t.failedTooltipLabel),Object.keys(e).length>0?e:void 0})(),variant:t.variant||"outline",size:t.size||void 0,className:t.className||void 0}}f.propTypes={textToCopy:c().string,className:c().string,labels:c().shape({ariaLabel:c().string,copiedLabel:c().string,tooltipLabel:c().string,failedLabel:c().string,failedTooltipLabel:c().string}),ariaLabel:c().string,copiedLabel:c().string,tooltipLabel:c().string,variant:c().oneOf(["outline","primary","secondary"]),size:c().oneOf(["small","large"])};export{f as CopyButton,f as default,y as fromElement};
9
+ import{useEffect as e,useRef as t,useState as a}from"react";var o={2694(e,t,a){var o=a(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,a,r,i,l){if(l!==o){var n=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 n.name="Invariant Violation",n}}function t(){return e}e.isRequired=e;var a={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:i,resetWarningCache:r};return a.PropTypes=a,a}},5556(e,t,a){e.exports=a(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,t){var a;!function(){var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=l(e,i(a)))}return e}function i(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 a in e)o.call(e,a)&&e[a]&&(t=l(t,a));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(a=function(){return r}.apply(t,[]))||(e.exports=a)}()}};const r={};function i(e){const t=r[e];if(void 0!==t)return t.exports;const a=r[e]={exports:{}};return o[e](a,a.exports,i),a.exports}i.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.cw=e=>{var t;return()=>{if(e){var a=e;e=0,t={exports:{}},a.call(t.exports,t,t.exports)}return t.exports}},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=/*#__PURE__*/i.cw((e,t)=>{var a=Symbol.for("react.transitional.element");function o(e,t,o){var r=null;if(void 0!==o&&(r=""+o),void 0!==t.key&&(r=""+t.key),"key"in t)for(var i in o={},t)"key"!==i&&(o[i]=t[i]);else o=t;return t=o.ref,{$$typeof:a,type:e,key:r,ref:void 0!==t?t:null,props:o}}Symbol.for("react.fragment"),t.jsx=o,t.jsxs=o}),n=/*#__PURE__*/i.cw(e=>{e.exports=l()});const p={en:"ltr",ar:"rtl",es:"ltr",fr:"ltr",ja:"ltr",ru:"ltr",zh:"ltr"};function s(e="en"){return String(e).trim().toLowerCase().split(/[-_]/)[0]}function c(e,t){const a=s(e),o=void 0!==e&&Object.hasOwn(p,a)?p[a]:void 0,r=void 0===t?o:t;return{...void 0===e?{}:{lang:e},...void 0===r?{}:{dir:r}}}function b(e){const t=e.dataset.lang??e.closest("[lang]")?.getAttribute("lang"),a=e.getAttribute("dir")?.toLowerCase();return{...null==t?{}:{lang:t},...["ltr","rtl","auto"].includes(a)?{dir:a}:{}}}const d=(u={ariaLabel:"Copy to clipboard",copiedLabel:"Copied to clipboard.",tooltipLabel:"Copied!",failedTooltipLabel:"Copy failed",failedLabel:"Copy failed. Select the text and copy it manually."},f={ar:{ariaLabel:"نسخ إلى الحافظة",copiedLabel:"تم النسخ إلى الحافظة.",tooltipLabel:"تم النسخ!",failedTooltipLabel:"فشل النسخ",failedLabel:"فشل النسخ. حدد النص وانسخه يدويًا."},es:{ariaLabel:"Copiar al portapapeles",copiedLabel:"Copiado al portapapeles.",tooltipLabel:"¡Copiado!",failedTooltipLabel:"Error al copiar",failedLabel:"No se pudo copiar. Seleccione el texto y cópielo manualmente."},fr:{ariaLabel:"Copier dans le presse-papiers",copiedLabel:"Copié dans le presse-papiers.",tooltipLabel:"Copié !",failedTooltipLabel:"Échec de la copie",failedLabel:"La copie a échoué. Sélectionnez le texte et copiez-le manuellement."},ja:{ariaLabel:"クリップボードにコピー",copiedLabel:"クリップボードにコピーしました。",tooltipLabel:"コピー完了!",failedTooltipLabel:"コピーに失敗しました",failedLabel:"コピーに失敗しました。テキストを選択して手動でコピーしてください。"},ru:{ariaLabel:"Скопировать в буфер обмена",copiedLabel:"Скопировано в буфер обмена.",tooltipLabel:"Скопировано!",failedTooltipLabel:"Не удалось скопировать",failedLabel:"Не удалось скопировать. Выделите текст и скопируйте его вручную."},zh:{ariaLabel:"复制到剪贴板",copiedLabel:"已复制到剪贴板。",tooltipLabel:"已复制!",failedTooltipLabel:"复制失败",failedLabel:"复制失败。请选择文本并手动复制。"}},(e,t)=>{const a=s(e),o=Object.hasOwn(f,a)?f[a]:void 0,r=Object.fromEntries(Object.entries(t??{}).filter(([,e])=>void 0!==e));return{...u,...o,...r}});var u,f,L=/*#__PURE__*/i(5556),y=/*#__PURE__*/i.n(L),m=i(6942),g=/*#__PURE__*/i.n(m);n();const v={outline:"mg-button-primary mg-button-outline",primary:"mg-button-primary",secondary:"mg-button-secondary mg-button-outline"},x=({textToCopy:o="",className:r,lang:i,dir:n,labels:p,ariaLabel:s,copiedLabel:b,tooltipLabel:u,variant:f="outline",size:L})=>{const y=d(i,p),m=s||y.ariaLabel||d(i).ariaLabel,x=b??y.copiedLabel,T=u??y.tooltipLabel,[h,O]=a("idle"),C="copied"===h,j="failed"===h,{failedLabel:_,failedTooltipLabel:S}=y,k=t(null);e(()=>()=>{k.current&&clearTimeout(k.current)},[]);const w=(e,t)=>{O(e),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{O("idle")},t)};/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,l().jsxs)("button",{...c(i,n),type:"button",className:g()("mg-button",v[f]||v.outline,"mg-button--icon",{"mg-button--small":"small"===L,"mg-button--large":"large"===L,"mg-copy-button--copied":C},"mg-copy-button",r),onClick:async()=>{try{await navigator.clipboard.writeText(o),w("copied",2e3)}catch(e){console.error("Failed to copy!",e),w("failed",5e3)}},"aria-label":m,children:[/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("span",{className:"mg-icon mg-icon-copy mg-button__icon","aria-hidden":"true"}),/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("span",{className:g()("mg-copy-button__feedback",{"mg-copy-button__feedback--visible":C||j,"mg-copy-button__feedback--error":j}),"aria-hidden":"true",children:j?S:T}),/*#__PURE__*/ /*#__PURE__*/(0,l().jsxs)("span",{className:"mg-u-sr-only","aria-live":"polite",children:[C?x:"",j?_:""]})]})};function T(e){const{dataset:t}=e,a=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=e.getAttribute("aria-label")??t.ariaLabel??t.label??t.copyLabel??a.ariaLabel??void 0,r=t.copiedLabel??t.ariaLiveText??a.copiedLabel??void 0,i=t.tooltipLabel??t.feedbackText??a.tooltipLabel??void 0;return{...b(e),textToCopy:t.textToCopy||t.text||t.copyText||"",ariaLabel:o,copiedLabel:r,tooltipLabel:i,labels:(()=>{const e={...a};return void 0!==t.failedLabel&&(e.failedLabel=t.failedLabel),void 0!==t.failedTooltipLabel&&(e.failedTooltipLabel=t.failedTooltipLabel),Object.keys(e).length>0?e:void 0})(),variant:t.variant||"outline",size:t.size||void 0,className:t.className||void 0}}x.propTypes={textToCopy:y().string,className:y().string,lang:y().string,dir:y().oneOf(["ltr","rtl","auto"]),labels:y().shape({ariaLabel:y().string,copiedLabel:y().string,tooltipLabel:y().string,failedLabel:y().string,failedTooltipLabel:y().string}),ariaLabel:y().string,copiedLabel:y().string,tooltipLabel:y().string,variant:y().oneOf(["outline","primary","secondary"]),size:y().oneOf(["small","large"])};export{x as CopyButton,x as default,T as fromElement,d as getCopyButtonLabels};
@@ -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 CtaButton.js.LICENSE.txt */
9
- import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,i){if(i!==n){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 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:a,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 r={};function t(n){const o=r[n];if(void 0!==o)return o.exports;const a=r[n]={exports:{}};return e[n](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 t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=t.cw(function(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}}),o=t.cw(function(e,r){e.exports=n()}),a=t(5556),i=t.n(a);function s({label:e,Type:r="Primary",Variant:t="Default",Outline:o=!1,State:a="Default",href:i="#",onClick:s,className:c,...l}){const p="Disabled"===a,f=["mg-button","CTA"===t&&"mg-button-cta","mg-button-"+("Secondary"===r?"secondary":"primary"),o&&"mg-button-outline",p&&"disabled",c].filter(Boolean).join(" ");return(0,n().jsx)("a",{className:f,...l,...p?{"aria-disabled":"true",tabIndex:-1}:{href:i,onClick:s},children:e})}o(),s.propTypes={label:i().string.isRequired,Type:i().oneOf(["Primary","Secondary"]),Variant:i().oneOf(["Default","CTA"]),Outline:i().bool,State:i().oneOf(["Default","Disabled"]),href:i().string,onClick:i().func,className:i().string};export{s as CtaButton};
9
+ import"react";var e={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,i){if(i!==n){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 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:a,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 r={};function t(n){const o=r[n];if(void 0!==o)return o.exports;const a=r[n]={exports:{}};return e[n](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 t=e;e=0,r={exports:{}},t.call(r.exports,r,r.exports)}return r.exports}},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n=/*#__PURE__*/t.cw((e,r)=>{var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}}),o=/*#__PURE__*/t.cw(e=>{e.exports=n()}),a=/*#__PURE__*/t(5556),i=/*#__PURE__*/t.n(a);function s({label:e,Type:r="Primary",Variant:t="Default",Outline:o=!1,State:a="Default",href:i="#",onClick:s,className:l,...c}){const p="Disabled"===a,f=["mg-button","CTA"===t&&"mg-button-cta","mg-button-"+("Secondary"===r?"secondary":"primary"),o&&"mg-button-outline",p&&"disabled",l].filter(Boolean).join(" ");/*#__PURE__*/ /*#__PURE__*/
10
+ return(0,n().jsx)("a",{className:f,...c,...p?{"aria-disabled":"true",tabIndex:-1}:{href:i,onClick:s},children:e})}o(),s.propTypes={label:i().string.isRequired,Type:i().oneOf(["Primary","Secondary"]),Variant:i().oneOf(["Default","CTA"]),Outline:i().bool,State:i().oneOf(["Default","Disabled"]),href:i().string,onClick:i().func,className:i().string};export{s as CtaButton};
@@ -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 Drawer.js.LICENSE.txt */
9
- import{useEffect as e,useId as t,useRef as n,useState as r}from"react";var o={2694(e,t,n){var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,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 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:i,resetWarningCache:o};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 r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.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)r.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?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}};const i={};function a(e){const t=i[e];if(void 0!==t)return t.exports;const n=i[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=a.cw(function(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o}),c=a.cw(function(e,t){e.exports=l()}),s=a(5556),u=a.n(s),f=a(6942),p=a.n(f);function m(e,t){this.v=e,this.k=t}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,l=a instanceof m;Promise.resolve(l?a.v:a).then(function(n){if(l){var c="return"===t&&a.k?t:"next";if(!a.k||n.done)return r(c,n);n=e[c](n).value}o(!!i.done,n)},function(e){r("throw",e)})}catch(e){o(2,e)}}function o(e,o){2===e?t.reject(o):t.resolve({value:o,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,a){var l={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=l:(t=n=l,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}y.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},y.prototype.next=function(e){return this._invoke("next",e)},y.prototype.throw=function(e){return this._invoke("throw",e)},y.prototype.return=function(e){return this._invoke("return",e)};const g=Object.entries,b=Object.setPrototypeOf,v=Object.isFrozen,S=Object.getPrototypeOf,T=Object.getOwnPropertyDescriptor;let E=Object.freeze,w=Object.seal,A=Object.create,x="undefined"!=typeof Reflect&&Reflect,_=x.apply,O=x.construct;E||(E=function(e){return e}),w||(w=function(e){return e}),_||(_=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),O||(O=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const k=X(Array.prototype.forEach);Array.prototype.indexOf;const N=X(Array.prototype.lastIndexOf),D=X(Array.prototype.pop),C=X(Array.prototype.push);Array.prototype.slice;const R=X(Array.prototype.splice),L=Array.isArray,I=X(String.prototype.toLowerCase),M=X(String.prototype.toString),P=X(String.prototype.match),z=X(String.prototype.replace),j=X(String.prototype.indexOf),U=X(String.prototype.trim),F=X(Number.prototype.toString),H=X(Boolean.prototype.toString),B="undefined"==typeof BigInt?null:X(BigInt.prototype.toString),W="undefined"==typeof Symbol?null:X(Symbol.prototype.toString),Y=X(Object.prototype.hasOwnProperty),$=X(Object.prototype.toString),G=X(RegExp.prototype.test),q=(K=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return O(K,t)});var K;function X(e){return function(t){t instanceof RegExp&&(t.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 _(e,t,r)}}function V(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I;if(b&&b(e,null),!L(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(v(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Z(e){for(let t=0;t<e.length;t++)Y(e,t)||(e[t]=null);return e}function J(e){const t=A(null);for(const r of g(e)){var n=h(r,2);const o=n[0],i=n[1];Y(e,o)&&(L(i)?t[o]=Z(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=J(i):t[o]=i)}return t}function Q(e,t){for(;null!==e;){const n=T(e,t);if(n){if(n.get)return X(n.get);if("function"==typeof n.value)return X(n.value)}e=S(e)}return function(){return null}}const ee=E(["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"]),te=E(["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"]),ne=E(["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"]),re=E(["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"]),oe=E(["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"]),ie=E(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ae=E(["#text"]),le=E(["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"]),ce=E(["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"]),se=E(["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"]),ue=E(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fe=w(/{{[\w\W]*|^[\w\W]*}}/g),pe=w(/<%[\w\W]*|^[\w\W]*%>/g),me=w(/\${[\w\W]*/g),de=w(/^data-[\-\w.\u00B7-\uFFFF]+$/),he=w(/^aria-[\-\w]+$/),ye=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ge=w(/^(?:\w+script|data):/i),be=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ve=w(/^html$/i),Se=w(/^[a-z][.\w]*(-[.\w]+)+$/i),Te=w(/<[/\w!]/g),Ee=w(/<[/\w]/g),we=w(/<\/no(script|embed|frames)/i),Ae=w(/\/>/i),xe=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],_e=E(V({},xe)),Oe=function(){const e={};return k(xe,t=>{e[t]=w(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),E(e)}(),ke=function(){return"undefined"==typeof window?null:window},Ne=function(e,t,n,r){return Y(e,t)&&L(e[t])?V(r.base?J(r.base):{},e[t],r.transform):n},De=function(e,t,n){const r=Y(e,t)?e[t]:void 0;return r&&"object"==typeof r?J(r):n()};var Ce=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ke();const n=t=>e(t);if(n.version="3.4.16",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,l=t.Node,c=t.Element,s=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const u=t.DOMParser,f=t.trustedTypes,p=c.prototype,m=Q(p,"cloneNode"),d=Q(p,"remove"),h=Q(p,"removeAttributeNode"),y=Q(p,"nextSibling"),b=Q(p,"childNodes"),v=Q(p,"parentNode"),S=Q(p,"shadowRoot"),T=Q(p,"attributes"),x=l&&l.prototype?Q(l.prototype,"nodeType"):null,_=l&&l.prototype?Q(l.prototype,"nodeName"):null,O=l&&l.prototype?Q(l.prototype,"ownerDocument"):null,K=function(e){return x?x(e):e.nodeType},X=function(e){return _?_(e):e.nodeName};if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Z,xe,Ce="",Re=!1,Le=0;const Ie=function(){if(Le>0)throw q('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.')},Me=function(e){Ie(),Le++;try{return Z.createHTML(e)}finally{Le--}},Pe=r,ze=Pe.implementation,je=Pe.createNodeIterator,Ue=Pe.createDocumentFragment,Fe=Pe.getElementsByTagName,He=o.importNode;let Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof g&&"function"==typeof v&&ze&&void 0!==ze.createHTMLDocument;const We=fe,Ye=pe,$e=me,Ge=de,qe=he,Ke=ge,Xe=be,Ve=Se;let Ze=ye,Je=null;const Qe=V({},[...ee,...te,...ne,...oe,...ae]);let et=null;const tt=V({},[...le,...ce,...se,...ue]);let nt=Object.seal(A(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}})),rt=null,ot=null;const it=Object.seal(A(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let at=!0,lt=!0,ct=!1,st=!0,ut=!1,ft=!0,pt=!1,mt=!1,dt=null,ht=null,yt=!1,gt=!1,bt=!1,vt=!1,St=!0,Tt=!1;const Et="user-content-";let wt=!0,At=!1,xt={},_t=null;const Ot=V({},["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 kt=null;const Nt=V({},["audio","video","img","source","image","track"]);let Dt=null;const Ct=V({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let Mt=It,Pt=!1,zt=null;const jt=V({},[Rt,Lt,It],M),Ut=E(["mi","mo","mn","ms","mtext"]);let Ft=V({},Ut);const Ht=E(["annotation-xml"]);let Bt=V({},Ht);const Wt=V({},["title","style","font","a","script"]);let Yt=null;const $t=["application/xhtml+xml","text/html"];let Gt=null,qt=null;const Kt=r.createElement("form"),Xt=function(e){return e instanceof RegExp||e instanceof Function},Vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(qt&&qt===e)return;e&&"object"==typeof e||(e={}),e=J(e),Yt=-1===$t.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Gt="application/xhtml+xml"===Yt?M:I,Je=Ne(e,"ALLOWED_TAGS",Qe,{transform:Gt}),et=Ne(e,"ALLOWED_ATTR",tt,{transform:Gt}),zt=Ne(e,"ALLOWED_NAMESPACES",jt,{transform:M}),Dt=Ne(e,"ADD_URI_SAFE_ATTR",Ct,{transform:Gt,base:Ct}),kt=Ne(e,"ADD_DATA_URI_TAGS",Nt,{transform:Gt,base:Nt}),_t=Ne(e,"FORBID_CONTENTS",Ot,{transform:Gt}),rt=Ne(e,"FORBID_TAGS",J({}),{transform:Gt}),ot=Ne(e,"FORBID_ATTR",J({}),{transform:Gt}),xt=!!Y(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?J(e.USE_PROFILES):e.USE_PROFILES),at=!1!==e.ALLOW_ARIA_ATTR,lt=!1!==e.ALLOW_DATA_ATTR,ct=e.ALLOW_UNKNOWN_PROTOCOLS||!1,st=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ut=e.SAFE_FOR_TEMPLATES||!1,ft=!1!==e.SAFE_FOR_XML,pt=e.WHOLE_DOCUMENT||!1,gt=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,vt=e.RETURN_TRUSTED_TYPE||!1,yt=e.FORCE_BODY||!1,St=!1!==e.SANITIZE_DOM,Tt=e.SANITIZE_NAMED_PROPS||!1,wt=!1!==e.KEEP_CONTENT,At=e.IN_PLACE||!1,Ze=function(e){try{return G(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ye,Mt="string"==typeof e.NAMESPACE?e.NAMESPACE:It,Ft=De(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>V({},Ut)),Bt=De(e,"HTML_INTEGRATION_POINTS",()=>V({},Ht));const t=De(e,"CUSTOM_ELEMENT_HANDLING",()=>A(null));if(nt=A(null),Y(t,"tagNameCheck")&&Xt(t.tagNameCheck)&&(nt.tagNameCheck=t.tagNameCheck),Y(t,"attributeNameCheck")&&Xt(t.attributeNameCheck)&&(nt.attributeNameCheck=t.attributeNameCheck),Y(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(nt.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),w(nt),ut&&(lt=!1),bt&&(gt=!0),xt&&(Je=V({},ae),et=A(null),!0===xt.html&&(V(Je,ee),V(et,le)),!0===xt.svg&&(V(Je,te),V(et,ce),V(et,ue)),!0===xt.svgFilters&&(V(Je,ne),V(et,ce),V(et,ue)),!0===xt.mathMl&&(V(Je,oe),V(et,se),V(et,ue))),it.tagCheck=null,it.attributeCheck=null,Y(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?it.tagCheck=e.ADD_TAGS:L(e.ADD_TAGS)&&(Je===Qe&&(Je=J(Je)),V(Je,e.ADD_TAGS,Gt))),Y(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?it.attributeCheck=e.ADD_ATTR:L(e.ADD_ATTR)&&(et===tt&&(et=J(et)),V(et,e.ADD_ATTR,Gt))),Y(e,"ADD_FORBID_CONTENTS")&&L(e.ADD_FORBID_CONTENTS)&&(_t===Ot&&(_t=J(_t)),V(_t,e.ADD_FORBID_CONTENTS,Gt)),wt&&(Je["#text"]=!0),pt&&V(Je,["html","head","body"]),Je.table&&(V(Je,["tbody"]),delete rt.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Z;Z=e.TRUSTED_TYPES_POLICY;try{Ce=Me("")}catch(e){throw Z=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Z=void 0,Ce=""):(void 0===Z&&(Re||(xe=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,i),Re=!0),Z=xe),Z&&"string"==typeof Ce&&(Ce=Me("")));E&&E(e),qt=e},Zt=V({},[...te,...ne,...re]),Jt=V({},[...oe,...ie]),Qt=function(e){C(n.removed,{element:e});try{v(e).removeChild(e)}catch(t){if(d(e),!v(e))throw q("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},en=function(e,t,n){try{h(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},tn=function(e){on(e);const t=b(e);if(t){const e=[];k(t,t=>{C(e,t)}),k(e,e=>{try{d(e)}catch(e){}})}const n=T(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;"string"==typeof o&&en(e,r,o)}},nn=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}C(n.removed,{attribute:r||null,from:t});try{r?h(t,r):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(gt||bt)try{Qt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},rn=function(e){const t=T(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;"string"!=typeof o||et[Gt(o)]||en(e,r,o)}},on=function(e){const t=[e];for(;t.length>0;){const e=t.pop();1===K(e)&&rn(e);const n=b(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},an=function(e,t){return!!ft&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},ln=function(e){let t=null,n=null;if(yt)e="<remove></remove>"+e;else{const t=P(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Yt&&Mt===It&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Z?Me(e):e;if(Mt===It)try{t=(new u).parseFromString(o,Yt)}catch(e){}if(!t||!t.documentElement){t=ze.createDocument(Mt,"template",null);try{t.documentElement.innerHTML=Pt?Ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Mt===It?Fe.call(t,pt?"html":"body")[0]:pt?t.documentElement:i},cn=function(e){const t=O?O(e):e.ownerDocument;return je.call(t||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},sn=function(e){return e=z(e,We," "),e=z(e,Ye," "),z(e,$e," ")},un=function(e){var t;e.normalize();const n=O?O(e):e.ownerDocument,r=je.call(n||e,e,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===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&k(i,e=>{pn(e.content)&&un(e.content)})},fn=function(e){const t=_?_(e):null;return"string"==typeof t&&"form"===Gt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==T(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==x(e)||e.childNodes!==b(e))},pn=function(e){if(!x||"object"!=typeof e||null===e)return!1;try{return 11===x(e)}catch(e){return!1}},mn=function(e){if(!x||"object"!=typeof e||null===e)return!1;try{return"number"==typeof x(e)}catch(e){return!1}};function dn(e,t,r){0!==e.length&&k(e,e=>{e.call(n,t,r,qt)})}const hn=function(e,t){if(e instanceof RegExp)return G(e,t);if(e 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(e(t,...r))}return!1},yn=function(e,t,n,r){return 0===e.length?t:t===n||t===r?J(t):t},gn=function(e,t){return e!==t&&null===v(e)&&(At&&on(e),!0)},bn=function(e,t){if(dn(Be.beforeSanitizeElements,e,null),gn(e,t))return!0;if(fn(e))return Qt(e),!0;const r=Gt(X(e));if(Je=yn(Be.uponSanitizeElement,Je,Qe,dt),dn(Be.uponSanitizeElement,e,{tagName:r,allowedTags:Je}),gn(e,t))return!0;if(function(e,t){return!!(ft&&e.hasChildNodes()&&!mn(e.firstElementChild)&&G(Te,e.textContent)&&G(Te,e.innerHTML))||!!(ft&&e.namespaceURI===It&&_e[t]&&(mn(e.firstElementChild)||"string"==typeof e.textContent&&G(Oe[t],e.textContent)))||7===e.nodeType||!(!ft||8!==e.nodeType||!G(Ee,e.data))}(e,r))return Qt(e),!0;if(rt[r]||!(it.tagCheck instanceof Function&&it.tagCheck(r))&&!Je[r]){const n=function(e,t,n){if(!rt[t]&&Tn(t)&&hn(nt.tagNameCheck,t))return!1;if(wt&&!_t[t]){const t=v(e),r=b(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?m(r[o],!0):r[o];t.insertBefore(i,y(e))}}return Qt(e),!0}(e,r,t);return!(!1!==n||(dn(Be.afterSanitizeElements,e,null),!gn(e,t)))||n}if(1===K(e)&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:Mt,tagName:"template"});const n=I(e.tagName),r=I(t.tagName);return!!zt[e.namespaceURI]&&(e.namespaceURI===Lt?function(e,t,n){return t.namespaceURI===It?"svg"===e:t.namespaceURI===Rt?"svg"===e&&("annotation-xml"===n||Ft[n]):Boolean(Zt[e])}(n,t,r):e.namespaceURI===Rt?function(e,t,n){return t.namespaceURI===It?"math"===e:t.namespaceURI===Lt?"math"===e&&Bt[n]:Boolean(Jt[e])}(n,t,r):e.namespaceURI===It?function(e,t,n){return!(t.namespaceURI===Lt&&!Bt[n])&&!(t.namespaceURI===Rt&&!Ft[n])&&!Jt[e]&&(Wt[e]||!Zt[e])}(n,t,r):!("application/xhtml+xml"!==Yt||!zt[e.namespaceURI]))}(e))return Qt(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&G(we,e.innerHTML))return Qt(e),!0;if(ut&&3===e.nodeType){const t=sn(e.textContent);e.textContent!==t&&(C(n.removed,{element:e.cloneNode()}),e.textContent=t)}return dn(Be.afterSanitizeElements,e,null),gn(e,t)},vn=function(e,t,n){if(ot[t])return!1;if(an(t,e))return!1;if(St&&("id"===t||"name"===t)&&(n in r||n in Kt))return!1;const o=et[t]||it.attributeCheck instanceof Function&&it.attributeCheck(t,e);return!(!lt||!G(Ge,t))||!(!at||!G(qe,t))||(o?!(!Dt[t]&&!G(Ze,z(n,Xe,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==j(n,"data:")||!kt[e])&&(!ct||G(Ke,z(n,Xe,"")))&&n):Tn(e)&&hn(nt.tagNameCheck,e)&&hn(nt.attributeNameCheck,t,e)||"is"===t&&nt.allowCustomizedBuiltInElements&&hn(nt.tagNameCheck,n))},Sn=V({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tn=function(e){return!Sn[I(e)]&&G(Ve,e)},En=function(e,t,n,r){if(Z&&"object"==typeof f&&"function"==typeof f.getAttributeType&&!n)switch(f.getAttributeType(e,t)){case"TrustedHTML":return Me(r);case"TrustedScriptURL":return function(e){Ie(),Le++;try{return Z.createScriptURL(e)}finally{Le--}}(r)}return r},wn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!fn(e)||(Qt(e),!1)}catch(n){return nn(t,e),!1}},An=function(e,t){if(dn(Be.beforeSanitizeAttributes,e,null),gn(e,t))return;const r=e.attributes;if(!r||fn(e))return;et=yn(Be.uponSanitizeAttribute,et,tt,ht);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let i=r.length;const a=Gt(e.nodeName);for(;i--;){const t=r[i],l=t.name,c=t.namespaceURI,s=t.value,u=Gt(l),f=s;let p="value"===l?f:U(f),m=!1;o.attrName=u,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,dn(Be.uponSanitizeAttribute,e,o),p=o.attrValue,!Tt||"id"!==u&&"name"!==u||0===j(p,Et)||(nn(l,e,t),p=Et+p,m=!0),ft&&G(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===u&&P(p,"href")?nn(l,e,t):o.forceKeepAttr||(!o.keepAttr||!st&&G(Ae,p)?nn(l,e,t):(ut&&(p=sn(p)),vn(a,u,p)?(p=En(a,u,c,p),p!==f&&wn(e,l,c,p)&&m&&D(n.removed)):nn(l,e,t)))}dn(Be.afterSanitizeAttributes,e,null),gn(e,t)},xn=function(e){let t=null;const n=cn(e);for(dn(Be.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(dn(Be.uponSanitizeShadowNode,t,null),bn(t,e),An(t,e),pn(t.content)&&xn(t.content),1===K(t)){const e=S(t);pn(e)&&(_n(e),xn(e))}dn(Be.afterSanitizeShadowDOM,e,null)},_n=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){xn(e.shadow);continue}const n=e.node,r=1===K(n),o=b(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=_?_(n):null;if("string"==typeof e&&"template"===Gt(e)){const e=n.content;pn(e)&&t.push({node:e,shadow:null})}}if(r){const e=S(n);pn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Pt=!e,Pt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!mn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return F(e);case"boolean":return H(e);case"bigint":return B?B(e):"0";case"symbol":return W?W(e):"Symbol()";case"undefined":default:return $(e);case"function":case"object":{if(null===e)return $(e);const t=e,n=Q(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:$(e)}return $(e)}}}(e)))throw q("dirty is not a string, aborting");if(!n.isSupported)return e;mt?(Je=dt,et=ht):Vt(t),(Be.uponSanitizeElement.length>0||Be.uponSanitizeAttribute.length>0)&&(Je=J(Je)),Be.uponSanitizeAttribute.length>0&&(et=J(et)),n.removed=[];const c=At&&"string"!=typeof e&&mn(e);if(c){!function(e){if(!ft)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=K(e);if(7===n||8===n&&G(Ee,e.data)){try{d(e)}catch(e){}continue}if(1===n){const t=e,n=Gt(X(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&an("for",n)&&t.removeAttribute("for")}catch(e){}}const r=b(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}}(e);const t=X(e);if("string"==typeof t){const n=Gt(t);if(!Je[n]||rt[n])throw tn(e),q("root node is forbidden and cannot be sanitized in-place")}if(fn(e))throw tn(e),q("root node is clobbered and cannot be sanitized in-place");try{_n(e)}catch(t){throw tn(e),t}}else if(mn(e))r=ln("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),_n(r);else{if(!gt&&!ut&&!pt&&-1===e.indexOf("<"))return Z&&vt?Me(e):e;if(r=ln(e),!r)return gt?null:vt?Ce:""}r&&yt&&Qt(r.firstChild);const s=c?e:r;try{const e=cn(s);for(;a=e.nextNode();)bn(a,s),An(a,s),pn(a.content)&&xn(a.content)}catch(t){throw c&&(tn(e),k(n.removed,e=>{e.element&&on(e.element)})),t}if(c){let t=!1;if(k(n.removed,n=>{n.element&&(n.element===e&&(t=!0),on(n.element))}),t)throw q("a node selected for removal could not be safely returned; refusing to sanitize in place");return ut&&un(e),e}if(gt){if(ut&&un(r),bt)for(l=Ue.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(et.shadowroot||et.shadowrootmode)&&(l=He.call(o,l,!0)),l}let u=pt?r.outerHTML:r.innerHTML;return pt&&Je["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&G(ve,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),ut&&(u=sn(u)),Z&&vt?Me(u):u},n.setConfig=function(){Vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),mt=!0,dt=Je,ht=et},n.clearConfig=function(){qt=null,mt=!1,dt=null,ht=null,Z=xe,Ce=""},n.isValidAttribute=function(e,t,n){qt||Vt({});const r=Gt(e),o=Gt(t);return vn(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Y(Be,e)&&C(Be[e],t)},n.removeHook=function(e,t){if(Y(Be,e)){if(void 0!==t){const n=N(Be[e],t);return-1===n?void 0:R(Be[e],n,1)[0]}return D(Be[e])}},n.removeHooks=function(e){Y(Be,e)&&(Be[e]=[])},n.removeAllHooks=function(){Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Re={closeLabel:"Close"};c();const Le=e=>({__html:Ce.sanitize(e)}),Ie=({isOpen:r=!1,onClose:o,position:i="start",title:a,children:c,footer:s,bodyHtml:u,footerHtml:f,labels:m={},className:d,backdrop:h=!0,isFloatingPanel:y=!1,...g})=>{const{closeLabel:b}={...Re,...m},v=n(null),S=n(null),T=n(null),E=n(o);E.current=o;const w=t(),A=h&&!y,x=y?"mg-floating-panel":"mg-drawer";e(()=>{const e=e=>{"Escape"===e.key&&r&&E.current&&E.current()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),e(()=>{const e=v.current;if(!e)return;const t=e.ownerDocument;if(e.inert=!r,r)return T.current=t.activeElement,void(S.current||e).focus();const n=T.current;T.current=null,n&&n.isConnected&&"function"==typeof n.focus&&(!e.contains(t.activeElement)&&t.activeElement&&t.activeElement!==t.body||n.focus())},[r]);const _=p()(x,{"is-open":r,[`${x}--${i}`]:!y&&i},d);let O=c;u&&(O=(0,l().jsx)("div",{dangerouslySetInnerHTML:Le(u)}));let k=s;return f&&(k=(0,l().jsx)("div",{dangerouslySetInnerHTML:Le(f)})),(0,l().jsxs)(l().Fragment,{children:[A&&r&&(0,l().jsx)("div",{className:"mg-drawer__backdrop",onClick:o,"aria-hidden":"true"}),(0,l().jsxs)("div",{ref:v,className:_,"aria-hidden":r?void 0:"true",tabIndex:"-1",role:"dialog","aria-modal":A&&r?"true":void 0,"aria-labelledby":a?w:void 0,onKeyDown:e=>{if(!A||!r||"Tab"!==e.key)return;const t=Array.from(v.current.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===t.length)return void e.preventDefault();const n=t[0],o=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),o.focus()):e.shiftKey||document.activeElement!==o||(e.preventDefault(),n.focus())},...g,children:[(0,l().jsxs)("div",{className:`${x}__header`,children:[a&&(0,l().jsx)("h2",{id:w,className:`${x}__title`,children:a}),(0,l().jsx)("button",{ref:S,type:"button",className:`mg-icon-button mg-icon-button--small ${x}__close`,onClick:o,"aria-label":b,children:(0,l().jsx)("span",{className:"mg-icon mg-icon-close","aria-hidden":"true"})})]}),(0,l().jsx)("div",{className:`${x}__body`,children:O}),k&&(0,l().jsx)("div",{className:`${x}__footer`,children:k})]})]})};Ie.propTypes={isOpen:u().bool,onClose:u().func,position:u().oneOf(["start","end","bottom"]),title:u().node,children:u().node,footer:u().node,bodyHtml:u().string,footerHtml:u().string,labels:u().shape({closeLabel:u().string}),className:u().string,backdrop:u().bool,isFloatingPanel:u().bool};const Me="mg-drawer:open",Pe="mg-drawer:close",ze="mg-drawer:toggle",je=({isOpen:t=!1,controlsId:n,...o})=>{const[i,a]=r(t);return e(()=>{if(!n)return;const e=e=>{const t=e.target.closest?.("[data-mg-drawer-trigger]");t&&t.getAttribute("data-mg-drawer-trigger")===n&&(e.preventDefault(),a(e=>!e))},t=()=>a(!0),r=()=>a(!1),o=()=>a(e=>!e);document.addEventListener("click",e);const i=document.getElementById(n);return i?.addEventListener(Me,t),i?.addEventListener(Pe,r),i?.addEventListener(ze,o),()=>{document.removeEventListener("click",e),i?.removeEventListener(Me,t),i?.removeEventListener(Pe,r),i?.removeEventListener(ze,o)}},[n]),e(()=>{n&&document.querySelectorAll("[data-mg-drawer-trigger]").forEach(e=>{e.getAttribute("data-mg-drawer-trigger")===n&&(e.setAttribute("aria-expanded",String(i)),e.setAttribute("aria-controls",n))})},[n,i]),(0,l().jsx)(Ie,{...o,isOpen:i,onClose:()=>a(!1)})};function Ue(e){const{dataset:t}=e,n="true"===t.isFloatingPanel||e.classList.contains("mg-floating-panel"),r=n?"mg-floating-panel":"mg-drawer",o=e.querySelector(`.${r}__body`),i=e.querySelector(`.${r}__footer`),a=e.querySelector(`.${r}__title`),l=t.title||(a?a.textContent.trim():void 0);let c=o?o.innerHTML.trim():"";return c||a||i||(c=e.innerHTML.trim()),{isOpen:"true"===t.isOpen||e.classList.contains("is-open"),position:t.position||"start",title:l||void 0,backdrop:"false"!==t.backdrop,isFloatingPanel:n,bodyHtml:c||void 0,footerHtml:i?i.innerHTML.trim():void 0,labels:t.closeLabel?{closeLabel:t.closeLabel}:void 0,controlsId:e.id||void 0,className:t.className||void 0}}je.propTypes={isOpen:u().bool,controlsId:u().string};export{Ie as Drawer,je as HydratedDrawer,je as default,Ue as fromElement};
9
+ import{useEffect as t,useId as e,useRef as n,useState as r}from"react";var o={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"},6942(t,e){var n;!function(){var r={}.hasOwnProperty;function o(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,i(n)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()}};const i={};function a(t){const e=i[t];if(void 0!==e)return e.exports;const n=i[t]={exports:{}};return o[t](n,n.exports,a),n.exports}a.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.cw=t=>{var e;return()=>{if(t){var n=t;t=0,e={exports:{}},n.call(e.exports,e,e.exports)}return e.exports}},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var l=/*#__PURE__*/a.cw((t,e)=>{var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(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}}e.Fragment=r,e.jsx=o,e.jsxs=o}),c=/*#__PURE__*/a.cw(t=>{t.exports=l()});const s={en:"ltr",ar:"rtl",es:"ltr",fr:"ltr",ja:"ltr",ru:"ltr",zh:"ltr"};function u(t="en"){return String(t).trim().toLowerCase().split(/[-_]/)[0]}function f(t,e){const n=u(t),r=void 0!==t&&Object.hasOwn(s,n)?s[n]:void 0,o=void 0===e?r:e;return{...void 0===t?{}:{lang:t},...void 0===o?{}:{dir:o}}}function p(t){const e=t.dataset.lang??t.closest("[lang]")?.getAttribute("lang"),n=t.getAttribute("dir")?.toLowerCase();return{...null==e?{}:{lang:e},...["ltr","rtl","auto"].includes(n)?{dir:n}:{}}}const d=(m={closeLabel:"Close"},h={ar:{closeLabel:"إغلاق"},es:{closeLabel:"Cerrar"},fr:{closeLabel:"Fermer"},ja:{closeLabel:"閉じる"},ru:{closeLabel:"Закрыть"},zh:{closeLabel:"关闭"}},(t,e)=>{const n=u(t),r=Object.hasOwn(h,n)?h[n]:void 0,o=Object.fromEntries(Object.entries(e??{}).filter(([,t])=>void 0!==t));return{...m,...r,...o}});var m,h,y=/*#__PURE__*/a(5556),g=/*#__PURE__*/a.n(y),b=a(6942),v=/*#__PURE__*/a.n(b);function S(t,e){this.v=t,this.k=e}function T(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 w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){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 T(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)?T(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 E(t){var e,n;function r(e,n){try{var i=t[e](n),a=i.value,l=a instanceof S;Promise.resolve(l?a.v:a).then(function(n){if(l){var c="return"===e&&a.k?e:"next";if(!a.k||n.done)return r(c,n);n=t[c](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)}E.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},E.prototype.next=function(t){return this._invoke("next",t)},E.prototype.throw=function(t){return this._invoke("throw",t)},E.prototype.return=function(t){return this._invoke("return",t)};const A=Object.entries,x=Object.setPrototypeOf,_=Object.isFrozen,O=Object.getPrototypeOf,k=Object.getOwnPropertyDescriptor;let N=Object.freeze,D=Object.seal,C=Object.create,L="undefined"!=typeof Reflect&&Reflect,R=L.apply,I=L.construct;N||(N=function(t){return t}),D||(D=function(t){return t}),R||(R=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)}),I||(I=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 z=it(Array.prototype.forEach);Array.prototype.indexOf;const M=it(Array.prototype.lastIndexOf),P=it(Array.prototype.pop),j=it(Array.prototype.push),F=it(Array.prototype.slice),U=it(Array.prototype.splice),H=Array.isArray,B=at(Set),W=it(Set.prototype.add),Y=it(Set.prototype.has),$=it(String.prototype.toLowerCase),G=it(String.prototype.toString),q=it(String.prototype.match),K=it(String.prototype.replace),X=it(String.prototype.indexOf),V=it(String.prototype.trim),Z=it(Number.prototype.toString),J=it(Boolean.prototype.toString),Q="undefined"==typeof BigInt?null:it(BigInt.prototype.toString),tt="undefined"==typeof Symbol?null:it(Symbol.prototype.toString),et=it(Object.prototype.hasOwnProperty),nt=it(Object.prototype.toString),rt=it(RegExp.prototype.test),ot=at(TypeError);function it(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 R(t,e,r)}}function at(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return I(t,n)}}function lt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$;if(x&&x(t,null),!H(e))return t;let r=e.length;for(;r--;){let o=e[r];if("string"==typeof o){const t=n(o);t!==o&&(_(e)||(e[r]=t),o=t)}t[o]=!0}return t}function ct(t){for(let e=0;e<t.length;e++)et(t,e)||(t[e]=null);return t}function st(t){const e=C(null);for(const r of A(t)){var n=w(r,2);const o=n[0],i=n[1];et(t,o)&&(H(i)?e[o]=ct(i):i&&"object"==typeof i&&i.constructor===Object?e[o]=st(i):e[o]=i)}return e}function ut(t,e){for(;null!==t;){const n=k(t,e);if(n){if(n.get)return it(n.get);if("function"==typeof n.value)return it(n.value)}t=O(t)}return function(){return null}}const ft=N(["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"]),pt=N(["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"]),dt=N(["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"]),mt=N(["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"]),ht=N(["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"]),yt=N(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gt=N(["#text"]),bt=N(["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"]),vt=N(["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"]),St=N(["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"]),Tt=N(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wt=D(/{{[\w\W]*|^[\w\W]*}}/g),Et=D(/<%[\w\W]*|^[\w\W]*%>/g),At=D(/\${[\w\W]*/g),xt=D(/^data-[\-\w.\u00B7-\uFFFF]+$/),_t=D(/^aria-[\-\w]+$/),Ot=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kt=D(/^(?:\w+script|data):/i),Nt=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dt=D(/^html$/i),Ct=D(/^[a-z][.\w]*(-[.\w]+)+$/i),Lt=D(/<[/\w!]/g),Rt=D(/<[/\w]/g),It=D(/<\/no(script|embed|frames)/i),zt=D(/\/>/i),Mt=N(lt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Pt=function(){return"undefined"==typeof window?null:window},jt=function(t,e,n,r){return et(t,e)&&H(t[e])?lt(r.base?st(r.base):{},t[e],r.transform):n},Ft=function(t,e,n){const r=et(t,e)?t[e]:void 0;return r&&"object"==typeof r?st(r):n()};var Ut=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pt();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,f=e.trustedTypes,p=c.prototype,d=ut(p,"cloneNode"),m=ut(p,"remove"),h=ut(p,"removeAttributeNode"),y=ut(p,"nextSibling"),g=ut(p,"childNodes"),b=ut(p,"parentNode"),v=ut(p,"shadowRoot"),S=ut(p,"attributes"),T=l&&l.prototype?ut(l.prototype,"nodeType"):null,w=l&&l.prototype?ut(l.prototype,"nodeName"):null,E=l&&l.prototype?ut(l.prototype,"ownerDocument"):null,x=function(t){return T?T(t):t.nodeType},_=function(t){return w?w(t):t.nodeName},L=function(t){for(;null!==t;){const e=k(t,"namespaceURI");if(e)return e.get?it(e.get):null;t=O(t)}return null}(p),R=function(t){return L?L(t):t.namespaceURI};if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let I,at,ct="",Ut=!1,Ht=0;const Bt=function(){if(Ht>0)throw ot('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.')},Wt=function(t){Bt(),Ht++;try{return I.createHTML(t)}finally{Ht--}},Yt=r,$t=Yt.implementation,Gt=Yt.createNodeIterator,qt=Yt.createDocumentFragment,Kt=Yt.getElementsByTagName,Xt=o.importNode;let Vt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof A&&"function"==typeof b&&$t&&void 0!==$t.createHTMLDocument;const Zt=wt,Jt=Et,Qt=At,te=xt,ee=_t,ne=kt,re=Nt,oe=Ct;let ie=Ot,ae=null;const le=lt({},[...ft,...pt,...dt,...ht,...gt]);let ce=null;const se=lt({},[...bt,...vt,...St,...Tt]);let ue=Object.seal(C(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 de=Object.seal(C(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let me=!0,he=!0,ye=!1,ge=!0,be=!1,ve=!0,Se=!1,Te=!1,we=null,Ee=null,Ae=!1,xe=!1,_e=!1,Oe=!1,ke=!0,Ne=!1;const De="user-content-";let Ce=!0,Le=!1,Re=null,Ie={},ze=null;const Me=lt({},["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=lt({},["audio","video","img","source","image","track"]);let Fe=null;const Ue=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Be="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ye=We,$e=!1,Ge=null;const qe=lt({},[He,Be,We],G),Ke=N(["mi","mo","mn","ms","mtext"]);let Xe=lt({},Ke);const Ve=N(["annotation-xml"]);let Ze=lt({},Ve);const Je=lt({},["title","style","font","a","script"]);let Qe=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=st(t),Qe=-1===tn.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,en="application/xhtml+xml"===Qe?G:$,ae=jt(t,"ALLOWED_TAGS",le,{transform:en}),ce=jt(t,"ALLOWED_ATTR",se,{transform:en}),Ge=jt(t,"ALLOWED_NAMESPACES",qe,{transform:G}),Fe=jt(t,"ADD_URI_SAFE_ATTR",Ue,{transform:en,base:Ue}),Pe=jt(t,"ADD_DATA_URI_TAGS",je,{transform:en,base:je}),ze=jt(t,"FORBID_CONTENTS",Me,{transform:en}),fe=jt(t,"FORBID_TAGS",st({}),{transform:en}),pe=jt(t,"FORBID_ATTR",st({}),{transform:en}),Ie=!!et(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?st(t.USE_PROFILES):t.USE_PROFILES),me=!1!==t.ALLOW_ARIA_ATTR,he=!1!==t.ALLOW_DATA_ATTR,ye=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,be=t.SAFE_FOR_TEMPLATES||!1,ve=!1!==t.SAFE_FOR_XML,Se=t.WHOLE_DOCUMENT||!1,xe=t.RETURN_DOM||!1,_e=t.RETURN_DOM_FRAGMENT||!1,Oe=t.RETURN_TRUSTED_TYPE||!1,Ae=t.FORCE_BODY||!1,ke=!1!==t.SANITIZE_DOM,Ne=t.SANITIZE_NAMED_PROPS||!1,Ce=!1!==t.KEEP_CONTENT,Le=t.IN_PLACE||!1,ie=function(t){try{return rt(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:Ot,Ye="string"==typeof t.NAMESPACE?t.NAMESPACE:We,Xe=Ft(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>lt({},Ke)),Ze=Ft(t,"HTML_INTEGRATION_POINTS",()=>lt({},Ve));const e=Ft(t,"CUSTOM_ELEMENT_HANDLING",()=>C(null));if(ue=C(null),et(e,"tagNameCheck")&&on(e.tagNameCheck)&&(ue.tagNameCheck=e.tagNameCheck),et(e,"attributeNameCheck")&&on(e.attributeNameCheck)&&(ue.attributeNameCheck=e.attributeNameCheck),et(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ue.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),D(ue),be&&(he=!1),_e&&(xe=!0),Ie&&(ae=lt({},gt),ce=C(null),!0===Ie.html&&(lt(ae,ft),lt(ce,bt)),!0===Ie.svg&&(lt(ae,pt),lt(ce,vt),lt(ce,Tt)),!0===Ie.svgFilters&&(lt(ae,dt),lt(ce,vt),lt(ce,Tt)),!0===Ie.mathMl&&(lt(ae,ht),lt(ce,St),lt(ce,Tt))),de.tagCheck=null,de.attributeCheck=null,et(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?de.tagCheck=t.ADD_TAGS:H(t.ADD_TAGS)&&(ae===le&&(ae=st(ae)),lt(ae,t.ADD_TAGS,en))),et(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?de.attributeCheck=t.ADD_ATTR:H(t.ADD_ATTR)&&(ce===se&&(ce=st(ce)),lt(ce,t.ADD_ATTR,en))),et(t,"ADD_FORBID_CONTENTS")&&H(t.ADD_FORBID_CONTENTS)&&(ze===Me&&(ze=st(ze)),lt(ze,t.ADD_FORBID_CONTENTS,en)),Ce&&(ae["#text"]=!0),Se&&lt(ae,["html","head","body"]),ae.table&&(lt(ae,["tbody"]),delete fe.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw ot('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=I;I=t.TRUSTED_TYPES_POLICY;try{ct=Wt("")}catch(t){throw I=e,t}}else null===t.TRUSTED_TYPES_POLICY?(I=void 0,ct=""):(void 0===I&&(Ut||(at=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}}(f,i),Ut=!0),I=at),I&&"string"==typeof ct&&(ct=Wt("")));N&&N(t),nn=t},ln=lt({},[...pt,...dt,...mt]),cn=lt({},[...ht,...yt]),sn=function(t){j(n.removed,{element:t});try{b(t).removeChild(t)}catch(e){if(m(t),!b(t))throw ot("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{h(t,e)}catch(e){try{t.removeAttribute(n)}catch(t){}}},fn=function(t){hn(t);const e=g(t);e&&z(F(e),t=>{try{m(t)}catch(t){}});const n=1===x(t)?S(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}j(n.removed,{attribute:r||null,from:e});try{r?h(e,r):e.removeAttribute(t)}catch(n){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(xe||_e)try{sn(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},dn=function(t){const e=S(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)}},mn=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===x(t)){const e=v(t);_n(e)&&r.push(e)}const o=g(t);if(o)for(let t=o.length-1;t>=0;--t)r.push(o[t])}},hn=function(t){mn(t,t=>{1===x(t)&&dn(t)})},yn=function(t){const e=[];return mn(t,t=>{e.push(t)},!0),e},gn=function(t,e){let r=!1;return z(n.removed,e=>{e.element&&(r=r||e.element===t,hn(e.element))}),function(t,e){const n=B();z(yn(t),t=>{1===x(t)&&W(n,t)}),z(e,t=>{1!==x(t)||Y(n,t)||dn(t)})}(t,e),r},bn=function(t,e,n,r){const o=Tn(t);let i;for(;i=o.nextNode();)Y(r,i)&&!Y(Re,i)&&(e&&kn(Vt.uponSanitizeShadowNode,i,null),Ln(i,n),Fn(i,n),_n(i.content)&&Un(i.content))},vn=function(t,e){return!!ve&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},Sn=function(t){let e=null,n=null;if(Ae)t="<remove></remove>"+t;else{const e=q(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Qe&&Ye===We&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=I?Wt(t):t;if(Ye===We)try{e=(new u).parseFromString(o,Qe)}catch(t){}if(!e||!e.documentElement){e=$t.createDocument(Ye,"template",null);try{e.documentElement.innerHTML=$e?ct:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ye===We?Kt.call(e,Se?"html":"body")[0]:Se?e.documentElement:i},Tn=function(t){const e=E?E(t):t.ownerDocument;return Gt.call(e||t,t,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},wn=function(t){return t=K(t,Zt," "),t=K(t,Jt," "),K(t,Qt," ")},En=function(t){var e;An(t);const n=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");n&&z(n,t=>{_n(t.content)&&En(t.content)})},An=function(t){t.normalize();const e=E?E(t):t.ownerDocument,n=Gt.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=wn(r.data),r=n.nextNode()},xn=function(t){const e=w?w(t):null;return"string"==typeof e&&"form"===en(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==S(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!==T(t)||t.childNodes!==g(t))},_n=function(t){if(!T||"object"!=typeof t||null===t)return!1;try{return 11===T(t)}catch(t){return!1}},On=function(t){if(!T||"object"!=typeof t||null===t)return!1;try{return"number"==typeof T(t)}catch(t){return!1}};function kn(t,e,r){0!==t.length&&z(t,t=>{t.call(n,e,r,nn)})}const Nn=function(t,e){if(t instanceof RegExp)return rt(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?st(e):e},Cn=function(t,e){return t!==e&&null===b(t)&&(Le&&hn(t),!0)},Ln=function(t,e){if(Re&&W(Re,t),kn(Vt.beforeSanitizeElements,t,null),Cn(t,e))return!0;if(xn(t))return sn(t),!0;const r=en(_(t));if(ae=Dn(Vt.uponSanitizeElement,ae,le,we),kn(Vt.uponSanitizeElement,t,{tagName:r,allowedTags:ae}),Cn(t,e))return!0;if(function(t,e){return!!(ve&&t.hasChildNodes()&&!On(t.firstElementChild)&&rt(Lt,t.textContent)&&rt(Lt,t.innerHTML))||!!(ve&&Mt[e]&&1===x(t)&&R(t)===We&&(On(t.firstElementChild)||"string"==typeof t.textContent&&rt(Lt,t.textContent)))||7===t.nodeType||!(!ve||8!==t.nodeType||!rt(Rt,t.data))}(t,r))return sn(t),!0;if(fe[r]||!(de.tagCheck instanceof Function&&de.tagCheck(r))&&!ae[r]){const n=function(t,e,n){if(!fe[e]&&zn(e)&&Nn(ue.tagNameCheck,e))return!1;if(Ce&&!ze[e]&&!ze[$(e)]){const e=b(t),r=g(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,y(t))}}return sn(t),!0}(t,r,e);return!(!1!==n||(kn(Vt.afterSanitizeElements,t,null),!Cn(t,e)))||n}if(1===x(t)&&!function(t){const e=R(t),n=$(_(t)),r=b(t);let o,i;return r&&1===x(r)?(o={namespaceURI:R(r)},i=$(_(r))):(o={namespaceURI:Ye},i="template"),!!Ge[e]&&(e===Be?function(t,e,n){return e.namespaceURI===We?"svg"===t:e.namespaceURI===He?"svg"===t&&("annotation-xml"===n||Xe[n]):Boolean(ln[t])}(n,o,i):e===He?function(t,e,n){return e.namespaceURI===We?"math"===t:e.namespaceURI===Be?"math"===t&&Ze[n]:Boolean(cn[t])}(n,o,i):e===We?function(t,e,n){return!(e.namespaceURI===Be&&!Ze[n])&&!(e.namespaceURI===He&&!Xe[n])&&!cn[t]&&(Je[t]||!ln[t])}(n,o,i):!("application/xhtml+xml"!==Qe||!Ge[e]))}(t))return sn(t),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&rt(It,t.innerHTML))return sn(t),!0;if(be&&3===t.nodeType){const e=wn(t.textContent);t.textContent!==e&&(j(n.removed,{element:t.cloneNode()}),t.textContent=e)}return kn(Vt.afterSanitizeElements,t,null),Cn(t,e)},Rn=function(t,e,n){if(pe[e])return!1;if(vn(e,t))return!1;if(ke&&("id"===e||"name"===e)&&(n in r||n in rn))return!1;const o=ce[e]||de.attributeCheck instanceof Function&&de.attributeCheck(e,t);return!(!he||!rt(te,e))||!(!me||!rt(ee,e))||(o?!(!Fe[e]&&!rt(ie,K(n,re,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==X(n,"data:")||!Pe[t])&&(!ye||rt(ne,K(n,re,"")))&&n):zn(t)&&Nn(ue.tagNameCheck,t)&&Nn(ue.attributeNameCheck,e,t)||"is"===e&&ue.allowCustomizedBuiltInElements&&Nn(ue.tagNameCheck,n))},In=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),zn=function(t){return!In[$(t)]&&rt(oe,t)},Mn=function(t,e,n,r){if(I&&"object"==typeof f&&"function"==typeof f.getAttributeType&&!n)switch(f.getAttributeType(t,e)){case"TrustedHTML":return Wt(r);case"TrustedScriptURL":return function(t){Bt(),Ht++;try{return I.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!(!ve||!rt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e))||"attributename"===$(t)&&null!==q(e,"href")},Fn=function(t,e){if(kn(Vt.beforeSanitizeAttributes,t,null),Cn(t,e))return;const r=t.attributes;if(!r||xn(t))return;ce=Dn(Vt.uponSanitizeAttribute,ce,se,Ee);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:V(f),d=!1;o.attrName=u,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,kn(Vt.uponSanitizeAttribute,t,o),p=o.attrValue,!Ne||"id"!==u&&"name"!==u||0===X(p,De)||(pn(l,t,e),p=De+p,d=!0),jn(l,p)?pn(l,t,e):o.forceKeepAttr||(!o.keepAttr||!ge&&rt(zt,p)?pn(l,t,e):(be&&(p=wn(p)),Rn(a,u,p)?(p=Mn(a,u,c,p),p!==f&&Pn(t,l,c,p)&&d&&P(n.removed)):pn(l,t,e)))}kn(Vt.afterSanitizeAttributes,t,null),Cn(t,e)},Un=function(t){let e=null;const n=Tn(t);for(kn(Vt.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(kn(Vt.uponSanitizeShadowNode,e,null),Ln(e,t),Fn(e,t),_n(e.content)&&Un(e.content),1===x(e)){const t=v(e);_n(t)&&(Hn(t),Un(t))}be&&An(t),kn(Vt.afterSanitizeShadowDOM,t,null)},Hn=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){Un(t.shadow);continue}const n=t.node,r=1===x(n),o=g(n);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(r){const t=w?w(n):null;if("string"==typeof t&&"template"===en(t)){const t=n.content;_n(t)&&e.push({node:t,shadow:null})}}if(r){const t=v(n);_n(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($e=!t,$e&&(t="\x3c!--\x3e"),"string"!=typeof t&&!On(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return Z(t);case"boolean":return J(t);case"bigint":return Q?Q(t):"0";case"symbol":return tt?tt(t):"Symbol()";case"undefined":default:return nt(t);case"function":case"object":{if(null===t)return nt(t);const e=t,n=ut(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:nt(t)}return nt(t)}}}(t)))throw ot("dirty is not a string, aborting");if(!n.isSupported)return t;Te?(ae=we,ce=Ee):an(e),(Vt.uponSanitizeElement.length>0||Vt.uponSanitizeAttribute.length>0)&&(ae=st(ae)),Vt.uponSanitizeAttribute.length>0&&(ce=st(ce)),n.removed=[];const c=Le&&"string"!=typeof t&&On(t);let s=[];const u=Re;if(c){ve&&mn(t,t=>{const e=x(t);if(7===e||8===e&&rt(Rt,t.data)){try{m(t)}catch(t){}return!1}if(1===e){const e=t,n=en(_(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&vn("for",n)&&e.removeAttribute("for")}catch(t){}}return!0});const e=_(t);if("string"==typeof e){const n=en(e);if(!ae[n]||fe[n])throw fn(t),ot("root node is forbidden and cannot be sanitized in-place")}if(xn(t))throw fn(t),ot("root node is clobbered and cannot be sanitized in-place");s=yn(t),Re=B()}else if(On(t))r=Sn("\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&&!Se&&-1===t.indexOf("<"))return I&&Oe?Wt(t):t;if(r=Sn(t),!r)return xe?null:Oe?ct:""}r&&Ae&&sn(r.firstChild);const f=c?t:r;try{c&&Hn(t);const e=Tn(f);for(;a=e.nextNode();)Ln(a,f),Fn(a,f),_n(a.content)&&Un(a.content);c&&function(t,e){const n=Re;let r=null;const o=()=>(r||(r=B(),z(e,t=>{W(r,t)})),r);for(let e=0;;e++){const r=yn(t),i=[t];let a=!1;if(z(r,t=>{11===x(t)?j(i,t):a||Y(n,t)||(a=Y(o(),t))}),!a)return;if(e>=8)throw ot("the tree kept changing during in-place sanitization; refusing to return it");z(i,(e,n)=>{bn(e,n>0,t,o())})}}(t,s)}catch(e){throw c&&(fn(t),gn(t,s)),e}finally{Re=u}if(c){if(gn(t,s))throw ot("a node selected for removal could not be safely returned; refusing to sanitize in place");return be&&En(t),t}if(xe){if(be&&En(r),_e)for(l=qt.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(ce.shadowroot||ce.shadowrootmode)&&(l=Xt.call(o,l,!0)),l}let p=Se?r.outerHTML:r.innerHTML;return Se&&ae["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&rt(Dt,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),be&&(p=wn(p)),I&&Oe?Wt(p):p},n.setConfig=function(){an(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Te=!0,we=ae,Ee=ce},n.clearConfig=function(){nn=null,Te=!1,we=null,Ee=null,I=at,ct=""},n.isValidAttribute=function(t,e,n){nn||an({});const r=en(t),o=en(e);return("string"!=typeof n||!(jn(e,n)||!ge&&rt(zt,n)))&&Rn(r,o,n)},n.addHook=function(t,e){"function"==typeof e&&et(Vt,t)&&j(Vt[t],e)},n.removeHook=function(t,e){if(et(Vt,t)){if(void 0!==e){const n=M(Vt[t],e);return-1===n?void 0:U(Vt[t],n,1)[0]}return P(Vt[t])}},n.removeHooks=function(t){et(Vt,t)&&(Vt[t]=[])},n.removeAllHooks=function(){Vt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();c();const Ht=t=>({__html:Ut.sanitize(t)}),Bt=({isOpen:r=!1,onClose:o,position:i="start",title:a,children:c,footer:s,bodyHtml:u,footerHtml:p,lang:m,dir:h,labels:y,className:g,backdrop:b=!0,isFloatingPanel:S=!1,...T})=>{const{closeLabel:w}=d(m,y),E=n(null),A=n(null),x=n(null),_=n(o);_.current=o;const O=e(),k=b&&!S,N=S?"mg-floating-panel":"mg-drawer";t(()=>{const t=t=>{"Escape"===t.key&&r&&_.current&&_.current()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[r]),t(()=>{const t=E.current;if(!t)return;const e=t.ownerDocument;if(t.inert=!r,r)return x.current=e.activeElement,void(A.current||t).focus();const n=x.current;x.current=null,n&&n.isConnected&&"function"==typeof n.focus&&(!t.contains(e.activeElement)&&e.activeElement&&e.activeElement!==e.body||n.focus())},[r]);const D=v()(N,{"is-open":r,[`${N}--${i}`]:!S&&i},g);let C=c;u&&(C=/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("div",{dangerouslySetInnerHTML:Ht(u)}));let L=s;return p&&(L=/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("div",{dangerouslySetInnerHTML:Ht(p)})),/*#__PURE__*/ /*#__PURE__*/(0,l().jsxs)(l().Fragment,{children:[k&&r&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("div",{className:"mg-drawer__backdrop",onClick:o,"aria-hidden":"true"}),/*#__PURE__*/ /*#__PURE__*/(0,l().jsxs)("div",{...f(m,h),ref:E,className:D,"aria-hidden":r?void 0:"true",tabIndex:"-1",role:"dialog","aria-modal":k&&r?"true":void 0,"aria-labelledby":a?O:void 0,onKeyDown:t=>{if(!k||!r||"Tab"!==t.key)return;const e=Array.from(E.current.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(0===e.length)return void t.preventDefault();const n=e[0],o=e[e.length-1];t.shiftKey&&document.activeElement===n?(t.preventDefault(),o.focus()):t.shiftKey||document.activeElement!==o||(t.preventDefault(),n.focus())},...T,children:[/*#__PURE__*/ /*#__PURE__*/(0,l().jsxs)("div",{className:`${N}__header`,children:[a&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("h2",{id:O,className:`${N}__title`,children:a}),/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("button",{ref:A,type:"button",className:`mg-icon-button mg-icon-button--small ${N}__close`,onClick:o,"aria-label":w,children:/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("span",{className:"mg-icon mg-icon-close","aria-hidden":"true"})})]}),/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("div",{className:`${N}__body`,children:C}),L&&/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)("div",{className:`${N}__footer`,children:L})]})]})};Bt.propTypes={isOpen:g().bool,onClose:g().func,position:g().oneOf(["start","end","bottom"]),title:g().node,children:g().node,footer:g().node,bodyHtml:g().string,footerHtml:g().string,lang:g().string,dir:g().oneOf(["ltr","rtl","auto"]),labels:g().shape({closeLabel:g().string}),className:g().string,backdrop:g().bool,isFloatingPanel:g().bool};const Wt="mg-drawer:open",Yt="mg-drawer:close",$t="mg-drawer:toggle",Gt=({isOpen:e=!1,controlsId:n,...o})=>{const[i,a]=r(e);return t(()=>{if(!n)return;const t=t=>{const e=t.target.closest?.("[data-mg-drawer-trigger]");e&&e.getAttribute("data-mg-drawer-trigger")===n&&(t.preventDefault(),a(t=>!t))},e=()=>a(!0),r=()=>a(!1),o=()=>a(t=>!t);document.addEventListener("click",t);const i=document.getElementById(n);return i?.addEventListener(Wt,e),i?.addEventListener(Yt,r),i?.addEventListener($t,o),()=>{document.removeEventListener("click",t),i?.removeEventListener(Wt,e),i?.removeEventListener(Yt,r),i?.removeEventListener($t,o)}},[n]),t(()=>{n&&document.querySelectorAll("[data-mg-drawer-trigger]").forEach(t=>{t.getAttribute("data-mg-drawer-trigger")===n&&(t.setAttribute("aria-expanded",String(i)),t.setAttribute("aria-controls",n))})},[n,i]),/*#__PURE__*/ /*#__PURE__*/(0,l().jsx)(Bt,{...o,isOpen:i,onClose:()=>a(!1)})};function qt(t){const{dataset:e}=t,n=function(t){try{const e=JSON.parse(t.dataset.labels);return e&&"object"==typeof e&&!Array.isArray(e)?e:void 0}catch{return}}(t),r="true"===e.isFloatingPanel||t.classList.contains("mg-floating-panel"),o=r?"mg-floating-panel":"mg-drawer",i=t.querySelector(`.${o}__body`),a=t.querySelector(`.${o}__footer`),l=t.querySelector(`.${o}__title`),c=e.title||(l?l.textContent.trim():void 0);let s=i?i.innerHTML.trim():"";return s||l||a||(s=t.innerHTML.trim()),{...p(t),isOpen:"true"===e.isOpen||t.classList.contains("is-open"),position:e.position||"start",title:c||void 0,backdrop:"false"!==e.backdrop,isFloatingPanel:r,bodyHtml:s||void 0,footerHtml:a?a.innerHTML.trim():void 0,labels:void 0===e.closeLabel?n:{...n,closeLabel:e.closeLabel},controlsId:t.id||void 0,className:e.className||void 0}}Gt.propTypes={isOpen:g().bool,controlsId:g().string};export{Bt as Drawer,Gt as HydratedDrawer,Gt as default,qt as fromElement,d as getDrawerLabels};