@descope/web-components-ui 1.21.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8712,8822],{85759:(e,t,s)=>{s.r(t),s.d(t,{AddressFieldClass:()=>f,componentName:()=>v}),s(40200),s(87151);var r=s(30064),i=s(17166),o=s(18823),a=s(18366);class n extends((0,r.h)()){#e=null;#t=null;constructor(e){super(e),this.#t=this.#s()}getRequiredParams(){return["public-api-key"]}getOptionalParams(){return[{key:"includedPrimaryTypes",attribute:"address-types"},{key:"language",attribute:"address-language"},{key:"region",attribute:"address-region"}]}async#s(){const e=this.getAttribute("public-api-key");if(!this.#e&&e)try{(e=>{var t,s,r,i,o,a,n,l,u,c,d,m,h;window.google?.maps||(t={key:e},o="The Google Maps JavaScript API",a="google",n="importLibrary",l="__ib__",u=document,c=window,d=(c=c[a]||(c[a]={})).maps||(c.maps={}),m=new Set,h=new URLSearchParams,d[n]?console.warn(o+" only loads once. Ignoring:",t):d[n]=(e,...c)=>m.add(e)&&(s||(s=new Promise((async(e,n)=>{for(i in await(r=u.createElement("script")),h.set("libraries",[...m]+""),t)h.set(i.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),t[i]);h.set("callback",a+".maps."+l),r.src=`https://maps.${a}apis.com/maps/api/js?`+h,d[l]=e,r.onerror=()=>s=n(Error(o+" could not load.")),r.nonce=u.querySelector("script[nonce]")?.nonce||"",u.head.append(r)})))).then((()=>d[n](e,...c))))})(e);const{AutocompleteSuggestion:t}=await google.maps.importLibrary("places");this.#e=t}catch(e){throw console.error("Failed to initialize Google Maps Autocomplete service:",e),e}}async _fetchResults(e){if(!e?.trim())return{results:[]};try{await this.#t;const t={input:e};this.getOptionalParams().forEach((({attribute:e,key:s,defaultValue:r})=>{const i=this.getAttribute(e)||r;i&&(t[s]="includedPrimaryTypes"===s?i.split(",").map((e=>e.trim())).filter(Boolean):i)}));const{suggestions:s}=await this.#e.fetchAutocompleteSuggestions(t);return this.#r(s)}catch(e){return console.error("Google Maps Places Autocomplete failed:",e),{results:[],error:r.OR.FETCH_RESULTS_ERROR}}}#r(e){return e?.length?{results:e.map((e=>{const t=e.placePrediction;return{id:t.placeId,label:t.text.text,value:t.text.text}}))}:{results:[]}}}class l extends((0,r.h)()){getRequiredParams(){return["public-api-key"]}getOptionalParams(){return[{key:"layers",attribute:"address-types"},{key:"limit",attribute:"address-limit"},{key:"lang",attribute:"address-language"},{key:"countryCode",attribute:"address-region"}]}async _fetchResults(e){if(!e?.trim())return{results:[]};const t=this.getAttribute("public-api-key"),s=new URLSearchParams({query:e.trim()});this.getOptionalParams().forEach((({attribute:e,key:t,defaultValue:r})=>{const i=this.getAttribute(e)||r;i&&("layers"===t||"countryCode"===t?s.append(t,i.split(",").map((e=>e.trim())).filter(Boolean).join(",")):s.append(t,i))}));try{const e=await fetch(`https://api.radar.io/v1/search/autocomplete?${s.toString()}`,{headers:{Authorization:t}});if(!e.ok)throw new Error(`Radar API returned ${e.status}`);const r=await e.json();return this.#r(r)}catch(e){return console.error("Radar Places Autocomplete failed:",e),{results:[],error:r.OR.FETCH_RESULTS_ERROR}}}#r(e){return e?.addresses?.length?{results:e.addresses.map((e=>({label:e.formattedAddress,value:e.formattedAddress})))}:{results:[]}}}const u=(0,i.xE)("address-field-internal"),c="google-maps-places",d="radar",m={[c]:n,[d]:l},h=(0,r.yc)({componentName:u,baseSelector:""}),p=["public-api-key"],g=[...p],b=(0,a.Zz)((0,o.Jm)({connectorClasses:m}))(class extends h{static get observedAttributes(){return[].concat(h.observedAttributes||[],g)}get errorMsgValueMissing(){return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing}constructor(){super(),this.innerHTML="\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n </style>\n <div>\n <descope-autocomplete-field></descope-autocomplete-field>\n </div>\n ",this.autocompleteField=this.querySelector("descope-autocomplete-field")}get value(){return this.autocompleteField.value}set value(e){this.autocompleteField.value=e}focus(){this.autocompleteField.focus()}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.autocompleteField.focus()})),super.init?.(),this.initAutocomplete()}initAutocomplete(){(0,i.EA)(this,this.autocompleteField,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","error-message","default-value","data-errormessage-value-missing","st-host-direction","allow-custom-value","min-search-length","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),(0,i.Gh)(this,this.autocompleteField,{includeAttrs:["invalid"]}),this.autocompleteField.fetchResults=this.fetchConnectorResults.bind(this)}attributeChangedCallback(e,t,s){super.attributeChangedCallback?.(e,t,s),t!==s&&p.includes(e)&&this.initializeConnector()}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}});customElements.define(u,b),s(74259);const v=(0,i.xE)("address-field"),{host:y}={host:{selector:()=>":host"}},f=(0,a.Zz)((0,o.RF)({componentNameOverride:(0,i.xE)("input-wrapper")}),(0,o.RF)({mappings:{hostWidth:{...y,property:"width"},hostDirection:{...y,property:"direction"}}}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),o.tQ,(e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout((()=>{this.inputElement.value=this.defaultValue}))}set connectorClasses(e){this.inputElement.connectorClasses=e}get connectorClasses(){return this.inputElement.connectorClasses}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${u}\n tabindex="-1"\n ></${u}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(u),(0,i.EA)(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding","connector-template","public-api-key","address-types","address-language","address-region","address-limit"]}),(0,i.Gh)(this,this.inputElement,{includeAttrs:["invalid"]}),this.setDefaultValue()}}))((0,o.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n",excludeAttrsSync:["tabindex","error-message","label"],componentName:v}));customElements.define(v,f)},74259:(e,t,s)=>{s.d(t,{F:()=>c,T:()=>l});var r=s(18823),i=s(17166),o=s(18366),a=s(44976),n=s(50792);const l=(0,i.xE)("autocomplete-field"),{host:u}={host:{selector:()=>":host"}},c=(0,o.Zz)((0,r.RF)({componentNameOverride:(0,i.xE)("input-wrapper")}),(0,r.RF)({mappings:{hostWidth:{...u,property:"width"},hostDirection:{...u,property:"direction"},fontSize:{...u},checkmarkDisplay:{selector:a.C.componentName,property:a.C.cssVarList.overlayCheckmarkDisplay},itemPaddingInlineStart:{selector:a.C.componentName,property:a.C.cssVarList.overlayItemPaddingInlineStart},itemPaddingInlineEnd:{selector:a.C.componentName,property:a.C.cssVarList.overlayItemPaddingInlineEnd},selectedItemBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlaySelectedItemBackground},selectedItemHoverBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlaySelectedItemHoverBackground},selectedItemFocusBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlaySelectedItemFocusBackground},itemHoverBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlayItemHoverBackground}}}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),r.tQ,(e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout((()=>{this.inputElement.value=this.defaultValue}))}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${n.T}\n tabindex="-1"\n ></${n.T}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(n.T),(0,i.EA)(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),(0,i.Gh)(this,this.inputElement,{includeAttrs:["invalid"]}),this.inputElement.fetchResults=this.fetchResults,this.setDefaultValue()}set fetchResults(e){this.inputElement.fetchResults=e}}))((0,r.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n ",excludeAttrsSync:["tabindex","error-message","label"],componentName:l}))},50792:(e,t,s)=>{s.d(t,{A:()=>c,T:()=>a});var r=s(30064),i=s(17166),o=s(18366);const a=(0,i.xE)("autocomplete-field-internal"),n=(0,r.yc)({componentName:a,baseSelector:""}),l=[],u="DESCOPE_INVALID_OPTION",c=class extends n{static get observedAttributes(){return[].concat(n.observedAttributes||[],l)}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get minSearchLength(){return this.getAttribute("min-search-length")||3}get noResultsFoundMessage(){return this.getAttribute("no-results-message")||"No results found"}get errorFetchingResultsMessage(){return this.getAttribute("error-fetching-results-message")||"An error occurred fetching results"}constructor(){super(),this.innerHTML='\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n </style>\n <div class="autocomplete-field">\n <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>\n </div>\n ',this.comboBox=this.querySelector("descope-combo-box")}get value(){return this.comboBox.value}set value(e){this.allowCustomValue?this.comboBox.value=e:(this.comboBox.data=[{label:e,value:e}],setTimeout((()=>{this.comboBox.value=e})))}get defaultValue(){return this.getAttribute("default-value")}async#i(e){const{results:t,error:s}=await this.fetchResults(e);return s?{error:s}:{results:t}}#o(e,t,s,r){return`<span data-name="${s}" data-id="${t}" ${r?'disabled="true"':""}>${e||s}</span>`}#a(){this.comboBox.renderer=(e,t,s)=>{"true"===s.item.getAttribute("disabled")?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),e.innerHTML=s.item.outerHTML},this.comboBox.renderItem=({displayName:e,value:t,label:s,disabled:r})=>this.#o(e,t,s,r)}focus(){this.comboBox.focus()}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.comboBox.focus()})),super.init?.(),this.#n(),(0,i.Gh)(this,this.comboBox,{includeAttrs:["invalid"]})}#n(){this.debouncedSearch=(0,o.g5)((async e=>{try{const{results:t,error:s}=await this.#i(e);return{results:t,error:s,value:e}}catch(t){return{error:t,value:e}}}),250),(0,i.EA)(this,this.comboBox,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","invalid","error-message","data-errormessage-value-missing","st-host-direction","allow-custom-value","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),this.comboBox.addEventListener("filter-changed",this.onSearch.bind(this)),this.#a()}#l(){return[{label:this.noResultsFoundMessage,value:u,disabled:!0}]}#u(){return[{label:this.errorFetchingResultsMessage,value:u,disabled:!0}]}async onSearch(e){const t=e.detail.value;if(!t||t.length<this.minSearchLength)return;this.comboBox.loading=!0,this.comboBox.setAttribute("opened","true");const s=await this.debouncedSearch(t);s&&s.value===t&&(this.comboBox.loading=!1,s.error?this.comboBox.data=this.#u():0===s.results?.length?this.comboBox.data=this.#l():this.comboBox.data=s.results||[])}fetchResults(e){return console.warn("fetchResults","needs to be implemented"),{results:[],error:void 0}}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}}},87151:(e,t,s)=>{s.r(t),s.d(t,{AutocompleteFieldClass:()=>i.F,componentName:()=>i.T}),s(40200),s(11738);var r=s(50792);customElements.define(r.T,r.A);var i=s(74259);customElements.define(i.T,i.F)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8712],{98412:(e,t,s)=>{s.r(t),s.d(t,{AutocompleteFieldClass:()=>p,componentName:()=>m}),s(40200),s(11738);var r=s(30064),o=s(17166),n=s(18366);const a=(0,o.xE)("autocomplete-field-internal"),i=(0,r.yc)({componentName:a,baseSelector:""}),l=[],c="DESCOPE_INVALID_OPTION";customElements.define(a,class extends i{static get observedAttributes(){return[].concat(i.observedAttributes||[],l)}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get minSearchLength(){return this.getAttribute("min-search-length")||3}get noResultsFoundMessage(){return this.getAttribute("no-results-message")||"No results found"}get errorFetchingResultsMessage(){return this.getAttribute("error-fetching-results-message")||"An error occurred fetching results"}constructor(){super(),this.innerHTML='\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n </style>\n <div class="autocomplete-field">\n <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>\n </div>\n ',this.comboBox=this.querySelector("descope-combo-box")}get value(){return this.comboBox.value}set value(e){this.allowCustomValue?this.comboBox.value=e:(this.comboBox.data=[{label:e,value:e}],setTimeout((()=>{this.comboBox.value=e})))}get defaultValue(){return this.getAttribute("default-value")}async#e(e){const{results:t,error:s}=await this.fetchResults(e);return s?{error:s}:{results:t}}#t(e,t,s,r){return`<span data-name="${s}" data-id="${t}" ${r?'disabled="true"':""}>${e||s}</span>`}#s(){this.comboBox.renderer=(e,t,s)=>{"true"===s.item.getAttribute("disabled")?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),e.innerHTML=s.item.outerHTML},this.comboBox.renderItem=({displayName:e,value:t,label:s,disabled:r})=>this.#t(e,t,s,r)}focus(){this.comboBox.focus()}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.comboBox.focus()})),super.init?.(),this.#r(),(0,o.Gh)(this,this.comboBox,{includeAttrs:["invalid"]})}#r(){this.debouncedSearch=(0,n.g5)((async e=>{try{const{results:t,error:s}=await this.#e(e);return{results:t,error:s,value:e}}catch(t){return{error:t,value:e}}}),250),(0,o.EA)(this,this.comboBox,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","invalid","error-message","data-errormessage-value-missing","st-host-direction","allow-custom-value","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),this.comboBox.addEventListener("filter-changed",this.onSearch.bind(this)),this.#s()}#o(){return[{label:this.noResultsFoundMessage,value:c,disabled:!0}]}#n(){return[{label:this.errorFetchingResultsMessage,value:c,disabled:!0}]}async onSearch(e){const t=e.detail.value;if(!t||t.length<this.minSearchLength)return;this.comboBox.loading=!0,this.comboBox.setAttribute("opened","true");const s=await this.debouncedSearch(t);s&&s.value===t&&(this.comboBox.loading=!1,s.error?this.comboBox.data=this.#n():0===s.results?.length?this.comboBox.data=this.#o():this.comboBox.data=s.results||[])}fetchResults(e){return console.warn("fetchResults","needs to be implemented"),{results:[],error:void 0}}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}});var u=s(18823),d=s(44976);const m=(0,o.xE)("autocomplete-field"),{host:h}={host:{selector:()=>":host"}},p=(0,n.Zz)((0,u.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,u.RF)({mappings:{hostWidth:{...h,property:"width"},hostDirection:{...h,property:"direction"},fontSize:{...h},checkmarkDisplay:{selector:d.C.componentName,property:d.C.cssVarList.overlayCheckmarkDisplay},itemPaddingInlineStart:{selector:d.C.componentName,property:d.C.cssVarList.overlayItemPaddingInlineStart},itemPaddingInlineEnd:{selector:d.C.componentName,property:d.C.cssVarList.overlayItemPaddingInlineEnd},selectedItemBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlaySelectedItemBackground},selectedItemHoverBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlaySelectedItemHoverBackground},selectedItemFocusBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlaySelectedItemFocusBackground},itemHoverBackground:{selector:d.C.componentName,property:d.C.cssVarList.overlayItemHoverBackground},errorMessageIcon:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconSize},errorMessageIconPadding:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconPadding},errorMessageIconRepeat:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconRepeat},errorMessageIconPosition:{selector:()=>d.C.componentName,property:d.C.cssVarList.errorMessageIconPosition}}}),u.VO,(0,u.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),u.tQ,(e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout((()=>{this.inputElement.value=this.defaultValue}))}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${a}\n tabindex="-1"\n ></${a}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a),(0,o.EA)(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),(0,o.Gh)(this,this.inputElement,{includeAttrs:["invalid"]}),this.inputElement.fetchResults=this.fetchResults,this.setDefaultValue()}set fetchResults(e){this.inputElement.fetchResults=e}}))((0,u.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n ",excludeAttrsSync:["tabindex","error-message","label"],componentName:m}));customElements.define(m,p)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8712],{74259:(e,t,s)=>{s.d(t,{F:()=>d,T:()=>l});var r=s(18823),o=s(17166),i=s(18366),a=s(44976),n=s(50792);const l=(0,o.xE)("autocomplete-field"),{host:u}={host:{selector:()=>":host"}},d=(0,i.Zz)((0,r.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,r.RF)({mappings:{hostWidth:{...u,property:"width"},hostDirection:{...u,property:"direction"},fontSize:{...u},checkmarkDisplay:{selector:a.C.componentName,property:a.C.cssVarList.overlayCheckmarkDisplay},itemPaddingInlineStart:{selector:a.C.componentName,property:a.C.cssVarList.overlayItemPaddingInlineStart},itemPaddingInlineEnd:{selector:a.C.componentName,property:a.C.cssVarList.overlayItemPaddingInlineEnd},selectedItemBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlaySelectedItemBackground},selectedItemHoverBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlaySelectedItemHoverBackground},selectedItemFocusBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlaySelectedItemFocusBackground},itemHoverBackground:{selector:a.C.componentName,property:a.C.cssVarList.overlayItemHoverBackground}}}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"],inputEvent:"input",proxyParentValidation:!0}),r.tQ,(e=>class extends e{get defaultValue(){return this.getAttribute("default-value")}setDefaultValue(){this.defaultValue&&setTimeout((()=>{this.inputElement.value=this.defaultValue}))}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n <${n.T}\n tabindex="-1"\n ></${n.T}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(n.T),(0,o.EA)(this,this.inputElement,{includeAttrs:["size","bordered","label","required","label-type","placeholder","full-width","allow-custom-value","min-search-length","no-results-message","error-fetching-results-message","data-errormessage-value-missing","invalid","error-message","readonly","disabled","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),(0,o.Gh)(this,this.inputElement,{includeAttrs:["invalid"]}),this.inputElement.fetchResults=this.fetchResults,this.setDefaultValue()}set fetchResults(e){this.inputElement.fetchResults=e}}))((0,r.tz)({slots:[],wrappedEleName:"vaadin-custom-field",style:()=>"\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n ",excludeAttrsSync:["tabindex","error-message","label"],componentName:l}))},50792:(e,t,s)=>{s.d(t,{A:()=>d,T:()=>a});var r=s(30064),o=s(17166),i=s(18366);const a=(0,o.xE)("autocomplete-field-internal"),n=(0,r.yc)({componentName:a,baseSelector:""}),l=[],u="DESCOPE_INVALID_OPTION",d=class extends n{static get observedAttributes(){return[].concat(n.observedAttributes||[],l)}get allowCustomValue(){return"true"===this.getAttribute("allow-custom-value")}get minSearchLength(){return this.getAttribute("min-search-length")||3}get noResultsFoundMessage(){return this.getAttribute("no-results-message")||"No results found"}get errorFetchingResultsMessage(){return this.getAttribute("error-fetching-results-message")||"An error occurred fetching results"}constructor(){super(),this.innerHTML='\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n </style>\n <div class="autocomplete-field">\n <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>\n </div>\n ',this.comboBox=this.querySelector("descope-combo-box")}get value(){return this.comboBox.value}set value(e){this.allowCustomValue?this.comboBox.value=e:(this.comboBox.data=[{label:e,value:e}],setTimeout((()=>{this.comboBox.value=e})))}get defaultValue(){return this.getAttribute("default-value")}async#e(e){const{results:t,error:s}=await this.fetchResults(e);return s?{error:s}:{results:t}}#t(e,t,s,r){return`<span data-name="${s}" data-id="${t}" ${r?'disabled="true"':""}>${e||s}</span>`}#s(){this.comboBox.renderer=(e,t,s)=>{"true"===s.item.getAttribute("disabled")?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),e.innerHTML=s.item.outerHTML},this.comboBox.renderItem=({displayName:e,value:t,label:s,disabled:r})=>this.#t(e,t,s,r)}focus(){this.comboBox.focus()}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.comboBox.focus()})),super.init?.(),this.#r(),(0,o.Gh)(this,this.comboBox,{includeAttrs:["invalid"]})}#r(){this.debouncedSearch=(0,i.g5)((async e=>{try{const{results:t,error:s}=await this.#e(e);return{results:t,error:s,value:e}}catch(t){return{error:t,value:e}}}),250),(0,o.EA)(this,this.comboBox,{includeAttrs:["size","bordered","label","label-type","placeholder","disabled","readonly","required","full-width","helper-text","invalid","error-message","data-errormessage-value-missing","st-host-direction","allow-custom-value","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"]}),this.comboBox.addEventListener("filter-changed",this.onSearch.bind(this)),this.#s()}#o(){return[{label:this.noResultsFoundMessage,value:u,disabled:!0}]}#i(){return[{label:this.errorFetchingResultsMessage,value:u,disabled:!0}]}async onSearch(e){const t=e.detail.value;if(!t||t.length<this.minSearchLength)return;this.comboBox.loading=!0,this.comboBox.setAttribute("opened","true");const s=await this.debouncedSearch(t);s&&s.value===t&&(this.comboBox.loading=!1,s.error?this.comboBox.data=this.#i():0===s.results?.length?this.comboBox.data=this.#o():this.comboBox.data=s.results||[])}fetchResults(e){return console.warn("fetchResults","needs to be implemented"),{results:[],error:void 0}}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{valid:!0}}}},87151:(e,t,s)=>{s.r(t),s.d(t,{AutocompleteFieldClass:()=>o.F,componentName:()=>o.T}),s(40200),s(11738);var r=s(50792);customElements.define(r.T,r.A);var o=s(74259);customElements.define(o.T,o.F)}}]);
package/dist/umd/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DescopeUI=t():e.DescopeUI=t()}(self,(()=>(()=>{var e,t,n,r={62051:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=a||d||Function("return this")(),u=Object.prototype.toString,l=Math.max,f=Math.min,h=function(){return p.Date.now()};function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,s,c,a,d=0,p=!1,u=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function j(t){var n=r,i=o;return r=o=void 0,d=t,s=e.apply(i,n)}function v(e){var n=e-a;return void 0===a||n>=t||n<0||u&&e-d>=i}function x(){var e=h();if(v(e))return y(e);c=setTimeout(x,function(e){var n=t-(e-a);return u?f(n,i-(e-d)):n}(e))}function y(e){return c=void 0,m&&r?j(e):(r=o=void 0,s)}function _(){var e=h(),n=v(e);if(r=arguments,o=this,a=e,n){if(void 0===c)return function(e){return d=e,c=setTimeout(x,t),p?j(e):s}(a);if(u)return c=setTimeout(x,t),j(a)}return void 0===c&&(c=setTimeout(x,t)),s}return t=g(t)||0,b(n)&&(p=!!n.leading,i=(u="maxWait"in n)?l(g(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),_.cancel=function(){void 0!==c&&clearTimeout(c),d=0,r=a=o=c=void 0},_.flush=function(){return void 0===c?s:y(h())},_}},2816:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[i]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p[s]=p["[object Map]"]=p["[object Number]"]=p[c]=p["[object RegExp]"]=p["[object Set]"]=p["[object String]"]=p["[object WeakMap]"]=!1;var u,l,f,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,g=h||b||Function("return this")(),m=t&&!t.nodeType&&t,j=m&&e&&!e.nodeType&&e,v=j&&j.exports===m,x=v&&h.process,y=function(){try{return j&&j.require&&j.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),_=y&&y.isTypedArray,w=Array.prototype,O=Function.prototype,$=Object.prototype,A=g["__core-js_shared__"],T=O.toString,k=$.hasOwnProperty,E=(u=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",S=$.toString,N=T.call(Object),z=RegExp("^"+T.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=v?g.Buffer:void 0,M=g.Symbol,C=g.Uint8Array,I=(P&&P.allocUnsafe,l=Object.getPrototypeOf,f=Object,function(e){return l(f(e))}),L=Object.create,U=$.propertyIsEnumerable,W=w.splice,q=M?M.toStringTag:void 0,F=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),D=P?P.isBuffer:void 0,G=Math.max,R=Date.now,B=ce(g,"Map"),V=ce(Object,"create"),J=function(){function e(){}return function(t){if(!ve(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function H(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new K(e);this.size=t.size}function X(e,t,n){(void 0!==n&&!le(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Y(e,t,n){var r=e[t];k.call(e,t)&&le(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(le(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&F?F(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Z.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(V){var n=t[e];return n===r?void 0:n}return k.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:k.call(t,e)},Z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=V&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():W.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},H.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(B||K),string:new Z}},H.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return se(this,e).get(e)},H.prototype.has=function(e){return se(this,e).has(e)},H.prototype.set=function(e,t){var n=se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new K,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!B||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=k.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var o=S.call(e);return r&&(t?e[q]=n:delete e[q]),o}(e):function(e){return S.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var c=i[++r];if(!1===t(o[c],c,o))break}}(t,(function(i,s){if(o||(o=new Q),ve(i))!function(e,t,n,r,o,i,s){var a=pe(e,n),d=pe(t,n),p=s.get(d);if(p)X(e,n,p);else{var u,l,f,h,b,g=i?i(a,d,n+"",e,t,s):void 0,m=void 0===g;if(m){var j=he(d),v=!j&&ge(d),x=!j&&!v&&ye(d);g=d,j||v||x?he(a)?g=a:xe(b=a)&&be(b)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):v?(m=!1,g=function(e){return e.slice()}(d)):x?(m=!1,h=new(f=(u=d).buffer).constructor(f.byteLength),new C(h).set(new C(f)),l=h,g=new u.constructor(l,u.byteOffset,u.length)):g=[]:function(e){if(!xe(e)||ne(e)!=c)return!1;var t=I(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&T.call(n)==N}(d)||fe(d)?(g=a,fe(a)?g=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],c=void 0;void 0===c&&(c=e[s]),r?te(n,s,c):Y(n,s,c)}return n}(e,_e(e))}(a):ve(a)&&!me(a)||(g=function(e){return"function"!=typeof e.constructor||de(e)?{}:J(I(e))}(d))):m=!1}m&&(s.set(d,g),o(g,d,r,i,s),s.delete(d)),X(e,n,g)}}(e,t,s,n,oe,r,o);else{var a=r?r(pe(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),X(e,s,a)}}),_e)}var ie=F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:$e;function se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ve(e)||function(e){return!!E&&E in e}(e))&&(me(e)?z:a).test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ae(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function pe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=R(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function le(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return xe(e)&&k.call(e,"callee")&&!U.call(e,"callee")},he=Array.isArray;function be(e){return null!=e&&je(e.length)&&!me(e)}var ge=D||function(){return!1};function me(e){if(!ve(e))return!1;var t=ne(e);return t==s||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var ye=_?function(e){return function(t){return e(t)}}(_):function(e){return xe(e)&&je(e.length)&&!!p[ne(e)]};function _e(e){return be(e)?function(e,t){var n=he(e),r=!n&&fe(e),o=!n&&!r&&ge(e),i=!n&&!r&&!o&&ye(e),s=n||r||o||i,c=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=c.length;for(var d in e)!t&&!k.call(e,d)||s&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ae(d,a))||c.push(d);return c}(e,!0):function(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}(e)}var we,Oe=(we=function(e,t,n){oe(e,t,n)},function(e,t){return ue(function(e,t,n){return t=G(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=G(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}(e,t,$e),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=we.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ae(t,n.length):"string"==r&&t in n)&&le(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&we(e,s,n)}return e})));function $e(e){return e}e.exports=Oe},17166:(e,t,n)=>{"use strict";n.d(t,{EA:()=>u,Ge:()=>s,Gh:()=>a,Ix:()=>p,mx:()=>i,q:()=>l,xE:()=>d});var r=n(18366),o=n(75777);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,u=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},l=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)}},75777:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,aE:()=>o});const r="descope",o=3,i="host"},75346:(e,t,n)=>{},38843:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=new class{static mountOnPropName="DescopeThemeManager";#e={};#t="light";#n=new Set;#r(){this.#n.forEach((e=>e?.()))}get currentThemeName(){return this.#t}set currentThemeName(e){this.#t=e,this.#r()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#n.add(e),()=>{this.#n.delete(e)}}set themes(e){this.#e=e,this.#r()}get hasThemes(){return!!Object.keys(this.#e).length}}},49151:(e,t,n)=>{"use strict";n.d(t,{$J:()=>o.$J,I4:()=>o.I4,Kl:()=>o.Kl,br:()=>r.b,cy:()=>o.cy,fu:()=>o.fu,lS:()=>o.lS}),n(2816),n(18366),n(17166);var r=n(38843),o=(n(75346),n(34691))},34691:(e,t,n)=>{"use strict";n.d(t,{$J:()=>c,I4:()=>o,Kl:()=>a,cy:()=>r,fu:()=>s,lS:()=>i});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,i=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,a=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},71473:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(62051),o=n.n(r);const i=(e,t)=>{let n=0;const r=new Set,i=new Set,s=o()(((t,o)=>{e(...t).then((e=>{o===n&&(r.forEach((t=>t(e))),r.clear())})).catch((e=>{i.forEach((t=>t(e))),i.clear()}))}),t);return(...e)=>(n++,new Promise(((t,o)=>{r.add(t),i.add(o),s(e,n)})))}},18366:(e,t,n)=>{"use strict";n.d(t,{GL:()=>i,Tn:()=>a,Zz:()=>c,dk:()=>s,g5:()=>r.g,kW:()=>o});var r=n(71473);const o=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),i=(...e)=>o(e.filter((e=>!!e)).join("-")),s=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),c=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),a=e=>"function"==typeof e},97301:(e,t,n)=>{var r={"./boolean-fields/descope-boolean-field-internal/index.js":[53716,5318,4619,7362],"./boolean-fields/descope-checkbox/index.js":[12388,5318,5563,7150,4218,4902,3191,3437,507,4619,4838],"./boolean-fields/descope-switch-toggle/index.js":[57836,5318,5563,7150,4218,4902,3191,3437,507,4619,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[39173,5318,4619,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[82329,5318,5563,7150,4218,3437,5414,9478,4619,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[19509,5318,4619,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[42426,5318,5563,7150,4218,3437,5414,9478,4619,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[7815,5318,5563,7150,4218,3437,5414,9478,4619,2141],"./descope-alert/index.js":[35479,5318,2540,4619,1456],"./descope-apps-list/index.js":[94073,5318,5563,7150,4218,201,3638,4114,1172,4619,8823,3057],"./descope-badge/index.js":[58765,5318,4619,9553],"./descope-button/index.js":[1058,5318,5563,7150,4218,3437,5414,4619,9984],"./descope-code-snippet/index.js":[52475,5318,1402,4619,3521],"./descope-container/index.js":[43713,5318,4619,8689],"./descope-date-field/descope-calendar/index.js":[18562,5318,5563,7150,4218,4902,3191,3437,4114,5414,742,3110,4127,4619,8823,1738,6028],"./descope-date-field/index.js":[66509,5318,5563,7150,4218,4902,3191,201,3437,3638,4114,5414,742,3110,4127,9243,4619,8823,1738,6028,9257],"./descope-divider/index.js":[53665,5318,4619,8823,8819],"./descope-email-field/index.js":[80230,5318,5563,7150,4218,4902,3191,4619,5695],"./descope-enriched-text/index.js":[94694,5318,2540,4619,5710],"./descope-grid/descope-grid-custom-column/index.js":[96969,5563,4187,9176],"./descope-grid/descope-grid-item-details-column/index.js":[85198,5563,7150,201,3638,4187,2381],"./descope-grid/descope-grid-selection-column/index.js":[79120,5318,5563,7150,4218,4902,3191,3437,4187,507,4619,3305],"./descope-grid/descope-grid-text-column/index.js":[36486,5563,4187,8108],"./descope-grid/index.js":[30954,5318,5563,7150,4218,4902,3191,201,3437,3638,742,4187,507,1402,731,4619,2200],"./descope-hybrid-field/index.js":[56614,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,1484,4619,8823,1738,5459,9894,7299],"./descope-icon/index.js":[21471,5318,5414,4619,7401],"./descope-image/index.js":[90313,5318,4619,9175],"./descope-link/index.js":[31678,5318,4619,8823,7792],"./descope-list/index.js":[36911,5318,4619,7640],"./descope-loader-linear/index.js":[22339,5318,4619,8009],"./descope-loader-radial/index.js":[86715,5318,4619,7163],"./descope-logo/index.js":[47713,5318,4619,1239],"./descope-modal/index.js":[826,5318,5563,7150,4114,4455,4619,4139],"./descope-multi-select-combo-box/index.js":[10664,5318,5563,7150,4218,4902,3191,4114,742,3110,9030,4619,1331],"./descope-new-password/descope-new-password-internal/index.js":[32039,5318,4619,8603],"./descope-new-password/index.js":[26586,5318,5563,7150,4218,4902,3191,201,3437,3638,7979,4619,4364],"./descope-notification/descope-notification-card/index.js":[39749,5318,5563,7150,4574,4619,7326],"./descope-notification/index.js":[35592,5318,5563,7150,4574,4619,8019],"./descope-notp-image/index.js":[22529,5318,4619,2251],"./descope-number-field/index.js":[37041,5318,5563,7150,4218,4902,3191,5096,4619,7944],"./descope-passcode/descope-passcode-internal/index.js":[81443,5318,4619,3359],"./descope-passcode/index.js":[40868,5318,5563,7150,4218,4902,3191,201,3638,4619,8884],"./descope-password/index.js":[1279,5318,5563,7150,4218,4902,3191,3437,7979,4619,6969],"./descope-policy-validation/index.js":[28184,5318,4619,2996],"./descope-radio-group/index.js":[94702,5318,5563,7150,4218,4902,3437,4554,4619,9399],"./descope-recaptcha/index.js":[19552,5318,4619,3847],"./descope-scopes-list/index.js":[78538,5318,5563,7150,4218,4902,3191,3437,507,4619,1674],"./descope-security-questions-setup/index.js":[69555,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,404,4619,8823,1738,3594],"./descope-security-questions-verify/index.js":[45307,5318,5563,7150,4218,4902,3191,201,3638,4619,8823,9446],"./descope-text-area/index.js":[641,5318,5563,7150,4218,4902,3191,2666,4619,5686],"./descope-text-field/index.js":[89348,5318,5563,7150,4218,4902,3191,201,3638,4619,5166],"./descope-third-party-app-logo/index.js":[63200,5318,5414,4619,230],"./descope-totp-image/index.js":[89011,5318,4619,6213],"./descope-upload-file/index.js":[82147,5318,5563,7150,4218,3437,5414,7097,4619,9636],"./descope-user-attribute/index.js":[91132,5318,5563,7150,4218,201,3437,5414,189,4619,8823,1578],"./descope-user-auth-method/index.js":[56780,5318,5563,7150,4218,201,3437,5414,2570,4619,8823,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[91491,5318,4619,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[88858,5318,4619,9522],"./mapping-fields/descope-mappings-field/index.js":[64551,5318,5563,7150,4218,4902,3191,201,3437,3638,4114,5414,742,3110,6050,1902,4619,8823,1738,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[71828,5318,4619,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[28511,5318,5563,7150,4218,4902,3191,201,3437,3638,4114,5414,742,3110,6050,1902,4619,8823,1738,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[54930,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,1484,4619,8823,1738,5459,2878],"./phone-fields/descope-phone-field/index.js":[96442,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,1484,4619,8823,1738,5459,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[46633,5318,5563,7150,4218,4902,3191,201,3638,4619,5459,8657],"./phone-fields/descope-phone-input-box-field/index.js":[87743,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,4619,8823,1738,5459,4043]};function o(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=97301,e.exports=o},25521:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,WJ:()=>s,aE:()=>o});const r="descope",o=3,i="host",s="@"},14944:(e,t,n)=>{"use strict";n.d(t,{EA:()=>u,Ge:()=>s,Gh:()=>a,Ix:()=>p,mx:()=>i,q:()=>l,xE:()=>d});var r=n(7138),o=n(25521);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,u=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},l=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)}},7138:(e,t,n)=>{"use strict";n.d(t,{AG:()=>d,GL:()=>o,Tn:()=>c,Zz:()=>s,dk:()=>i,gU:()=>a,kW:()=>r,wy:()=>p});const r=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...e)=>r(e.filter((e=>!!e)).join("-")),i=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),s=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),c=e=>"function"==typeof e,a=e=>{try{return new URL(e),!0}catch(e){return!1}},d=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const n=e.slice().sort(),r=t.slice().sort();for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0},p=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},69453:(e,t,n)=>{"use strict";n.r(t),n.d(t,{componentsThemeManager:()=>a.br,createComponentsTheme:()=>j,createHelperVars:()=>y,getThemeRefs:()=>h,getThemeVars:()=>b,globalsThemeToStyle:()=>g,themeToCSSVarsObj:()=>f,themeToStyle:()=>v,useVar:()=>x});var r=n(2816),o=n.n(r),i=n(25521),s=n(7138),c=n(14944),a=n(49151);const d=e=>(0,c.Ix)(i.$m,...e),p=(e,t,n)=>{const r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),e),e},u=(e,t,n)=>Object.entries(e).reduce(((e,[r,i])=>i?.constructor!==Object?o()(e,n(t.concat(r),i)):o()(e,u(i,[...t,r],n))),{}),l=e=>{switch(!0){case Array.isArray(e):return e.map((e=>e.includes(" ")?`"${e}"`:e)).join(", ");case(0,s.gU)(e):return`url(${e})`;default:return e}},f=e=>u(e,[],((e,t)=>({[d(e)]:l(t)}))),h=(e,t)=>u(e,[],(e=>p({},e,`var(${d(t?[t,...e]:e)})`))),b=(e,t)=>u(e,[],(e=>p({},e,d(t?[t,...e]:e)))),g=(e,t="")=>{const n=Object.entries(f(e)).reduce(((e,t)=>`${e}${t.join(":")};\n`),"");return t?`*[data-theme="${t}"] {${n}}`:n},m=e=>Object.entries(e).reduce(((e,[t,n])=>`${e}${t} { \n${Object.entries(n).map((([e,t])=>`${e}: ${t}`)).join(";\n")} \n}\n\n`),""),j=e=>{const t=(e=>u(e,[],((e,t)=>{const[n,...r]=e,o=r.pop(),a=(0,c.xE)(n);"undefined"===o&&console.warn(a,`theme value: "${t}" is mapped to an invalid property`);let d=i.IM;r[0]&&r[0].startsWith(i.WJ)&&(d=r.shift());const p=r.reduce(((e,t,n)=>{if(t.startsWith("_"))return`${e}[${(0,s.kW)(t.replace(/^_/,""))}="true"]`;const o=r[n+1];return"string"!=typeof o||o.startsWith("_")?(console.error("theme generator",`your theme structure is invalid, attribute "${t}" is followed by "${o}" which is not allowed`),e):`${e}[${(0,s.kW)(t)}="${r.splice(n+1,1).join("")}"]`}),""),u=":host"+(p?`(${p})`:"");return{[a]:{[d]:{[u]:{[o]:l(t)}}}}})))(e);return Object.keys(t).reduce(((e,n)=>{const r=t[n];return Object.assign(e,{[n]:Object.keys(r).reduce(((e,t)=>Object.assign(e,{[t]:m(r[t])})),{})})}),{})},v=({globals:e,components:t},n)=>({globals:g(e,n),components:j(t)}),x=(...e)=>e.reduceRight(((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`),""),y=(e,t)=>{const n=u(e,[],((e,n)=>{const r=[...e],o=r.splice(-1),i=(0,c.Ix)(t,o),s={[o]:i},a={[o]:x(i)};return{theme:p({},[...r,i],n),useVars:a,vars:s}}));return[n.theme,n.useVars,n.vars]}},41216:(e,t,n)=>{const{componentsThemeManager:r}=n(69453),o=n(97301);e.exports=o.keys().reduce(((e,t)=>{const n=t.replace(/.*?([^\/]+)\/index\.js$/,"$1");return n.endsWith("-internal")||(e[n]=()=>o(t)),e}),{}),e.exports.componentsThemeManager=r,e.exports["descope-autocomplete-field"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(4902),n.e(3191),n.e(4114),n.e(742),n.e(3110),n.e(6050),n.e(8823),n.e(1738),n.e(8712)]).then(n.bind(n,98412)),e.exports["descope-avatar"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(201),n.e(3638),n.e(4114),n.e(1172),n.e(8823),n.e(2272)]).then(n.bind(n,78188)),e.exports["descope-combo-box"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(4902),n.e(3191),n.e(4114),n.e(742),n.e(3110),n.e(8823),n.e(1738),n.e(5691)]).then(n.bind(n,11738)),e.exports["descope-text"]=()=>Promise.all([n.e(5318),n.e(8823),n.e(2294)]).then(n.bind(n,98893))}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e](n,n.exports,i),n.loaded=!0,n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(p=0;p<e.length;p++){for(var[n,r,o]=e[p],c=!0,a=0;a<n.length;a++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[a])))?n.splice(a--,1):(c=!1,o<s&&(s=o));if(c){e.splice(p--,1);var d=r();void 0!==d&&(t=d)}}return t}o=o||0;for(var p=e.length;p>0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[n,r,o]},i.F={},i.E=e=>{Object.keys(i.F).map((t=>{i.F[t](e)}))},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>(({230:"descope-third-party-app-logo-index-js",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1456:"descope-alert-index-js",1578:"descope-user-attribute-index-js",1674:"descope-scopes-list-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2251:"descope-notp-image-index-js",2272:"descope-avatar",2294:"descope-text",2381:"descope-grid-descope-grid-item-details-column-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3594:"descope-security-questions-setup-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5691:"descope-combo-box",5695:"descope-email-field-index-js",5710:"descope-enriched-text-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7299:"descope-hybrid-field-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7401:"descope-icon-index-js",7640:"descope-list-index-js",7792:"descope-link-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8712:"descope-autocomplete-field",8819:"descope-divider-index-js",8884:"descope-passcode-index-js",9175:"descope-image-index-js",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9399:"descope-radio-group-index-js",9446:"descope-security-questions-verify-index-js",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9984:"descope-button-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="@descope/web-components-ui:",i.l=(e,r,o,s)=>{if(t[e])t[e].push(r);else{var c,a;if(void 0!==o)for(var d=document.getElementsByTagName("script"),p=0;p<d.length;p++){var u=d[p];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+o){c=u;break}}c||(a=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",n+o),c.src=e),t[e]=[r];var l=(n,r)=>{c.onerror=c.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),n)return n(r)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),a&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5536:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var s=i.p+i.u(t),c=new Error;i.l(s,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",c.name="ChunkLoadError",c.type=o,c.request=s,r[1](c)}}),"chunk-"+t,t)}},i.F.j=t=>{if(!i.o(e,t)||void 0===e[t]){e[t]=null;var n=document.createElement("link");i.nc&&n.setAttribute("nonce",i.nc),n.rel="prefetch",n.as="script",n.href=i.p+i.u(t),document.head.appendChild(n)}},i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,c,a]=n,d=0;if(s.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(a)var p=a(i)}for(t&&t(n);d<s.length;d++)o=s[d],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(p)},n=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.O(0,[5536],(()=>{[5318,5563,7150,4218,4902,3191,4114,742,3110,6050,8823,1738,8712,201,3638,1172,2272,5691,2294,4619,7362,3437,507,4838,1448,8399,5414,9478,3829,7079,1837,2141,2540,1456,3057,9553,9984,1402,3521,8689,4127,6028,9243,9257,8819,5695,5710,4187,9176,2381,3305,8108,731,2200,1484,5459,9894,7299,7401,9175,7792,7640,8009,7163,1239,4455,4139,9030,1331,8603,7979,4364,4574,7326,8019,2251,5096,7944,3359,8884,6969,2996,4554,9399,3847,1674,404,3594,9446,2666,5686,5166,230,6213,7097,9636,189,1578,2570,9990,2230,9522,1902,7095,9708,6832,2878,8657,4043].map(i.E)}),5);var s=i(41216);return i.O(s)})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DescopeUI=t():e.DescopeUI=t()}(self,(()=>(()=>{var e,t,n,r={62051:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=a||d||Function("return this")(),u=Object.prototype.toString,l=Math.max,f=Math.min,h=function(){return p.Date.now()};function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,s,c,a,d=0,p=!1,u=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function j(t){var n=r,i=o;return r=o=void 0,d=t,s=e.apply(i,n)}function v(e){var n=e-a;return void 0===a||n>=t||n<0||u&&e-d>=i}function x(){var e=h();if(v(e))return y(e);c=setTimeout(x,function(e){var n=t-(e-a);return u?f(n,i-(e-d)):n}(e))}function y(e){return c=void 0,m&&r?j(e):(r=o=void 0,s)}function _(){var e=h(),n=v(e);if(r=arguments,o=this,a=e,n){if(void 0===c)return function(e){return d=e,c=setTimeout(x,t),p?j(e):s}(a);if(u)return c=setTimeout(x,t),j(a)}return void 0===c&&(c=setTimeout(x,t)),s}return t=g(t)||0,b(n)&&(p=!!n.leading,i=(u="maxWait"in n)?l(g(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),_.cancel=function(){void 0!==c&&clearTimeout(c),d=0,r=a=o=c=void 0},_.flush=function(){return void 0===c?s:y(h())},_}},2816:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[i]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p[s]=p["[object Map]"]=p["[object Number]"]=p[c]=p["[object RegExp]"]=p["[object Set]"]=p["[object String]"]=p["[object WeakMap]"]=!1;var u,l,f,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,b="object"==typeof self&&self&&self.Object===Object&&self,g=h||b||Function("return this")(),m=t&&!t.nodeType&&t,j=m&&e&&!e.nodeType&&e,v=j&&j.exports===m,x=v&&h.process,y=function(){try{return j&&j.require&&j.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),_=y&&y.isTypedArray,w=Array.prototype,O=Function.prototype,$=Object.prototype,A=g["__core-js_shared__"],T=O.toString,k=$.hasOwnProperty,E=(u=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",S=$.toString,N=T.call(Object),z=RegExp("^"+T.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=v?g.Buffer:void 0,M=g.Symbol,C=g.Uint8Array,I=(P&&P.allocUnsafe,l=Object.getPrototypeOf,f=Object,function(e){return l(f(e))}),L=Object.create,U=$.propertyIsEnumerable,W=w.splice,q=M?M.toStringTag:void 0,F=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),D=P?P.isBuffer:void 0,G=Math.max,R=Date.now,B=ce(g,"Map"),V=ce(Object,"create"),J=function(){function e(){}return function(t){if(!ve(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function H(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=this.__data__=new K(e);this.size=t.size}function X(e,t,n){(void 0!==n&&!le(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function Y(e,t,n){var r=e[t];k.call(e,t)&&le(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(le(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&F?F(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Z.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(V){var n=t[e];return n===r?void 0:n}return k.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:k.call(t,e)},Z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=V&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():W.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return ee(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},H.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(B||K),string:new Z}},H.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return se(this,e).get(e)},H.prototype.has=function(e){return se(this,e).has(e)},H.prototype.set=function(e,t){var n=se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new K,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!B||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=k.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var o=S.call(e);return r&&(t?e[q]=n:delete e[q]),o}(e):function(e){return S.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var c=i[++r];if(!1===t(o[c],c,o))break}}(t,(function(i,s){if(o||(o=new Q),ve(i))!function(e,t,n,r,o,i,s){var a=pe(e,n),d=pe(t,n),p=s.get(d);if(p)X(e,n,p);else{var u,l,f,h,b,g=i?i(a,d,n+"",e,t,s):void 0,m=void 0===g;if(m){var j=he(d),v=!j&&ge(d),x=!j&&!v&&ye(d);g=d,j||v||x?he(a)?g=a:xe(b=a)&&be(b)?g=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):v?(m=!1,g=function(e){return e.slice()}(d)):x?(m=!1,h=new(f=(u=d).buffer).constructor(f.byteLength),new C(h).set(new C(f)),l=h,g=new u.constructor(l,u.byteOffset,u.length)):g=[]:function(e){if(!xe(e)||ne(e)!=c)return!1;var t=I(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&T.call(n)==N}(d)||fe(d)?(g=a,fe(a)?g=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],c=void 0;void 0===c&&(c=e[s]),r?te(n,s,c):Y(n,s,c)}return n}(e,_e(e))}(a):ve(a)&&!me(a)||(g=function(e){return"function"!=typeof e.constructor||de(e)?{}:J(I(e))}(d))):m=!1}m&&(s.set(d,g),o(g,d,r,i,s),s.delete(d)),X(e,n,g)}}(e,t,s,n,oe,r,o);else{var a=r?r(pe(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),X(e,s,a)}}),_e)}var ie=F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:$e;function se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ve(e)||function(e){return!!E&&E in e}(e))&&(me(e)?z:a).test(function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ae(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&d.test(e))&&e>-1&&e%1==0&&e<t}function de(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function pe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ue=function(e){var t=0,n=0;return function(){var r=R(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function le(e,t){return e===t||e!=e&&t!=t}var fe=re(function(){return arguments}())?re:function(e){return xe(e)&&k.call(e,"callee")&&!U.call(e,"callee")},he=Array.isArray;function be(e){return null!=e&&je(e.length)&&!me(e)}var ge=D||function(){return!1};function me(e){if(!ve(e))return!1;var t=ne(e);return t==s||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var ye=_?function(e){return function(t){return e(t)}}(_):function(e){return xe(e)&&je(e.length)&&!!p[ne(e)]};function _e(e){return be(e)?function(e,t){var n=he(e),r=!n&&fe(e),o=!n&&!r&&ge(e),i=!n&&!r&&!o&&ye(e),s=n||r||o||i,c=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=c.length;for(var d in e)!t&&!k.call(e,d)||s&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ae(d,a))||c.push(d);return c}(e,!0):function(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=de(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}(e)}var we,Oe=(we=function(e,t,n){oe(e,t,n)},function(e,t){return ue(function(e,t,n){return t=G(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=G(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}(e,t,$e),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=we.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&ae(t,n.length):"string"==r&&t in n)&&le(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&we(e,s,n)}return e})));function $e(e){return e}e.exports=Oe},17166:(e,t,n)=>{"use strict";n.d(t,{EA:()=>u,Ge:()=>s,Gh:()=>a,Ix:()=>p,mx:()=>i,q:()=>l,xE:()=>d});var r=n(18366),o=n(75777);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,u=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},l=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)}},75777:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,aE:()=>o});const r="descope",o=3,i="host"},75346:(e,t,n)=>{},38843:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=new class{static mountOnPropName="DescopeThemeManager";#e={};#t="light";#n=new Set;#r(){this.#n.forEach((e=>e?.()))}get currentThemeName(){return this.#t}set currentThemeName(e){this.#t=e,this.#r()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#n.add(e),()=>{this.#n.delete(e)}}set themes(e){this.#e=e,this.#r()}get hasThemes(){return!!Object.keys(this.#e).length}}},49151:(e,t,n)=>{"use strict";n.d(t,{$J:()=>o.$J,I4:()=>o.I4,Kl:()=>o.Kl,br:()=>r.b,cy:()=>o.cy,fu:()=>o.fu,lS:()=>o.lS}),n(2816),n(18366),n(17166);var r=n(38843),o=(n(75346),n(34691))},34691:(e,t,n)=>{"use strict";n.d(t,{$J:()=>c,I4:()=>o,Kl:()=>a,cy:()=>r,fu:()=>s,lS:()=>i});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,i=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,a=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},71473:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(62051),o=n.n(r);const i=(e,t)=>{let n=0;const r=new Set,i=new Set,s=o()(((t,o)=>{e(...t).then((e=>{o===n&&(r.forEach((t=>t(e))),r.clear())})).catch((e=>{i.forEach((t=>t(e))),i.clear()}))}),t);return(...e)=>(n++,new Promise(((t,o)=>{r.add(t),i.add(o),s(e,n)})))}},18366:(e,t,n)=>{"use strict";n.d(t,{GL:()=>i,Tn:()=>a,Zz:()=>c,dk:()=>s,g5:()=>r.g,kW:()=>o});var r=n(71473);const o=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),i=(...e)=>o(e.filter((e=>!!e)).join("-")),s=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),c=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),a=e=>"function"==typeof e},97301:(e,t,n)=>{var r={"./boolean-fields/descope-boolean-field-internal/index.js":[53716,5318,4619,7362],"./boolean-fields/descope-checkbox/index.js":[12388,5318,5563,7150,4218,4902,3191,3437,507,4619,4838],"./boolean-fields/descope-switch-toggle/index.js":[57836,5318,5563,7150,4218,4902,3191,3437,507,4619,1448],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[39173,5318,4619,8399],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[82329,5318,5563,7150,4218,3437,5414,9478,4619,3829],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[19509,5318,4619,7079],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[42426,5318,5563,7150,4218,3437,5414,9478,4619,1837],"./button-selection-group-fields/descope-button-selection-group/index.js":[7815,5318,5563,7150,4218,3437,5414,9478,4619,2141],"./descope-alert/index.js":[35479,5318,2540,4619,1456],"./descope-apps-list/index.js":[94073,5318,5563,7150,4218,201,3638,4114,1172,4619,8823,3057],"./descope-badge/index.js":[58765,5318,4619,9553],"./descope-button/index.js":[1058,5318,5563,7150,4218,3437,5414,4619,9984],"./descope-code-snippet/index.js":[52475,5318,1402,4619,3521],"./descope-container/index.js":[43713,5318,4619,8689],"./descope-date-field/descope-calendar/index.js":[18562,5318,5563,7150,4218,4902,3191,3437,4114,742,3110,5414,4127,4619,8823,1738,6028],"./descope-date-field/index.js":[66509,5318,5563,7150,4218,4902,3191,201,3437,3638,4114,742,3110,5414,4127,9243,4619,8823,1738,6028,9257],"./descope-divider/index.js":[53665,5318,4619,8823,8819],"./descope-email-field/index.js":[80230,5318,5563,7150,4218,4902,3191,4619,5695],"./descope-enriched-text/index.js":[94694,5318,2540,4619,5710],"./descope-grid/descope-grid-custom-column/index.js":[96969,5563,4187,9176],"./descope-grid/descope-grid-item-details-column/index.js":[85198,5563,7150,201,3638,4187,2381],"./descope-grid/descope-grid-selection-column/index.js":[79120,5318,5563,7150,4218,4902,3191,3437,4187,507,4619,3305],"./descope-grid/descope-grid-text-column/index.js":[36486,5563,4187,8108],"./descope-grid/index.js":[30954,5318,5563,7150,4218,4902,3191,201,3437,3638,742,4187,507,1402,731,4619,2200],"./descope-hybrid-field/index.js":[56614,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,1484,4619,8823,1738,5459,9894,7299],"./descope-icon/index.js":[21471,5318,5414,4619,7401],"./descope-image/index.js":[90313,5318,4619,9175],"./descope-link/index.js":[31678,5318,4619,8823,7792],"./descope-list/index.js":[36911,5318,4619,7640],"./descope-loader-linear/index.js":[22339,5318,4619,8009],"./descope-loader-radial/index.js":[86715,5318,4619,7163],"./descope-logo/index.js":[47713,5318,4619,1239],"./descope-modal/index.js":[826,5318,5563,7150,4114,4455,4619,4139],"./descope-multi-select-combo-box/index.js":[10664,5318,5563,7150,4218,4902,3191,4114,742,3110,9030,4619,1331],"./descope-new-password/descope-new-password-internal/index.js":[32039,5318,4619,8603],"./descope-new-password/index.js":[26586,5318,5563,7150,4218,4902,3191,201,3437,3638,7979,4619,4364],"./descope-notification/descope-notification-card/index.js":[39749,5318,5563,7150,4574,4619,7326],"./descope-notification/index.js":[35592,5318,5563,7150,4574,4619,8019],"./descope-notp-image/index.js":[22529,5318,4619,2251],"./descope-number-field/index.js":[37041,5318,5563,7150,4218,4902,3191,5096,4619,7944],"./descope-passcode/descope-passcode-internal/index.js":[81443,5318,4619,3359],"./descope-passcode/index.js":[40868,5318,5563,7150,4218,4902,3191,201,3638,4619,8884],"./descope-password/index.js":[1279,5318,5563,7150,4218,4902,3191,3437,7979,4619,6969],"./descope-policy-validation/index.js":[28184,5318,4619,2996],"./descope-radio-group/index.js":[94702,5318,5563,7150,4218,4902,3437,4554,4619,9399],"./descope-recaptcha/index.js":[19552,5318,4619,3847],"./descope-scopes-list/index.js":[78538,5318,5563,7150,4218,4902,3191,3437,507,4619,1674],"./descope-security-questions-setup/index.js":[69555,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,404,4619,8823,1738,3594],"./descope-security-questions-verify/index.js":[45307,5318,5563,7150,4218,4902,3191,201,3638,4619,8823,9446],"./descope-text-area/index.js":[641,5318,5563,7150,4218,4902,3191,2666,4619,5686],"./descope-text-field/index.js":[89348,5318,5563,7150,4218,4902,3191,201,3638,4619,5166],"./descope-third-party-app-logo/index.js":[63200,5318,5414,4619,230],"./descope-totp-image/index.js":[89011,5318,4619,6213],"./descope-upload-file/index.js":[82147,5318,5563,7150,4218,3437,5414,7097,4619,9636],"./descope-user-attribute/index.js":[91132,5318,5563,7150,4218,201,3437,5414,189,4619,8823,1578],"./descope-user-auth-method/index.js":[56780,5318,5563,7150,4218,201,3437,5414,2570,4619,8823,9990],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[91491,5318,4619,2230],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[88858,5318,4619,9522],"./mapping-fields/descope-mappings-field/index.js":[64551,5318,5563,7150,4218,4902,3191,201,3437,3638,4114,742,3110,5414,6050,1902,4619,8823,1738,7095],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[71828,5318,4619,9708],"./mapping-fields/descope-saml-group-mappings/index.js":[28511,5318,5563,7150,4218,4902,3191,201,3437,3638,4114,742,3110,5414,6050,1902,4619,8823,1738,6832],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[54930,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,1484,4619,8823,1738,5459,2878],"./phone-fields/descope-phone-field/index.js":[96442,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,1484,4619,8823,1738,5459,9894],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[46633,5318,5563,7150,4218,4902,3191,201,3638,4619,5459,8657],"./phone-fields/descope-phone-input-box-field/index.js":[87743,5318,5563,7150,4218,4902,3191,201,3638,4114,742,3110,4619,8823,1738,5459,4043]};function o(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=97301,e.exports=o},25521:(e,t,n)=>{"use strict";n.d(t,{$m:()=>r,IM:()=>i,WJ:()=>s,aE:()=>o});const r="descope",o=3,i="host",s="@"},14944:(e,t,n)=>{"use strict";n.d(t,{EA:()=>u,Ge:()=>s,Gh:()=>a,Ix:()=>p,mx:()=>i,q:()=>l,xE:()=>d});var r=n(7138),o=n(25521);const i=(e,t,{excludeAttrs:n=[],includeAttrs:r=[]})=>{const o=Array.from(e.attributes).filter((e=>!n.includes(e.name)&&(!r.length||r.includes(e.name)))).map((e=>e.name));t(o),new MutationObserver((e=>{e.forEach((e=>{"attributes"!==e.type||n.includes(e.attributeName)||r.length&&!r.includes(e.attributeName)||t([e.attributeName])}))})).observe(e,{attributes:!0})},s=(e,t)=>{t({addedNodes:Array.from(e.children),removedNodes:[]}),new MutationObserver((e=>{e.forEach((e=>{"childList"!==e.type&&"characterData"!==e.type||t(e)}))})).observe(e,{childList:!0,characterData:!0,subtree:!0})},c=(e,t,n={})=>r=>{r.forEach((r=>{const o=n[r]||r,i=e.getAttribute(r);null!==i?t.getAttribute(o)!==i&&t.setAttribute(o,i):t.removeAttribute(o)}))},a=(e,t,n)=>{i(e,c(e,t),n),i(t,c(t,e),n)},d=e=>(0,r.GL)(o.$m,e),p=(...e)=>`--${(0,r.GL)(...e)}`,u=(e,t,n={})=>{i(e,c(e,t,n.mapAttrs),n)},l=(e,t,n=[])=>{if(!n.length)return;const r=n.reduce(((t,n)=>Object.assign(t,{[n]:{get:()=>e[n],set(t){e[n]=t}}})),{});Object.defineProperties(t,r)}},7138:(e,t,n)=>{"use strict";n.d(t,{AG:()=>d,GL:()=>o,Tn:()=>c,Zz:()=>s,dk:()=>i,gU:()=>a,kW:()=>r,wy:()=>p});const r=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_.]+/g,"-").toLowerCase(),o=(...e)=>r(e.filter((e=>!!e)).join("-")),i=(...e)=>e.filter(Boolean).map(((e,t)=>{return 0===t?e:(n=e).charAt(0).toUpperCase()+n.slice(1);var n})).join(""),s=(...e)=>t=>e.reduceRight(((e,t)=>t(e)),t),c=e=>"function"==typeof e,a=e=>{try{return new URL(e),!0}catch(e){return!1}},d=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;const n=e.slice().sort(),r=t.slice().sort();for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0},p=e=>e.replace(/([A-Z])/g," $1").trim().split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},69453:(e,t,n)=>{"use strict";n.r(t),n.d(t,{componentsThemeManager:()=>a.br,createComponentsTheme:()=>j,createHelperVars:()=>y,getThemeRefs:()=>h,getThemeVars:()=>b,globalsThemeToStyle:()=>g,themeToCSSVarsObj:()=>f,themeToStyle:()=>v,useVar:()=>x});var r=n(2816),o=n.n(r),i=n(25521),s=n(7138),c=n(14944),a=n(49151);const d=e=>(0,c.Ix)(i.$m,...e),p=(e,t,n)=>{const r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),e),e},u=(e,t,n)=>Object.entries(e).reduce(((e,[r,i])=>i?.constructor!==Object?o()(e,n(t.concat(r),i)):o()(e,u(i,[...t,r],n))),{}),l=e=>{switch(!0){case Array.isArray(e):return e.map((e=>e.includes(" ")?`"${e}"`:e)).join(", ");case(0,s.gU)(e):return`url(${e})`;default:return e}},f=e=>u(e,[],((e,t)=>({[d(e)]:l(t)}))),h=(e,t)=>u(e,[],(e=>p({},e,`var(${d(t?[t,...e]:e)})`))),b=(e,t)=>u(e,[],(e=>p({},e,d(t?[t,...e]:e)))),g=(e,t="")=>{const n=Object.entries(f(e)).reduce(((e,t)=>`${e}${t.join(":")};\n`),"");return t?`*[data-theme="${t}"] {${n}}`:n},m=e=>Object.entries(e).reduce(((e,[t,n])=>`${e}${t} { \n${Object.entries(n).map((([e,t])=>`${e}: ${t}`)).join(";\n")} \n}\n\n`),""),j=e=>{const t=(e=>u(e,[],((e,t)=>{const[n,...r]=e,o=r.pop(),a=(0,c.xE)(n);"undefined"===o&&console.warn(a,`theme value: "${t}" is mapped to an invalid property`);let d=i.IM;r[0]&&r[0].startsWith(i.WJ)&&(d=r.shift());const p=r.reduce(((e,t,n)=>{if(t.startsWith("_"))return`${e}[${(0,s.kW)(t.replace(/^_/,""))}="true"]`;const o=r[n+1];return"string"!=typeof o||o.startsWith("_")?(console.error("theme generator",`your theme structure is invalid, attribute "${t}" is followed by "${o}" which is not allowed`),e):`${e}[${(0,s.kW)(t)}="${r.splice(n+1,1).join("")}"]`}),""),u=":host"+(p?`(${p})`:"");return{[a]:{[d]:{[u]:{[o]:l(t)}}}}})))(e);return Object.keys(t).reduce(((e,n)=>{const r=t[n];return Object.assign(e,{[n]:Object.keys(r).reduce(((e,t)=>Object.assign(e,{[t]:m(r[t])})),{})})}),{})},v=({globals:e,components:t},n)=>({globals:g(e,n),components:j(t)}),x=(...e)=>e.reduceRight(((e,t)=>t.startsWith("--")?`var(${t}${e?`, ${e}`:e})`:`${t}${e?`, ${e}`:e}`),""),y=(e,t)=>{const n=u(e,[],((e,n)=>{const r=[...e],o=r.splice(-1),i=(0,c.Ix)(t,o),s={[o]:i},a={[o]:x(i)};return{theme:p({},[...r,i],n),useVars:a,vars:s}}));return[n.theme,n.useVars,n.vars]}},41216:(e,t,n)=>{const{componentsThemeManager:r}=n(69453),o=n(97301);e.exports=o.keys().reduce(((e,t)=>{const n=t.replace(/.*?([^\/]+)\/index\.js$/,"$1");return n.endsWith("-internal")||(e[n]=()=>o(t)),e}),{}),e.exports.componentsThemeManager=r,e.exports["descope-address-field"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(4902),n.e(3191),n.e(4114),n.e(742),n.e(3110),n.e(6050),n.e(8823),n.e(1738),n.e(8822)]).then(n.bind(n,85759)),e.exports["descope-autocomplete-field"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(4902),n.e(3191),n.e(4114),n.e(742),n.e(3110),n.e(6050),n.e(8823),n.e(1738),n.e(8712)]).then(n.bind(n,87151)),e.exports["descope-avatar"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(201),n.e(3638),n.e(4114),n.e(1172),n.e(8823),n.e(2272)]).then(n.bind(n,78188)),e.exports["descope-combo-box"]=()=>Promise.all([n.e(5318),n.e(5563),n.e(7150),n.e(4218),n.e(4902),n.e(3191),n.e(4114),n.e(742),n.e(3110),n.e(8823),n.e(1738),n.e(5691)]).then(n.bind(n,11738)),e.exports["descope-text"]=()=>Promise.all([n.e(5318),n.e(8823),n.e(2294)]).then(n.bind(n,98893))}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e](n,n.exports,i),n.loaded=!0,n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(p=0;p<e.length;p++){for(var[n,r,o]=e[p],c=!0,a=0;a<n.length;a++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[a])))?n.splice(a--,1):(c=!1,o<s&&(s=o));if(c){e.splice(p--,1);var d=r();void 0!==d&&(t=d)}}return t}o=o||0;for(var p=e.length;p>0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[n,r,o]},i.F={},i.E=e=>{Object.keys(i.F).map((t=>{i.F[t](e)}))},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>(({230:"descope-third-party-app-logo-index-js",1239:"descope-logo-index-js",1331:"descope-multi-select-combo-box-index-js",1448:"boolean-fields-descope-switch-toggle-index-js",1456:"descope-alert-index-js",1578:"descope-user-attribute-index-js",1674:"descope-scopes-list-index-js",1837:"button-selection-group-fields-descope-button-selection-group-item-index-js",2141:"button-selection-group-fields-descope-button-selection-group-index-js",2200:"descope-grid-index-js",2230:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",2251:"descope-notp-image-index-js",2272:"descope-avatar",2294:"descope-text",2381:"descope-grid-descope-grid-item-details-column-index-js",2878:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",2996:"descope-policy-validation-index-js",3057:"descope-apps-list-index-js",3305:"descope-grid-descope-grid-selection-column-index-js",3359:"descope-passcode-descope-passcode-internal-index-js",3521:"descope-code-snippet-index-js",3594:"descope-security-questions-setup-index-js",3829:"button-selection-group-fields-descope-button-multi-selection-group-index-js",3847:"descope-recaptcha-index-js",4043:"phone-fields-descope-phone-input-box-field-index-js",4139:"descope-modal-index-js",4364:"descope-new-password-index-js",4838:"boolean-fields-descope-checkbox-index-js",5166:"descope-text-field-index-js",5686:"descope-text-area-index-js",5691:"descope-combo-box",5695:"descope-email-field-index-js",5710:"descope-enriched-text-index-js",6028:"descope-date-field-descope-calendar-index-js",6213:"descope-totp-image-index-js",6832:"mapping-fields-descope-saml-group-mappings-index-js",6969:"descope-password-index-js",7079:"button-selection-group-fields-descope-button-selection-group-internal-index-js",7095:"mapping-fields-descope-mappings-field-index-js",7163:"descope-loader-radial-index-js",7299:"descope-hybrid-field-index-js",7326:"descope-notification-descope-notification-card-index-js",7362:"boolean-fields-descope-boolean-field-internal-index-js",7401:"descope-icon-index-js",7640:"descope-list-index-js",7792:"descope-link-index-js",7944:"descope-number-field-index-js",8009:"descope-loader-linear-index-js",8019:"descope-notification-index-js",8108:"descope-grid-descope-grid-text-column-index-js",8399:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",8603:"descope-new-password-descope-new-password-internal-index-js",8657:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",8689:"descope-container-index-js",8712:"descope-autocomplete-field",8819:"descope-divider-index-js",8822:"descope-address-field",8884:"descope-passcode-index-js",9175:"descope-image-index-js",9176:"descope-grid-descope-grid-custom-column-index-js",9257:"descope-date-field-index-js",9399:"descope-radio-group-index-js",9446:"descope-security-questions-verify-index-js",9522:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",9553:"descope-badge-index-js",9636:"descope-upload-file-index-js",9708:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9894:"phone-fields-descope-phone-field-index-js",9984:"descope-button-index-js",9990:"descope-user-auth-method-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="@descope/web-components-ui:",i.l=(e,r,o,s)=>{if(t[e])t[e].push(r);else{var c,a;if(void 0!==o)for(var d=document.getElementsByTagName("script"),p=0;p<d.length;p++){var u=d[p];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+o){c=u;break}}c||(a=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",n+o),c.src=e),t[e]=[r];var l=(n,r)=>{c.onerror=c.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),n)return n(r)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),a&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={5536:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var s=i.p+i.u(t),c=new Error;i.l(s,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",c.name="ChunkLoadError",c.type=o,c.request=s,r[1](c)}}),"chunk-"+t,t)}},i.F.j=t=>{if(!i.o(e,t)||void 0===e[t]){e[t]=null;var n=document.createElement("link");i.nc&&n.setAttribute("nonce",i.nc),n.rel="prefetch",n.as="script",n.href=i.p+i.u(t),document.head.appendChild(n)}},i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,c,a]=n,d=0;if(s.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(a)var p=a(i)}for(t&&t(n);d<s.length;d++)o=s[d],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(p)},n=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.O(0,[5536],(()=>{[5318,5563,7150,4218,4902,3191,4114,742,3110,6050,8823,1738,8822,8712,201,3638,1172,2272,5691,2294,4619,7362,3437,507,4838,1448,8399,5414,9478,3829,7079,1837,2141,2540,1456,3057,9553,9984,1402,3521,8689,4127,6028,9243,9257,8819,5695,5710,4187,9176,2381,3305,8108,731,2200,1484,5459,9894,7299,7401,9175,7792,7640,8009,7163,1239,4455,4139,9030,1331,8603,7979,4364,4574,7326,8019,2251,5096,7944,3359,8884,6969,2996,4554,9399,3847,1674,404,3594,9446,2666,5686,5166,230,6213,7097,9636,189,1578,2570,9990,2230,9522,1902,7095,9708,6832,2878,8657,4043].map(i.E)}),5);var s=i(41216);return i.O(s)})()));
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878,9894],{69473:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>u});var o=n(94619),i=n(93826),r=n(7138),a=n(14944),s=n(33177);const l=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],u=(0,r.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${u.cssVarList.inputOutlineWidth}) + var(${u.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(u.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",u.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>o.w,componentName:()=>o.T}),n(63970),n(23638),n(80201);var o=n(69473);customElements.define(o.T,o.w)},23758:(t,e,n)=>{n.d(e,{NF:()=>A,TQ:()=>h});var o=n(32413),i=n(14944),r=n(7138),a=n(94619),s=n(69473),l=n(44976),p=n(44066),u=n(33177);const d=s.w.cssVarList,c=l.C.cssVarList,h=(0,i.xE)("phone-field"),{host:b,label:y,requiredIndicator:m,inputField:g,internalAfter:f,countryCodeInput:v,phoneInput:C,separator:x,errorMessage:I,helperText:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},A=(0,r.Zz)((0,a.RF)({mappings:{fontSize:[b,g,{selector:s.w.componentName,property:s.w.cssVarList.fontSize},{selector:l.C.componentName,property:l.C.cssVarList.fontSize}],fontFamily:[y,I,w,{...v,property:l.C.cssVarList.overlay.fontFamily}],hostWidth:[{...b,property:"width"},{...C,property:"width"},{...v,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...b,property:"direction"},inputBorderStyle:[{...f,property:"outline-style"},{...x,property:"border-left-style"}],inputBorderWidth:[{...f,property:"outline-width"},{...x,property:"border-left-width"}],inputBorderColor:[{...f,property:"outline-color"},{...x,property:"border-left-color"}],inputBorderRadius:[{...g,property:"border-radius"},{...f,property:"border-radius"}],countryCodeInputWidth:{...v,property:c.hostWidth},countryCodeDropdownWidth:{...v,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...C,property:"width"},horizontalPadding:[{...C,property:"padding-left"},{...C,property:"padding-right"},{...v,property:"padding-left"},{...v,property:"padding-right"}],labelTextColor:[{...y,property:"color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...I,property:"color"},errorMessageIcon:{...I,property:"background-image"},errorMessageIconSize:{...I,property:"background-size"},errorMessageIconPadding:{...I,property:"padding-inline-start"},errorMessageIconRepeat:{...I,property:"background-repeat"},errorMessageIconPosition:{...I,property:"background-position"},inputValueTextColor:[{...C,property:d.inputValueTextColor},{...v,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...C,property:d.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...g,property:"outline-style"},inputOutlineColor:{...g,property:"outline-color"},inputOutlineWidth:{...g,property:"outline-width"},inputOutlineOffset:{...g,property:"outline-offset"},valueInputHeight:[{...v,property:c.valueInputHeight}],valueInputMarginBottom:[{...C,property:d.valueInputMarginBottom}],marginInlineStart:[{...C,property:d.marginInlineStart},{...v,property:c.marginInlineStart}]}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return p.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),(0,i.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map((t=>t.getAttribute("data-country-code")))}}))((0,a.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,u.cy)(A.cssVarList)}\n\t\t\t${(0,u.I4)("vaadin-text-field")}\n\t\t\t${(0,u.kG)("vaadin-text-field")}\n\t\t\t${(0,u.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${A.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${d.inputOutlineWidth}: 0;\n\t\t\t\t${d.inputOutlineOffset}: 0;\n\t\t\t\t${d.inputBorderWidth}: 0;\n\t\t\t\t${d.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,u.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}))},32413:(t,e,n)=>{n.d(e,{A:()=>y,T:()=>s});var o=n(25827),i=n(14944),r=n(44066),a=n(41611);const s=(0,i.xE)("phone-field-internal"),l=["disabled","size","bordered","readonly","allow-alphanumeric-input"],p=["country-input-placeholder","default-code","restrict-countries"],u=["phone-input-placeholder","maxlength","autocomplete","name"],d=["label-type","country-input-label","label"],c={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(l,p,u,d),b=(0,o.y)({componentName:s,baseSelector:"div"}),y=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map((t=>(0,a.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,i.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,i.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.countryCodeInput.items}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,a.lq)(t);this.#t(e),this.#e(n)}setSelectionRange(...t){this.phoneNumberInput.setSelectionRange(...t)}get selectionStart(){return this.phoneNumberInput.selectionStart}#t(t){if(t){const e=this.getCountryByDialCode(t);e&&(this.countryCodeInput.selectedItem=e)}else this.countryCodeInput.selectedItem=void 0}#e(t){this.phoneNumberInput.value!==t&&(this.phoneNumberInput.value=t)}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,o=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:o?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){const t=this.getAttribute("restrict-countries");return t?t.split(","):[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?r.A.filter((e=>t.includes(e.code))):r.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,a.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{if(t.stopPropagation(),!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n}})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=c[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=c[t]||t;l.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):p.includes(t)?this.countryCodeInput.setAttribute(e,n):u.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}d.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},54930:(t,e,n)=>{n.r(e),n(11738),n(89348);var o=n(32413);customElements.define(o.T,o.A)},41611:(t,e,n)=>{n.d(e,{$B:()=>i,lq:()=>r});var o=n(94327);const i=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",i="";const r=(0,o.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(i=r.nationalNumber);else{const[t,o]=e.split("-");n=t||"",i=o||""}return[n,i]}},96442:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>o.NF,componentName:()=>o.TQ}),n(54930),n(11738),n(89348);var o=n(23758);customElements.define(o.TQ,o.NF)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878,9894],{69473:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>d});var o=n(94619),i=n(93826),r=n(7138),a=n(14944),s=n(33177);const l=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,r.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(d.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>o.w,componentName:()=>o.T}),n(63970),n(23638),n(80201);var o=n(69473);customElements.define(o.T,o.w)},23758:(t,e,n)=>{n.d(e,{NF:()=>A,TQ:()=>h});var o=n(32413),i=n(14944),r=n(7138),a=n(94619),s=n(69473),l=n(44976),p=n(44066),d=n(33177);const u=s.w.cssVarList,c=l.C.cssVarList,h=(0,i.xE)("phone-field"),{host:b,label:y,requiredIndicator:m,inputField:g,internalAfter:f,countryCodeInput:v,phoneInput:C,separator:x,errorMessage:I,helperText:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},A=(0,r.Zz)((0,a.RF)({mappings:{fontSize:[b,g,{selector:s.w.componentName,property:s.w.cssVarList.fontSize},{selector:l.C.componentName,property:l.C.cssVarList.fontSize}],fontFamily:[y,I,w,{...v,property:l.C.cssVarList.overlay.fontFamily}],hostWidth:[{...b,property:"width"},{...C,property:"width"},{...v,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...b,property:"direction"},inputBorderStyle:[{...f,property:"border-style"},{...x,property:"border-left-style"}],inputBorderWidth:[{...f,property:"border-width"},{...x,property:"border-left-width"}],inputBorderColor:[{...f,property:"border-color"},{...x,property:"border-left-color"}],inputBorderRadius:[{...g,property:"border-radius"},{...f,property:"border-radius"}],countryCodeInputWidth:{...v,property:c.hostWidth},countryCodeDropdownWidth:{...v,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...C,property:"width"},horizontalPadding:[{...C,property:"padding-left"},{...C,property:"padding-right"},{...v,property:"padding-left"},{...v,property:"padding-right"}],labelTextColor:[{...y,property:"color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...I,property:"color"},errorMessageIcon:{...I,property:"background-image"},errorMessageIconSize:{...I,property:"background-size"},errorMessageIconPadding:{...I,property:"padding-inline-start"},errorMessageIconRepeat:{...I,property:"background-repeat"},errorMessageIconPosition:{...I,property:"background-position"},inputValueTextColor:[{...C,property:u.inputValueTextColor},{...v,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...C,property:u.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...g,property:"outline-style"},inputOutlineColor:{...g,property:"outline-color"},inputOutlineWidth:{...g,property:"outline-width"},inputOutlineOffset:{...g,property:"outline-offset"},valueInputHeight:[{...v,property:c.valueInputHeight}],valueInputMarginBottom:[{...C,property:u.valueInputMarginBottom}],marginInlineStart:[{...C,property:u.marginInlineStart},{...v,property:c.marginInlineStart}]}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return p.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),(0,i.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map((t=>t.getAttribute("data-country-code")))}}))((0,a.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,d.cy)(A.cssVarList)}\n\t\t\t${(0,d.I4)("vaadin-text-field")}\n\t\t\t${(0,d.kG)("vaadin-text-field")}\n\t\t\t${(0,d.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${A.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${u.inputOutlineWidth}: 0;\n\t\t\t\t${u.inputOutlineOffset}: 0;\n\t\t\t\t${u.inputBorderWidth}: 0;\n\t\t\t\t${u.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,d.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}))},32413:(t,e,n)=>{n.d(e,{A:()=>y,T:()=>s});var o=n(25827),i=n(14944),r=n(44066),a=n(41611);const s=(0,i.xE)("phone-field-internal"),l=["disabled","size","bordered","readonly","allow-alphanumeric-input"],p=["country-input-placeholder","default-code","restrict-countries"],d=["phone-input-placeholder","maxlength","autocomplete","name"],u=["label-type","country-input-label","label"],c={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(l,p,d,u),b=(0,o.y)({componentName:s,baseSelector:"div"}),y=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map((t=>(0,a.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,i.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,i.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.countryCodeInput.items}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,a.lq)(t);this.#t(e),this.#e(n)}setSelectionRange(...t){this.phoneNumberInput.setSelectionRange(...t)}get selectionStart(){return this.phoneNumberInput.selectionStart}#t(t){if(t){const e=this.getCountryByDialCode(t);e&&(this.countryCodeInput.selectedItem=e)}else this.countryCodeInput.selectedItem=void 0}#e(t){this.phoneNumberInput.value!==t&&(this.phoneNumberInput.value=t)}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,o=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:o?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){const t=this.getAttribute("restrict-countries");return t?t.split(","):[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?r.A.filter((e=>t.includes(e.code))):r.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,a.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{if(t.stopPropagation(),!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n}})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=c[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=c[t]||t;l.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):p.includes(t)?this.countryCodeInput.setAttribute(e,n):d.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}u.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},54930:(t,e,n)=>{n.r(e),n(11738),n(89348);var o=n(32413);customElements.define(o.T,o.A)},41611:(t,e,n)=>{n.d(e,{$B:()=>i,lq:()=>r});var o=n(94327);const i=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",i="";const r=(0,o.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(i=r.nationalNumber);else{const[t,o]=e.split("-");n=t||"",i=o||""}return[n,i]}},96442:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>o.NF,componentName:()=>o.TQ}),n(54930),n(11738),n(89348);var o=n(23758);customElements.define(o.TQ,o.NF)}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.21.0",
3
+ "version": "1.23.0",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -76,11 +76,12 @@
76
76
  "lodash.debounce": "4.0.8",
77
77
  "lodash.merge": "4.6.2",
78
78
  "markdown-it": "14.1.0",
79
- "@descope-ui/common": "0.0.3",
80
- "@descope-ui/descope-text": "0.0.3",
81
- "@descope-ui/descope-avatar": "0.0.3",
82
- "@descope-ui/descope-combo-box": "0.0.3",
83
- "@descope-ui/descope-autocomplete-field": "0.0.1"
79
+ "@descope-ui/common": "0.0.4",
80
+ "@descope-ui/descope-text": "0.0.4",
81
+ "@descope-ui/descope-avatar": "0.0.4",
82
+ "@descope-ui/descope-combo-box": "0.0.4",
83
+ "@descope-ui/descope-autocomplete-field": "0.0.2",
84
+ "@descope-ui/descope-address-field": "0.0.1"
84
85
  },
85
86
  "overrides": {
86
87
  "@vaadin/avatar": "24.3.4",
@@ -136,15 +136,15 @@ export const PhoneFieldClass = compose(
136
136
  hostDirection: { ...host, property: 'direction' },
137
137
 
138
138
  inputBorderStyle: [
139
- { ...internalAfter, property: 'outline-style' },
139
+ { ...internalAfter, property: 'border-style' },
140
140
  { ...separator, property: 'border-left-style' },
141
141
  ],
142
142
  inputBorderWidth: [
143
- { ...internalAfter, property: 'outline-width' },
143
+ { ...internalAfter, property: 'border-width' },
144
144
  { ...separator, property: 'border-left-width' },
145
145
  ],
146
146
  inputBorderColor: [
147
- { ...internalAfter, property: 'outline-color' },
147
+ { ...internalAfter, property: 'border-color' },
148
148
  { ...separator, property: 'border-left-color' },
149
149
  ],
150
150
  inputBorderRadius: [
@@ -53,6 +53,7 @@ import * as securityQuestionsVerify from './securityQuestionsVerify';
53
53
  import * as hybridField from './hybridField';
54
54
  import * as alert from './alert';
55
55
  import * as autocompleteField from '@descope-ui/descope-autocomplete-field/theme';
56
+ import * as addressField from '@descope-ui/descope-address-field/theme';
56
57
 
57
58
  const components = {
58
59
  button,
@@ -111,6 +112,7 @@ const components = {
111
112
  hybridField,
112
113
  alert,
113
114
  autocompleteField,
115
+ addressField,
114
116
  };
115
117
 
116
118
  const theme = Object.keys(components).reduce(