@mgdis/mg-components 5.21.0 → 5.22.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 (101) hide show
  1. package/dist/cjs/{components.utils-cd908d4e.js → components.utils-637c479d.js} +9 -5
  2. package/dist/cjs/components.utils-637c479d.js.map +1 -0
  3. package/dist/cjs/{index-8532b5e9.js → index-28bf9033.js} +25 -17
  4. package/dist/cjs/index-28bf9033.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mg-action-more_34.cjs.entry.js +195 -146
  7. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
  8. package/dist/cjs/mg-components.cjs.js +3 -3
  9. package/dist/cjs/mg-components.cjs.js.map +1 -1
  10. package/dist/cjs/mg-item-more.cjs.entry.js +2 -2
  11. package/dist/collection/assets/icons/index.js +91 -90
  12. package/dist/collection/assets/icons/index.js.map +1 -1
  13. package/dist/collection/collection-manifest.json +1 -1
  14. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +3 -1
  15. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  16. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +32 -11
  17. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  18. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +9 -0
  19. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
  20. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +56 -44
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  22. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -10
  23. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  24. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -10
  25. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  26. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +6 -10
  27. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  28. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +6 -10
  29. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +6 -10
  31. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +6 -10
  33. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  34. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +6 -10
  35. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  36. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +6 -10
  37. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  38. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  39. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  40. package/dist/collection/components/molecules/mg-popover/mg-popover.js +27 -10
  41. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  42. package/dist/collection/locales/en/messages.json +4 -2
  43. package/dist/collection/locales/fr/messages.json +4 -2
  44. package/dist/collection/utils/behaviors.utils.spec.js +1 -1
  45. package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
  46. package/dist/collection/utils/components.utils.spec.js +1 -1
  47. package/dist/collection/utils/components.utils.spec.js.map +1 -1
  48. package/dist/components/index2.js +8 -4
  49. package/dist/components/index2.js.map +1 -1
  50. package/dist/components/mg-action-more.js.map +1 -1
  51. package/dist/components/mg-icon2.js +92 -90
  52. package/dist/components/mg-icon2.js.map +1 -1
  53. package/dist/components/mg-input-checkbox-paginated.js +1 -1
  54. package/dist/components/mg-input-checkbox-paginated2.js +25 -12
  55. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  56. package/dist/components/mg-input-checkbox.js +50 -34
  57. package/dist/components/mg-input-checkbox.js.map +1 -1
  58. package/dist/components/mg-popover2.js +27 -10
  59. package/dist/components/mg-popover2.js.map +1 -1
  60. package/dist/components/mg-tooltip2.js +3 -1
  61. package/dist/components/mg-tooltip2.js.map +1 -1
  62. package/dist/esm/{components.utils-0d67c31c.js → components.utils-f7c073a0.js} +9 -5
  63. package/dist/esm/components.utils-f7c073a0.js.map +1 -0
  64. package/dist/esm/{index-f34a3a2c.js → index-93dafb06.js} +25 -17
  65. package/dist/esm/index-93dafb06.js.map +1 -0
  66. package/dist/esm/loader.js +3 -3
  67. package/dist/esm/mg-action-more_34.entry.js +195 -146
  68. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  69. package/dist/esm/mg-components.js +4 -4
  70. package/dist/esm/mg-components.js.map +1 -1
  71. package/dist/esm/mg-item-more.entry.js +2 -2
  72. package/dist/mg-components/locales/en/messages.json +4 -2
  73. package/dist/mg-components/locales/fr/messages.json +4 -2
  74. package/dist/mg-components/mg-components.esm.js +1 -1
  75. package/dist/mg-components/mg-components.esm.js.map +1 -1
  76. package/dist/mg-components/p-457dd62a.entry.js +2 -0
  77. package/dist/mg-components/p-457dd62a.entry.js.map +1 -0
  78. package/dist/mg-components/{p-ce356bc0.entry.js → p-4fa40a8f.entry.js} +2 -2
  79. package/dist/mg-components/p-721c4571.js +2 -0
  80. package/dist/mg-components/{p-af42d17b.js.map → p-721c4571.js.map} +1 -1
  81. package/dist/mg-components/p-8155d0e2.js +3 -0
  82. package/dist/mg-components/p-8155d0e2.js.map +1 -0
  83. package/dist/types/assets/icons/index.d.ts +1 -0
  84. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +4 -4
  85. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +8 -0
  86. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +14 -12
  87. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +1 -1
  88. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +10 -0
  89. package/dist/types/components.d.ts +10 -2
  90. package/dist/types/locales/index.d.ts +4 -0
  91. package/package.json +6 -6
  92. package/dist/cjs/components.utils-cd908d4e.js.map +0 -1
  93. package/dist/cjs/index-8532b5e9.js.map +0 -1
  94. package/dist/esm/components.utils-0d67c31c.js.map +0 -1
  95. package/dist/esm/index-f34a3a2c.js.map +0 -1
  96. package/dist/mg-components/p-7444ff40.js +0 -3
  97. package/dist/mg-components/p-7444ff40.js.map +0 -1
  98. package/dist/mg-components/p-af42d17b.js +0 -2
  99. package/dist/mg-components/p-e591ba8f.entry.js +0 -2
  100. package/dist/mg-components/p-e591ba8f.entry.js.map +0 -1
  101. /package/dist/mg-components/{p-ce356bc0.entry.js.map → p-4fa40a8f.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as e,g as s}from"./p-7444ff40.js";import{a as o,i as n,D as h}from"./p-af42d17b.js";const r=t=>t.nodeName==="MG-ITEM-MORE";var a;(function(t){t["BASE_INDEX"]="data-overflow-base-index";t["PROXY_INDEX"]="data-overflow-proxy-index"})(a||(a={}));class l{constructor(t,i){this.element=t;this.render=i;this.disconnect=()=>{this._resizeObserver.disconnect()};this.run=t=>{if(this._moreElement===undefined){this._moreElement=this.render();this._baseChildren=this.getInteractiveItems(this.element);if(r(this._moreElement)){this._proxyChildren=this.getInteractiveItems(this._moreElement.shadowRoot.querySelector("mg-menu"))}this._baseChildren.forEach(((t,i)=>{t.setAttribute(a.BASE_INDEX,`${i}`);this._proxyChildren[i].setAttribute(a.PROXY_INDEX,`${i}`)}))}if(t!==undefined)this.updateDisplayedItems(t)};this.getInteractiveItems=t=>{var i;return(((i=t.children)===null||i===void 0?void 0:i.length)>0?Array.from(t.children):[]).filter((t=>["MG-MENU-ITEM","MG-BUTTON"].includes(t.nodeName)))};this.updateDisplayedItems=t=>{this.restoreItems();const i={accWidth:0,previousItem:null};[...this._baseChildren,this._moreElement].forEach((e=>{i.accWidth+=e.offsetWidth;const s=i.previousItem!==null;const o=s&&i.previousItem.getAttribute("hidden")!==null;this.toggleItem(e,o&&!this.isMoreElement(e)||this.isOverflowElement(i.accWidth,e,t)||this.isMoreElement(e)&&!o);i.previousItem=e}))};this.isOverflowElement=(t,i,e)=>{if(i.previousElementSibling===null||this.isMoreElement(i))return false;else if(!this.isMoreElement(i.nextElementSibling))return t+this._moreElement.offsetWidth>e;else return t>e};this.isMoreElement=t=>t.nodeName==="MG-ITEM-MORE";this.toggleItem=(t,i)=>{const e=Number(t.getAttribute(a.BASE_INDEX));if(this.isMoreElement(t))this.toggleElement(this._moreElement,i);else if(e>=0){this.toggleElement(t,i);this.toggleElement(this._proxyChildren[e],!i)}};this.toggleElement=(t,i)=>{if(i)t.setAttribute("hidden","");else t.removeAttribute("hidden")};this.restoreItems=()=>{[...this._baseChildren,this._moreElement].forEach((t=>t.removeAttribute("hidden")))};if(this._resizeObserver===undefined){this._resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.run(t.contentRect.width)}))}));this._resizeObserver.observe(this.element)}this.run()}}const m=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host:not([hidden]){display:flex}";const d=class{constructor(i){t(this,i);this.name="mg-item-more";this.canRenderMgMenuItemOverflowElement=true;this.renderMgMenuItemOverflowElement=()=>{this.parentMenuItems.forEach((t=>{this.moreElementMenuItem.querySelector("mg-menu").appendChild(t.cloneNode(true))}));const t=Array.from(this.parentMenu.querySelectorAll("mg-menu-item:not([data-overflow-more])"));Array.from(this.moreElementMenuItem.querySelectorAll("mg-menu-item:not([data-overflow-more])")).forEach(((i,e)=>{i.addEventListener("click",(()=>{const i=t[e].shadowRoot.querySelector("a, button");if(i instanceof HTMLButtonElement||i instanceof HTMLAnchorElement)i.click()}));if(o(i.id))i.id=`${i.id}-proxy`;t[e].addEventListener("status-change",(t=>{i.setAttribute("status",t.detail)}))}));return this.element};this.icon={icon:"ellipsis-vertical"};this.slotlabel={display:false};this.size=undefined;this.parentMenu=undefined}validateIcon(t){if(typeof t!=="object"||typeof t==="object"&&typeof t.icon!=="string")throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type.`)}validateSlotLabel(t){if(typeof t!=="object"||typeof t==="object"&&typeof t.display!=="boolean")throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type.`);else if(typeof t.label!=="string")this.slotlabel.label=this.messages.moreLabel}validateSize(t){if(t&&typeof t!=="string")throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type.`)}componentWillLoad(){this.messages=n(this.element).messages.plusMenu;this.validateIcon(this.icon);this.validateSlotLabel(this.slotlabel);this.validateSize(this.size)}componentDidLoad(){return setTimeout((()=>{this.parentMenu=this.element.closest("mg-menu")}))}componentDidUpdate(){if(this.parentMenu&&this.canRenderMgMenuItemOverflowElement){this.parentMenuItems=Array.from(this.parentMenu.children).filter((t=>t.nodeName==="MG-MENU-ITEM"));this.overflowBehavior=new l(this.parentMenu,this.renderMgMenuItemOverflowElement);this.canRenderMgMenuItemOverflowElement=false}}disconnectedCallback(){var t;(t=this.overflowBehavior)===null||t===void 0?void 0:t.disconnect()}render(){return i(e,{role:"listitem"},this.parentMenu&&i("mg-menu-item",{"data-overflow-more":true,"data-size":this.parentMenu.size,ref:t=>{if(t)this.moreElementMenuItem=t}},i("mg-icon",{icon:this.icon.icon,slot:"image"}),i("span",{class:{"mg-u-visually-hidden":!this.slotlabel.display},slot:"label"},this.slotlabel.label),i("mg-menu",{direction:h.VERTICAL,label:this.messages.moreLabel,size:this.size})))}get element(){return s(this)}static get watchers(){return{icon:["validateIcon"],slotlabel:["validateSlotLabel"],size:["validateSize"]}}};d.style=m;export{d as mg_item_more};
2
- //# sourceMappingURL=p-ce356bc0.entry.js.map
1
+ import{r as t,h as i,H as e,g as s}from"./p-8155d0e2.js";import{a as o,i as n,D as h}from"./p-721c4571.js";const r=t=>t.nodeName==="MG-ITEM-MORE";var a;(function(t){t["BASE_INDEX"]="data-overflow-base-index";t["PROXY_INDEX"]="data-overflow-proxy-index"})(a||(a={}));class l{constructor(t,i){this.element=t;this.render=i;this.disconnect=()=>{this._resizeObserver.disconnect()};this.run=t=>{if(this._moreElement===undefined){this._moreElement=this.render();this._baseChildren=this.getInteractiveItems(this.element);if(r(this._moreElement)){this._proxyChildren=this.getInteractiveItems(this._moreElement.shadowRoot.querySelector("mg-menu"))}this._baseChildren.forEach(((t,i)=>{t.setAttribute(a.BASE_INDEX,`${i}`);this._proxyChildren[i].setAttribute(a.PROXY_INDEX,`${i}`)}))}if(t!==undefined)this.updateDisplayedItems(t)};this.getInteractiveItems=t=>{var i;return(((i=t.children)===null||i===void 0?void 0:i.length)>0?Array.from(t.children):[]).filter((t=>["MG-MENU-ITEM","MG-BUTTON"].includes(t.nodeName)))};this.updateDisplayedItems=t=>{this.restoreItems();const i={accWidth:0,previousItem:null};[...this._baseChildren,this._moreElement].forEach((e=>{i.accWidth+=e.offsetWidth;const s=i.previousItem!==null;const o=s&&i.previousItem.getAttribute("hidden")!==null;this.toggleItem(e,o&&!this.isMoreElement(e)||this.isOverflowElement(i.accWidth,e,t)||this.isMoreElement(e)&&!o);i.previousItem=e}))};this.isOverflowElement=(t,i,e)=>{if(i.previousElementSibling===null||this.isMoreElement(i))return false;else if(!this.isMoreElement(i.nextElementSibling))return t+this._moreElement.offsetWidth>e;else return t>e};this.isMoreElement=t=>t.nodeName==="MG-ITEM-MORE";this.toggleItem=(t,i)=>{const e=Number(t.getAttribute(a.BASE_INDEX));if(this.isMoreElement(t))this.toggleElement(this._moreElement,i);else if(e>=0){this.toggleElement(t,i);this.toggleElement(this._proxyChildren[e],!i)}};this.toggleElement=(t,i)=>{if(i)t.setAttribute("hidden","");else t.removeAttribute("hidden")};this.restoreItems=()=>{[...this._baseChildren,this._moreElement].forEach((t=>t.removeAttribute("hidden")))};if(this._resizeObserver===undefined){this._resizeObserver=new ResizeObserver((t=>{t.forEach((t=>{this.run(t.contentRect.width)}))}));this._resizeObserver.observe(this.element)}this.run()}}const m=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host:not([hidden]){display:flex}";const d=class{constructor(i){t(this,i);this.name="mg-item-more";this.canRenderMgMenuItemOverflowElement=true;this.renderMgMenuItemOverflowElement=()=>{this.parentMenuItems.forEach((t=>{this.moreElementMenuItem.querySelector("mg-menu").appendChild(t.cloneNode(true))}));const t=Array.from(this.parentMenu.querySelectorAll("mg-menu-item:not([data-overflow-more])"));Array.from(this.moreElementMenuItem.querySelectorAll("mg-menu-item:not([data-overflow-more])")).forEach(((i,e)=>{i.addEventListener("click",(()=>{const i=t[e].shadowRoot.querySelector("a, button");if(i instanceof HTMLButtonElement||i instanceof HTMLAnchorElement)i.click()}));if(o(i.id))i.id=`${i.id}-proxy`;t[e].addEventListener("status-change",(t=>{i.setAttribute("status",t.detail)}))}));return this.element};this.icon={icon:"ellipsis-vertical"};this.slotlabel={display:false};this.size=undefined;this.parentMenu=undefined}validateIcon(t){if(typeof t!=="object"||typeof t==="object"&&typeof t.icon!=="string")throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type.`)}validateSlotLabel(t){if(typeof t!=="object"||typeof t==="object"&&typeof t.display!=="boolean")throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type.`);else if(typeof t.label!=="string")this.slotlabel.label=this.messages.moreLabel}validateSize(t){if(t&&typeof t!=="string")throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type.`)}componentWillLoad(){this.messages=n(this.element).messages.plusMenu;this.validateIcon(this.icon);this.validateSlotLabel(this.slotlabel);this.validateSize(this.size)}componentDidLoad(){return setTimeout((()=>{this.parentMenu=this.element.closest("mg-menu")}))}componentDidUpdate(){if(this.parentMenu&&this.canRenderMgMenuItemOverflowElement){this.parentMenuItems=Array.from(this.parentMenu.children).filter((t=>t.nodeName==="MG-MENU-ITEM"));this.overflowBehavior=new l(this.parentMenu,this.renderMgMenuItemOverflowElement);this.canRenderMgMenuItemOverflowElement=false}}disconnectedCallback(){var t;(t=this.overflowBehavior)===null||t===void 0?void 0:t.disconnect()}render(){return i(e,{role:"listitem"},this.parentMenu&&i("mg-menu-item",{"data-overflow-more":true,"data-size":this.parentMenu.size,ref:t=>{if(t)this.moreElementMenuItem=t}},i("mg-icon",{icon:this.icon.icon,slot:"image"}),i("span",{class:{"mg-u-visually-hidden":!this.slotlabel.display},slot:"label"},this.slotlabel.label),i("mg-menu",{direction:h.VERTICAL,label:this.messages.moreLabel,size:this.size})))}get element(){return s(this)}static get watchers(){return{icon:["validateIcon"],slotlabel:["validateSlotLabel"],size:["validateSize"]}}};d.style=m;export{d as mg_item_more};
2
+ //# sourceMappingURL=p-4fa40a8f.entry.js.map
@@ -0,0 +1,2 @@
1
+ const e={required:"This field is required.",date:{badInput:'The date format must be <span aria-hidden="true">mm/dd/yyyy</span><span class="mg-u-visually-hidden">m m / d d / y y y y</span> and the date must be greater than {min}',min:"The date cannot be earlier than {min}",max:"The date cannot be later than {max}",minMax:"The date must be between {min} and {max}"},numeric:{min:"The value cannot be less than {min}",max:"The value cannot be greater than {max}",minMax:"The value must be between {min} et {max}"}};const t="{counter} characters left.";const s={select:{placeholder:"Select a value"},checkbox:{selectedValues:"{nb} selected values",selectedValue:"{nb} selected value",editButton:"Edit",selectButton:"Select values",showButton:"Show",label:"Enter a value",result:"result",results:"results",searchResults:"Search result(s) list.",noResult:"No result.",sections:{selected:{title:"Selected",titlePlurial:"Selected",action:"Unselect all",tooltip:"Unselect all current search results"},notSelected:{title:"Not selected",titlePlurial:"Not selected",action:"Select all",tooltip:"Select all current search results"}}}};const n={required:'Fields with a <strong class="mg-u-is-asterisk">*</strong> are required',requiredSingle:'Field with a <strong class="mg-u-is-asterisk">*</strong> is required',allRequired:"All fields are required",allRequiredSingle:"The field is required"};const a={closeButton:"Close message"};const l={closeButton:"Close modal"};const r={label:"Pagination",page:"page",pages:"pages",nextPage:"Next page",previousPage:"Previous page",selectPage:"Select the page to display."};const i={editLabel:"Edit section title."};const o={navLabel:"Quick access"};const c={confirm:"Confirm",cancel:"Cancel",close:"Close",next:"next",previous:"previous"};const u={moreLabel:"Additional menu",badgeLabel:"Include notification(s)"};const d={label:"Actions"};const m={errors:e,nbCharLeft:t,input:s,form:n,message:a,modal:l,pagination:r,panel:i,skipLinks:o,general:c,plusMenu:u,actionMore:d};const p={required:"Ce champ est obligatoire.",date:{badInput:'Le format de la date doit être du type <span aria-hidden="true">jj/mm/aaaa</span><span class="mg-u-visually-hidden">j j / m m / a a a a</span> et la date supérieure au {min}',min:"La date ne peut pas être antérieure au {min}",max:"La date ne peut pas être postérieure au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"},numeric:{min:"La valeur ne peut pas être inférieure à {min}",max:"La valeur ne peut pas être supérieure à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}};const g="{counter} caractères disponibles.";const h={select:{placeholder:"Sélectionnez une valeur"},checkbox:{selectedValues:"{nb} valeurs selectionnées",selectedValue:"{nb} valeur selectionnée",editButton:"Modifier",selectButton:"Sélectionner des valeurs",showButton:"Voir",label:"Saisissez une valeur",result:"résultat",results:"résultats",searchResults:"List de résultat(s) de la recherche.",noResult:"Aucun résultat.",sections:{selected:{title:"Sélectionné",titlePlurial:"Sélectionnés",action:"Tout désélectionner",tooltip:"Désélectionne tous les résultats de la recherche en cours"},notSelected:{title:"Non sélectionné",titlePlurial:"Non sélectionnés",action:"Tout sélectionner",tooltip:"Sélectionne tous les résultats de la recherche en cours"}}}};const b={required:'Les champs marqués d\'un <strong class="mg-u-is-asterisk">*</strong> sont obligatoires',requiredSingle:'Le champ marqué d\'un <strong class="mg-u-is-asterisk">*</strong> est obligatoire',allRequired:"Tous les champs sont obligatoires",allRequiredSingle:"Le champ est obligatoire"};const f={closeButton:"Fermer le message"};const v={closeButton:"Fermer la modale"};const x={label:"Pagination",page:"page",pages:"pages",nextPage:"Page suivante",previousPage:"Page précédente",selectPage:"Sélectionner la page à afficher."};const y={editLabel:"Modifier le titre de la section."};const L={navLabel:"Accès rapide"};const S={confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"suivant",previous:"précédent"};const q={moreLabel:"Menu complémentaire",badgeLabel:"Notification(s) incluse(s)"};const P={label:"Actions"};const w={errors:p,nbCharLeft:g,input:h,form:b,message:f,modal:v,pagination:x,panel:y,skipLinks:L,general:S,plusMenu:q,actionMore:P};const k=(e,t,s)=>new Intl.NumberFormat(t,{style:"currency",currency:s}).format(e);const T=(e,t)=>new Intl.NumberFormat(t).format(e);const A=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;const M=(e,t)=>{if(typeof e!=="string"||e===""||!A.test(e)){return""}return new Intl.DateTimeFormat(t).format(new Date(e))};const B=(e,t,s)=>{const n=e.closest("[lang]");const a=Intl.NumberFormat.supportedLocalesOf(n===null||n===void 0?void 0:n.lang);const l=a.length>0?a[0]:navigator.language||s;const r=l.split("-").shift();return{locale:l,messages:t[r]||t[s]}};const C="en";const N={en:m,fr:w};const R=e=>B(e,N,C);var I;(function(e){e["VERTICAL"]="vertical";e["HORIZONTAL"]="horizontal"})(I||(I={}));const F=["regular","medium","large"];const V=(e="",t=10)=>{const s=new Uint8Array(t);crypto.getRandomValues(s);const n=Array.from(s).map((e=>e.toString(16).padStart(2,"0"))).join("").slice(0,t);return e!==""?`${e}-${n}`:n};class j{constructor(e=[]){this.add=e=>{if(!this.has(e)){this.classes.push(e)}};this.delete=e=>{const t=this.classes.indexOf(e);if(t>-1){this.classes.splice(t,1)}};this.has=e=>this.classes.includes(e);this.join=()=>this.classes.join(" ");this.classes=e}}const D=e=>Array.isArray(e)&&e.every((e=>typeof e==="string"));const z=(e,t)=>t.includes(e===null||e===void 0?void 0:e.tagName.toLowerCase());const E='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier]';const U=e=>{const t=$(e);const s=Q(e);return[e,...t,...s]};const $=(e,t=[])=>{if(e.self!==e.top){try{const s=e.parent;t.push(s);return $(s,t)}catch(e){console.error("Different hosts between iframes:",e);return t}}return t};const Q=(e,t=[])=>{if(e.frames.length>0){for(const s of Array.from(e.frames)){t.push(s);Q(s,t)}}return t};const G=e=>typeof e==="string"&&e.trim()!=="";const H=e=>typeof e==="string"&&e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,"");const J=async e=>e();export{j as C,I as D,G as a,z as b,V as c,H as d,A as e,k as f,T as g,D as h,R as i,E as j,U as k,M as l,J as n,F as s};
2
+ //# sourceMappingURL=p-721c4571.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["localeCurrency","number","locale","currency","Intl","NumberFormat","style","format","localeNumber","dateRegExp","localeDate","date","test","DateTimeFormat","Date","getLocaleMessages","element","messages","defaultLocale","closestLangAttribute","closest","closestLang","supportedLocalesOf","lang","length","navigator","language","localeSubtag","split","shift","en","fr","initLocales","Direction","sizes","createID","prefix","randomBytes","Uint8Array","crypto","getRandomValues","hexString","Array","from","map","byte","toString","padStart","join","slice","ClassList","constructor","classlist","this","add","className","has","classes","push","delete","index","indexOf","splice","includes","allItemsAreString","items","isArray","every","item","isTagName","tagNames","tagName","toLowerCase","focusableElements","getWindows","localWindow","parentWindows","getParentWindows","childWindows","getChildWindows","windows","self","top","parentWindow","parent","err","console","error","frames","childWindow","isValidString","value","trim","cleanString","text","toLocaleLowerCase","normalize","replaceAll","nextTick","async","callback"],"sources":["src/utils/locale.utils.ts","src/locales/index.ts","src/components/molecules/menu/mg-menu/mg-menu.conf.ts","src/utils/components.utils.ts"],"sourcesContent":["/**\n * Format number to the locale currency\n * @param number - number to format\n * @param locale - locale to apply\n * @param currency - currency to apply\n * @returns formatted currency\n */\nexport const localeCurrency = (number: number, locale: string, currency: string): string => {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(number);\n};\n\n/**\n * Format number to locale\n * @param number - number to format\n * @param locale - locale to apply\n * @returns formatted number\n */\nexport const localeNumber = (number: number, locale: string): string => {\n return new Intl.NumberFormat(locale).format(number);\n};\n\n/**\n * Date RegExp\n */\nexport const dateRegExp = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/;\n\n/**\n * Locale date format\n * @param date - date to format\n * @param locale - locale to apply\n * @returns formatted date\n */\nexport const localeDate = (date: string, locale: string): string => {\n if (typeof date !== 'string' || date === '' || !dateRegExp.test(date)) {\n return '';\n }\n return new Intl.DateTimeFormat(locale).format(new Date(date));\n};\n\n/**\n * Get locale and messages\n * We load the defined locale but for now we only support the first subtag for messages\n * @param element - element we need to get the language\n * @param messages - messages to use\n * @param defaultLocale - default messages locale\n * @returns messages object\n */\nexport const getLocaleMessages = (element: HTMLElement, messages: unknown, defaultLocale: string): { locale: string; messages: Record<string, unknown> } => {\n // Get local\n const closestLangAttribute: HTMLElement = element.closest('[lang]');\n const closestLang: string[] = Intl.NumberFormat.supportedLocalesOf(closestLangAttribute?.lang);\n const locale = closestLang.length > 0 ? closestLang[0] : navigator.language || defaultLocale;\n // Only keep first subtag\n const localeSubtag = locale.split('-').shift();\n // Return\n return {\n locale,\n messages: messages[localeSubtag] || messages[defaultLocale],\n };\n};\n","import en from './en/messages.json';\nimport fr from './fr/messages.json';\nimport { getLocaleMessages } from '../utils/locale.utils';\n\nconst defaultLocale = 'en';\nconst messages = { en, fr };\n\n/**\n * Get Intl object\n * @param element - element we need to get the language\n * @returns messages object\n */\nexport const initLocales = (element: HTMLElement): { locale: string; messages: Record<string, unknown> } => getLocaleMessages(element, messages, defaultLocale);\n","import { MgItemMore } from '../../mg-item-more/mg-item-more';\n\n/**\n * Menu direction type\n */\nexport enum Direction {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\n/**\n * ItemMore prop type\n */\nexport type ItemMoreType = Pick<MgItemMore, 'icon' | 'slotlabel' | 'size'>;\n\n/**\n * List of all possibles sizes\n */\nexport const sizes = ['regular', 'medium', 'large'] as const;\n\n/**\n * item Size from sizes\n */\nexport type MenuSizeType = (typeof sizes)[number];\n","/**\n * Create random ID\n * @param prefix - add prefix to created ID\n * @param length - ID length\n * @returns ID\n */\nexport const createID = (prefix = '', length = 10): string => {\n const randomBytes = new Uint8Array(length);\n\n crypto.getRandomValues(randomBytes);\n\n const hexString = Array.from(randomBytes)\n .map(byte => byte.toString(16).padStart(2, '0'))\n .join('')\n .slice(0, length);\n\n return prefix !== '' ? `${prefix}-${hexString}` : hexString;\n};\n\n/**\n * Class to manage component classlist\n * Set() are not working when imported in project\n */\nexport class ClassList {\n /**\n * Available classes\n */\n classes: string[];\n\n constructor(classlist: string[] = []) {\n this.classes = classlist;\n }\n\n /**\n * Add class\n * @param className - class name to add\n */\n add = (className: string): void => {\n if (!this.has(className)) {\n this.classes.push(className);\n }\n };\n\n /**\n * Delete class\n * @param className - class name to delete\n */\n delete = (className: string): void => {\n const index = this.classes.indexOf(className);\n if (index > -1) {\n this.classes.splice(index, 1);\n }\n };\n\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n has = (className: string): boolean => {\n return this.classes.includes(className);\n };\n\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n join = (): string => {\n return this.classes.join(' ');\n };\n}\n\n/**\n * Check if all items are string\n * @param items - items to check\n * @returns all items are string\n */\nexport const allItemsAreString = (items: unknown): items is string[] => Array.isArray(items) && items.every(item => typeof item === 'string');\n\n/**\n * Check if element is a heading\n * @param element - slotted element\n * @param tagNames - allowed tag names list\n * @returns element is a heading\n */\nexport const isTagName = (element: Element, tagNames: string[]): boolean => {\n return tagNames.includes(element?.tagName.toLowerCase());\n};\n\n/**\n * Focusable elements query selector\n */\nexport const focusableElements = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier]';\n\n/**\n * Get windows\n * @param localWindow - the window we are lookink for other windows\n * @returns The list of windows found\n */\nexport const getWindows = (localWindow: Window): Window[] => {\n const parentWindows = getParentWindows(localWindow);\n const childWindows = getChildWindows(localWindow);\n return [localWindow, ...parentWindows, ...childWindows];\n};\n\n/**\n * Get parent windows\n * @param localWindow - the window we are lookink for parents\n * @param windows - The list of allready found windows\n * @returns The list of windows found\n */\nexport const getParentWindows = (localWindow: Window, windows: Window[] = []): Window[] => {\n // Check if is in iframe\n if (localWindow.self !== localWindow.top) {\n // Check if we have permission to access parent\n try {\n const parentWindow: Window = localWindow.parent;\n windows.push(parentWindow);\n return getParentWindows(parentWindow, windows);\n } catch (err) {\n console.error('Different hosts between iframes:', err);\n return windows;\n }\n }\n return windows;\n};\n\n/**\n * Get child windows\n * @param localWindow - the window we are lookink for children\n * @param windows - The list of allready found windows\n * @returns The list of windows found\n */\nconst getChildWindows = (localWindow: Window, windows: Window[] = []): Window[] => {\n if (localWindow.frames.length > 0) {\n for (const childWindow of Array.from(localWindow.frames)) {\n windows.push(childWindow);\n getChildWindows(childWindow, windows);\n }\n }\n return windows;\n};\n\n/**\n * Validate string\n * @param value - value to check\n * @returns if string is valid\n */\nexport const isValidString = (value: unknown): boolean => typeof value === 'string' && value.trim() !== '';\n\n/**\n * Clean string caraters\n * @param text - text to cliean\n * @returns cleanded string\n */\nexport const cleanString = (text: string): string =>\n typeof text === 'string' &&\n text\n .toLocaleLowerCase()\n .normalize('NFD')\n .replaceAll(/[\\u0300-\\u036f]/g, '');\n\n/**\n * Use to process code next tick in the event loop\n * @param callback - code to excute on next tick\n * @returns differed code excution\n */\nexport const nextTick = async (callback: () => void): Promise<void> => callback();\n"],"mappings":"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"}
1
+ {"version":3,"names":["localeCurrency","number","locale","currency","Intl","NumberFormat","style","format","localeNumber","dateRegExp","localeDate","date","test","DateTimeFormat","Date","getLocaleMessages","element","messages","defaultLocale","closestLangAttribute","closest","closestLang","supportedLocalesOf","lang","length","navigator","language","localeSubtag","split","shift","en","fr","initLocales","Direction","sizes","createID","prefix","randomBytes","Uint8Array","crypto","getRandomValues","hexString","Array","from","map","byte","toString","padStart","join","slice","ClassList","constructor","classlist","this","add","className","has","classes","push","delete","index","indexOf","splice","includes","allItemsAreString","items","isArray","every","item","isTagName","tagNames","tagName","toLowerCase","focusableElements","getWindows","localWindow","parentWindows","getParentWindows","childWindows","getChildWindows","windows","self","top","parentWindow","parent","err","console","error","frames","childWindow","isValidString","value","trim","cleanString","text","toLocaleLowerCase","normalize","replaceAll","nextTick","async","callback"],"sources":["src/utils/locale.utils.ts","src/locales/index.ts","src/components/molecules/menu/mg-menu/mg-menu.conf.ts","src/utils/components.utils.ts"],"sourcesContent":["/**\n * Format number to the locale currency\n * @param number - number to format\n * @param locale - locale to apply\n * @param currency - currency to apply\n * @returns formatted currency\n */\nexport const localeCurrency = (number: number, locale: string, currency: string): string => {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(number);\n};\n\n/**\n * Format number to locale\n * @param number - number to format\n * @param locale - locale to apply\n * @returns formatted number\n */\nexport const localeNumber = (number: number, locale: string): string => {\n return new Intl.NumberFormat(locale).format(number);\n};\n\n/**\n * Date RegExp\n */\nexport const dateRegExp = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/;\n\n/**\n * Locale date format\n * @param date - date to format\n * @param locale - locale to apply\n * @returns formatted date\n */\nexport const localeDate = (date: string, locale: string): string => {\n if (typeof date !== 'string' || date === '' || !dateRegExp.test(date)) {\n return '';\n }\n return new Intl.DateTimeFormat(locale).format(new Date(date));\n};\n\n/**\n * Get locale and messages\n * We load the defined locale but for now we only support the first subtag for messages\n * @param element - element we need to get the language\n * @param messages - messages to use\n * @param defaultLocale - default messages locale\n * @returns messages object\n */\nexport const getLocaleMessages = (element: HTMLElement, messages: unknown, defaultLocale: string): { locale: string; messages: Record<string, unknown> } => {\n // Get local\n const closestLangAttribute: HTMLElement = element.closest('[lang]');\n const closestLang: string[] = Intl.NumberFormat.supportedLocalesOf(closestLangAttribute?.lang);\n const locale = closestLang.length > 0 ? closestLang[0] : navigator.language || defaultLocale;\n // Only keep first subtag\n const localeSubtag = locale.split('-').shift();\n // Return\n return {\n locale,\n messages: messages[localeSubtag] || messages[defaultLocale],\n };\n};\n","import en from './en/messages.json';\nimport fr from './fr/messages.json';\nimport { getLocaleMessages } from '../utils/locale.utils';\n\nconst defaultLocale = 'en';\nconst messages = { en, fr };\n\n/**\n * Get Intl object\n * @param element - element we need to get the language\n * @returns messages object\n */\nexport const initLocales = (element: HTMLElement): { locale: string; messages: Record<string, unknown> } => getLocaleMessages(element, messages, defaultLocale);\n","import { MgItemMore } from '../../mg-item-more/mg-item-more';\n\n/**\n * Menu direction type\n */\nexport enum Direction {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\n/**\n * ItemMore prop type\n */\nexport type ItemMoreType = Pick<MgItemMore, 'icon' | 'slotlabel' | 'size'>;\n\n/**\n * List of all possibles sizes\n */\nexport const sizes = ['regular', 'medium', 'large'] as const;\n\n/**\n * item Size from sizes\n */\nexport type MenuSizeType = (typeof sizes)[number];\n","/**\n * Create random ID\n * @param prefix - add prefix to created ID\n * @param length - ID length\n * @returns ID\n */\nexport const createID = (prefix = '', length = 10): string => {\n const randomBytes = new Uint8Array(length);\n\n crypto.getRandomValues(randomBytes);\n\n const hexString = Array.from(randomBytes)\n .map(byte => byte.toString(16).padStart(2, '0'))\n .join('')\n .slice(0, length);\n\n return prefix !== '' ? `${prefix}-${hexString}` : hexString;\n};\n\n/**\n * Class to manage component classlist\n * Set() are not working when imported in project\n */\nexport class ClassList {\n /**\n * Available classes\n */\n classes: string[];\n\n constructor(classlist: string[] = []) {\n this.classes = classlist;\n }\n\n /**\n * Add class\n * @param className - class name to add\n */\n add = (className: string): void => {\n if (!this.has(className)) {\n this.classes.push(className);\n }\n };\n\n /**\n * Delete class\n * @param className - class name to delete\n */\n delete = (className: string): void => {\n const index = this.classes.indexOf(className);\n if (index > -1) {\n this.classes.splice(index, 1);\n }\n };\n\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n has = (className: string): boolean => {\n return this.classes.includes(className);\n };\n\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n join = (): string => {\n return this.classes.join(' ');\n };\n}\n\n/**\n * Check if all items are string\n * @param items - items to check\n * @returns all items are string\n */\nexport const allItemsAreString = (items: unknown): items is string[] => Array.isArray(items) && items.every(item => typeof item === 'string');\n\n/**\n * Check if element is a heading\n * @param element - slotted element\n * @param tagNames - allowed tag names list\n * @returns element is a heading\n */\nexport const isTagName = (element: Element, tagNames: string[]): boolean => {\n return tagNames.includes(element?.tagName.toLowerCase());\n};\n\n/**\n * Focusable elements query selector\n */\nexport const focusableElements = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier]';\n\n/**\n * Get windows\n * @param localWindow - the window we are lookink for other windows\n * @returns The list of windows found\n */\nexport const getWindows = (localWindow: Window): Window[] => {\n const parentWindows = getParentWindows(localWindow);\n const childWindows = getChildWindows(localWindow);\n return [localWindow, ...parentWindows, ...childWindows];\n};\n\n/**\n * Get parent windows\n * @param localWindow - the window we are lookink for parents\n * @param windows - The list of allready found windows\n * @returns The list of windows found\n */\nexport const getParentWindows = (localWindow: Window, windows: Window[] = []): Window[] => {\n // Check if is in iframe\n if (localWindow.self !== localWindow.top) {\n // Check if we have permission to access parent\n try {\n const parentWindow: Window = localWindow.parent;\n windows.push(parentWindow);\n return getParentWindows(parentWindow, windows);\n } catch (err) {\n console.error('Different hosts between iframes:', err);\n return windows;\n }\n }\n return windows;\n};\n\n/**\n * Get child windows\n * @param localWindow - the window we are lookink for children\n * @param windows - The list of allready found windows\n * @returns The list of windows found\n */\nconst getChildWindows = (localWindow: Window, windows: Window[] = []): Window[] => {\n if (localWindow.frames.length > 0) {\n for (const childWindow of Array.from(localWindow.frames)) {\n windows.push(childWindow);\n getChildWindows(childWindow, windows);\n }\n }\n return windows;\n};\n\n/**\n * Validate string\n * @param value - value to check\n * @returns if string is valid\n */\nexport const isValidString = (value: unknown): boolean => typeof value === 'string' && value.trim() !== '';\n\n/**\n * Clean string caraters\n * @param text - text to cliean\n * @returns cleanded string\n */\nexport const cleanString = (text: string): string =>\n typeof text === 'string' &&\n text\n .toLocaleLowerCase()\n .normalize('NFD')\n .replaceAll(/[\\u0300-\\u036f]/g, '');\n\n/**\n * Use to process code next tick in the event loop\n * @param callback - code to excute on next tick\n * @returns differed code excution\n */\nexport const nextTick = async (callback: () => void): Promise<void> => callback();\n"],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ const e="mg-components";const t={allRenderFn:false,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:false,cmpDidLoad:true,cmpDidRender:true,cmpDidUnload:false,cmpDidUpdate:true,cmpShouldUpdate:false,cmpWillLoad:true,cmpWillRender:false,cmpWillUpdate:true,connectedCallback:false,constructableCSS:true,cssAnnotations:true,devTools:false,disconnectedCallback:true,element:false,event:true,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:true,hostListenerTarget:true,hostListenerTargetBody:false,hostListenerTargetDocument:false,hostListenerTargetParent:false,hostListenerTargetWindow:true,hotModuleReplacement:false,hydrateClientSide:false,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:true,scoped:true,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:false,shadowDom:true,slot:true,slotChildNodesFix:false,slotRelocation:true,state:true,style:true,svg:false,taskQueue:true,transformTagName:false,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:true,watchCallback:true};let n;let s;let l;let o=false;let i=false;let c=false;let f=false;let r=false;const u=(e,t="")=>{{return()=>{}}};const a=(e,t)=>{{return()=>{}}};const d="{visibility:hidden}.hydrated{visibility:inherit}";const p="slot-fb{display:contents}slot-fb[hidden]{display:none}";const v="http://www.w3.org/1999/xlink";const m={};const h=e=>e!=null;const y=e=>{e=typeof e;return e==="object"||e==="function"};function b(e){var t,n,s;return(s=(n=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const $=(e,t,...n)=>{let s=null;let l=null;let o=null;let i=false;let c=false;const f=[];const r=t=>{for(let n=0;n<t.length;n++){s=t[n];if(Array.isArray(s)){r(s)}else if(s!=null&&typeof s!=="boolean"){if(i=typeof e!=="function"&&!y(s)){s=String(s)}if(i&&c){f[f.length-1].t+=s}else{f.push(i?w(null,s):s)}c=i}}};r(n);if(t){if(t.key){l=t.key}if(t.name){o=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,f,k)}const u=w(e,null);u.l=t;if(f.length>0){u.o=f}{u.i=l}{u.u=o}return u};const w=(e,t)=>{const n={p:0,v:e,t,m:null,o:null};{n.l=null}{n.i=null}{n.u=null}return n};const g={};const S=e=>e&&e.v===g;const k={forEach:(e,t)=>e.map(C).forEach(t),map:(e,t)=>e.map(C).map(t).map(x)};const C=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.v,vtext:e.t});const x=e=>{if(typeof e.vtag==="function"){const t=Object.assign({},e.vattrs);if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return $(e.vtag,t,...e.vchildren||[])}const t=w(e.vtag,e.vtext);t.l=e.vattrs;t.o=e.vchildren;t.i=e.vkey;t.u=e.vname;return t};const T=(e,t)=>{if(e!=null&&!y(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};const L=e=>De(e).$hostElement$;const R=(e,t,n)=>{const s=L(e);return{emit:e=>D(s,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:e})}};const D=(e,t,n)=>{const s=Ee.ce(t,n);e.dispatchEvent(s);return s};const j=new WeakMap;const O=(e,t,n)=>{let s=Ne.get(e);if(Be&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=t}else{s.replaceSync(t)}}else{s=t}Ne.set(e,s)};const F=(e,t,n)=>{var s;const l=U(t);const o=Ne.get(l);e=e.nodeType===11?e:We;if(o){if(typeof o==="string"){e=e.head||e;let n=j.get(e);let i;if(!n){j.set(e,n=new Set)}if(!n.has(l)){{i=We.createElement("style");i.innerHTML=o;const t=(s=Ee.h)!==null&&s!==void 0?s:b(We);if(t!=null){i.setAttribute("nonce",t)}e.insertBefore(i,e.querySelector("link"))}if(t.p&4){i.innerHTML+=p}if(n){n.add(l)}}}else if(!e.adoptedStyleSheets.includes(o)){e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]}}return l};const M=e=>{const t=e.$;const n=e.$hostElement$;const s=t.p;const l=u("attachStyles",t.S);const o=F(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h");if(s&2){n.classList.add(o+"-s")}}l()};const U=(e,t)=>"sc-"+e.S;const A=(e,t,n,s,l,o)=>{if(n!==s){let i=Fe(e,t);let c=t.toLowerCase();if(t==="class"){const t=e.classList;const l=P(n);const o=P(s);t.remove(...l.filter((e=>e&&!o.includes(e))));t.add(...o.filter((e=>e&&!l.includes(e))))}else if(t==="style"){{for(const t in n){if(!s||s[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in s){if(!n||s[t]!==n[t]){if(t.includes("-")){e.style.setProperty(t,s[t])}else{e.style[t]=s[t]}}}}else if(t==="key");else if(t==="ref"){if(s){s(e)}}else if(!i&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(Fe(Pe,c)){t=c.slice(2)}else{t=c[2]+t.slice(3)}if(n||s){const l=t.endsWith(W);t=t.replace(E,"");if(n){Ee.rel(e,t,n,l)}if(s){Ee.ael(e,t,s,l)}}}else{const f=y(s);if((i||f&&s!==null)&&!l){try{if(!e.tagName.includes("-")){const l=s==null?"":s;if(t==="list"){i=false}else if(n==null||e[t]!=l){e[t]=l}}else{e[t]=s}}catch(e){}}let r=false;{if(c!==(c=c.replace(/^xlink\:?/,""))){t=c;r=true}}if(s==null||s===false){if(s!==false||e.getAttribute(t)===""){if(r){e.removeAttributeNS(v,t)}else{e.removeAttribute(t)}}}else if((!i||o&4||l)&&!f){s=s===true?"":s;if(r){e.setAttributeNS(v,t,s)}else{e.setAttribute(t,s)}}}}};const N=/\s/;const P=e=>!e?[]:e.split(N);const W="Capture";const E=new RegExp(W+"$");const z=(e,t,n,s)=>{const l=t.m.nodeType===11&&t.m.host?t.m.host:t.m;const o=e&&e.l||m;const i=t.l||m;{for(s in o){if(!(s in i)){A(l,s,o[s],undefined,n,t.p)}}}for(s in i){A(l,s,o[s],i[s],n,t.p)}};const B=(e,t,i,r)=>{var u;const a=t.o[i];let d=0;let p;let v;let m;if(!o){c=true;if(a.v==="slot"){if(n){r.classList.add(n+"-s")}a.p|=a.o?2:1}}if(a.t!==null){p=a.m=We.createTextNode(a.t)}else if(a.p&1){p=a.m=We.createTextNode("")}else{p=a.m=We.createElement(a.p&2?"slot-fb":a.v);{z(null,a,f)}if(h(n)&&p["s-si"]!==n){p.classList.add(p["s-si"]=n)}if(a.o){for(d=0;d<a.o.length;++d){v=B(e,a,d,p);if(v){p.appendChild(v)}}}}p["s-hn"]=l;{if(a.p&(2|1)){p["s-sr"]=true;p["s-fs"]=(u=a.l)===null||u===void 0?void 0:u.slot;p["s-cr"]=s;p["s-sn"]=a.u||"";m=e&&e.o&&e.o[i];if(m&&m.v===a.v&&e.m){{H(e.m,false)}}}}return p};const H=(e,t)=>{var n;Ee.p|=1;const s=e.childNodes;for(let e=s.length-1;e>=0;e--){const o=s[e];if(o["s-hn"]!==l&&o["s-ol"]){X(o).insertBefore(o,V(o));o["s-ol"].remove();o["s-ol"]=undefined;o["s-sh"]=undefined;if(o.nodeType===1){o.setAttribute("slot",(n=o["s-sn"])!==null&&n!==void 0?n:"")}c=true}if(t){H(o,t)}}Ee.p&=~1};const Q=(e,t,n,s,o,i)=>{let c=e["s-cr"]&&e["s-cr"].parentNode||e;let f;if(c.shadowRoot&&c.tagName===l){c=c.shadowRoot}for(;o<=i;++o){if(s[o]){f=B(null,n,o,e);if(f){s[o].m=f;c.insertBefore(f,V(t))}}}};const q=(e,t,n)=>{for(let s=t;s<=n;++s){const t=e[s];if(t){const e=t.m;ee(t);if(e){{i=true;if(e["s-ol"]){e["s-ol"].remove()}else{H(e,true)}}e.remove()}}}};const I=(e,t,n,s,l=false)=>{let o=0;let i=0;let c=0;let f=0;let r=t.length-1;let u=t[0];let a=t[r];let d=s.length-1;let p=s[0];let v=s[d];let m;let h;while(o<=r&&i<=d){if(u==null){u=t[++o]}else if(a==null){a=t[--r]}else if(p==null){p=s[++i]}else if(v==null){v=s[--d]}else if(K(u,p,l)){_(u,p,l);u=t[++o];p=s[++i]}else if(K(a,v,l)){_(a,v,l);a=t[--r];v=s[--d]}else if(K(u,v,l)){if(u.v==="slot"||v.v==="slot"){H(u.m.parentNode,false)}_(u,v,l);e.insertBefore(u.m,a.m.nextSibling);u=t[++o];v=s[--d]}else if(K(a,p,l)){if(u.v==="slot"||v.v==="slot"){H(a.m.parentNode,false)}_(a,p,l);e.insertBefore(a.m,u.m);a=t[--r];p=s[++i]}else{c=-1;{for(f=o;f<=r;++f){if(t[f]&&t[f].i!==null&&t[f].i===p.i){c=f;break}}}if(c>=0){h=t[c];if(h.v!==p.v){m=B(t&&t[i],n,c,e)}else{_(h,p,l);t[c]=undefined;m=h.m}p=s[++i]}else{m=B(t&&t[i],n,i,e);p=s[++i]}if(m){{X(u.m).insertBefore(m,V(u.m))}}}}if(o>r){Q(e,s[d+1]==null?null:s[d+1].m,n,s,i,d)}else if(i>d){q(t,o,r)}};const K=(e,t,n=false)=>{if(e.v===t.v){if(e.v==="slot"){return e.u===t.u}if(!n){return e.i===t.i}return true}return false};const V=e=>e&&e["s-ol"]||e;const X=e=>(e["s-ol"]?e["s-ol"]:e).parentNode;const _=(e,t,n=false)=>{const s=t.m=e.m;const l=e.o;const o=t.o;const i=t.v;const c=t.t;let r;if(c===null){{if(i==="slot");else{z(e,t,f)}}if(l!==null&&o!==null){I(s,l,t,o,n)}else if(o!==null){if(e.t!==null){s.textContent=""}Q(s,null,t,o,0,o.length-1)}else if(l!==null){q(l,0,l.length-1)}}else if(r=s["s-cr"]){r.parentNode.textContent=c}else if(e.t!==c){s.data=c}};const G=e=>{const t=e.childNodes;for(const e of t){if(e.nodeType===1){if(e["s-sr"]){const n=e["s-sn"];e.hidden=false;for(const s of t){if(s!==e){if(s["s-hn"]!==e["s-hn"]||n!==""){if(s.nodeType===1&&(n===s.getAttribute("slot")||n===s["s-sn"])){e.hidden=true;break}}else{if(s.nodeType===1||s.nodeType===3&&s.textContent.trim()!==""){e.hidden=true;break}}}}}G(e)}}};const J=[];const Y=e=>{let n;let s;let l;for(const o of e.childNodes){if(o["s-sr"]&&(n=o["s-cr"])&&n.parentNode){s=n.parentNode.childNodes;const e=o["s-sn"];for(l=s.length-1;l>=0;l--){n=s[l];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==o["s-hn"]&&!t.experimentalSlotFixes){if(Z(n,e)){let t=J.find((e=>e.k===n));i=true;n["s-sn"]=n["s-sn"]||e;if(t){t.k["s-sh"]=o["s-hn"];t.C=o}else{n["s-sh"]=o["s-hn"];J.push({C:o,k:n})}if(n["s-sr"]){J.map((e=>{if(Z(e.k,n["s-sn"])){t=J.find((e=>e.k===n));if(t&&!e.C){e.C=t.C}}}))}}else if(!J.some((e=>e.k===n))){J.push({k:n})}}}}if(o.nodeType===1){Y(o)}}};const Z=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};const ee=e=>{{e.l&&e.l.ref&&e.l.ref(null);e.o&&e.o.map(ee)}};const te=(e,t,f=false)=>{var r,u,a,d;const p=e.$hostElement$;const v=e.$;const m=e.T||w(null,null);const h=S(t)?t:$(null,null,t);l=p.tagName;if(v.L){h.l=h.l||{};v.L.map((([e,t])=>h.l[t]=p[e]))}if(f&&h.l){for(const e of Object.keys(h.l)){if(p.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){h.l[e]=p[e]}}}h.v=null;h.p|=4;e.T=h;h.m=m.m=p.shadowRoot||p;{n=p["s-sc"]}{s=p["s-cr"];o=(v.p&1)!==0;i=false}_(m,h,f);{Ee.p|=1;if(c){Y(h.m);for(const e of J){const t=e.k;if(!t["s-ol"]){const e=We.createTextNode("");e["s-nr"]=t;t.parentNode.insertBefore(t["s-ol"]=e,t)}}for(const e of J){const t=e.k;const n=e.C;if(n){const e=n.parentNode;let s=n.nextSibling;{let n=(r=t["s-ol"])===null||r===void 0?void 0:r.previousSibling;while(n){let l=(u=n["s-nr"])!==null&&u!==void 0?u:null;if(l&&l["s-sn"]===t["s-sn"]&&e===l.parentNode){l=l.nextSibling;if(!l||!l["s-nr"]){s=l;break}}n=n.previousSibling}}if(!s&&e!==t.parentNode||t.nextSibling!==s){if(t!==s){if(!t["s-hn"]&&t["s-ol"]){t["s-hn"]=t["s-ol"].parentNode.nodeName}e.insertBefore(t,s);if(t.nodeType===1){t.hidden=(a=t["s-ih"])!==null&&a!==void 0?a:false}}}}else{if(t.nodeType===1){if(f){t["s-ih"]=(d=t.hidden)!==null&&d!==void 0?d:false}t.hidden=true}}}}if(i){G(h.m)}Ee.p&=~1;J.length=0}};const ne=(e,t)=>{if(t&&!e.R&&t["s-p"]){t["s-p"].push(new Promise((t=>e.R=t)))}};const se=(e,t)=>{{e.p|=16}if(e.p&4){e.p|=512;return}ne(e,e.D);const n=()=>le(e,t);return Xe(n)};const le=(e,t)=>{const n=u("scheduleUpdate",e.$.S);const s=e.j;let l;if(t){{e.p|=256;if(e.O){e.O.map((([e,t])=>ae(s,e,t)));e.O=undefined}}{l=ae(s,"componentWillLoad")}}else{{l=ae(s,"componentWillUpdate")}}n();return oe(l,(()=>ce(e,s,t)))};const oe=(e,t)=>ie(e)?e.then(t):t();const ie=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";const ce=async(e,t,n)=>{var s;const l=e.$hostElement$;const o=u("update",e.$.S);const i=l["s-rc"];if(n){M(e)}const c=u("render",e.$.S);{fe(e,t,l,n)}if(i){i.map((e=>e()));l["s-rc"]=undefined}c();o();{const t=(s=l["s-p"])!==null&&s!==void 0?s:[];const n=()=>re(e);if(t.length===0){n()}else{Promise.all(t).then(n);e.p|=4;t.length=0}}};const fe=(e,t,n,s)=>{try{t=t.render&&t.render();{e.p&=~16}{e.p|=2}{{{te(e,t,s)}}}}catch(t){Me(t,e.$hostElement$)}return null};const re=e=>{const t=e.$.S;const n=e.$hostElement$;const s=u("postUpdate",t);const l=e.j;const o=e.D;{ae(l,"componentDidRender")}if(!(e.p&64)){e.p|=64;{de(n)}{ae(l,"componentDidLoad")}s();{e.F(n);if(!o){ue()}}}else{{ae(l,"componentDidUpdate")}s()}{e.M(n)}{if(e.R){e.R();e.R=undefined}if(e.p&512){Ve((()=>se(e,false)))}e.p&=~(4|512)}};const ue=t=>{{de(We.documentElement)}Ve((()=>D(Pe,"appload",{detail:{namespace:e}})))};const ae=(e,t,n)=>{if(e&&e[t]){try{return e[t](n)}catch(e){Me(e)}}return undefined};const de=e=>e.classList.add("hydrated");const pe=(e,t)=>De(e).U.get(t);const ve=(e,t,n,s)=>{const l=De(e);const o=l.$hostElement$;const i=l.U.get(t);const c=l.p;const f=l.j;n=T(n,s.A[t][0]);const r=Number.isNaN(i)&&Number.isNaN(n);const u=n!==i&&!r;if((!(c&8)||i===undefined)&&u){l.U.set(t,n);if(f){if(s.N&&c&128){const e=s.N[t];if(e){e.map((e=>{try{f[e](n,i,t)}catch(e){Me(e,o)}}))}}if((c&(2|16))===2){se(l,false)}}}};const me=(e,t,n)=>{var s;const l=e.prototype;if(t.A){if(e.watchers){t.N=e.watchers}const o=Object.entries(t.A);o.map((([e,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,e,{get(){return pe(this,e)},set(n){ve(this,e,n,t)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(l,e,{value(...t){var n;const s=De(this);return(n=s===null||s===void 0?void 0:s.P)===null||n===void 0?void 0:n.then((()=>{var n;return(n=s.j)===null||n===void 0?void 0:n[e](...t)}))}})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(e,s,o){Ee.jmp((()=>{var i;const c=n.get(e);if(this.hasOwnProperty(c)){o=this[c];delete this[c]}else if(l.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==o){return}else if(c==null){const n=De(this);const l=n===null||n===void 0?void 0:n.p;if(l&&!(l&8)&&l&128&&o!==s){const l=n.j;const c=(i=t.N)===null||i===void 0?void 0:i[e];c===null||c===void 0?void 0:c.forEach((t=>{if(l[t]!=null){l[t].call(l,o,s,e)}}))}return}this[c]=o===null&&typeof this[c]==="boolean"?false:o}))};e.observedAttributes=Array.from(new Set([...Object.keys((s=t.N)!==null&&s!==void 0?s:{}),...o.filter((([e,t])=>t[0]&15)).map((([e,s])=>{var l;const o=s[1]||e;n.set(o,e);if(s[0]&512){(l=t.L)===null||l===void 0?void 0:l.push([e,o])}return o}))]))}}return e};const he=async(e,t,n,s)=>{let l;if((t.p&32)===0){t.p|=32;{l=Ae(n);if(l.then){const e=a();l=await l;e()}if(!l.isProxied){{n.N=l.watchers}me(l,n,2);l.isProxied=true}const e=u("createInstance",n.S);{t.p|=8}try{new l(t)}catch(e){Me(e)}{t.p&=~8}{t.p|=128}e()}if(l.style){let e=l.style;const t=U(n);if(!Ne.has(t)){const s=u("registerStyles",n.S);O(t,e,!!(n.p&1));s()}}}const o=t.D;const i=()=>se(t,true);if(o&&o["s-rc"]){o["s-rc"].push(i)}else{i()}};const ye=e=>{};const be=e=>{if((Ee.p&1)===0){const t=De(e);const n=t.$;const s=u("connectedCallback",n.S);if(!(t.p&1)){t.p|=1;{if(n.p&(4|8)){$e(e)}}{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){ne(t,t.D=n);break}}}if(n.A){Object.entries(n.A).map((([t,[n]])=>{if(n&31&&e.hasOwnProperty(t)){const n=e[t];delete e[t];e[t]=n}}))}{he(e,t,n)}}else{ke(e,t,n.W);if(t===null||t===void 0?void 0:t.j);else if(t===null||t===void 0?void 0:t.B){t.B.then((()=>ye()))}}s()}};const $e=e=>{const t=e["s-cr"]=We.createComment("");t["s-cn"]=true;e.insertBefore(t,e.firstChild)};const we=e=>{{ae(e,"disconnectedCallback")}};const ge=async e=>{if((Ee.p&1)===0){const t=De(e);{if(t.H){t.H.map((e=>e()));t.H=undefined}}if(t===null||t===void 0?void 0:t.j){we(t.j)}else if(t===null||t===void 0?void 0:t.B){t.B.then((()=>we(t.j)))}}};const Se=(e,t={})=>{var n;const s=u();const l=[];const o=t.exclude||[];const i=Pe.customElements;const c=We.head;const f=c.querySelector("meta[charset]");const r=We.createElement("style");const a=[];let v;let m=true;Object.assign(Ee,t);Ee.q=new URL(t.resourcesUrl||"./",We.baseURI).href;let h=false;e.map((e=>{e[1].map((t=>{var n;const s={p:t[0],S:t[1],A:t[2],W:t[3]};if(s.p&4){h=true}{s.A=t[2]}{s.W=t[3]}{s.L=[]}{s.N=(n=t[4])!==null&&n!==void 0?n:{}}const c=s.S;const f=class extends HTMLElement{constructor(e){super(e);e=this;Oe(e,s);if(s.p&1){{{e.attachShadow({mode:"open"})}}}}connectedCallback(){if(v){clearTimeout(v);v=null}if(m){a.push(this)}else{Ee.jmp((()=>be(this)))}}disconnectedCallback(){Ee.jmp((()=>ge(this)))}componentOnReady(){return De(this).B}};s.I=e[0];if(!o.includes(c)&&!i.get(c)){l.push(c);i.define(c,me(f,s,1))}}))}));if(h){r.innerHTML+=p}{r.innerHTML+=l+d}if(r.innerHTML.length){r.setAttribute("data-styles","");const e=(n=Ee.h)!==null&&n!==void 0?n:b(We);if(e!=null){r.setAttribute("nonce",e)}c.insertBefore(r,f?f.nextSibling:c.firstChild)}m=false;if(a.length){a.map((e=>e.connectedCallback()))}else{{Ee.jmp((()=>v=setTimeout(ue,30)))}}s()};const ke=(e,t,n,s)=>{if(n){n.map((([n,s,l])=>{const o=xe(e,n);const i=Ce(t,l);const c=Te(n);Ee.ael(o,s,i,c);(t.H=t.H||[]).push((()=>Ee.rel(o,s,i,c)))}))}};const Ce=(e,t)=>n=>{try{{if(e.p&256){e.j[t](n)}else{(e.O=e.O||[]).push([t,n])}}}catch(e){Me(e)}};const xe=(e,t)=>{if(t&8)return Pe;return e};const Te=e=>(e&2)!==0;const Le=e=>Ee.h=e;const Re=new WeakMap;const De=e=>Re.get(e);const je=(e,t)=>Re.set(t.j=e,t);const Oe=(e,t)=>{const n={p:0,$hostElement$:e,$:t,U:new Map};{n.P=new Promise((e=>n.M=e))}{n.B=new Promise((e=>n.F=e));e["s-p"]=[];e["s-rc"]=[]}ke(e,n,t.W);return Re.set(e,n)};const Fe=(e,t)=>t in e;const Me=(e,t)=>(0,console.error)(e,t);const Ue=new Map;const Ae=(e,t,n)=>{const s=e.S.replace(/-/g,"_");const l=e.I;const o=Ue.get(l);if(o){return o[s]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((e=>{{Ue.set(l,e)}return e[s]}),Me)};const Ne=new Map;const Pe=typeof window!=="undefined"?window:{};const We=Pe.document||{head:{}};const Ee={p:0,q:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,s)=>e.addEventListener(t,n,s),rel:(e,t,n,s)=>e.removeEventListener(t,n,s),ce:(e,t)=>new CustomEvent(e,t)};const ze=e=>Promise.resolve(e);const Be=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();const He=[];const Qe=[];const qe=(e,t)=>n=>{e.push(n);if(!r){r=true;if(t&&Ee.p&4){Ve(Ke)}else{Ee.raf(Ke)}}};const Ie=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){Me(e)}}e.length=0};const Ke=()=>{Ie(He);{Ie(Qe);if(r=He.length>0){Ee.raf(Ke)}}};const Ve=e=>ze().then(e);const Xe=qe(Qe,true);export{g as H,Se as b,R as c,L as g,$ as h,ze as p,je as r,Le as s};
3
+ //# sourceMappingURL=p-8155d0e2.js.map