@govtechsg/sgds-web-component 3.10.0-rc.3 → 3.10.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.
- package/components/Checkbox/index.umd.min.js +1 -1
- package/components/Checkbox/index.umd.min.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +225 -225
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/FileUpload/index.umd.min.js +1 -1
- package/components/FileUpload/index.umd.min.js.map +1 -1
- package/components/Input/index.umd.min.js +1 -1
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Radio/index.umd.min.js +5 -5
- package/components/Radio/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/SystemBanner/index.umd.min.js +2 -2
- package/components/SystemBanner/index.umd.min.js.map +1 -1
- package/components/SystemBanner/sgds-system-banner.d.ts +2 -2
- package/components/SystemBanner/sgds-system-banner.js +5 -5
- package/components/SystemBanner/sgds-system-banner.js.map +1 -1
- package/components/Table/index.umd.min.js +62 -17
- package/components/Table/index.umd.min.js.map +1 -1
- package/components/Table/sgds-table-cell.js +1 -1
- package/components/Table/sgds-table-cell.js.map +1 -1
- package/components/Table/sgds-table-head.d.ts +2 -5
- package/components/Table/sgds-table-head.js +24 -15
- package/components/Table/sgds-table-head.js.map +1 -1
- package/components/Table/sgds-table.d.ts +41 -6
- package/components/Table/sgds-table.js +57 -15
- package/components/Table/sgds-table.js.map +1 -1
- package/components/Table/table-cell.js +1 -1
- package/components/Table/table-context.d.ts +3 -0
- package/components/Table/table-context.js +6 -0
- package/components/Table/table-context.js.map +1 -0
- package/components/Table/table-head.js +1 -1
- package/components/Table/table.js +1 -1
- package/components/Textarea/index.umd.min.js +6 -6
- package/components/Textarea/index.umd.min.js.map +1 -1
- package/components/index.umd.min.js +23 -19
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +1 -1
- package/index.umd.min.js +616 -612
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/SystemBanner/sgds-system-banner.cjs.js +5 -5
- package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -1
- package/react/components/SystemBanner/sgds-system-banner.js +5 -5
- package/react/components/SystemBanner/sgds-system-banner.js.map +1 -1
- package/react/components/Table/sgds-table-cell.cjs.js +1 -1
- package/react/components/Table/sgds-table-cell.cjs.js.map +1 -1
- package/react/components/Table/sgds-table-cell.js +1 -1
- package/react/components/Table/sgds-table-cell.js.map +1 -1
- package/react/components/Table/sgds-table-head.cjs.js +24 -15
- package/react/components/Table/sgds-table-head.cjs.js.map +1 -1
- package/react/components/Table/sgds-table-head.js +24 -15
- package/react/components/Table/sgds-table-head.js.map +1 -1
- package/react/components/Table/sgds-table.cjs.js +56 -14
- package/react/components/Table/sgds-table.cjs.js.map +1 -1
- package/react/components/Table/sgds-table.js +57 -15
- package/react/components/Table/sgds-table.js.map +1 -1
- package/react/components/Table/table-cell.cjs.js +1 -1
- package/react/components/Table/table-cell.js +1 -1
- package/react/components/Table/table-context.cjs.js +11 -0
- package/react/components/Table/table-context.cjs.js.map +1 -0
- package/react/components/Table/table-context.js +7 -0
- package/react/components/Table/table-context.js.map +1 -0
- package/react/components/Table/table-head.cjs.js +1 -1
- package/react/components/Table/table-head.js +1 -1
- package/react/components/Table/table.cjs.js +1 -1
- package/react/components/Table/table.js +1 -1
- package/react/index.cjs.js +8 -8
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -1
- package/react/utils/inputValidationController.cjs.js +2 -2
- package/react/utils/inputValidationController.cjs.js.map +1 -1
- package/react/utils/inputValidationController.js +2 -2
- package/react/utils/inputValidationController.js.map +1 -1
- package/react/utils/validatorMixin.cjs.js +9 -13
- package/react/utils/validatorMixin.cjs.js.map +1 -1
- package/react/utils/validatorMixin.js +9 -13
- package/react/utils/validatorMixin.js.map +1 -1
- package/utils/inputValidationController.d.ts +1 -1
- package/utils/inputValidationController.js +2 -2
- package/utils/inputValidationController.js.map +1 -1
- package/utils/validatorMixin.js +9 -13
- package/utils/validatorMixin.js.map +1 -1
|
@@ -10,7 +10,7 @@ const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const C=globalThis,V=t=>{C.emitLitDebugLogEvents&&C.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let k,P=0;C.litIssuedWarnings??=new Set,k=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",C.litIssuedWarnings.has(e)||C.litIssuedWarnings.has(t)||(console.warn(e),C.litIssuedWarnings.add(e))},queueMicrotask(()=>{k("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=C.ShadyDOM?.inUse&&!0===C.ShadyDOM?.noPatch?C.ShadyDOM.wrap:t=>t,E=C.trustedTypes,I=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=t=>t,z=(t,e,i)=>U,N=t=>{if(rt!==z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");rt=t},M=()=>{rt=z},O=(t,e,i)=>rt(t,e,i),R="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+D,W=`<${A}>`,F=document,L=()=>F.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,q="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/g,K=/^(?:script|style|textarea|title)$/i,Q=(tt=1,(t,...e)=>(t.some(t=>void 0===t)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),e.some(t=>t?._$litStatic$)&&k("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:tt,strings:t,values:e}));var tt;const et=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),st=new WeakMap,nt=F.createTreeWalker(F,129);let rt=z;function ot(t,e){if(!H(t)||!t.hasOwnProperty("raw")){let t="invalid template strings array";throw t="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(t)}return void 0!==I?I.createHTML(e):e}class at{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const o=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,s=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=B;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(o.lastIndex=h,l=o.exec(i),null!==l);)if(h=o.lastIndex,o===B){if("!--"===l[1])o=Z;else if(void 0!==l[1])o=J;else if(void 0!==l[2])K.test(l[2])&&(n=new RegExp(`</${l[2]}`,"g")),o=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===G?">"===l[0]?(o=n??B,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?G:'"'===l[3]?X:Y):o===X||o===Y?o=G:o===Z||o===J?o=B:(o=G,n=void 0);console.assert(-1===d||o===G||o===Y||o===X,"unexpected parse state B");const c=o===G&&t[e+1].startsWith("/>")?" ":"";r+=o===B?i+W:d>=0?(s.push(a),i.slice(0,d)+R+i.slice(d)+D+c):i+D+(-2===d?e:c)}return[ot(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=at.createElement(l,i),nt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=nt.nextNode())&&a.length<o;){if(1===s.nodeType){{const t=s.localName;if(/^(?:textarea|template)$/i.test(t)&&s.innerHTML.includes(D)){const e=`Expressions are not supported inside \`${t}\` elements. See https://lit.dev/msg/expression-in-${t} for more information.`;if("template"===t)throw new Error(e);k("",e)}}if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(R)){const e=d[r++],i=s.getAttribute(t).split(D),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?pt:"?"===o[1]?ut:"@"===o[1]?mt:ct}),s.removeAttribute(t)}else t.startsWith(D)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(K.test(s.tagName)){const t=s.textContent.split(D),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],L()),nt.nextNode(),a.push({type:2,index:++n});s.append(t[e],L())}}}else if(8===s.nodeType){if(s.data===A)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(D,t+1));)a.push({type:7,index:n}),t+=D.length-1}}n++}if(d.length!==r)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+t.join("${...}")+"`");V&&V({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:t})}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,s){if(e===et)return e;let n=void 0!==s?i.__directives?.[s]:i.__directive;const r=j(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?n=void 0:(n=new r(t),n._$initialize(t,i,s)),void 0!==s?(i.__directives??=[])[s]=n:i.__directive=n),void 0!==n&&(e=lt(t,n._$resolve(t,e.values),n,s)),e}class dt{constructor(t,e){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:i}=this._$template,s=(t?.creationScope??F).importNode(e,!0);nt.currentNode=s;let n=nt.nextNode(),r=0,o=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ht(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new ft(n,this,t)),this._$parts.push(e),a=i[++o]}r!==a?.index&&(n=nt.nextNode(),r++)}return nt.currentNode=F,s}_update(t){let e=0;for(const i of this._$parts)void 0!==i&&(V&&V({kind:"set part",part:i,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==i.strings?(i._$setValue(t,i,e),e+=i.strings.length-2):i._$setValue(t[e])),e++}}class ht{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,i,s){this.type=2,this._$committedValue=it,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=s?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let t=T(this._$startNode).parentNode;const e=this._$parent;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(t=lt(this,t,e),j(t))t===it||null==t||""===t?(this._$committedValue!==it&&(V&&V({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=it):t!==this._$committedValue&&t!==et&&this._commitText(t);else if(void 0!==t._$litType$)this._commitTemplateResult(t);else if(void 0!==t.nodeType){if(this.options?.host===t)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",t,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(t)}else(t=>H(t)||"function"==typeof t?.[Symbol.iterator])(t)?this._commitIterable(t):this._commitText(t)}_insert(t){return T(T(this._$startNode).parentNode).insertBefore(t,this._$endNode)}_commitNode(t){if(this._$committedValue!==t){if(this._$clear(),rt!==z){const t=this._$startNode.parentNode?.nodeName;if("STYLE"===t||"SCRIPT"===t){let e="Forbidden";throw e="STYLE"===t?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(e)}}V&&V({kind:"commit node",start:this._$startNode,parent:this._$parent,value:t,options:this.options}),this._$committedValue=this._insert(t)}}_commitText(t){if(this._$committedValue!==it&&j(this._$committedValue)){const e=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=O(e,"data","property")),t=this._textSanitizer(t),V&&V({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}else{const e=F.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=O(e,"data","property")),t=this._textSanitizer(t),V&&V({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}this._$committedValue=t}_commitTemplateResult(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$getTemplate(t):(void 0===i.el&&(i.el=at.createElement(ot(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===s)V&&V({kind:"template updating",template:s,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new dt(s,this),i=t._clone(this.options);V&&V({kind:"template instantiated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),t._update(e),V&&V({kind:"template instantiated and updated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new at(t)),e}_commitIterable(t){H(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i,s=0;for(const n of t)s===e.length?e.push(i=new ht(this._insert(L()),this._insert(L()),this,this.options)):i=e[s],i._$setValue(n),s++;s<e.length&&(this._$clear(i&&T(i._$endNode).nextSibling,s),e.length=s)}_$clear(t=T(this._$startNode).nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t!==this._$endNode;){const e=T(t).nextSibling;T(t).remove(),t=e}}setConnected(t){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=t,this._$notifyConnectionChanged?.(t)}}class ct{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,i,s,n){this.type=1,this._$committedValue=it,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=it,this._sanitizer=void 0}_$setValue(t,e=this,i,s){const n=this.strings;let r=!1;if(void 0===n)t=lt(this,t,e,0),r=!j(t)||t!==this._$committedValue&&t!==et,r&&(this._$committedValue=t);else{const s=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=lt(this,s[i+o],e,o),a===et&&(a=this._$committedValue[o]),r||=!j(a)||a!==this._$committedValue[o],a===it?t=it:t!==it&&(t+=(a??"")+n[o+1]),this._$committedValue[o]=a}r&&!s&&this._commitValue(t)}_commitValue(t){t===it?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"attribute")),t=this._sanitizer(t??""),V&&V({kind:"commit attribute",element:this.element,name:this.name,value:t,options:this.options}),T(this.element).setAttribute(this.name,t??""))}}class pt extends ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"property")),t=this._sanitizer(t),V&&V({kind:"commit property",element:this.element,name:this.name,value:t,options:this.options}),this.element[this.name]=t===it?void 0:t}}class ut extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){V&&V({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===it),options:this.options}),T(this.element).toggleAttribute(this.name,!!t&&t!==it)}}class mt extends ct{constructor(t,e,i,s,n){if(super(t,e,i,s,n),this.type=5,void 0!==this.strings)throw new Error(`A \`<${t.localName}>\` has a \`@${e}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(t,e=this){if((t=lt(this,t,e,0)??it)===et)return;const i=this._$committedValue,s=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==it&&(i===it||s);V&&V({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:s,addListener:n,oldListener:i}),s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class ft{constructor(t,e,i){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){V&&V({kind:"commit to element binding",element:this.element,value:t,options:this.options}),lt(this,t)}}const gt=C.litHtmlPolyfillSupportDevMode;gt?.(at,ht),(C.litHtmlVersions??=[]).push("3.3.2"),C.litHtmlVersions.length>1&&queueMicrotask(()=>{k("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const vt=(t,e,i)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const s=P++,n=i?.renderBefore??e;let r=n._$litPart$;if(V&&V({kind:"begin render",id:s,value:t,container:e,options:i,part:r}),void 0===r){const t=i?.renderBefore??null;n._$litPart$=r=new ht(e.insertBefore(L(),t),t,void 0,i??{})}return r._$setValue(t),V&&V({kind:"end render",id:s,value:t,container:e,options:i,part:r}),r};vt.setSanitizer=N,vt.createSanitizer=O,vt._testOnlyClearSanitizerFactoryDoNotCallOrElse=M;
|
|
13
|
+
const C=globalThis,k=t=>{C.emitLitDebugLogEvents&&C.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let V,P=0;C.litIssuedWarnings??=new Set,V=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",C.litIssuedWarnings.has(e)||C.litIssuedWarnings.has(t)||(console.warn(e),C.litIssuedWarnings.add(e))},queueMicrotask(()=>{V("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=C.ShadyDOM?.inUse&&!0===C.ShadyDOM?.noPatch?C.ShadyDOM.wrap:t=>t,E=C.trustedTypes,I=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=t=>t,z=(t,e,i)=>U,N=t=>{if(rt!==z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");rt=t},M=()=>{rt=z},O=(t,e,i)=>rt(t,e,i),R="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+D,W=`<${A}>`,F=document,L=()=>F.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,q="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/g,K=/^(?:script|style|textarea|title)$/i,Q=(tt=1,(t,...e)=>(t.some(t=>void 0===t)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),e.some(t=>t?._$litStatic$)&&V("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:tt,strings:t,values:e}));var tt;const et=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),st=new WeakMap,nt=F.createTreeWalker(F,129);let rt=z;function ot(t,e){if(!H(t)||!t.hasOwnProperty("raw")){let t="invalid template strings array";throw t="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(t)}return void 0!==I?I.createHTML(e):e}class at{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const o=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,s=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=B;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(o.lastIndex=h,l=o.exec(i),null!==l);)if(h=o.lastIndex,o===B){if("!--"===l[1])o=Z;else if(void 0!==l[1])o=J;else if(void 0!==l[2])K.test(l[2])&&(n=new RegExp(`</${l[2]}`,"g")),o=G;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===G?">"===l[0]?(o=n??B,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?G:'"'===l[3]?X:Y):o===X||o===Y?o=G:o===Z||o===J?o=B:(o=G,n=void 0);console.assert(-1===d||o===G||o===Y||o===X,"unexpected parse state B");const c=o===G&&t[e+1].startsWith("/>")?" ":"";r+=o===B?i+W:d>=0?(s.push(a),i.slice(0,d)+R+i.slice(d)+D+c):i+D+(-2===d?e:c)}return[ot(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=at.createElement(l,i),nt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=nt.nextNode())&&a.length<o;){if(1===s.nodeType){{const t=s.localName;if(/^(?:textarea|template)$/i.test(t)&&s.innerHTML.includes(D)){const e=`Expressions are not supported inside \`${t}\` elements. See https://lit.dev/msg/expression-in-${t} for more information.`;if("template"===t)throw new Error(e);V("",e)}}if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(R)){const e=d[r++],i=s.getAttribute(t).split(D),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?pt:"?"===o[1]?ut:"@"===o[1]?mt:ct}),s.removeAttribute(t)}else t.startsWith(D)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(K.test(s.tagName)){const t=s.textContent.split(D),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],L()),nt.nextNode(),a.push({type:2,index:++n});s.append(t[e],L())}}}else if(8===s.nodeType){if(s.data===A)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(D,t+1));)a.push({type:7,index:n}),t+=D.length-1}}n++}if(d.length!==r)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+t.join("${...}")+"`");k&&k({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:t})}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,s){if(e===et)return e;let n=void 0!==s?i.__directives?.[s]:i.__directive;const r=j(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?n=void 0:(n=new r(t),n._$initialize(t,i,s)),void 0!==s?(i.__directives??=[])[s]=n:i.__directive=n),void 0!==n&&(e=lt(t,n._$resolve(t,e.values),n,s)),e}class dt{constructor(t,e){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:i}=this._$template,s=(t?.creationScope??F).importNode(e,!0);nt.currentNode=s;let n=nt.nextNode(),r=0,o=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ht(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new ft(n,this,t)),this._$parts.push(e),a=i[++o]}r!==a?.index&&(n=nt.nextNode(),r++)}return nt.currentNode=F,s}_update(t){let e=0;for(const i of this._$parts)void 0!==i&&(k&&k({kind:"set part",part:i,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==i.strings?(i._$setValue(t,i,e),e+=i.strings.length-2):i._$setValue(t[e])),e++}}class ht{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,i,s){this.type=2,this._$committedValue=it,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=s?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let t=T(this._$startNode).parentNode;const e=this._$parent;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(t=lt(this,t,e),j(t))t===it||null==t||""===t?(this._$committedValue!==it&&(k&&k({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=it):t!==this._$committedValue&&t!==et&&this._commitText(t);else if(void 0!==t._$litType$)this._commitTemplateResult(t);else if(void 0!==t.nodeType){if(this.options?.host===t)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",t,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(t)}else(t=>H(t)||"function"==typeof t?.[Symbol.iterator])(t)?this._commitIterable(t):this._commitText(t)}_insert(t){return T(T(this._$startNode).parentNode).insertBefore(t,this._$endNode)}_commitNode(t){if(this._$committedValue!==t){if(this._$clear(),rt!==z){const t=this._$startNode.parentNode?.nodeName;if("STYLE"===t||"SCRIPT"===t){let e="Forbidden";throw e="STYLE"===t?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(e)}}k&&k({kind:"commit node",start:this._$startNode,parent:this._$parent,value:t,options:this.options}),this._$committedValue=this._insert(t)}}_commitText(t){if(this._$committedValue!==it&&j(this._$committedValue)){const e=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=O(e,"data","property")),t=this._textSanitizer(t),k&&k({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}else{const e=F.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=O(e,"data","property")),t=this._textSanitizer(t),k&&k({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}this._$committedValue=t}_commitTemplateResult(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$getTemplate(t):(void 0===i.el&&(i.el=at.createElement(ot(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===s)k&&k({kind:"template updating",template:s,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new dt(s,this),i=t._clone(this.options);k&&k({kind:"template instantiated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),t._update(e),k&&k({kind:"template instantiated and updated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new at(t)),e}_commitIterable(t){H(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i,s=0;for(const n of t)s===e.length?e.push(i=new ht(this._insert(L()),this._insert(L()),this,this.options)):i=e[s],i._$setValue(n),s++;s<e.length&&(this._$clear(i&&T(i._$endNode).nextSibling,s),e.length=s)}_$clear(t=T(this._$startNode).nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t!==this._$endNode;){const e=T(t).nextSibling;T(t).remove(),t=e}}setConnected(t){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=t,this._$notifyConnectionChanged?.(t)}}class ct{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,i,s,n){this.type=1,this._$committedValue=it,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=it,this._sanitizer=void 0}_$setValue(t,e=this,i,s){const n=this.strings;let r=!1;if(void 0===n)t=lt(this,t,e,0),r=!j(t)||t!==this._$committedValue&&t!==et,r&&(this._$committedValue=t);else{const s=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=lt(this,s[i+o],e,o),a===et&&(a=this._$committedValue[o]),r||=!j(a)||a!==this._$committedValue[o],a===it?t=it:t!==it&&(t+=(a??"")+n[o+1]),this._$committedValue[o]=a}r&&!s&&this._commitValue(t)}_commitValue(t){t===it?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"attribute")),t=this._sanitizer(t??""),k&&k({kind:"commit attribute",element:this.element,name:this.name,value:t,options:this.options}),T(this.element).setAttribute(this.name,t??""))}}class pt extends ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"property")),t=this._sanitizer(t),k&&k({kind:"commit property",element:this.element,name:this.name,value:t,options:this.options}),this.element[this.name]=t===it?void 0:t}}class ut extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){k&&k({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===it),options:this.options}),T(this.element).toggleAttribute(this.name,!!t&&t!==it)}}class mt extends ct{constructor(t,e,i,s,n){if(super(t,e,i,s,n),this.type=5,void 0!==this.strings)throw new Error(`A \`<${t.localName}>\` has a \`@${e}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(t,e=this){if((t=lt(this,t,e,0)??it)===et)return;const i=this._$committedValue,s=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==it&&(i===it||s);k&&k({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:s,addListener:n,oldListener:i}),s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class ft{constructor(t,e,i){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){k&&k({kind:"commit to element binding",element:this.element,value:t,options:this.options}),lt(this,t)}}const gt=C.litHtmlPolyfillSupportDevMode;gt?.(at,ht),(C.litHtmlVersions??=[]).push("3.3.2"),C.litHtmlVersions.length>1&&queueMicrotask(()=>{V("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const vt=(t,e,i)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const s=P++,n=i?.renderBefore??e;let r=n._$litPart$;if(k&&k({kind:"begin render",id:s,value:t,container:e,options:i,part:r}),void 0===r){const t=i?.renderBefore??null;n._$litPart$=r=new ht(e.insertBefore(L(),t),t,void 0,i??{})}return r._$setValue(t),k&&k({kind:"end render",id:s,value:t,container:e,options:i,part:r}),r};vt.setSanitizer=N,vt.createSanitizer=O,vt._testOnlyClearSanitizerFactoryDoNotCallOrElse=M;
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
@@ -22,7 +22,7 @@ const _t=globalThis;let yt;_t.litIssuedWarnings??=new Set,yt=(t,e)=>{e+=` See ht
|
|
|
22
22
|
* Copyright 2017 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
24
|
*/
|
|
25
|
-
let xt;$t?.({LitElement:bt}),(_t.litElementVersions??=[]).push("4.2.2"),_t.litElementVersions.length>1&&queueMicrotask(()=>{yt("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,xt=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,globalThis.litIssuedWarnings.has(e)||globalThis.litIssuedWarnings.has(t)||(console.warn(e),globalThis.litIssuedWarnings.add(e))};const St={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$},Ct=(t=St,e,i)=>{const{kind:s,metadata:n}=i;null==n&&xt("missing-class-metadata",`The class ${e} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,n,t,!0,i)},init(e){return void 0!==e&&this._$changeProperty(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const n=this[s];e.call(this,i),this.requestUpdate(s,n,t,!0,i)}}throw new Error(`Unsupported decorator location: ${s}`)};function
|
|
25
|
+
let xt;$t?.({LitElement:bt}),(_t.litElementVersions??=[]).push("4.2.2"),_t.litElementVersions.length>1&&queueMicrotask(()=>{yt("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,xt=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,globalThis.litIssuedWarnings.has(e)||globalThis.litIssuedWarnings.has(t)||(console.warn(e),globalThis.litIssuedWarnings.add(e))};const St={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$},Ct=(t=St,e,i)=>{const{kind:s,metadata:n}=i;null==n&&xt("missing-class-metadata",`The class ${e} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,n,t,!0,i)},init(e){return void 0!==e&&this._$changeProperty(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const n=this[s];e.call(this,i),this.requestUpdate(s,n,t,!0,i)}}throw new Error(`Unsupported decorator location: ${s}`)};function kt(t){return(e,i)=>"object"==typeof i?Ct(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
@@ -33,7 +33,7 @@ let xt;$t?.({LitElement:bt}),(_t.litElementVersions??=[]).push("4.2.2"),_t.litEl
|
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
35
|
*/
|
|
36
|
-
const
|
|
36
|
+
const Vt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i);
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
@@ -44,7 +44,7 @@ const kt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!
|
|
|
44
44
|
* Copyright 2017 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
46
|
*/
|
|
47
|
-
function Tt(t){return(e,i)=>
|
|
47
|
+
function Tt(t){return(e,i)=>Vt(e,i,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(t)??null}})}
|
|
48
48
|
/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
@@ -76,7 +76,7 @@ class extends Nt{constructor(t){if(super(t),t.type!==It&&t.type!==Et&&t.type!==U
|
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright 2020 Google LLC
|
|
78
78
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
|
-
*/var jt,Ht=o`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,qt=o`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Bt=o`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Zt=o`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`,Jt=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Gt extends bt{emit(t,e){const i=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(i),i}static define(t,e=this,i={}){if(customElements.get(t));else try{customElements.define(t,e,i)}catch(s){customElements.define(t,class extends e{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}function Yt(t="",e=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${t}-${e}`}Gt.styles=[Jt],Gt.dependencies={},t([Vt({type:Boolean,reflect:!0})],Gt.prototype,"ssr",void 0);class Xt extends Gt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Yt("input"),this._labelId=Yt("label")}setInvalid(t){this.invalid=t,t?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Xt.styles=[...Gt.styles,Ht,qt,Bt,Zt],t([Vt({reflect:!0})],Xt.prototype,"label",void 0),t([Vt({reflect:!0})],Xt.prototype,"hintText",void 0),t([Vt({reflect:!0})],Xt.prototype,"name",void 0),t([Vt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",void 0),t([Vt({type:Boolean,reflect:!0})],Xt.prototype,"invalid",void 0);class Kt{constructor(t,e,i){(this.host=t).addController(this),this._internals=e,this.options=Object.assign({setInvalid:(t,e)=>{t.invalid=e},value:t=>t.value,input:t=>t.input},i)}hostConnected(){this.host.addEventListener("invalid",t=>this.handleInvalid(t))}hostDisconnected(){this.host.removeEventListener("invalid",t=>this.handleInvalid(t))}handleInvalid(t){t.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(t){const e=t.target;this.options.setInvalid(this.host,!1),this.validateInput(e)}handleChange(t){const e=t.target;this.validateInput(e),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(t,e,i){return this._internals.setValidity(t,e,i)}setFormValue(){const t=this.options.value(this.host);this._internals.setFormValue(t)}validateInput(t){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const e=t.validity;if(e.valid)this._internals.setValidity({});else for(const i in e)e[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},t.validationMessage,t))}}const Qt=e=>{class i extends e{constructor(...t){var e;super(...t),this._isTouched=!1,this._internals=this.attachInternals(),null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Kt(this,this._internals))}async firstUpdated(t){super.firstUpdated(t),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||(this._mixinSetFormValue(),this._mixinValidate(this.input))}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(t){this._mixinSetFormValue(),this.inputValidationController.handleChange(t)}_mixinHandleInputChange(t){this._mixinSetFormValue(),this.inputValidationController.handleInput(t)}_mixinResetValidity(t){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(t),this._isTouched&&(this._isTouched=!1)}_mixinValidate(t){this.inputValidationController.validateInput(t)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(t,e,i){return this.inputValidationController.setValidity(t,e,i)}_mixinShouldSkipSgdsValidation(){const t=this.closest("form");return(null==t?void 0:t.noValidate)||this.noValidate}}return i.formAssociated=!0,t([Tt("sgds-input")],i.prototype,"sgdsInput",void 0),t([Tt("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};function te(t,e){const i=Object.assign({waitUntilFirstUpdate:!1},e);return(e,s)=>{const{update:n}=e;if(t in e){const r=t;e.update=function(t){if(t.has(r)){const e=t.get(r),n=this[r];e!==n&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[s](e,n))}n.call(this,t)}}}}var ee,ie,se,ne,re,oe=o`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{min-height:var(--sgds-dimension-136);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`,ae=o`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class le extends(Qt(Xt)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.hintText="",this._isTouched=!1}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(t){t.preventDefault(),this.invalid=!0}_handleChange(t){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(t)}_handleInputChange(t){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(t)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._isTouched&&(this.invalid=!this.textarea.checkValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const t=Lt` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&t}_wordCount(){return Lt`
|
|
79
|
+
*/var jt,Ht=o`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,qt=o`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Bt=o`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Zt=o`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`,Jt=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Gt extends bt{emit(t,e){const i=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(i),i}static define(t,e=this,i={}){if(customElements.get(t));else try{customElements.define(t,e,i)}catch(s){customElements.define(t,class extends e{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}function Yt(t="",e=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${t}-${e}`}Gt.styles=[Jt],Gt.dependencies={},t([kt({type:Boolean,reflect:!0})],Gt.prototype,"ssr",void 0);class Xt extends Gt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Yt("input"),this._labelId=Yt("label")}setInvalid(t){this.invalid=t,t?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Xt.styles=[...Gt.styles,Ht,qt,Bt,Zt],t([kt({reflect:!0})],Xt.prototype,"label",void 0),t([kt({reflect:!0})],Xt.prototype,"hintText",void 0),t([kt({reflect:!0})],Xt.prototype,"name",void 0),t([kt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",void 0),t([kt({type:Boolean,reflect:!0})],Xt.prototype,"invalid",void 0);class Kt{constructor(t,e){(this.host=t).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(t,e)=>{t.invalid=e},value:t=>t.value,input:t=>t.input},e)}hostConnected(){this.host.addEventListener("invalid",t=>this.handleInvalid(t))}hostDisconnected(){this.host.removeEventListener("invalid",t=>this.handleInvalid(t))}handleInvalid(t){t.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(t){const e=t.target;this.options.setInvalid(this.host,!1),this.validateInput(e)}handleChange(t){const e=t.target;this.validateInput(e),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(t,e,i){return this._internals.setValidity(t,e,i)}setFormValue(){const t=this.options.value(this.host);this._internals.setFormValue(t)}validateInput(t){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const e=t.validity;if(e.valid)this._internals.setValidity({});else for(const i in e)e[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},t.validationMessage,t))}}const Qt=e=>{class i extends e{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var t;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(t=this.inputValidationController)&&void 0!==t||(this.inputValidationController=new Kt(this))}async firstUpdated(t){super.firstUpdated(t),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||(this._mixinSetFormValue(),this._mixinValidate(this.input))}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(t){this._mixinSetFormValue(),this.inputValidationController.handleChange(t)}_mixinHandleInputChange(t){this._mixinSetFormValue(),this.inputValidationController.handleInput(t)}_mixinResetValidity(t){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(t),this._isTouched&&(this._isTouched=!1)}_mixinValidate(t){this.inputValidationController.validateInput(t)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(t,e,i){return this.inputValidationController.setValidity(t,e,i)}_mixinShouldSkipSgdsValidation(){const t=this.closest("form");return(null==t?void 0:t.noValidate)||this.noValidate}}return i.formAssociated=!0,t([Tt("sgds-input")],i.prototype,"sgdsInput",void 0),t([Tt("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};function te(t,e){const i=Object.assign({waitUntilFirstUpdate:!1},e);return(e,s)=>{const{update:n}=e;if(t in e){const r=t;e.update=function(t){if(t.has(r)){const e=t.get(r),n=this[r];e!==n&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[s](e,n))}n.call(this,t)}}}}var ee,ie,se,ne,re,oe=o`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{min-height:var(--sgds-dimension-136);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`,ae=o`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;min-width:var(--sgds-dimension-256);padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class le extends(Qt(Xt)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.hintText="",this._isTouched=!1}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(t){t.preventDefault(),this.invalid=!0}_handleChange(t){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(t)}_handleInputChange(t){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(t)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){this._isTouched=!0,this.emit("sgds-blur")}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._isTouched&&(this.invalid=!this.textarea.checkValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const t=Lt` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&t}_wordCount(){return Lt`
|
|
80
80
|
<div
|
|
81
81
|
class="form-text word-count ${Mt({"invalid-feedback":this.invalid&&this.hasFeedback})}"
|
|
82
82
|
>
|
|
@@ -122,5 +122,5 @@ class extends Nt{constructor(t){if(super(t),t.type!==It&&t.type!==Et&&t.type!==U
|
|
|
122
122
|
${this.maxlength>0?this._wordCount():it}
|
|
123
123
|
</div>
|
|
124
124
|
</div>
|
|
125
|
-
`}}le.styles=[...Xt.styles,ae,oe],t([(ee="textarea.form-control-group",(t,e,i)=>{const s=t=>{const i=t.renderRoot?.querySelector(ee)??null;if(null===i&&ie&&!t.hasUpdated){const t="object"==typeof e?e.name:e;Pt("",`@query'd field ${JSON.stringify(String(t))} with the 'cache' flag set for selector '${ee}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(ie){const{get:n,set:r}="object"==typeof e?t:i??(()=>{const t=Symbol(`${String(e)} (@query() cache)`);return{get(){return this[t]},set(e){this[t]=e}}})();return
|
|
125
|
+
`}}le.styles=[...Xt.styles,ae,oe],t([(ee="textarea.form-control-group",(t,e,i)=>{const s=t=>{const i=t.renderRoot?.querySelector(ee)??null;if(null===i&&ie&&!t.hasUpdated){const t="object"==typeof e?e.name:e;Pt("",`@query'd field ${JSON.stringify(String(t))} with the 'cache' flag set for selector '${ee}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(ie){const{get:n,set:r}="object"==typeof e?t:i??(()=>{const t=Symbol(`${String(e)} (@query() cache)`);return{get(){return this[t]},set(e){this[t]=e}}})();return Vt(t,e,{get(){let t=n.call(this);return void 0===t&&(t=s(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return Vt(t,e,{get(){return s(this)}})})],le.prototype,"textarea",void 0),t([kt({type:String,reflect:!0})],le.prototype,"name",void 0),t([kt({type:String,reflect:!0})],le.prototype,"value",void 0),t([kt({type:Number,reflect:!0})],le.prototype,"minlength",void 0),t([kt({type:Number,reflect:!0})],le.prototype,"maxlength",void 0),t([kt({type:Boolean,reflect:!0})],le.prototype,"spellcheck",void 0),t([kt({type:Number})],le.prototype,"rows",void 0),t([kt({type:String,reflect:!0})],le.prototype,"placeholder",void 0),t([kt({type:String,reflect:!0})],le.prototype,"invalidFeedback",void 0),t([kt({type:Boolean,reflect:!0})],le.prototype,"autofocus",void 0),t([kt({type:Boolean,reflect:!0})],le.prototype,"readonly",void 0),t([kt({type:String,reflect:!0})],le.prototype,"resize",void 0),t([kt({type:String,reflect:!0})],le.prototype,"inputmode",void 0),t([kt({type:Boolean,reflect:!0})],le.prototype,"autocorrect",void 0),t([((t="value")=>(e,i)=>{const s=e.constructor,n=s.prototype.attributeChangedCallback;s.prototype.attributeChangedCallback=function(e,r,o){var a;const l=s.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t).toLowerCase()){const e=l.converter||w,s=("function"==typeof e?e:null!==(a=null==e?void 0:e.fromAttribute)&&void 0!==a?a:w.fromAttribute)(o,l.type);this[t]!==s&&(this[i]=s)}n.call(this,e,r,o)}})()],le.prototype,"defaultValue",void 0),t([kt({type:Boolean,reflect:!0})],le.prototype,"hasFeedback",void 0),t([kt({type:Boolean,reflect:!0})],le.prototype,"required",void 0),t([kt({reflect:!0})],le.prototype,"hintText",void 0),t([kt({...se,state:!0,attribute:!1})],le.prototype,"_isTouched",void 0),t([te("rows",{waitUntilFirstUpdate:!0})],le.prototype,"_handleRowsChange",null),t([te("_isTouched",{waitUntilFirstUpdate:!0})],le.prototype,"_handleIsTouched",null),t([te("disabled",{waitUntilFirstUpdate:!0})],le.prototype,"_handleDisabledChange",null),t([te("value",{waitUntilFirstUpdate:!0})],le.prototype,"_handleValueChange",null),ne="sgds-textarea",re=le,customElements.get(ne)||customElements.define(ne,re)});
|
|
126
126
|
//# sourceMappingURL=index.umd.min.js.map
|