@descope/web-components-ui 1.0.390 → 1.0.392

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/cjs/index.cjs.js +1468 -1279
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1438 -1248
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/4619.js +1 -1
  6. package/dist/umd/DescopeDev.js +1 -1
  7. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  8. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  9. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  10. package/dist/umd/descope-button-index-js.js +1 -1
  11. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  12. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +1 -1
  13. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +3 -3
  14. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +1 -1
  15. package/dist/umd/descope-icon-index-js.js +1 -1
  16. package/dist/umd/descope-logo-index-js.js +1 -1
  17. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  18. package/dist/umd/descope-third-party-app-logo-index-js.js +1 -0
  19. package/dist/umd/descope-upload-file-index-js.js +1 -1
  20. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  21. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  22. package/dist/umd/index.js +1 -1
  23. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  24. package/package.json +1 -1
  25. package/src/components/descope-icon/helpers.js +2 -2
  26. package/src/components/descope-scopes-list/ScopesListClass.js +24 -4
  27. package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +102 -0
  28. package/src/components/descope-third-party-app-logo/arrows.svg +4 -0
  29. package/src/components/descope-third-party-app-logo/index.js +7 -0
  30. package/src/helpers/index.js +8 -2
  31. package/src/index.cjs.js +1 -0
  32. package/src/index.js +1 -0
  33. package/src/mixins/createStyleMixin/helpers.js +32 -6
  34. package/src/mixins/createStyleMixin/index.js +1 -1
  35. package/src/theme/components/index.js +2 -0
  36. package/src/theme/components/thirdPartyAppLogo.js +36 -0
package/dist/umd/4619.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4619],{70263:(t,e,s)=>{s.d(e,{q:()=>l});var i=s(7138),r=s(38339),n=s(67259),a=s(19388),o=s(6842);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.Zz)(r.t,a.m,o.y,n.b)(s)}},25521:(t,e,s)=>{s.d(e,{$m:()=>i,IM:()=>n,WJ:()=>a,aE:()=>r});const i="descope",r=3,n="host",a="@"},14944:(t,e,s)=>{s.d(e,{EA:()=>c,Ge:()=>a,Gh:()=>l,Ix:()=>h,mx:()=>n,q:()=>d,xE:()=>u});var i=s(7138),r=s(25521);const n=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const r=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(r),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 r=s[i]||i,n=t.getAttribute(i);null!==n?e.getAttribute(r)!==n&&e.setAttribute(r,n):e.removeAttribute(r)}))},l=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},u=t=>(0,i.GL)(r.$m,t),h=(...t)=>`--${(0,i.GL)(...t)}`,c=(t,e,s={})=>{n(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)}},7138:(t,e,s)=>{s.d(e,{AG:()=>o,GL:()=>r,Tn:()=>a,Zz:()=>n,kW:()=>i,wy:()=>l});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),r=(...t)=>i(t.filter((t=>!!t)).join("-")),n=(...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},l=t=>t.replace(/([A-Z])/g," $1").trim().split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")},83929:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{r:()=>i})},37122:(t,e,s)=>{s.d(e,{_:()=>r});var i=s(83929);const r=t=>class extends t{#s=i.r.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)}))}}},38339:(t,e,s)=>{s.d(e,{t:()=>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()}}},67259:(t,e,s)=>{s.d(e,{b:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},40187:(t,e,s)=>{s.d(e,{t:()=>o});var i=s(70263),r=s(7138),n=s(14944),a=s(83929);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:u=[],includeForwardProps:h=[],delegatesFocus:c=!0})=>{class d extends((0,i.q)({componentName:t,baseSelector:e})){#r=a.r.bind(this,"blur");#n=a.r.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${((0,r.Tn)(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.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#n()})),(0,n.q)(this.baseElement,this,h),(0,n.Gh)(this.baseElement,this,{excludeAttrs:l,includeAttrs:u})}}return d}},46155:(t,e,s)=>{s.d(e,{AM:()=>l,SR:()=>o,_r:()=>a});var i=s(7138),r=s(14944);class n{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 n;return Object.keys(s).forEach((n=>{const o=((t,e)=>{const s={selector:"",property:(0,i.kW)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(n,s[n]),l=(0,r.Ix)(t,n);o.forEach((({selector:t,property:s,important:r,fallback:n})=>{a.add(((t="",e="")=>(0,i.Tn)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.Tn)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,n)+(r?"!important":""))}))})),a.toString()},o=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Ix)(t,s)})),{}),l=(t,e)=>Array(e).fill(`.${t}`).join("")},62650:(t,e,s)=>{s.d(e,{R:()=>l});var i=s(25521),r=s(7138),n=s(14944),a=s(6461),o=s(46155);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SR)(l,{...t})}}#a;#o;#l;#u;#h;#c;#d;#m;#p;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:n=i.IM,baseSelector:a}={}){super(),this.#u=s,this.#h=n,this.#d=a??this.baseSelector,this.#p=e,this.#m=Object.keys(t).map((t=>(0,r.GL)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#h]}#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.AM)(l,i.aE);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,n.Ix)(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._r)((0,r.GL)(l,this.#u),this.#d,t),this.#c.prepend(e)}}#x(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.#x(l),this.#A(),this.#E(),this.#v(),(0,n.mx)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},65927:(t,e,s)=>{s.d(e,{V:()=>i});const i=t=>class extends t{#S=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#S=document.createElement("style"),this.#S.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#S):this.#S.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)}}},37821:(t,e,s)=>{s.d(e,{E8:()=>i,Mk:()=>n,q$:()=>r});const i=(t,e)=>{const s=document.createElement("slot");return s.setAttribute("name",t),s.setAttribute("slot",e),s},r=(t,e,s)=>{const i=document.createElement("input");return i.setAttribute("slot",t),i.setAttribute("type",e),i.setAttribute("data-hidden-input","true"),i.setAttribute("autocomplete",s),i},n=(t,e,s)=>{setTimeout((()=>{const i=getComputedStyle(t),r=i.getPropertyValue("height"),n=i.getPropertyValue("padding-left"),a=i.getPropertyValue("padding-right"),o=i.getPropertyValue("font-size"),l=i.getPropertyValue("font-family"),u=i.getPropertyValue("letter-spacing"),h=i.getPropertyValue("caret-color"),c=((t,e)=>{const s=t.value;t.value="_";const i=e.getPropertyValue("color");return"_"===t.value&&(t.value=s),i})(t,i);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",r],["left",n],["right",a],["font-size",o],["font-family",l],["letter-spacing",u],["caret-color",h],["color",c]].forEach((([t,s])=>e.style.setProperty(t,s,"important"))),"floating"===s){const t=i.getPropertyValue("margin-bottom");e.style.setProperty("margin-bottom",t,"important")}const d=i.getPropertyValue("width");e.style.setProperty("width",`calc(${d} - ${n} - ${a}`,"important")}),0)}},64557:(t,e,s)=>{s.d(e,{R:()=>n});var i=s(14944),r=s(37821);const n=({inputType:t,autocompleteType:e,includeAttrs:s=[],noBlurDispatch:n=!1})=>a=>class extends a{#T=[];get isExternalInput(){return"true"===this.getAttribute("external-input")}createExternalInput(){if(!this.isExternalInput)return null;const e=this.baseElement.querySelector("input");e.setAttribute("tabindex","-1");const n=(0,r.E8)("external-input","suffix");return this.baseElement.appendChild(n),this.externalInput=(0,r.q$)("external-input",t,this.getAutocompleteType()),setTimeout((()=>{(0,r.Mk)(e,this.externalInput,this.getAttribute("label-type"))})),this.forwardInputValue(e,this.externalInput),(0,i.Gh)(e,this.externalInput,{includeAttrs:s}),this.baseElement.querySelector("input").addEventListener("focusout",(t=>t.stopImmediatePropagation()),!0),this.handleFocusEvents(),this.handleBlurEvents(),this.handlelInputEvents(this.externalInput),this.appendChild(this.externalInput),this.externalInput}clearBlurTimers(){this.#T.forEach((t=>clearTimeout(t))),this.#T.length=0}dispatchBlur(){return setTimeout((()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0})),this.removeAttribute("focused")}))}handleFocusEvents(){this.baseElement.addEventListener("focus",(()=>{this.externalInput.focus(),this.clearBlurTimers()})),this.externalInput.addEventListener("focus",(()=>{this.clearBlurTimers(),setTimeout((()=>this.baseElement.setAttribute("focused","true")))}))}handleBlurEvents(){this.baseElement.addEventListener("blur",(t=>{t.stopImmediatePropagation(),n||this.#T.push(this.dispatchBlur())}),!0),this.externalInput.addEventListener("blur",(t=>{t.stopImmediatePropagation(),this.#T.push(this.dispatchBlur())}),!0)}handlelInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")}))}getAutocompleteType(){return this.getAttribute("autocomplete")||e}forwardInputValue(t,e){const s=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(t,"value",{...s,set(t){s.set.call(this,t),e.value=t},configurable:!0})}}},19388:(t,e,s)=>{s.d(e,{m:()=>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})}))}}},94619:(t,e,s)=>{s.d(e,{OZ:()=>a.O,RF:()=>i.R,RV:()=>p.R,VO:()=>r.V,XX:()=>u.X,_$:()=>c._,jd:()=>m.j,mA:()=>h.m,mZ:()=>l.m,tQ:()=>o.t,tz:()=>n.t,yF:()=>d.y});var i=s(62650),r=s(65927),n=s(40187),a=s(46502),o=s(38339),l=s(19388),u=s(69699),h=s(45748),c=s(37122),d=s(6842),m=s(88629),p=s(64557)},88629:(t,e,s)=>{s.d(e,{j:()=>r});var i=s(83929);const r=t=>class extends t{init(){this.#w(),super.init?.()}#w(){["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.r.call(this,"blur"),i.r.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.r.call(this,"focus"),i.r.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}))}}},69699:(t,e,s)=>{s.d(e,{X:()=>a}),s(10650);const i=["required","pattern"],r="data-errormessage-pattern-mismatch",n=Symbol("validationTarget"),a=t=>class extends t{#L=n;static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#V;get internals(){return this.#V}set internals(t){this.#V=t}constructor(){super(),this.#V=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.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:a,tooLong:o,rangeOverflow:l,rangeUnderflow:u,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||n||h:return this.getAttribute(r)||this.defaultErrorMsgPatternMismatch;case i:return this.getAttribute("data-errormessage-type-mismatch")||this.getAttribute(r)||this.defaultErrorMsgTypeMismatch;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case o:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.getAttribute("data-errormessage-pattern-range-underflow")||this.defaultErrorMsgRangeUnderflow;case l:return this.getAttribute("data-errormessage-pattern-range-overflow")||this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#C(){const t=this.isReadOnly?{}:this.getValidity();this.#V.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#V.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#V.validity.valid}reportValidity(){return this.#V.reportValidity()}get validity(){return this.#V.validity}get validationTarget(){return this.#L===n?this.inputElement:this.#L}set validationTarget(t){this.#L=t}setCustomValidity(t){t?this.#V.setValidity({customError:!0},t,this.validationTarget):(this.#V.setValidity({}),this.#C())}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.#V.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#C()}init(){super.init?.(),this.addEventListener("change",this.#C),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#C),setTimeout((()=>this.#C()))}}},6842:(t,e,s)=>{s.d(e,{y:()=>n});var i=s(14944);const r=["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"],n=t=>class extends t{init(){super.init?.(),(0,i.mx)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>r.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?`)}))),{})}}},45748:(t,e,s)=>{s.d(e,{m:()=>u});var i=s(25521),r=s(7138),n=s(14944),a=s(62650),o=s(46155);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()}))},u=({name:t,selector:e,mappings:s={},forward:{attributes:u=[],include:h=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.R)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SR)((0,r.GL)(c.componentName,"_"+d),s)}}#I;constructor(){const t=l((async t=>{const s=(t.shadowRoot||t).querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.WJ+d,baseSelector:":host"}),this.#I=t(this).then((t=>t.host))}async#$(){const t=await this.#I;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#I;(0,n.EA)(this,t,{[h?"includeAttrs":"excludeAttrs"]:u}),this.#$()}}}},46502:(t,e,s)=>{s.d(e,{O:()=>c});var i=s(7138),r=s(14944),n=s(83929),a=s(62650),o=s(69699);const l=["invalid","required"],u=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},h=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:i=[],proxyParentValidation:a=!1})=>h=>class extends((0,o.X)(h)){static get observedAttributes(){return[...h.observedAttributes||[],...l]}#P;#s=n.r.bind(this,"change");constructor(){super(),this.#P=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#P&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#P)return this.#P;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#P=u(t)||u(e),this.#P}set inputElement(t){this.#P=t}getValidity(){return this.inputElement?.validity||{}}#R(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#R(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",(t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})),i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(s)?s:[s]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#R()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#R()})),t.forEach((t=>{const s=this.querySelector('input[slot="external-input"]')||null,i=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const i=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){i.forEach((e=>{e[s]=t}))},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...i],t)})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.EA)(this,this.inputElement,{includeAttrs:["inputmode"]})})),a){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.Zz)(h(t),(0,a.R)({componentNameOverride:(0,r.xE)("input-wrapper")}))}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4619],{70263:(t,e,s)=>{s.d(e,{q:()=>l});var i=s(7138),r=s(38339),n=s(67259),a=s(19388),o=s(6842);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.Zz)(r.t,a.m,o.y,n.b)(s)}},25521:(t,e,s)=>{s.d(e,{$m:()=>i,IM:()=>n,WJ:()=>a,aE:()=>r});const i="descope",r=3,n="host",a="@"},14944:(t,e,s)=>{s.d(e,{EA:()=>c,Ge:()=>a,Gh:()=>l,Ix:()=>h,mx:()=>n,q:()=>d,xE:()=>u});var i=s(7138),r=s(25521);const n=(t,e,{excludeAttrs:s=[],includeAttrs:i=[]})=>{const r=Array.from(t.attributes).filter((t=>!s.includes(t.name)&&(!i.length||i.includes(t.name)))).map((t=>t.name));e(r),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 r=s[i]||i,n=t.getAttribute(i);null!==n?e.getAttribute(r)!==n&&e.setAttribute(r,n):e.removeAttribute(r)}))},l=(t,e,s)=>{n(t,o(t,e),s),n(e,o(e,t),s)},u=t=>(0,i.GL)(r.$m,t),h=(...t)=>`--${(0,i.GL)(...t)}`,c=(t,e,s={})=>{n(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)}},7138:(t,e,s)=>{s.d(e,{AG:()=>l,GL:()=>r,Tn:()=>o,Zz:()=>a,dk:()=>n,kW:()=>i,wy:()=>u});const i=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),r=(...t)=>i(t.filter((t=>!!t)).join("-")),n=(...t)=>t.filter(Boolean).map(((t,e)=>{return 0===e?t:(s=t).charAt(0).toUpperCase()+s.slice(1);var s})).join(""),a=(...t)=>e=>t.reduceRight(((t,e)=>e(t)),e),o=t=>"function"==typeof t,l=(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},u=t=>t.replace(/([A-Z])/g," $1").trim().split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")},83929:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{r:()=>i})},37122:(t,e,s)=>{s.d(e,{_:()=>r});var i=s(83929);const r=t=>class extends t{#s=i.r.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)}))}}},38339:(t,e,s)=>{s.d(e,{t:()=>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()}}},67259:(t,e,s)=>{s.d(e,{b:()=>i});const i=t=>class extends t{updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}}},40187:(t,e,s)=>{s.d(e,{t:()=>o});var i=s(70263),r=s(7138),n=s(14944),a=s(83929);const o=({componentName:t,wrappedEleName:e,slots:s=[],style:o,excludeAttrsSync:l=[],includeAttrsSync:u=[],includeForwardProps:h=[],delegatesFocus:c=!0})=>{class d extends((0,i.q)({componentName:t,baseSelector:e})){#r=a.r.bind(this,"blur");#n=a.r.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:c}).innerHTML=`\n\t\t\t<style id="create-proxy">${((0,r.Tn)(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.#r()})),this.baseElement.addEventListener("focus",(t=>{this.#n()})),(0,n.q)(this.baseElement,this,h),(0,n.Gh)(this.baseElement,this,{excludeAttrs:l,includeAttrs:u})}}return d}},46155:(t,e,s)=>{s.d(e,{AM:()=>c,SR:()=>h,_r:()=>l});var i=s(7138),r=s(14944);const n=(t,e)=>`var(${t}${e?`, ${e}`:""})`;class a{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 o=(t,e="fallback")=>(0,i.GL)(t,e),l=(t,e,s)=>{const l=new a,u=(t,e)=>{if(!t)return"";if("string"==typeof t)return t;const s=o(e,t?.suffix);return n(s,u(t.fallback,s))};return Object.keys(s).forEach((a=>{const o=((t,e)=>{const s={selector:"",property:(0,i.kW)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(a,s[a]),h=(0,r.Ix)(t,a);o.forEach((({selector:t,property:s,important:r,fallback:a})=>{const o=u(a,h);l.add(((t="",e="")=>(0,i.Tn)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,i.Tn)(s)?s():s,n(h,o)+(r?"!important":""))}))})),l.toString()},u=(t,e,{fallback:s})=>{if(!s)return{};const r=o(e,s.suffix),n=(0,i.dk)(t,s.suffix||"fallback");return{[n]:r,...u(n,r,s)}},h=(t,e)=>Object.keys(e).reduce(((s,i)=>{const n=(0,r.Ix)(t,i);return Object.assign(s,{[i]:n},u(i,n,e[i]))}),{}),c=(t,e)=>Array(e).fill(`.${t}`).join("")},62650:(t,e,s)=>{s.d(e,{R:()=>l});var i=s(25521),r=s(7138),n=s(14944),a=s(6461),o=s(46155);const l=({mappings:t={},componentNameOverride:e=""})=>s=>{const l=e||s.componentName;return class e extends s{static get cssVarList(){return{...s.cssVarList,...(0,o.SR)(l,{...t})}}#a;#o;#l;#u;#h;#c;#d;#m;#p;constructor({getRootElement:t,componentNameSuffix:s="",themeSection:n=i.IM,baseSelector:a}={}){super(),this.#u=s,this.#h=n,this.#d=a??this.baseSelector,this.#p=t,this.#m=Object.keys(e.cssVarList).map((t=>(0,r.GL)("st",s,t)))}get#g(){return a.componentsThemeManager.currentTheme?.[l]||""}#b(){this.#o.innerHTML=this.#g[this.#h]}#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.AM)(l,i.aE);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,n.Ix)(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._r)((0,r.GL)(l,this.#u),this.#d,t),this.#c.prepend(e)}}#x(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.#x(l),this.#A(),this.#E(),this.#v(),(0,n.mx)(this,this.#f.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#l?.()}}}},65927:(t,e,s)=>{s.d(e,{V:()=>i});const i=t=>class extends t{#S=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#S=document.createElement("style"),this.#S.innerText="* { cursor: inherit!important }"}#M(t){t?this.shadowRoot.appendChild(this.#S):this.#S.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)}}},37821:(t,e,s)=>{s.d(e,{E8:()=>i,Mk:()=>n,q$:()=>r});const i=(t,e)=>{const s=document.createElement("slot");return s.setAttribute("name",t),s.setAttribute("slot",e),s},r=(t,e,s)=>{const i=document.createElement("input");return i.setAttribute("slot",t),i.setAttribute("type",e),i.setAttribute("data-hidden-input","true"),i.setAttribute("autocomplete",s),i},n=(t,e,s)=>{setTimeout((()=>{const i=getComputedStyle(t),r=i.getPropertyValue("height"),n=i.getPropertyValue("padding-left"),a=i.getPropertyValue("padding-right"),o=i.getPropertyValue("font-size"),l=i.getPropertyValue("font-family"),u=i.getPropertyValue("letter-spacing"),h=i.getPropertyValue("caret-color"),c=((t,e)=>{const s=t.value;t.value="_";const i=e.getPropertyValue("color");return"_"===t.value&&(t.value=s),i})(t,i);if([["all","unset"],["position","absolute"],["background-color","transparent"],["height",r],["left",n],["right",a],["font-size",o],["font-family",l],["letter-spacing",u],["caret-color",h],["color",c]].forEach((([t,s])=>e.style.setProperty(t,s,"important"))),"floating"===s){const t=i.getPropertyValue("margin-bottom");e.style.setProperty("margin-bottom",t,"important")}const d=i.getPropertyValue("width");e.style.setProperty("width",`calc(${d} - ${n} - ${a}`,"important")}),0)}},64557:(t,e,s)=>{s.d(e,{R:()=>n});var i=s(14944),r=s(37821);const n=({inputType:t,autocompleteType:e,includeAttrs:s=[],noBlurDispatch:n=!1})=>a=>class extends a{#T=[];get isExternalInput(){return"true"===this.getAttribute("external-input")}createExternalInput(){if(!this.isExternalInput)return null;const e=this.baseElement.querySelector("input");e.setAttribute("tabindex","-1");const n=(0,r.E8)("external-input","suffix");return this.baseElement.appendChild(n),this.externalInput=(0,r.q$)("external-input",t,this.getAutocompleteType()),setTimeout((()=>{(0,r.Mk)(e,this.externalInput,this.getAttribute("label-type"))})),this.forwardInputValue(e,this.externalInput),(0,i.Gh)(e,this.externalInput,{includeAttrs:s}),this.baseElement.querySelector("input").addEventListener("focusout",(t=>t.stopImmediatePropagation()),!0),this.handleFocusEvents(),this.handleBlurEvents(),this.handlelInputEvents(this.externalInput),this.appendChild(this.externalInput),this.externalInput}clearBlurTimers(){this.#T.forEach((t=>clearTimeout(t))),this.#T.length=0}dispatchBlur(){return setTimeout((()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0})),this.removeAttribute("focused")}))}handleFocusEvents(){this.baseElement.addEventListener("focus",(()=>{this.externalInput.focus(),this.clearBlurTimers()})),this.externalInput.addEventListener("focus",(()=>{this.clearBlurTimers(),setTimeout((()=>this.baseElement.setAttribute("focused","true")))}))}handleBlurEvents(){this.baseElement.addEventListener("blur",(t=>{t.stopImmediatePropagation(),n||this.#T.push(this.dispatchBlur())}),!0),this.externalInput.addEventListener("blur",(t=>{t.stopImmediatePropagation(),this.#T.push(this.dispatchBlur())}),!0)}handlelInputEvents(t){t.addEventListener("input",(t=>{this.value=t.target.value})),t.addEventListener("input",(t=>{t.target.value?this.setAttribute("has-value","true"):this.removeAttribute("has-value")}))}getAutocompleteType(){return this.getAttribute("autocomplete")||e}forwardInputValue(t,e){const s=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value");Object.defineProperty(t,"value",{...s,set(t){s.set.call(this,t),e.value=t},configurable:!0})}}},19388:(t,e,s)=>{s.d(e,{m:()=>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})}))}}},94619:(t,e,s)=>{s.d(e,{OZ:()=>a.O,RF:()=>i.R,RV:()=>p.R,VO:()=>r.V,XX:()=>u.X,_$:()=>c._,jd:()=>m.j,mA:()=>h.m,mZ:()=>l.m,tQ:()=>o.t,tz:()=>n.t,yF:()=>d.y});var i=s(62650),r=s(65927),n=s(40187),a=s(46502),o=s(38339),l=s(19388),u=s(69699),h=s(45748),c=s(37122),d=s(6842),m=s(88629),p=s(64557)},88629:(t,e,s)=>{s.d(e,{j:()=>r});var i=s(83929);const r=t=>class extends t{init(){this.#w(),super.init?.()}#w(){["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.r.call(this,"blur"),i.r.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(i.r.call(this,"focus"),i.r.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}))}}},69699:(t,e,s)=>{s.d(e,{X:()=>a}),s(10650);const i=["required","pattern"],r="data-errormessage-pattern-mismatch",n=Symbol("validationTarget"),a=t=>class extends t{#L=n;static get observedAttributes(){return[...t.observedAttributes||[],...i]}static get formAssociated(){return!0}#V;get internals(){return this.#V}set internals(t){this.#V=t}constructor(){super(),this.#V=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.`}get defaultErrorMsgTypeMismatch(){return"Please match the requested type."}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:a,tooLong:o,rangeOverflow:l,rangeUnderflow:u,badInput:h,customError:c}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||n||h:return this.getAttribute(r)||this.defaultErrorMsgPatternMismatch;case i:return this.getAttribute("data-errormessage-type-mismatch")||this.getAttribute(r)||this.defaultErrorMsgTypeMismatch;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case o:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case u:return this.getAttribute("data-errormessage-pattern-range-underflow")||this.defaultErrorMsgRangeUnderflow;case l:return this.getAttribute("data-errormessage-pattern-range-overflow")||this.defaultErrorMsgRangeOverflow;case c:return this.validationMessage;default:return""}}#C(){const t=this.isReadOnly?{}:this.getValidity();this.#V.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#V.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#V.validity.valid}reportValidity(){return this.#V.reportValidity()}get validity(){return this.#V.validity}get validationTarget(){return this.#L===n?this.inputElement:this.#L}set validationTarget(t){this.#L=t}setCustomValidity(t){t?this.#V.setValidity({customError:!0},t,this.validationTarget):(this.#V.setValidity({}),this.#C())}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.#V.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),i.includes(t)&&this.#C()}init(){super.init?.(),this.addEventListener("change",this.#C),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#C),setTimeout((()=>this.#C()))}}},6842:(t,e,s)=>{s.d(e,{y:()=>n});var i=s(14944);const r=["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"],n=t=>class extends t{init(){super.init?.(),(0,i.mx)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>r.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?`)}))),{})}}},45748:(t,e,s)=>{s.d(e,{m:()=>u});var i=s(25521),r=s(7138),n=s(14944),a=s(62650),o=s(46155);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()}))},u=({name:t,selector:e,mappings:s={},forward:{attributes:u=[],include:h=!0}={}})=>c=>{const d=t||(t=>t.replace(/[^\w\s]/gi,""))(e),m=(0,a.R)({mappings:s})(c);return class extends m{static get cssVarList(){return{...m.cssVarList,[d]:(0,o.SR)((0,r.GL)(c.componentName,"_"+d),s)}}#I;constructor(){const t=l((async t=>{const s=(t.shadowRoot||t).querySelector(t.baseSelector);return e?(await l((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+d,themeSection:i.WJ+d,baseSelector:":host"}),this.#I=t(this).then((t=>t.host))}async#$(){const t=await this.#I;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#I;(0,n.EA)(this,t,{[h?"includeAttrs":"excludeAttrs"]:u}),this.#$()}}}},46502:(t,e,s)=>{s.d(e,{O:()=>c});var i=s(7138),r=s(14944),n=s(83929),a=s(62650),o=s(69699);const l=["invalid","required"],u=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e?.localName)return e},h=({proxyProps:t=[],useProxyTargets:e=!1,inputEvent:s="input",triggerValidationEvents:i=[],proxyParentValidation:a=!1})=>h=>class extends((0,o.X)(h)){static get observedAttributes(){return[...h.observedAttributes||[],...l]}#k;#s=n.r.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=u(t)||u(e),this.#k}set inputElement(t){this.#k=t}getValidity(){return this.inputElement?.validity||{}}#P(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#P(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},this.baseElement.addEventListener("input",(t=>{t.composed||this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})),i.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(s)?s:[s]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#P()}))})),this.baseElement.addEventListener("change",(()=>{this.#s()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#P()})),t.forEach((t=>{const s=this.querySelector('input[slot="external-input"]')||null,i=e?[this.baseElement,s].filter(Boolean):[];((t,e,s)=>{const i=Array.isArray(e)?e:[e];Object.defineProperty(t,s,{set(t){i.forEach((e=>{e[s]=t}))},get:()=>e[0][s],configurable:!0})})(this,[this.inputElement,...i],t)})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.EA)(this,this.inputElement,{includeAttrs:["inputmode"]})})),a){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.Zz)(h(t),(0,a.R)({componentNameOverride:(0,r.xE)("input-wrapper")}))}}]);