@descope/web-components-ui 1.0.311 → 1.0.312

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/dist/cjs/index.cjs.js +1300 -906
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.esm.js +1306 -911
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/1224.js +1 -1
  7. package/dist/umd/1438.js +11 -11
  8. package/dist/umd/1612.js +4 -4
  9. package/dist/umd/1621.js +8 -8
  10. package/dist/umd/2362.js +2 -2
  11. package/dist/umd/3830.js +1 -1
  12. package/dist/umd/3951.js +4 -4
  13. package/dist/umd/4024.js +4 -4
  14. package/dist/umd/4028.js +6 -6
  15. package/dist/umd/4052.js +4 -4
  16. package/dist/umd/4392.js +1 -1
  17. package/dist/umd/4569.js +1 -1
  18. package/dist/umd/4746.js +2 -2
  19. package/dist/umd/4978.js +1 -1
  20. package/dist/umd/5135.js +4 -4
  21. package/dist/umd/5517.js +1 -1
  22. package/dist/umd/5806.js +2 -2
  23. package/dist/umd/5910.js +1 -1
  24. package/dist/umd/63.js +7 -7
  25. package/dist/umd/637.js +1 -0
  26. package/dist/umd/6594.js +1 -1
  27. package/dist/umd/6770.js +2 -2
  28. package/dist/umd/7056.js +9 -9
  29. package/dist/umd/7164.js +7 -7
  30. package/dist/umd/7531.js +4 -4
  31. package/dist/umd/7911.js +4 -4
  32. package/dist/umd/8191.js +4 -4
  33. package/dist/umd/8866.js +5 -5
  34. package/dist/umd/9092.js +12 -12
  35. package/dist/umd/9314.js +5 -5
  36. package/dist/umd/9423.js +12 -12
  37. package/dist/umd/9562.js +4 -4
  38. package/dist/umd/DescopeDev.js +1 -1
  39. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
  40. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  41. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  42. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  43. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +1 -1
  44. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  45. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +1 -1
  46. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  47. package/dist/umd/descope-avatar-index-js.js +1 -1
  48. package/dist/umd/descope-badge-index-js.js +1 -1
  49. package/dist/umd/descope-button-index-js.js +4 -4
  50. package/dist/umd/descope-code-snippet-index-js.js +1 -0
  51. package/dist/umd/descope-combo-box-index-js.js +5 -5
  52. package/dist/umd/descope-container-index-js.js +1 -1
  53. package/dist/umd/descope-date-picker-index-js.js +1 -1
  54. package/dist/umd/descope-divider-index-js.js +1 -1
  55. package/dist/umd/descope-email-field-index-js.js +4 -4
  56. package/dist/umd/descope-enriched-text-index-js.js +1 -1
  57. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +3 -3
  58. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  59. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +3 -3
  60. package/dist/umd/descope-grid-index-js.js +1 -1
  61. package/dist/umd/descope-icon-index-js.js +1 -1
  62. package/dist/umd/descope-image-index-js.js +1 -1
  63. package/dist/umd/descope-link-index-js.js +1 -1
  64. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  65. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  66. package/dist/umd/descope-logo-index-js.js +1 -1
  67. package/dist/umd/descope-modal-index-js.js +1 -1
  68. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  69. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  70. package/dist/umd/descope-new-password-index-js.js +1 -1
  71. package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
  72. package/dist/umd/descope-notification-index-js.js +1 -1
  73. package/dist/umd/descope-notp-image-index-js.js +1 -1
  74. package/dist/umd/descope-number-field-index-js.js +1 -1
  75. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  76. package/dist/umd/descope-passcode-index-js.js +2 -2
  77. package/dist/umd/descope-password-index-js.js +1 -1
  78. package/dist/umd/descope-policy-validation-index-js.js +1 -1
  79. package/dist/umd/descope-recaptcha-index-js.js +1 -1
  80. package/dist/umd/descope-text-area-index-js.js +1 -1
  81. package/dist/umd/descope-text-field-index-js.js +2 -2
  82. package/dist/umd/descope-text-index-js.js +1 -1
  83. package/dist/umd/descope-totp-image-index-js.js +1 -1
  84. package/dist/umd/descope-upload-file-index-js.js +1 -1
  85. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  86. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  87. package/dist/umd/index.js +1 -1
  88. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
  89. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
  90. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  91. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +1 -1
  92. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  93. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  94. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  95. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
  96. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  97. package/package.json +2 -1
  98. package/src/components/descope-code-snippet/CodeSnippetClass.js +238 -0
  99. package/src/components/descope-code-snippet/helpers.js +9 -0
  100. package/src/components/descope-code-snippet/index.js +5 -0
  101. package/src/darkTheme.js +4 -0
  102. package/src/index.cjs.js +1 -0
  103. package/src/index.d.ts +1 -0
  104. package/src/index.js +1 -0
  105. package/src/theme/components/codeSnippet.js +145 -0
  106. package/src/theme/components/index.js +2 -0
package/dist/umd/4746.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 4746.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4746],{2223:(e,t,o)=>{o.d(t,{T8:()=>l}),o(7894);let s=!1,n=[],i=[];function r(){s=!0,requestAnimationFrame((function(){s=!1,function(e){for(;e.length;)a(e.shift())}(n),setTimeout((function(){!function(e){for(let t=0,o=e.length;t<o;t++)a(e.shift())}(i)}))}))}function a(e){const t=e[0],o=e[1],s=e[2];try{o.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function l(e,t,o){s||r(),i.push([e,t,o])}},962:(e,t,o)=>{o.d(t,{Ry:()=>d});let s=new WeakMap,n=new WeakMap,i={},r=0;const a=e=>e&&e.nodeType===Node.ELEMENT_NODE,l=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)},d=(e,t=document.body,o="data-aria-hidden")=>{const d=Array.from(Array.isArray(e)?e:[e]);return t&&d.push(...Array.from(t.querySelectorAll("[aria-live]"))),((e,t,o,d)=>{const h=((e,t)=>a(e)?t.map((t=>{if(!a(t))return l(t,"is not a valid element"),null;let o=t;for(;o&&o!==e;){if(e.contains(o))return t;o=o.getRootNode().host}return l(t,"is not contained inside",e),null})).filter((e=>Boolean(e))):(l(e,"is not a valid element"),[]))(t,Array.isArray(e)?e:[e]);i[o]||(i[o]=new WeakMap);const c=i[o],u=[],p=new Set,_=new Set(h),m=e=>{if(!e||p.has(e))return;p.add(e);const t=e.assignedSlot;t&&m(t),m(e.parentNode||e.host)};h.forEach(m);const v=e=>{if(!e||_.has(e))return;const t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach((e=>{if(!["template","script","style"].includes(e.localName))if(p.has(e))v(e);else{const t=e.getAttribute(d),i=null!==t&&"false"!==t,r=(s.get(e)||0)+1,a=(c.get(e)||0)+1;s.set(e,r),c.set(e,a),u.push(e),1===r&&i&&n.set(e,!0),1===a&&e.setAttribute(o,"true"),i||e.setAttribute(d,"true")}}))};return v(t),p.clear(),r+=1,()=>{u.forEach((e=>{const t=s.get(e)-1,i=c.get(e)-1;s.set(e,t),c.set(e,i),t||(n.has(e)?n.delete(e):e.removeAttribute(d)),i||e.removeAttribute(o)})),r-=1,r||(s=new WeakMap,s=new WeakMap,n=new WeakMap,i={})}})(d,t,o,"aria-hidden")};HTMLElement.prototype},3392:(e,t,o)=>{o.d(t,{G:()=>n});var s=o(3550);class n{saveFocus(e){this.focusNode=e||(0,s.Gf)()}restoreFocus(){const e=this.focusNode;e&&((0,s.Gf)()===document.body?setTimeout((()=>e.focus())):e.focus(),this.focusNode=null)}}},1486:(e,t,o)=>{o.d(t,{f:()=>i});var s=o(3550);const n=[];class i{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return(0,s.GO)(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(s.Qw).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");n.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,n.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(n).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,o=e?-1:1,s=this.__focusedElementIndex,n=t[(t.length+s+o)%t.length];n.focus(),"input"===n.localName&&n.select()}}},9320:(e,t,o)=>{o.d(t,{u:()=>s});const s=e=>class extends e{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t)return;if(void 0===e)return;const{classList:o}=t;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const e=this.__previousClasses.filter((e=>!this.__initialClasses.has(e)));e.length>0&&o.remove(...e)}const s="string"==typeof e?e.split(" "):[];s.length>0&&o.add(...s),this.__previousClasses=s}}},4457:(e,t,o)=>{o.d(t,{F:()=>_});var s=o(2223),n=o(1037),i=o(962);class r{constructor(e,t){this.host=e,this.callback="function"==typeof t?t:()=>e}showModal(){const e=this.callback();this.__showOthers=(0,i.Ry)(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}var a=o(3392),l=o(1486),d=o(3550),h=o(6155);const c=e=>class extends((0,h.k)(e)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new r(this),this.__focusTrapController=new l.f(this),this.__focusRestorationController=new a.G}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=(0,d.Gf)();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==this;)t=t.parentNode||t.host;return t===this}},u=()=>Array.from(document.body.children).filter((e=>e instanceof HTMLElement&&e._hasOverlayStackMixin&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0)),p=e=>class extends e{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return this===u().pop()}bringToFront(){let e="";const t=u().filter((e=>e!==this)).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),u().forEach((e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=u();let t;for(;(t=e.pop())&&(t===this||(t.$.overlay.style.removeProperty("pointer-events"),t.modeless)););}},_=e=>class extends(c(p(e))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),n.gn&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",o-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(e,t,o,s){const n=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const i=this._oldRenderer!==e;this._oldRenderer=e;const r=this._oldOpened!==s;this._oldOpened=s,i&&(this.innerHTML="",delete this._$litPart$),s&&e&&(i||r||n)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),(0,s.T8)(this,(()=>{this._trapFocus();const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return!("none"===e.getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(e,t){const o=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[o])};this[o]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&(!this.modeless||e.composedPath().includes(this.$.overlay))&&"Escape"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}}},6196:(e,t,o)=>{o.d(t,{r:()=>s});const s=o(235).iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4746],{52223:(e,t,o)=>{o.d(t,{T8:()=>l}),o(7894);let s=!1,n=[],i=[];function r(){s=!0,requestAnimationFrame((function(){s=!1,function(e){for(;e.length;)a(e.shift())}(n),setTimeout((function(){!function(e){for(let t=0,o=e.length;t<o;t++)a(e.shift())}(i)}))}))}function a(e){const t=e[0],o=e[1],s=e[2];try{o.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function l(e,t,o){s||r(),i.push([e,t,o])}},80962:(e,t,o)=>{o.d(t,{Ry:()=>d});let s=new WeakMap,n=new WeakMap,i={},r=0;const a=e=>e&&e.nodeType===Node.ELEMENT_NODE,l=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)},d=(e,t=document.body,o="data-aria-hidden")=>{const d=Array.from(Array.isArray(e)?e:[e]);return t&&d.push(...Array.from(t.querySelectorAll("[aria-live]"))),((e,t,o,d)=>{const h=((e,t)=>a(e)?t.map((t=>{if(!a(t))return l(t,"is not a valid element"),null;let o=t;for(;o&&o!==e;){if(e.contains(o))return t;o=o.getRootNode().host}return l(t,"is not contained inside",e),null})).filter((e=>Boolean(e))):(l(e,"is not a valid element"),[]))(t,Array.isArray(e)?e:[e]);i[o]||(i[o]=new WeakMap);const c=i[o],u=[],p=new Set,_=new Set(h),m=e=>{if(!e||p.has(e))return;p.add(e);const t=e.assignedSlot;t&&m(t),m(e.parentNode||e.host)};h.forEach(m);const v=e=>{if(!e||_.has(e))return;const t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach((e=>{if(!["template","script","style"].includes(e.localName))if(p.has(e))v(e);else{const t=e.getAttribute(d),i=null!==t&&"false"!==t,r=(s.get(e)||0)+1,a=(c.get(e)||0)+1;s.set(e,r),c.set(e,a),u.push(e),1===r&&i&&n.set(e,!0),1===a&&e.setAttribute(o,"true"),i||e.setAttribute(d,"true")}}))};return v(t),p.clear(),r+=1,()=>{u.forEach((e=>{const t=s.get(e)-1,i=c.get(e)-1;s.set(e,t),c.set(e,i),t||(n.has(e)?n.delete(e):e.removeAttribute(d)),i||e.removeAttribute(o)})),r-=1,r||(s=new WeakMap,s=new WeakMap,n=new WeakMap,i={})}})(d,t,o,"aria-hidden")};HTMLElement.prototype},33392:(e,t,o)=>{o.d(t,{G:()=>n});var s=o(3550);class n{saveFocus(e){this.focusNode=e||(0,s.Gf)()}restoreFocus(){const e=this.focusNode;e&&((0,s.Gf)()===document.body?setTimeout((()=>e.focus())):e.focus(),this.focusNode=null)}}},91486:(e,t,o)=>{o.d(t,{f:()=>i});var s=o(3550);const n=[];class i{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return(0,s.GO)(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(s.Qw).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");n.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,n.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(n).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,o=e?-1:1,s=this.__focusedElementIndex,n=t[(t.length+s+o)%t.length];n.focus(),"input"===n.localName&&n.select()}}},39320:(e,t,o)=>{o.d(t,{u:()=>s});const s=e=>class extends e{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t)return;if(void 0===e)return;const{classList:o}=t;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const e=this.__previousClasses.filter((e=>!this.__initialClasses.has(e)));e.length>0&&o.remove(...e)}const s="string"==typeof e?e.split(" "):[];s.length>0&&o.add(...s),this.__previousClasses=s}}},44457:(e,t,o)=>{o.d(t,{F:()=>_});var s=o(52223),n=o(61037),i=o(80962);class r{constructor(e,t){this.host=e,this.callback="function"==typeof t?t:()=>e}showModal(){const e=this.callback();this.__showOthers=(0,i.Ry)(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}var a=o(33392),l=o(91486),d=o(3550),h=o(16155);const c=e=>class extends((0,h.k)(e)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new r(this),this.__focusTrapController=new l.f(this),this.__focusRestorationController=new a.G}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=(0,d.Gf)();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==this;)t=t.parentNode||t.host;return t===this}},u=()=>Array.from(document.body.children).filter((e=>e instanceof HTMLElement&&e._hasOverlayStackMixin&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0)),p=e=>class extends e{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return this===u().pop()}bringToFront(){let e="";const t=u().filter((e=>e!==this)).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),u().forEach((e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=u();let t;for(;(t=e.pop())&&(t===this||(t.$.overlay.style.removeProperty("pointer-events"),t.modeless)););}},_=e=>class extends(c(p(e))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),n.gn&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",o-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(e,t,o,s){const n=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const i=this._oldRenderer!==e;this._oldRenderer=e;const r=this._oldOpened!==s;this._oldOpened=s,i&&(this.innerHTML="",delete this._$litPart$),s&&e&&(i||r||n)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),(0,s.T8)(this,(()=>{this._trapFocus();const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return!("none"===e.getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(e,t){const o=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[o])};this[o]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&(!this.modeless||e.composedPath().includes(this.$.overlay))&&"Escape"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}}},6196:(e,t,o)=>{o.d(t,{r:()=>s});const s=o(9392).iv`
3
3
  :host {
4
4
  z-index: 200;
5
5
  position: fixed;
@@ -58,7 +58,7 @@
58
58
  inset: 0;
59
59
  pointer-events: auto;
60
60
  }
61
- `},510:(e,t,o)=>{o.d(t,{I:()=>n}),o(1195),o(9416),o(9849),o(4173);var s=o(6570);const n=s.iv`
61
+ `},90510:(e,t,o)=>{o.d(t,{I:()=>n}),o(51195),o(29416),o(29849),o(34173);var s=o(46570);const n=s.iv`
62
62
  :host {
63
63
  top: var(--lumo-space-m);
64
64
  right: var(--lumo-space-m);
package/dist/umd/4978.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{3346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),n=s(357),r=s(3038),a=s(2666),o=s(8084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,a._,o.Q,r.k)(s)}},5279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},4567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(5279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,lo:()=>o,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0}},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},6557:(t,e,s)=>{s.d(e,{l:()=>n});var i=s(7878);const n=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},3038:(t,e,s)=>{s.d(e,{k:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(3346),n=s(2061),r=s(4567),a=s(7878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:u=[],delegatesFocus:c=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#n=a.C.bind(this,"blur");#r=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(o)?o():o}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#n()})),this.baseElement.addEventListener("focus",(t=>{this.#r()})),(0,r.Db)(this.baseElement,this,u),(0,r.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},4814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),n=s(4567);class r{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new r;return Object.keys(s).forEach((r=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(r,s[r]),l=(0,n.Tk)(t,r);o.forEach((({selector:t,property:s,important:n,fallback:r})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,r)+(n?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(5279),n=s(2061),r=s(4567),a=s(5561),o=s(4814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#a;#o;#l;#h;#u;#c;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#h=s,this.#u=r,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#u]}#E(){this.#o=document.createElement("style"),this.#o.id=`style-mixin-theme__${l}`,this.#c.prepend(this.#o),this.#l=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){this.#a=document.createElement("style"),this.#a.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#a.innerText=`:host(${t}) {}`,this.#c.append(this.#a)}}#y(t,e){const s=this.#a?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#f(t=[]){let e=!1;t.forEach((t=>{this.#m.includes(t)&&(this.#y(t,this.getAttribute(t)),e=!0)})),e&&(this.#a.innerHTML=this.#a?.sheet?.cssRules[0].cssText)}#A(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,n.E3)(l,this.#h),this.#d,t),this.#c.prepend(e)}}#S(t){(this.#c.classList||this.#c.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#c=await(this.#p?.(this))||this.shadowRoot,this.#S(l),this.#A(),this.#E(),this.#v(),(0,r.FX)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},5579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#w=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#w=document.createElement("style"),this.#w.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#w):this.#w.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#M("true"===s)}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},4978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>r.D,Iw:()=>u.I,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>n.e,li:()=>c.l,mE:()=>m.m,wX:()=>h.w,yk:()=>i.y});var i=s(9129),n=s(5579),r=s(370),a=s(5584),o=s(357),l=s(2666),h=s(9894),u=s(9772),c=s(6557),d=s(8084),m=s(1534)},1534:(t,e,s)=>{s.d(e,{m:()=>n});var i=s(7878);const n=t=>class extends t{init(){this.#C(),super.init?.()}#C(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},9894:(t,e,s)=>{s.d(e,{w:()=>n}),s(5910);const i=["required","pattern"],n=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#x;get internals(){return this.#x}set internals(t){this.#x=t}constructor(){super(),this.#x=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#T(){const t=this.isReadOnly?{}:this.getValidity();this.#x.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#x.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#x.validity.valid}reportValidity(){return this.#x.reportValidity()}get validity(){return this.#x.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#x.setValidity({customError:!0},t,this.validationTarget):(this.#x.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#x.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#T),setTimeout((()=>this.#T()))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},9772:(t,e,s)=>{s.d(e,{I:()=>h});var i=s(5279),n=s(2061),r=s(4567),a=s(9129),o=s(4814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},h=({name:t,selector:e,mappings:s={},forward:{attributes:h=[],include:u=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,n.E3)(c.componentName,"_"+d),s)}}#L;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#L=t(this).then((t=>t.host))}async#V(){const t=await this.#L;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#L;(0,r.oP)(this,t,{[u?"includeAttrs":"excludeAttrs"]:h}),this.#V()}}}},5584:(t,e,s)=>{s.d(e,{d:()=>c});var i=s(2061),n=s(4567),r=s(7878),a=s(9129),o=s(9894);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},u=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:s=[],proxyParentValidation:i=!1})=>a=>class extends((0,o.w)(a)){static get observedAttributes(){return[...a.observedAttributes||[],...l]}#k;#s=r.C.bind(this,"change");constructor(){super(),this.#k=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#k&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#k)return this.#k;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#k=h(t)||h(e),this.#k}set inputElement(t){this.#k=t}getValidity(){return this.inputElement?.validity||{}}#$(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#$(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},s.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#$()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#$()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,n.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},c=t=>(0,i.qC)(u(t),(0,a.y)({componentNameOverride:(0,n.iY)("input-wrapper")}))}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4978],{33346:(t,e,s)=>{s.d(e,{s:()=>l});var i=s(2061),n=s(30357),r=s(33038),a=s(12666),o=s(28084);const l=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#t;#e=!0;get baseSelector(){return e}get baseElement(){return this.#t??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#t||console.warn("missing base element for component",this.localName),this.#t}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#e&&(this.#e=!1,this.init?.())}}return(0,i.qC)(n.A,a._,o.Q,r.k)(s)}},65279:(t,e,s)=>{s.d(e,{gh:()=>i,k4:()=>n,qM:()=>a,qg:()=>r});const i="descope",n=3,r="host",a="@"},54567:(t,e,s)=>{s.d(e,{Db:()=>d,FX:()=>r,P$:()=>a,Tk:()=>u,iY:()=>h,oP:()=>c,tg:()=>l});var i=s(2061),n=s(65279);const r=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const n=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(n),new MutationObserver((t=>{t.forEach((t=>{"attributes"!==t.type||s.includes(t.attributeName)||i.length&&!i.includes(t.attributeName)||e([t.attributeName])}))})).observe(t,{attributes:!0})},a=(t,e)=>{e({addedNodes:Array.from(t.children),removedNodes:[]}),new MutationObserver((t=>{t.forEach((t=>{"childList"!==t.type&&"characterData"!==t.type||e(t)}))})).observe(t,{childList:!0,characterData:!0,subtree:!0})},o=(t,e,s={})=>i=>{i.forEach((i=>{const n=s[i]||i,r=t.getAttribute(i);null!==r?e.getAttribute(n)!==r&&e.setAttribute(n,r):e.removeAttribute(n)}))},l=(t,e,s)=>{r(t,o(t,e),s),r(e,o(e,t),s)},h=t=>(0,i.E3)(n.gh,t),u=(...t)=>`--${(0,i.E3)(...t)}`,c=(t,e,s={})=>{r(t,o(t,e,s.mapAttrs),s)},d=(t,e,s=[])=>{if(!s.length)return;const i=s.reduce(((e,s)=>Object.assign(e,{[s]:{get:()=>t[s],set(e){t[s]=e}}})),{});Object.defineProperties(e,i)}},2061:(t,e,s)=>{s.d(e,{E3:()=>n,GL:()=>i,lo:()=>o,mf:()=>a,qC:()=>r});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),n=(...t)=>i(t.filter((t=>!!t)).join("-")),r=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),a=t=>"function"==typeof t,o=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;const s=t.slice().sort(),i=e.slice().sort();for(let t=0;t<s.length;t++)if(s[t]!==i[t])return!1;return!0}},37878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},86557:(t,e,s)=>{s.d(e,{l:()=>n});var i=s(37878);const n=t=>class extends t{#s=i.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#s(),this.prevValue=this.value)}))}}},30357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},33038:(t,e,s)=>{s.d(e,{k:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},20370:(t,e,s)=>{s.d(e,{D:()=>o});var i=s(33346),n=s(2061),r=s(54567),a=s(37878);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:h=[],includeForwardProps:u=[],delegatesFocus:c=!0})=>{class d extends((0,i.s)({componentName:t,baseSelector:e})){#n=a.C.bind(this,"blur");#r=a.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(o)?o():o}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#n()})),this.baseElement.addEventListener("focus",(t=>{this.#r()})),(0,r.Db)(this.baseElement,this,u),(0,r.tg)(this.baseElement,this,{excludeAttrs:l,includeAttrs:h})}}return d}},74814:(t,e,s)=>{s.d(e,{SP:()=>o,i3:()=>l,wj:()=>a});var i=s(2061),n=s(54567);class r{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const a=(t,e,s)=>{const a=new r;return Object.keys(s).forEach((r=>{const o=((t,e)=>{const s={selector:"",property:(0,i.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(r,s[r]),l=(0,n.Tk)(t,r);o.forEach((({selector:t,property:s,important:n,fallback:r})=>{a.add(((t="",e="")=>(0,i.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,r)+(n?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,n.Tk)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},9129:(t,e,s)=>{s.d(e,{y:()=>l});var i=s(65279),n=s(2061),r=s(54567),a=s(25561),o=s(74814);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SP)(l,{...t})}}#a;#o;#l;#h;#u;#c;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#h=s,this.#u=r,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#u]}#E(){this.#o=document.createElement("style"),this.#o.id=`style-mixin-theme__${l}`,this.#c.prepend(this.#o),this.#l=a.componentsThemeManager.onCurrentThemeChange(this.#b.bind(this)),this.#b()}#v(){if(this.#m.length){this.#a=document.createElement("style"),this.#a.id=`style-mixin-overrides__${l}`;const t=(0,o.i3)(l,i.k4);this.#a.innerText=`:host(${t}) {}`,this.#c.append(this.#a)}}#y(t,e){const s=this.#a?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(l,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#f(t=[]){let e=!1;t.forEach((t=>{this.#m.includes(t)&&(this.#y(t,this.getAttribute(t)),e=!0)})),e&&(this.#a.innerHTML=this.#a?.sheet?.cssRules[0].cssText)}#A(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${l}`,e.innerHTML=(0,o.wj)((0,n.E3)(l,this.#h),this.#d,t),this.#c.prepend(e)}}#S(t){(this.#c.classList||this.#c.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#c=await(this.#p?.(this))||this.shadowRoot,this.#S(l),this.#A(),this.#E(),this.#v(),(0,r.FX)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},95579:(t,e,s)=>{s.d(e,{e:()=>i});const i=t=>class extends t{#w=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#w=document.createElement("style"),this.#w.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#w):this.#w.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#M("true"===s)}}},12666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},94978:(t,e,s)=>{s.d(e,{Ae:()=>o.A,DM:()=>r.D,Iw:()=>u.I,QT:()=>d.Q,_A:()=>l._,dj:()=>a.d,e4:()=>n.e,li:()=>c.l,mE:()=>m.m,wX:()=>h.w,yk:()=>i.y});var i=s(9129),n=s(95579),r=s(20370),a=s(15584),o=s(30357),l=s(12666),h=s(89894),u=s(19772),c=s(86557),d=s(28084),m=s(61534)},61534:(t,e,s)=>{s.d(e,{m:()=>n});var i=s(37878);const n=t=>class extends t{init(){this.#C(),super.init?.()}#C(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,i.C.call(this,"blur"),i.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.C.call(this,"focus"),i.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},89894:(t,e,s)=>{s.d(e,{w:()=>n}),s(95910);const i=["required","pattern"],n=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#x;get internals(){return this.#x}set internals(t){this.#x=t}constructor(){super(),this.#x=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#T(){const t=this.isReadOnly?{}:this.getValidity();this.#x.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#x.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#x.validity.valid}reportValidity(){return this.#x.reportValidity()}get validity(){return this.#x.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#x.setValidity({customError:!0},t,this.validationTarget):(this.#x.setValidity({}),this.#T())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#x.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#T()}init(){super.init?.(),this.addEventListener("change",this.#T),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#T),setTimeout((()=>this.#T()))}}},28084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(54567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.debug(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}},19772:(t,e,s)=>{s.d(e,{I:()=>h});var i=s(65279),n=s(2061),r=s(54567),a=s(9129),o=s(74814);const l=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},h=({name:t,selector:e,mappings:s={},forward:{attributes:h=[],include:u=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.y)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SP)((0,n.E3)(c.componentName,"_"+d),s)}}#L;constructor(){const t=l((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.qM+d,baseSelector:":host"}),this.#L=t(this).then((t=>t.host))}async#V(){const t=await this.#L;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#L;(0,r.oP)(this,t,{[u?"includeAttrs":"excludeAttrs"]:h}),this.#V()}}}},15584:(t,e,s)=>{s.d(e,{d:()=>c});var i=s(2061),n=s(54567),r=s(37878),a=s(9129),o=s(89894);const l=["invalid","required"],h=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},u=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:s=[],proxyParentValidation:i=!1})=>a=>class extends((0,o.w)(a)){static get observedAttributes(){return[...a.observedAttributes||[],...l]}#k;#s=r.C.bind(this,"change");constructor(){super(),this.#k=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#k&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#k)return this.#k;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#k=h(t)||h(e),this.#k}set inputElement(t){this.#k=t}getValidity(){return this.inputElement?.validity||{}}#$(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#$(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},s.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#$()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#$()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,n.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},c=t=>(0,i.qC)(u(t),(0,a.y)({componentNameOverride:(0,n.iY)("input-wrapper")}))}}]);