kanto-ds 1.10.1 → 1.11.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/dist/cdn/kanto.min.js +171 -130
- package/dist/components/data/kt-chat-message/kt-chat-message.d.ts +6 -0
- package/dist/components/data/kt-chat-message/kt-chat-message.js +49 -13
- package/dist/components/data/kt-chat-message/kt-chat-message.js.map +1 -1
- package/dist/components/overlays/kt-side-panel/kt-side-panel.d.ts +2 -0
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js +30 -19
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js.map +1 -1
- package/dist/custom-elements.json +4198 -4158
- package/dist/docs/kt-chat-message.md +13 -0
- package/dist/docs/kt-side-panel.md +13 -6
- package/dist/vscode.css-custom-data.json +32 -32
- package/dist/vscode.html-custom-data.json +351 -337
- package/dist/web-types.json +1060 -1037
- package/package.json +1 -1
package/dist/cdn/kanto.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vo=Symbol(),ls=new WeakMap,
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),vs=/'/g,bs=/"/g,ks=/^(?:script|style|textarea|title)$/i,Jo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Jo(1),M=Jo(2),Gc=Jo(3),vt=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),xs=new WeakMap,Ir=Fr.createTreeWalker(Fr,129);function ws(o,t){if(!Qo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return fs!==void 0?fs.createHTML(t):t}var $s=(o,t)=>{let e=o.length-1,a=[],r,i=t===2?"<svg>":t===3?"<math>":"",s=Da;for(let p=0;p<e;p++){let h=o[p],u,m,b=-1,k=0;for(;k<h.length&&(s.lastIndex=k,m=s.exec(h),m!==null);)k=s.lastIndex,s===Da?m[1]==="!--"?s=ms:m[1]!==void 0?s=gs:m[2]!==void 0?(ks.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=Er):m[3]!==void 0&&(s=Er):s===Er?m[0]===">"?(s=r??Da,b=-1):m[1]===void 0?b=-2:(b=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?Er:m[3]==='"'?bs:vs):s===bs||s===vs?s=Er:s===ms||s===gs?s=Da:(s=Er,r=void 0);let $=s===Er&&o[p+1].startsWith("/>")?" ":"";i+=s===Da?h+Gn:b>=0?(a.push(u),h.slice(0,b)+Xo+h.slice(b)+Ze+$):h+Ze+(b===-2?p:$)}return[ws(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Ba=class o{constructor({strings:t,_$litType$:e},a){let r;this.parts=[];let i=0,s=0,p=t.length-1,h=this.parts,[u,m]=$s(t,e);if(this.el=o.createElement(u,a),Ir.currentNode=this.el.content,e===2||e===3){let b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=Ir.nextNode())!==null&&h.length<p;){if(r.nodeType===1){if(r.hasAttributes())for(let b of r.getAttributeNames())if(b.endsWith(Xo)){let k=m[s++],$=r.getAttribute(b).split(Ze),D=/([.?@])?(.*)/.exec(k);h.push({type:1,index:i,name:D[2],strings:$,ctor:D[1]==="."?ao:D[1]==="?"?oo:D[1]==="@"?io:Nr}),r.removeAttribute(b)}else b.startsWith(Ze)&&(h.push({type:6,index:i}),r.removeAttribute(b));if(ks.test(r.tagName)){let b=r.textContent.split(Ze),k=b.length-1;if(k>0){r.textContent=eo?eo.emptyScript:"";for(let $=0;$<k;$++)r.append(b[$],Ta()),Ir.nextNode(),h.push({type:2,index:++i});r.append(b[k],Ta())}}}else if(r.nodeType===8)if(r.data===Zo)h.push({type:2,index:i});else{let b=-1;for(;(b=r.data.indexOf(Ze,b+1))!==-1;)h.push({type:7,index:i}),b+=Ze.length-1}i++}}static createElement(t,e){let a=Fr.createElement("template");return a.innerHTML=t,a}};function Ur(o,t,e=o,a){if(t===vt)return t;let r=a!==void 0?e._$Co?.[a]:e._$Cl,i=La(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,a)),a!==void 0?(e._$Co??=[])[a]=r:e._$Cl=r),r!==void 0&&(t=Ur(o,r._$AS(o,t.values),r,a)),t}var ro=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:a}=this._$AD,r=(t?.creationScope??Fr).importNode(e,!0);Ir.currentNode=r;let i=Ir.nextNode(),s=0,p=0,h=a[0];for(;h!==void 0;){if(s===h.index){let u;h.type===2?u=new ia(i,i.nextSibling,this,t):h.type===1?u=new h.ctor(i,h.name,h.strings,this,t):h.type===6&&(u=new so(i,this,t)),this._$AV.push(u),h=a[++p]}s!==h?.index&&(i=Ir.nextNode(),s++)}return Ir.currentNode=Fr,r}p(t){let e=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(t,a,e),e+=a.strings.length-2):a._$AI(t[e])),e++}},ia=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,a,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=a,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ur(this,t,e),La(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==vt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ys(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&La(this._$AH)?this._$AA.nextSibling.data=t:this.T(Fr.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:a}=t,r=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Ba.createElement(ws(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ro(r,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=xs.get(t.strings);return e===void 0&&xs.set(t.strings,e=new Ba(t)),e}k(t){Qo(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,a,r=0;for(let i of t)r===e.length?e.push(a=new o(this.O(Ta()),this.O(Ta()),this,this.options)):a=e[r],a._$AI(i),r++;r<e.length&&(this._$AR(a&&a._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let a=us(t).nextSibling;us(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Nr=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,a,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=d}_$AI(t,e=this,a,r){let i=this.strings,s=!1;if(i===void 0)t=Ur(this,t,e,0),s=!La(t)||t!==this._$AH&&t!==vt,s&&(this._$AH=t);else{let p=t,h,u;for(t=i[0],h=0;h<i.length-1;h++)u=Ur(this,p[a+h],e,h),u===vt&&(u=this._$AH[h]),s||=!La(u)||u!==this._$AH[h],u===d?t=d:t!==d&&(t+=(u??"")+i[h+1]),this._$AH[h]=u}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ao=class extends Nr{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},oo=class extends Nr{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},io=class extends Nr{constructor(t,e,a,r,i){super(t,e,a,r,i),this.type=5}_$AI(t,e=this){if((t=Ur(this,t,e,0)??d)===vt)return;let a=this._$AH,r=t===d&&a!==d||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,i=t!==d&&(a===d||r);r&&this.element.removeEventListener(this.name,this,a),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},so=class{constructor(t,e,a){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(t){Ur(this,t)}},Cs={M:Xo,P:Ze,A:Zo,C:1,L:$s,R:ro,D:ys,V:Ur,I:ia,H:Nr,N:oo,U:io,B:ao,F:so},Wn=Yo.litHtmlPolyfillSupport;Wn?.(Ba,ia),(Yo.litHtmlVersions??=[]).push("3.3.3");var Ss=(o,t,e)=>{let a=e?.renderBefore??t,r=a._$litPart$;if(r===void 0){let i=e?.renderBefore??null;a._$litPart$=r=new ia(t.insertBefore(Ta(),i),i,void 0,e??{})}return r._$AI(o),r};var ti=globalThis,mr=class extends Xe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ss(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};mr._$litElement$=!0,mr.finalized=!0,ti.litElementHydrateSupport?.({LitElement:mr});var Yn=ti.litElementPolyfillSupport;Yn?.({LitElement:mr});(ti.litElementVersions??=[]).push("4.2.2");var Xn={attribute:!0,type:String,converter:Ma,reflect:!1,hasChanged:to},Zn=(o=Xn,t,e)=>{let{kind:a,metadata:r}=e,i=globalThis.litPropertyMetadata.get(r);if(i===void 0&&globalThis.litPropertyMetadata.set(r,i=new Map),a==="setter"&&((o=Object.create(o)).wrapped=!0),i.set(e.name,o),a==="accessor"){let{name:s}=e;return{set(p){let h=t.get.call(this);t.set.call(this,p),this.requestUpdate(s,h,o,!0,p)},init(p){return p!==void 0&&this.C(s,void 0,o,p),p}}}if(a==="setter"){let{name:s}=e;return function(p){let h=this[s];t.call(this,p),this.requestUpdate(s,h,o,!0,p)}}throw Error("Unsupported decorator location: "+a)};function n(o){return(t,e)=>typeof e=="object"?Zn(o,t,e):((a,r,i)=>{let s=r.hasOwnProperty(i);return r.constructor.createProperty(i,a),s?Object.getOwnPropertyDescriptor(r,i):void 0})(o,t,e)}function x(o){return n({...o,state:!0,attribute:!1})}var Qe=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function A(o,t){return(e,a,r)=>{let i=s=>s.renderRoot?.querySelector(o)??null;if(t){let{get:s,set:p}=typeof a=="object"?e:r??(()=>{let h=Symbol();return{get(){return this[h]},set(u){this[h]=u}}})();return Qe(e,a,{get(){let h=s.call(this);return h===void 0&&(h=i(this),(h!==null||this.hasUpdated)&&p.call(this,h)),h}})}return Qe(e,a,{get(){return i(this)}})}}var Qn;function sa(o){return(t,e)=>Qe(t,e,{get(){return(this.renderRoot??(Qn??=document.createDocumentFragment())).querySelectorAll(o)}})}function na(o){return(t,e)=>{let{slot:a,selector:r}=o??{},i="slot"+(a?`[name=${a}]`:":not([name])");return Qe(t,e,{get(){let s=this.renderRoot?.querySelector(i),p=s?.assignedElements(o)??[];return r===void 0?p:p.filter(h=>h.matches(r))}})}}var pe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},la=o=>(...t)=>({_$litDirective$:o,values:t}),gr=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,a){this._$Ct=t,this._$AM=e,this._$Ci=a}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var w=la(class extends gr{constructor(o){if(super(o),o.type!==pe.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(let a in t)t[a]&&!this.nt?.has(a)&&this.st.add(a);return this.render(t)}let e=o.element.classList;for(let a of this.st)a in t||(e.remove(a),this.st.delete(a));for(let a in t){let r=!!t[a];r===this.st.has(a)||this.nt?.has(a)||(r?(e.add(a),this.st.add(a)):(e.remove(a),this.st.delete(a)))}return vt}});var ai=Object.freeze({clear:"Clear",close:"Close",dismiss:"Dismiss",copy:"Copy",copied:"Copied",copyCode:"Copy code",timeRemaining:"Time remaining",remove:o=>o?`Remove ${o}`:"Remove",noOptions:"No options available",noResults:"No results",noActions:"No actions",noData:"No data to display",loading:"Loading\u2026",select:"Select",openList:"Open list",closeList:"Close list",showPassword:"Show password",hidePassword:"Hide password",searchCountry:"Search country or dial code",noCountry:"No country found",countryCode:o=>`Country code: ${o??"none"}`,selectedCount:o=>`${o} selected`,dragAndDrop:"Drag and drop or",browseFiles:"browse your files",recommendedSize:o=>`Recommended image size: ${o}`,selectedFiles:"Selected files",selectDate:"Select a date",selectPeriod:"Select a period",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose month",chooseYear:"Choose year",required:"This field is required.",selectOption:"Select an option.",selectFile:"Select a file.",checkRequired:"Check this box to continue.",dateRequired:"Select a date.",dateInvalid:o=>`Enter a date like ${o}.`,dateOutOfRange:"This date is outside the dates you can choose.",openCalendar:"Open calendar",presetToday:"Today",presetLast7Days:"Last 7 days",presetLast30Days:"Last 30 days",presetThisMonth:"This month",presetLastMonth:"Last month",presetThisYear:"This year",segmentDay:"Day",segmentMonth:"Month",segmentYear:"Year",segmentHour:"Hour",segmentMinute:"Minute",segmentSecond:"Second",segmentDayPeriod:"AM or PM",placeholderDay:"dd",placeholderMonth:"mm",placeholderYear:"yyyy",placeholderTime:"--",timeRequired:"Enter a time.",timeOutOfRange:"This time is outside the times you can choose.",commandPalette:"Command palette",commandPlaceholder:"Type a command or search\u2026",commandHintMove:"to move",commandHintRun:"to run",commandHintClose:"to close",sliderMinimum:"minimum",sliderMaximum:"maximum",stepComplete:"Completed",stepCurrent:"Current step",stepUpcoming:"Not started",stepError:"Needs attention",numberRequired:"Enter a number.",decrease:"Decrease",increase:"Increase",phoneTrunkPrefix:o=>`Enter the number without the leading ${o}.`,openMenu:"Open menu",closeMenu:"Close menu",breadcrumb:"Breadcrumb",secondaryNavigation:"Secondary navigation",pagination:"Pagination",previous:"Previous",next:"Next",pageOf:(o,t)=>`Page ${o} / ${t}`,moreActions:"More actions",options:"Options",formSection:"Form section",selectRow:"Select row",selectAll:"Select all",total:"Total",chartSeries:"Series",chartPoint:"Point",chartSlice:"Slice",chartShare:"Share",chartData:"Chart data",chartValue:"Value",confirmHeading:"Are you sure?",confirm:"Confirm",cancel:"Cancel",details:"Details",avatar:"Avatar",send:"Send",message:"Message",thinking:"Thinking\u2026",sidebar:"Sidebar",moreCount:o=>`${o} more`,otpCharacter:(o,t)=>`Character ${o} of ${t}`,otpRequired:"Enter the whole code.",customColour:"Custom colour",hexColour:"Hex code",stepOf:(o,t)=>`Step ${o} of ${t}`,done:"Done"}),ei={...ai},ri=new Set;function v(){return ei}function Ps(o){ei={...ei,...o};for(let t of ri)t()}function Jn(){Ps(ai)}function As(o){return ri.add(o),()=>ri.delete(o)}var Ms="kt-strings",c=class extends mr{static{this.styles=f`
|
|
1
|
+
var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vo=Symbol(),ls=new WeakMap,Aa=class{constructor(t,e,a){if(this._$cssResult$=!0,a!==Vo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Qa&&t===void 0){let a=e!==void 0&&e.length===1;a&&(t=ls.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),a&&ls.set(e,t))}return t}toString(){return this.cssText}},ds=o=>new Aa(typeof o=="string"?o:o+"",void 0,Vo),f=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((a,r,i)=>a+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1],o[0]);return new Aa(e,o,Vo)},ps=(o,t)=>{if(Qa)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let a=document.createElement("style"),r=Za.litNonce;r!==void 0&&a.setAttribute("nonce",r),a.textContent=e.cssText,o.appendChild(a)}},Go=Qa?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let a of t.cssRules)e+=a.cssText;return ds(e)})(o):o;var{is:In,defineProperty:Fn,getOwnPropertyDescriptor:Un,getOwnPropertyNames:Nn,getOwnPropertySymbols:Hn,getPrototypeOf:jn}=Object,Ja=globalThis,cs=Ja.trustedTypes,_n=cs?cs.emptyScript:"",Vn=Ja.reactiveElementPolyfillSupport,Ma=(o,t)=>o,Da={toAttribute(o,t){switch(t){case Boolean:o=o?_n:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},to=(o,t)=>!In(o,t),hs={attribute:!0,type:String,converter:Da,reflect:!1,useDefault:!1,hasChanged:to};Symbol.metadata??=Symbol("metadata"),Ja.litPropertyMetadata??=new WeakMap;var Ze=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=hs){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let a=Symbol(),r=this.getPropertyDescriptor(t,a,e);r!==void 0&&Fn(this.prototype,t,r)}}static getPropertyDescriptor(t,e,a){let{get:r,set:i}=Un(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:r,set(s){let p=r?.call(this);i?.call(this,s),this.requestUpdate(t,p,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??hs}static _$Ei(){if(this.hasOwnProperty(Ma("elementProperties")))return;let t=jn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ma("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ma("properties"))){let e=this.properties,a=[...Nn(e),...Hn(e)];for(let r of a)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[a,r]of e)this.elementProperties.set(a,r)}this._$Eh=new Map;for(let[e,a]of this.elementProperties){let r=this._$Eu(e,a);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let a=new Set(t.flat(1/0).reverse());for(let r of a)e.unshift(Go(r))}else t!==void 0&&e.push(Go(t));return e}static _$Eu(t,e){let a=e.attribute;return a===!1?void 0:typeof a=="string"?a:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let a of e.keys())this.hasOwnProperty(a)&&(t.set(a,this[a]),delete this[a]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ps(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,a){this._$AK(t,a)}_$ET(t,e){let a=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,a);if(r!==void 0&&a.reflect===!0){let i=(a.converter?.toAttribute!==void 0?a.converter:Da).toAttribute(e,a.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let a=this.constructor,r=a._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=a.getPropertyOptions(r),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Da;this._$Em=r;let p=s.fromAttribute(e,i.type);this[r]=p??this._$Ej?.get(r)??p,this._$Em=null}}requestUpdate(t,e,a,r=!1,i){if(t!==void 0){let s=this.constructor;if(r===!1&&(i=this[t]),a??=s.getPropertyOptions(t),!((a.hasChanged??to)(i,e)||a.useDefault&&a.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,a))))return;this.C(t,e,a)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:a,reflect:r,wrapped:i},s){a&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||a||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[r,i]of a){let{wrapped:s}=i,p=this[r];s!==!0||this._$AL.has(r)||p===void 0||this.C(r,void 0,i,p)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(a=>a.hostUpdate?.()),this.update(e)):this._$EM()}catch(a){throw t=!1,this._$EM(),a}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};Ze.elementStyles=[],Ze.shadowRootOptions={mode:"open"},Ze[Ma("elementProperties")]=new Map,Ze[Ma("finalized")]=new Map,Vn?.({ReactiveElement:Ze}),(Ja.reactiveElementVersions??=[]).push("2.1.2");var Yo=globalThis,us=o=>o,eo=Yo.trustedTypes,fs=eo?eo.createPolicy("lit-html",{createHTML:o=>o}):void 0,Xo="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,Zo="?"+Qe,Gn=`<${Zo}>`,Ur=document,La=()=>Ur.createComment(""),Ba=o=>o===null||typeof o!="object"&&typeof o!="function",Qo=Array.isArray,ys=o=>Qo(o)||typeof o?.[Symbol.iterator]=="function",Wo=`[
|
|
2
|
+
\f\r]`,Ta=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ms=/-->/g,gs=/>/g,Ir=RegExp(`>|${Wo}(?:([^\\s"'>=/]+)(${Wo}*=${Wo}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),vs=/'/g,bs=/"/g,ks=/^(?:script|style|textarea|title)$/i,Jo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Jo(1),M=Jo(2),Gc=Jo(3),vt=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),xs=new WeakMap,Fr=Ur.createTreeWalker(Ur,129);function ws(o,t){if(!Qo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return fs!==void 0?fs.createHTML(t):t}var $s=(o,t)=>{let e=o.length-1,a=[],r,i=t===2?"<svg>":t===3?"<math>":"",s=Ta;for(let p=0;p<e;p++){let h=o[p],u,m,b=-1,k=0;for(;k<h.length&&(s.lastIndex=k,m=s.exec(h),m!==null);)k=s.lastIndex,s===Ta?m[1]==="!--"?s=ms:m[1]!==void 0?s=gs:m[2]!==void 0?(ks.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=Ir):m[3]!==void 0&&(s=Ir):s===Ir?m[0]===">"?(s=r??Ta,b=-1):m[1]===void 0?b=-2:(b=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?Ir:m[3]==='"'?bs:vs):s===bs||s===vs?s=Ir:s===ms||s===gs?s=Ta:(s=Ir,r=void 0);let $=s===Ir&&o[p+1].startsWith("/>")?" ":"";i+=s===Ta?h+Gn:b>=0?(a.push(u),h.slice(0,b)+Xo+h.slice(b)+Qe+$):h+Qe+(b===-2?p:$)}return[ws(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Oa=class o{constructor({strings:t,_$litType$:e},a){let r;this.parts=[];let i=0,s=0,p=t.length-1,h=this.parts,[u,m]=$s(t,e);if(this.el=o.createElement(u,a),Fr.currentNode=this.el.content,e===2||e===3){let b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=Fr.nextNode())!==null&&h.length<p;){if(r.nodeType===1){if(r.hasAttributes())for(let b of r.getAttributeNames())if(b.endsWith(Xo)){let k=m[s++],$=r.getAttribute(b).split(Qe),D=/([.?@])?(.*)/.exec(k);h.push({type:1,index:i,name:D[2],strings:$,ctor:D[1]==="."?ao:D[1]==="?"?oo:D[1]==="@"?io:Hr}),r.removeAttribute(b)}else b.startsWith(Qe)&&(h.push({type:6,index:i}),r.removeAttribute(b));if(ks.test(r.tagName)){let b=r.textContent.split(Qe),k=b.length-1;if(k>0){r.textContent=eo?eo.emptyScript:"";for(let $=0;$<k;$++)r.append(b[$],La()),Fr.nextNode(),h.push({type:2,index:++i});r.append(b[k],La())}}}else if(r.nodeType===8)if(r.data===Zo)h.push({type:2,index:i});else{let b=-1;for(;(b=r.data.indexOf(Qe,b+1))!==-1;)h.push({type:7,index:i}),b+=Qe.length-1}i++}}static createElement(t,e){let a=Ur.createElement("template");return a.innerHTML=t,a}};function Nr(o,t,e=o,a){if(t===vt)return t;let r=a!==void 0?e._$Co?.[a]:e._$Cl,i=Ba(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,a)),a!==void 0?(e._$Co??=[])[a]=r:e._$Cl=r),r!==void 0&&(t=Nr(o,r._$AS(o,t.values),r,a)),t}var ro=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:a}=this._$AD,r=(t?.creationScope??Ur).importNode(e,!0);Fr.currentNode=r;let i=Fr.nextNode(),s=0,p=0,h=a[0];for(;h!==void 0;){if(s===h.index){let u;h.type===2?u=new ia(i,i.nextSibling,this,t):h.type===1?u=new h.ctor(i,h.name,h.strings,this,t):h.type===6&&(u=new so(i,this,t)),this._$AV.push(u),h=a[++p]}s!==h?.index&&(i=Fr.nextNode(),s++)}return Fr.currentNode=Ur,r}p(t){let e=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(t,a,e),e+=a.strings.length-2):a._$AI(t[e])),e++}},ia=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,a,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=a,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Nr(this,t,e),Ba(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==vt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ys(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&Ba(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ur.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:a}=t,r=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Oa.createElement(ws(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ro(r,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=xs.get(t.strings);return e===void 0&&xs.set(t.strings,e=new Oa(t)),e}k(t){Qo(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,a,r=0;for(let i of t)r===e.length?e.push(a=new o(this.O(La()),this.O(La()),this,this.options)):a=e[r],a._$AI(i),r++;r<e.length&&(this._$AR(a&&a._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let a=us(t).nextSibling;us(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Hr=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,a,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=d}_$AI(t,e=this,a,r){let i=this.strings,s=!1;if(i===void 0)t=Nr(this,t,e,0),s=!Ba(t)||t!==this._$AH&&t!==vt,s&&(this._$AH=t);else{let p=t,h,u;for(t=i[0],h=0;h<i.length-1;h++)u=Nr(this,p[a+h],e,h),u===vt&&(u=this._$AH[h]),s||=!Ba(u)||u!==this._$AH[h],u===d?t=d:t!==d&&(t+=(u??"")+i[h+1]),this._$AH[h]=u}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ao=class extends Hr{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},oo=class extends Hr{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},io=class extends Hr{constructor(t,e,a,r,i){super(t,e,a,r,i),this.type=5}_$AI(t,e=this){if((t=Nr(this,t,e,0)??d)===vt)return;let a=this._$AH,r=t===d&&a!==d||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,i=t!==d&&(a===d||r);r&&this.element.removeEventListener(this.name,this,a),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},so=class{constructor(t,e,a){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(t){Nr(this,t)}},Cs={M:Xo,P:Qe,A:Zo,C:1,L:$s,R:ro,D:ys,V:Nr,I:ia,H:Hr,N:oo,U:io,B:ao,F:so},Wn=Yo.litHtmlPolyfillSupport;Wn?.(Oa,ia),(Yo.litHtmlVersions??=[]).push("3.3.3");var Ss=(o,t,e)=>{let a=e?.renderBefore??t,r=a._$litPart$;if(r===void 0){let i=e?.renderBefore??null;a._$litPart$=r=new ia(t.insertBefore(La(),i),i,void 0,e??{})}return r._$AI(o),r};var ti=globalThis,mr=class extends Ze{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ss(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};mr._$litElement$=!0,mr.finalized=!0,ti.litElementHydrateSupport?.({LitElement:mr});var Yn=ti.litElementPolyfillSupport;Yn?.({LitElement:mr});(ti.litElementVersions??=[]).push("4.2.2");var Xn={attribute:!0,type:String,converter:Da,reflect:!1,hasChanged:to},Zn=(o=Xn,t,e)=>{let{kind:a,metadata:r}=e,i=globalThis.litPropertyMetadata.get(r);if(i===void 0&&globalThis.litPropertyMetadata.set(r,i=new Map),a==="setter"&&((o=Object.create(o)).wrapped=!0),i.set(e.name,o),a==="accessor"){let{name:s}=e;return{set(p){let h=t.get.call(this);t.set.call(this,p),this.requestUpdate(s,h,o,!0,p)},init(p){return p!==void 0&&this.C(s,void 0,o,p),p}}}if(a==="setter"){let{name:s}=e;return function(p){let h=this[s];t.call(this,p),this.requestUpdate(s,h,o,!0,p)}}throw Error("Unsupported decorator location: "+a)};function n(o){return(t,e)=>typeof e=="object"?Zn(o,t,e):((a,r,i)=>{let s=r.hasOwnProperty(i);return r.constructor.createProperty(i,a),s?Object.getOwnPropertyDescriptor(r,i):void 0})(o,t,e)}function x(o){return n({...o,state:!0,attribute:!1})}var Je=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function A(o,t){return(e,a,r)=>{let i=s=>s.renderRoot?.querySelector(o)??null;if(t){let{get:s,set:p}=typeof a=="object"?e:r??(()=>{let h=Symbol();return{get(){return this[h]},set(u){this[h]=u}}})();return Je(e,a,{get(){let h=s.call(this);return h===void 0&&(h=i(this),(h!==null||this.hasUpdated)&&p.call(this,h)),h}})}return Je(e,a,{get(){return i(this)}})}}var Qn;function sa(o){return(t,e)=>Je(t,e,{get(){return(this.renderRoot??(Qn??=document.createDocumentFragment())).querySelectorAll(o)}})}function na(o){return(t,e)=>{let{slot:a,selector:r}=o??{},i="slot"+(a?`[name=${a}]`:":not([name])");return Je(t,e,{get(){let s=this.renderRoot?.querySelector(i),p=s?.assignedElements(o)??[];return r===void 0?p:p.filter(h=>h.matches(r))}})}}var ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},la=o=>(...t)=>({_$litDirective$:o,values:t}),gr=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,a){this._$Ct=t,this._$AM=e,this._$Ci=a}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var w=la(class extends gr{constructor(o){if(super(o),o.type!==ce.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(let a in t)t[a]&&!this.nt?.has(a)&&this.st.add(a);return this.render(t)}let e=o.element.classList;for(let a of this.st)a in t||(e.remove(a),this.st.delete(a));for(let a in t){let r=!!t[a];r===this.st.has(a)||this.nt?.has(a)||(r?(e.add(a),this.st.add(a)):(e.remove(a),this.st.delete(a)))}return vt}});var ai=Object.freeze({clear:"Clear",close:"Close",dismiss:"Dismiss",copy:"Copy",copied:"Copied",copyCode:"Copy code",timeRemaining:"Time remaining",remove:o=>o?`Remove ${o}`:"Remove",noOptions:"No options available",noResults:"No results",noActions:"No actions",noData:"No data to display",loading:"Loading\u2026",select:"Select",openList:"Open list",closeList:"Close list",showPassword:"Show password",hidePassword:"Hide password",searchCountry:"Search country or dial code",noCountry:"No country found",countryCode:o=>`Country code: ${o??"none"}`,selectedCount:o=>`${o} selected`,dragAndDrop:"Drag and drop or",browseFiles:"browse your files",recommendedSize:o=>`Recommended image size: ${o}`,selectedFiles:"Selected files",selectDate:"Select a date",selectPeriod:"Select a period",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose month",chooseYear:"Choose year",required:"This field is required.",selectOption:"Select an option.",selectFile:"Select a file.",checkRequired:"Check this box to continue.",dateRequired:"Select a date.",dateInvalid:o=>`Enter a date like ${o}.`,dateOutOfRange:"This date is outside the dates you can choose.",openCalendar:"Open calendar",presetToday:"Today",presetLast7Days:"Last 7 days",presetLast30Days:"Last 30 days",presetThisMonth:"This month",presetLastMonth:"Last month",presetThisYear:"This year",segmentDay:"Day",segmentMonth:"Month",segmentYear:"Year",segmentHour:"Hour",segmentMinute:"Minute",segmentSecond:"Second",segmentDayPeriod:"AM or PM",placeholderDay:"dd",placeholderMonth:"mm",placeholderYear:"yyyy",placeholderTime:"--",timeRequired:"Enter a time.",timeOutOfRange:"This time is outside the times you can choose.",commandPalette:"Command palette",commandPlaceholder:"Type a command or search\u2026",commandHintMove:"to move",commandHintRun:"to run",commandHintClose:"to close",sliderMinimum:"minimum",sliderMaximum:"maximum",stepComplete:"Completed",stepCurrent:"Current step",stepUpcoming:"Not started",stepError:"Needs attention",numberRequired:"Enter a number.",decrease:"Decrease",increase:"Increase",phoneTrunkPrefix:o=>`Enter the number without the leading ${o}.`,openMenu:"Open menu",closeMenu:"Close menu",breadcrumb:"Breadcrumb",secondaryNavigation:"Secondary navigation",pagination:"Pagination",previous:"Previous",next:"Next",pageOf:(o,t)=>`Page ${o} / ${t}`,moreActions:"More actions",options:"Options",formSection:"Form section",selectRow:"Select row",selectAll:"Select all",total:"Total",chartSeries:"Series",chartPoint:"Point",chartSlice:"Slice",chartShare:"Share",chartData:"Chart data",chartValue:"Value",confirmHeading:"Are you sure?",confirm:"Confirm",cancel:"Cancel",details:"Details",avatar:"Avatar",send:"Send",message:"Message",thinking:"Thinking\u2026",sidebar:"Sidebar",moreCount:o=>`${o} more`,otpCharacter:(o,t)=>`Character ${o} of ${t}`,otpRequired:"Enter the whole code.",customColour:"Custom colour",hexColour:"Hex code",stepOf:(o,t)=>`Step ${o} of ${t}`,done:"Done"}),ei={...ai},ri=new Set;function v(){return ei}function Ps(o){ei={...ei,...o};for(let t of ri)t()}function Jn(){Ps(ai)}function As(o){return ri.add(o),()=>ri.delete(o)}var Ms="kt-strings",c=class extends mr{static{this.styles=f`
|
|
4
4
|
:host {
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
}
|
|
@@ -24,7 +24,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
24
24
|
clip-path: inset(50%);
|
|
25
25
|
white-space: nowrap;
|
|
26
26
|
}
|
|
27
|
-
`}connectedCallback(){super.connectedCallback(),this.unsubscribeStrings=As(()=>this.requestUpdate(Ms,Symbol("previous strings")))}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeStrings?.(),this.unsubscribeStrings=void 0}stringsChanged(t){return t.has(Ms)}};function g(o,t){customElements.get(o)||customElements.define(o,t)}var oi=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];var ii=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];var si=[["path",{d:"M8 2v3"}],["path",{d:"M16 2v3"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}],["path",{d:"M3 9h18"}]];var ni=[["path",{d:"M20 6 9 17l-5-5"}]];var li=[["path",{d:"m6 9 6 6 6-6"}]];var di=[["path",{d:"m15 18-6-6 6-6"}]];var pi=[["path",{d:"m9 18 6-6-6-6"}]];var ci=[["path",{d:"m18 15-6-6-6 6"}]];var hi=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];var no=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];var lo=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]];var ui=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];var fi=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];var po=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];var mi=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];var gi=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];var vi=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];var bi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];var xi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}]];var co=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];var yi=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}]];var ki=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];var ho=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];var wi=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];var $i=[["path",{d:"M5 12h14"}]];var uo=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];var Ci=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];var Si=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];var Pi=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];var Ai=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];var Mi=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];var Di=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];var fo=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];var mo=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];var Ti=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];var Li=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]];var Bi=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];var Oi=new Map;function Ds(o){return o.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-zA-Z])(\d)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Ts(o,t){Oi.set(Ds(o),t)}function Ls(o){for(let[t,e]of Object.entries(o))el(e)&&Ts(t,e)}function
|
|
27
|
+
`}connectedCallback(){super.connectedCallback(),this.unsubscribeStrings=As(()=>this.requestUpdate(Ms,Symbol("previous strings")))}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeStrings?.(),this.unsubscribeStrings=void 0}stringsChanged(t){return t.has(Ms)}};function g(o,t){customElements.get(o)||customElements.define(o,t)}var oi=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];var ii=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];var si=[["path",{d:"M8 2v3"}],["path",{d:"M16 2v3"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}],["path",{d:"M3 9h18"}]];var ni=[["path",{d:"M20 6 9 17l-5-5"}]];var li=[["path",{d:"m6 9 6 6 6-6"}]];var di=[["path",{d:"m15 18-6-6 6-6"}]];var pi=[["path",{d:"m9 18 6-6-6-6"}]];var ci=[["path",{d:"m18 15-6-6-6 6"}]];var hi=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];var no=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];var lo=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]];var ui=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];var fi=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];var po=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];var mi=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];var gi=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];var vi=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];var bi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];var xi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}]];var co=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];var yi=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}]];var ki=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];var ho=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];var wi=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];var $i=[["path",{d:"M5 12h14"}]];var uo=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];var Ci=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];var Si=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];var Pi=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];var Ai=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];var Mi=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];var Di=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];var fo=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];var mo=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];var Ti=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];var Li=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]];var Bi=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];var Oi=new Map;function Ds(o){return o.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-zA-Z])(\d)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Ts(o,t){Oi.set(Ds(o),t)}function Ls(o){for(let[t,e]of Object.entries(o))el(e)&&Ts(t,e)}function zi(o){return Oi.get(Ds(o))}function tl(){return[...Oi.keys()].sort()}function el(o){return Array.isArray(o)&&o.every(t=>Array.isArray(t)&&typeof t[0]=="string"&&typeof t[1]=="object"&&t[1]!==null)}var rl={ArrowDown:oi,ArrowUp:ii,Calendar:si,Check:ni,ChevronDown:li,ChevronLeft:di,ChevronRight:pi,ChevronUp:ci,ChevronsUpDown:hi,CircleAlert:no,CircleCheck:lo,Copy:ui,Download:fi,Ellipsis:po,ExternalLink:mi,Eye:gi,EyeOff:vi,File:xi,FileUp:bi,Filter:co,Inbox:yi,Info:ki,LoaderCircle:ho,Menu:wi,Minus:$i,PanelLeft:uo,Pencil:Ci,Plus:Si,RefreshCw:Pi,Search:Ai,Send:Mi,Settings:Di,Trash2:fo,TriangleAlert:mo,Upload:Ti,User:Li,X:Bi};Ls(rl);var al=Object.defineProperty,go=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&al(t,e,r),r},Os="http://www.w3.org/2000/svg",Bs=new Set;function ol([o,t]){let e=document.createElementNS(Os,o);for(let[a,r]of Object.entries(t))r!==void 0&&e.setAttribute(a,String(r));return e}var vr=class extends c{constructor(){super(...arguments),this.name="",this.size=24,this.strokeWidth=2,this.label=""}static{this.styles=[c.styles,f`
|
|
28
28
|
:host {
|
|
29
29
|
display: inline-flex;
|
|
30
30
|
align-items: center;
|
|
@@ -37,7 +37,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
37
37
|
svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
`]}render(){let t=
|
|
40
|
+
`]}render(){let t=zi(this.name);return t?l`<svg
|
|
41
41
|
part="svg"
|
|
42
42
|
xmlns=${Os}
|
|
43
43
|
width=${this.size}
|
|
@@ -59,7 +59,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
59
59
|
height=${this.size}
|
|
60
60
|
viewBox="0 0 24 24"
|
|
61
61
|
aria-hidden="true"
|
|
62
|
-
></svg>`)}};go([n({type:String,reflect:!0})],vr.prototype,"name");go([n({type:Number,reflect:!0})],vr.prototype,"size");go([n({type:Number,attribute:"stroke-width"})],vr.prototype,"strokeWidth");go([n({type:String})],vr.prototype,"label");g("kt-icon",vr);var il=Object.defineProperty,
|
|
62
|
+
></svg>`)}};go([n({type:String,reflect:!0})],vr.prototype,"name");go([n({type:Number,reflect:!0})],vr.prototype,"size");go([n({type:Number,attribute:"stroke-width"})],vr.prototype,"strokeWidth");go([n({type:String})],vr.prototype,"label");g("kt-icon",vr);var il=Object.defineProperty,jr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&il(t,e,r),r},zs=Array.from({length:8},(o,t)=>`var(--chart-series-${t+1})`);function sl(o){let t=(o.includes("@")?o.split("@")[0]??"":o).split(/[\s._-]+/).filter(Boolean);return t.length===0?"":t.length===1?(t[0]??"").slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}var he=class extends c{constructor(){super(...arguments),this.failed=!1,this.name="",this.src="",this.size="medium",this.square=!1,this.color=""}static{this.styles=[c.styles,f`
|
|
63
63
|
:host {
|
|
64
64
|
display: inline-flex;
|
|
65
65
|
--kt-avatar-size: 32px;
|
|
@@ -136,7 +136,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
136
136
|
.offline {
|
|
137
137
|
background: var(--color-text-500);
|
|
138
138
|
}
|
|
139
|
-
`]}willUpdate(t){t.has("src")&&(this.failed=!1)}get hue(){if(this.color)return this.color;let t=0;for(let e of this.name)t+=e.charCodeAt(0);return
|
|
139
|
+
`]}willUpdate(t){t.has("src")&&(this.failed=!1)}get hue(){if(this.color)return this.color;let t=0;for(let e of this.name)t+=e.charCodeAt(0);return zs[t%zs.length]}render(){let t=sl(this.name),e=!!this.src&&!this.failed;return l`<span
|
|
140
140
|
part="base"
|
|
141
141
|
class=${w({avatar:!0,"has-image":e,anonymous:!this.name})}
|
|
142
142
|
style=${e?"":`--kt-avatar-hue:${this.hue}`}
|
|
@@ -150,7 +150,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
150
150
|
@error=${()=>{this.failed=!0}}
|
|
151
151
|
/>`:t||l`<kt-icon name="user" size="16"></kt-icon>`}
|
|
152
152
|
${this.status?l`<span class=${w({status:!0,[this.status]:!0})}></span>`:d}
|
|
153
|
-
</span>`}};
|
|
153
|
+
</span>`}};jr([x()],he.prototype,"failed");jr([n({type:String})],he.prototype,"name");jr([n({type:String})],he.prototype,"src");jr([n({type:String,reflect:!0})],he.prototype,"size");jr([n({type:Boolean,reflect:!0})],he.prototype,"square");jr([n({type:String,reflect:!0})],he.prototype,"status");jr([n({type:String})],he.prototype,"color");g("kt-avatar",he);var Ks="important",nl=" !"+Ks,ct=la(class extends gr{constructor(o){if(super(o),o.type!==ce.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{let a=o[e];return a==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${a};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let a of this.ft)t[a]==null&&(this.ft.delete(a),a.includes("-")?e.removeProperty(a):e[a]=null);for(let a in t){let r=t[a];if(r!=null){this.ft.add(a);let i=typeof r=="string"&&r.endsWith(nl);a.includes("-")||i?e.setProperty(a,i?r.slice(0,-11):r,i?Ks:""):e[a]=r}}return vt}});function y(o,t,e){let a=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return o.dispatchEvent(a),a}var Rs=0;function q(o){return Rs+=1,`${o}-${Rs}`}function N(o,t,e,a,r){o?t.addEventListener(e,a,r):t.removeEventListener(e,a,r)}var ll=Object.defineProperty,De=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ll(t,e,r),r},Rt=class extends c{constructor(){super(...arguments),this.variant="tag",this.tone="neutral",this.size="medium",this.label="",this.color="",this.icon="",this.clickable=!1,this.removable=!1,this.error=!1}static{this.styles=[c.styles,f`
|
|
154
154
|
:host {
|
|
155
155
|
display: inline-flex;
|
|
156
156
|
vertical-align: middle;
|
|
@@ -321,7 +321,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
321
321
|
>
|
|
322
322
|
<kt-icon name="x" size="12"></kt-icon>
|
|
323
323
|
</button>`:d}
|
|
324
|
-
</span>`}};De([n({type:String,reflect:!0})],
|
|
324
|
+
</span>`}};De([n({type:String,reflect:!0})],Rt.prototype,"variant");De([n({type:String,reflect:!0})],Rt.prototype,"tone");De([n({type:String,reflect:!0})],Rt.prototype,"size");De([n({type:String})],Rt.prototype,"label");De([n({type:String})],Rt.prototype,"color");De([n({type:String})],Rt.prototype,"icon");De([n({type:Boolean,reflect:!0})],Rt.prototype,"clickable");De([n({type:Boolean,reflect:!0})],Rt.prototype,"removable");De([n({type:Number})],Rt.prototype,"max");De([n({type:Boolean,reflect:!0})],Rt.prototype,"error");g("kt-badge",Rt);function dl(o){let t=/^\s*(\d*\.?\d+)(ms|s)\s*$/.exec(o);if(!t)return 0;let e=Number(t[1]);return t[2]==="s"?e*1e3:e}function br(o,t){return dl(getComputedStyle(o).getPropertyValue(t))}function Ki(o){return getComputedStyle(o).getPropertyValue("--easing-standard").trim()||"ease"}function qt(o,t,e,a,r={}){let i=br(o,e)*(r.scale??1);if(i<=0||typeof o.animate!="function")return null;for(let p of o.getAnimations())p.id===a&&p.cancel();let s=o.animate(t,{duration:i,easing:r.easing??Ki(o)});return s.id=a,s}var pl={leave:[{opacity:1,scale:1,easing:"ease-in"},{opacity:0,scale:.6}],back:[{opacity:0,scale:.6},{opacity:1,scale:1}]},qs={morphs:!0,leaveScale:1.5,leave:[{translate:"0 0",rotate:"0deg",opacity:1,easing:"cubic-bezier(0.2, 0, 0.4, 1)"},{translate:"-0.15em 0.15em",rotate:"-6deg",opacity:1,offset:.3,easing:"cubic-bezier(0.55, 0, 0.8, 0.4)"},{translate:"1.1em -1.1em",rotate:"6deg",opacity:1,offset:.75},{translate:"1.8em -1.8em",rotate:"10deg",opacity:0}],back:[{translate:"-0.8em 0.8em",opacity:0},{translate:"0 0",opacity:1}]},cl={send:qs,"send-horizontal":qs};function vo(o){return cl[o]??pl}var hl=[{opacity:0,scale:.3},{opacity:1,scale:1.15,offset:.6},{opacity:1,scale:1}],ul=[{translate:"0"},{translate:"-4px"},{translate:"4px"},{translate:"-3px"},{translate:"2px"},{translate:"0"}],bo=[[14.536,21.686],[15.473,21.662],[21.973,2.662],[21.338,2.027],[2.338,8.527],[2.314,9.464],[10.244,12.644],[11.356,13.754]],fl="M21.854 2.147L10.914 13.086",Is=64,xo=[12,12],Es=9;function ml(o){let t=0;return o.forEach(([e,a],r)=>{let[i,s]=o[(r+1)%o.length];t+=e*s-i*a}),Math.sign(t)}var gl=Math.atan2(bo[0][1]-xo[1],bo[0][0]-xo[0]);function vl(o,t){let e=o.map((p,h)=>{let u=o[(h+1)%o.length];return{from:p,to:u,length:Math.hypot(u[0]-p[0],u[1]-p[1])}}),a=e.reduce((p,h)=>p+h.length,0),r=[],i=0,s=0;for(let p=0;p<t;p+=1){let h=a*p/t;for(;s+e[i].length<h;)s+=e[i++].length;let{from:u,to:m,length:b}=e[i],k=b?(h-s)/b:0;r.push([u[0]+(m[0]-u[0])*k,u[1]+(m[1]-u[1])*k])}return r}function bl(o,t){let e=ml(bo)||1;return Array.from({length:o},(a,r)=>{let i=t+e*2*Math.PI*r/o;return[xo[0]+Es*Math.cos(i),xo[1]+Es*Math.sin(i)]})}function xl(o,t,e){return o.map(([a,r],i)=>[a+(t[i][0]-a)*e,r+(t[i][1]-r)*e])}function yl(o){let t=([e,a])=>`${Number(e.toFixed(3))} ${Number(a.toFixed(3))}`;return`M${o.map(t).join("L")}Z`}var kl=Object.defineProperty,wt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kl(t,e,r),r},Ri={small:16,medium:20,large:24},wl=vl(bo,Is),$l=bl(Is,gl),Cl=.28,Sl=1e3,Pl=o=>o<.5?4*o**3:1-(-2*o+2)**3/2,bt=class Fs extends c{constructor(){super(...arguments),this.variant="primary",this.size="medium",this.disabled=!1,this.type="button",this.icon="",this.iconPosition="left",this.label="",this.popup=void 0,this.expanded=void 0,this.fullWidth=!1,this.name="",this.value="",this.doneLabel="",this.failedLabel="",this.phase="idle",this.running=null,this.widthBefore=0,this.morphing=!1,this.shape={m:0,target:0,offset:0,frame:0,last:0,span:1,settled:null},this.step=t=>{let e=this.shape,a=e.last?t-e.last:0;e.last=t;let r=a/e.span;if(e.m=e.target>e.m?Math.min(e.target,e.m+r):Math.max(e.target,e.m-r),e.offset=(e.offset-a/Sl)%1,this.drawShape(),e.target===0&&e.m===0){e.frame=0,e.settled?.(),e.settled=null;return}e.frame=requestAnimationFrame(this.step)}}static{this.styles=[c.styles,f`
|
|
325
325
|
:host {
|
|
326
326
|
display: inline-flex;
|
|
327
327
|
vertical-align: middle;
|
|
@@ -517,8 +517,8 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
517
517
|
part="icon"
|
|
518
518
|
class="morph"
|
|
519
519
|
viewBox="0 0 24 24"
|
|
520
|
-
width=${
|
|
521
|
-
height=${
|
|
520
|
+
width=${Ri[this.size]}
|
|
521
|
+
height=${Ri[this.size]}
|
|
522
522
|
fill="none"
|
|
523
523
|
stroke="currentColor"
|
|
524
524
|
stroke-width="2"
|
|
@@ -532,7 +532,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
532
532
|
part="icon"
|
|
533
533
|
class=${e.motion||d}
|
|
534
534
|
name=${e.name}
|
|
535
|
-
size=${
|
|
535
|
+
size=${Ri[this.size]}
|
|
536
536
|
></kt-icon>`:d,i=this.phase==="done"?this.doneLabel:this.phase==="failed"?this.failedLabel:"";return l`<button
|
|
537
537
|
part="button"
|
|
538
538
|
class=${w({[this.variant]:!0,[this.size]:!0,"icon-only":t})}
|
|
@@ -550,7 +550,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
550
550
|
<slot ?hidden=${!!i&&!t}></slot>
|
|
551
551
|
${this.iconPosition==="right"?r:d}
|
|
552
552
|
</button>
|
|
553
|
-
<span class="visually-hidden" role="status">${i}</span>`}};wt([n({type:String,reflect:!0})],bt.prototype,"variant");wt([n({type:String,reflect:!0})],bt.prototype,"size");wt([n({type:Boolean,reflect:!0})],bt.prototype,"disabled");wt([n({type:String})],bt.prototype,"type");wt([n({type:String})],bt.prototype,"icon");wt([n({type:String,attribute:"icon-position"})],bt.prototype,"iconPosition");wt([n({type:String})],bt.prototype,"label");wt([n({attribute:!1})],bt.prototype,"popup");wt([n({attribute:!1})],bt.prototype,"expanded");wt([n({type:Boolean,reflect:!0,attribute:"full-width"})],bt.prototype,"fullWidth");wt([n({type:String})],bt.prototype,"name");wt([n({type:String})],bt.prototype,"value");wt([n({type:String,attribute:"done-label"})],bt.prototype,"doneLabel");wt([n({type:String,attribute:"failed-label"})],bt.prototype,"failedLabel");wt([x()],bt.prototype,"phase");var Us=bt;g("kt-button",Us);function $t(o){return o.label??String(o.id)}function yo(o,t){let e=t.trim().toLowerCase();return e?o.filter(a=>$t(a).toLowerCase().includes(e)):o}function
|
|
553
|
+
<span class="visually-hidden" role="status">${i}</span>`}};wt([n({type:String,reflect:!0})],bt.prototype,"variant");wt([n({type:String,reflect:!0})],bt.prototype,"size");wt([n({type:Boolean,reflect:!0})],bt.prototype,"disabled");wt([n({type:String})],bt.prototype,"type");wt([n({type:String})],bt.prototype,"icon");wt([n({type:String,attribute:"icon-position"})],bt.prototype,"iconPosition");wt([n({type:String})],bt.prototype,"label");wt([n({attribute:!1})],bt.prototype,"popup");wt([n({attribute:!1})],bt.prototype,"expanded");wt([n({type:Boolean,reflect:!0,attribute:"full-width"})],bt.prototype,"fullWidth");wt([n({type:String})],bt.prototype,"name");wt([n({type:String})],bt.prototype,"value");wt([n({type:String,attribute:"done-label"})],bt.prototype,"doneLabel");wt([n({type:String,attribute:"failed-label"})],bt.prototype,"failedLabel");wt([x()],bt.prototype,"phase");var Us=bt;g("kt-button",Us);function $t(o){return o.label??String(o.id)}function yo(o,t){let e=t.trim().toLowerCase();return e?o.filter(a=>$t(a).toLowerCase().includes(e)):o}function tr(o,t,e){if(o.length===0)return-1;for(let a=1;a<=o.length;a+=1){let r=(t+e*a+o.length*a)%o.length;if(!o[r]?.disabled)return r}return-1}function Et(o){return o.findIndex(t=>!t.disabled)}function xr(o){for(let t=o.length-1;t>=0;t-=1)if(!o[t]?.disabled)return t;return-1}var da=f`
|
|
554
554
|
/* Placed from the field by FloatingController, which also sets its width. */
|
|
555
555
|
.popup {
|
|
556
556
|
display: flex;
|
|
@@ -636,7 +636,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
636
636
|
border: var(--border-width) solid var(--border-popover);
|
|
637
637
|
box-shadow: var(--shadow-popover);
|
|
638
638
|
}
|
|
639
|
-
`,at=class{constructor(t,e){this.options=e,this.open=!1,this.frame=0,this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.place())},t.addController(this)}sync(t){if(t!==this.open){this.open=t;let a=t?"addEventListener":"removeEventListener";window[a]("scroll",this.follow,{capture:!0,passive:!0}),window[a]("resize",this.follow)}let e=this.options.panel();!e||typeof e.showPopover!="function"||(t?(e.matches(":popover-open")||e.showPopover(),this.place(),!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(this.follow),this.resizeObserver.observe(e))):(this.unobserve(),e.matches(":popover-open")&&e.hidePopover()))}unobserve(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0}hostDisconnected(){this.sync(!1),this.unobserve(),cancelAnimationFrame(this.frame)}place(){let t=this.options.panel(),e=this.options.anchor()?.getBoundingClientRect();if(!t||!e)return;let a=this.options.matchWidth;(typeof a=="function"?a():a)&&(t.style.width=`${e.width}px`);let{x:r,y:i,placement:s}=wo(e,{width:t.offsetWidth,height:t.offsetHeight},{width:window.innerWidth,height:window.innerHeight},this.options.side?.()??"bottom",this.options.align?.()??"start");t.style.left=`${r}px`,t.style.top=`${i}px`,this.options.onPlace?.(s)}};var Al=Object.defineProperty,
|
|
639
|
+
`,at=class{constructor(t,e){this.options=e,this.open=!1,this.frame=0,this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.place())},t.addController(this)}sync(t){if(t!==this.open){this.open=t;let a=t?"addEventListener":"removeEventListener";window[a]("scroll",this.follow,{capture:!0,passive:!0}),window[a]("resize",this.follow)}let e=this.options.panel();!e||typeof e.showPopover!="function"||(t?(e.matches(":popover-open")||e.showPopover(),this.place(),!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(this.follow),this.resizeObserver.observe(e))):(this.unobserve(),e.matches(":popover-open")&&e.hidePopover()))}unobserve(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0}hostDisconnected(){this.sync(!1),this.unobserve(),cancelAnimationFrame(this.frame)}place(){let t=this.options.panel(),e=this.options.anchor()?.getBoundingClientRect();if(!t||!e)return;let a=this.options.matchWidth;(typeof a=="function"?a():a)&&(t.style.width=`${e.width}px`);let{x:r,y:i,placement:s}=wo(e,{width:t.offsetWidth,height:t.offsetHeight},{width:window.innerWidth,height:window.innerHeight},this.options.side?.()??"bottom",this.options.align?.()??"start");t.style.left=`${r}px`,t.style.top=`${i}px`,this.options.onPlace?.(s)}};var Al=Object.defineProperty,ue=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Al(t,e,r),r},Ct=class extends c{constructor(){super(...arguments),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.triggerWrapper,side:()=>this.preferredPlacement,align:()=>this.align,onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.options=[],this.value=null,this.preferredPlacement="bottom",this.align="start",this.disabled=!1,this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.hide()},this.onDocumentKeyDown=t=>{t.key==="Escape"&&this.hide()},this.syncTrigger=()=>{let t=this.triggerSlot?.assignedElements()[0];if(!t)return;let e=this.panelSlot?.assignedElements()[0]?.getAttribute("role")==="menu",a=this.options.length>0||e?"menu":void 0;if(Ml(t)){t.popup=a,t.expanded=this.open;return}a?t.setAttribute("aria-haspopup",a):t.removeAttribute("aria-haspopup"),t.setAttribute("aria-expanded",String(this.open))}}static{this.styles=[c.styles,ht,f`
|
|
640
640
|
:host {
|
|
641
641
|
position: relative;
|
|
642
642
|
display: inline-block;
|
|
@@ -755,7 +755,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
755
755
|
</ul>`:l`<slot name="panel">
|
|
756
756
|
<div class="empty">${this.emptyText??v().noResults}</div>
|
|
757
757
|
</slot>`}
|
|
758
|
-
</div>`}};
|
|
758
|
+
</div>`}};ue([A(".trigger")],Ct.prototype,"triggerWrapper");ue([A('slot[name="trigger"]')],Ct.prototype,"triggerSlot");ue([A('slot[name="panel"]')],Ct.prototype,"panelSlot");ue([x()],Ct.prototype,"open");ue([x()],Ct.prototype,"placement");ue([n({attribute:!1})],Ct.prototype,"options");ue([n({type:String})],Ct.prototype,"value");ue([n({type:String,attribute:"preferred-placement"})],Ct.prototype,"preferredPlacement");ue([n({type:String,reflect:!0})],Ct.prototype,"align");ue([n({type:Boolean,reflect:!0})],Ct.prototype,"disabled");ue([n({type:String,attribute:"empty-text"})],Ct.prototype,"emptyText");function Ml(o){return"popup"in o&&"expanded"in o}g("kt-dropdown",Ct);var Dl=Object.defineProperty,fe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dl(t,e,r),r},_s={small:16,medium:20,large:24},St=class extends c{constructor(){super(...arguments),this.activeIndex=-1,this.items=[],this.variant="primary",this.size="medium",this.disabled=!1,this.icon="",this.menuLabel=void 0,this.preferredPlacement="bottom",this.emptyText=void 0,this.onOpen=()=>{this.moveTo(Et(this.items))},this.onClose=()=>{let t=this.shadowRoot?.activeElement;this.activeIndex=-1,t instanceof HTMLElement&&t.classList.contains("item")&&this.caret?.focus()},this.onMenuKeyDown=t=>{let e={ArrowDown:()=>tr(this.items,this.activeIndex,1),ArrowUp:()=>tr(this.items,this.activeIndex,-1),Home:()=>Et(this.items),End:()=>xr(this.items)}[t.key];e&&(t.preventDefault(),this.moveTo(e()))}}static{this.styles=[c.styles,f`
|
|
759
759
|
:host {
|
|
760
760
|
display: inline-flex;
|
|
761
761
|
vertical-align: middle;
|
|
@@ -888,7 +888,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
888
888
|
${this.items.length>0?this.items.map((t,e)=>this.renderItem(t,e)):l`<div class="empty">${this.emptyText??v().noActions}</div>`}
|
|
889
889
|
</div>
|
|
890
890
|
</kt-dropdown>
|
|
891
|
-
</div>`}};
|
|
891
|
+
</div>`}};fe([A("kt-dropdown")],St.prototype,"dropdown");fe([A(".caret")],St.prototype,"caret");fe([x()],St.prototype,"activeIndex");fe([n({attribute:!1})],St.prototype,"items");fe([n({type:String,reflect:!0})],St.prototype,"variant");fe([n({type:String,reflect:!0})],St.prototype,"size");fe([n({type:Boolean,reflect:!0})],St.prototype,"disabled");fe([n({type:String})],St.prototype,"icon");fe([n({type:String,attribute:"menu-label"})],St.prototype,"menuLabel");fe([n({type:String,attribute:"preferred-placement"})],St.prototype,"preferredPlacement");fe([n({type:String,attribute:"empty-text"})],St.prototype,"emptyText");g("kt-split-button",St);function E(o){return o?o.assignedElements({flatten:!0}).length>0?!0:o.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE&&(t.textContent??"").trim()!==""):!1}var Tl=Object.defineProperty,yr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tl(t,e,r),r},ee=class extends c{constructor(){super(...arguments),this.hasHeader=!1,this.hasFooter=!1,this.clickable=!1,this.selected=!1,this.image="",this.imageAlt="",this.imagePosition="left",this.imageSize="120px"}static{this.styles=[c.styles,f`
|
|
892
892
|
:host {
|
|
893
893
|
display: block;
|
|
894
894
|
}
|
|
@@ -1037,7 +1037,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1037
1037
|
<slot name="footer" @slotchange=${this.onSlotChange}></slot>
|
|
1038
1038
|
</div>
|
|
1039
1039
|
</div>
|
|
1040
|
-
</div>`}};yr([x()],ee.prototype,"hasHeader");yr([x()],ee.prototype,"hasFooter");yr([n({type:Boolean,reflect:!0})],ee.prototype,"clickable");yr([n({type:Boolean,reflect:!0})],ee.prototype,"selected");yr([n({type:String})],ee.prototype,"image");yr([n({type:String,attribute:"image-alt"})],ee.prototype,"imageAlt");yr([n({type:String,attribute:"image-position"})],ee.prototype,"imagePosition");yr([n({type:String,attribute:"image-size"})],ee.prototype,"imageSize");g("kt-card",ee);var Ll=Object.defineProperty,$o=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ll(t,e,r),r},
|
|
1040
|
+
</div>`}};yr([x()],ee.prototype,"hasHeader");yr([x()],ee.prototype,"hasFooter");yr([n({type:Boolean,reflect:!0})],ee.prototype,"clickable");yr([n({type:Boolean,reflect:!0})],ee.prototype,"selected");yr([n({type:String})],ee.prototype,"image");yr([n({type:String,attribute:"image-alt"})],ee.prototype,"imageAlt");yr([n({type:String,attribute:"image-position"})],ee.prototype,"imagePosition");yr([n({type:String,attribute:"image-size"})],ee.prototype,"imageSize");g("kt-card",ee);var Ll=Object.defineProperty,$o=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ll(t,e,r),r},za=class Vs extends c{constructor(){super(...arguments),this.copied=!1,this.language="",this.copy=!1,this.label=""}static{this.styles=[c.styles,f`
|
|
1041
1041
|
:host {
|
|
1042
1042
|
display: block;
|
|
1043
1043
|
}
|
|
@@ -1130,7 +1130,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1130
1130
|
tabindex="0"
|
|
1131
1131
|
aria-label=${this.label||d}
|
|
1132
1132
|
><code><slot></slot></code></pre>
|
|
1133
|
-
</div>`}};$o([x()],
|
|
1133
|
+
</div>`}};$o([x()],za.prototype,"copied");$o([n({type:String})],za.prototype,"language");$o([n({type:Boolean})],za.prototype,"copy");$o([n({type:String})],za.prototype,"label");var Gs=za;g("kt-code",Gs);var Bl=Object.defineProperty,Ws=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Bl(t,e,r),r},Ol={mod:"\u2318",meta:"\u2318",cmd:"\u2318",ctrl:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",escape:"esc",backspace:"\u232B"},zl={mod:"Ctrl",meta:"Win",cmd:"Ctrl",ctrl:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift",enter:"Enter",escape:"Esc",backspace:"Backspace"},ca=class extends c{constructor(){super(...arguments),this.keys="",this.platform="auto"}static{this.styles=[c.styles,f`
|
|
1134
1134
|
:host {
|
|
1135
1135
|
display: inline-flex;
|
|
1136
1136
|
align-items: center;
|
|
@@ -1152,9 +1152,9 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1152
1152
|
border: var(--border-width) solid var(--border-subtle);
|
|
1153
1153
|
border-radius: calc(5px * var(--radius-scale, 1));
|
|
1154
1154
|
}
|
|
1155
|
-
`]}get isMac(){return this.platform!=="auto"?this.platform==="mac":typeof navigator>"u"?!1:/mac|iphone|ipad/i.test(navigator.platform||navigator.userAgent)}get labels(){let t=this.isMac?Ol:
|
|
1155
|
+
`]}get isMac(){return this.platform!=="auto"?this.platform==="mac":typeof navigator>"u"?!1:/mac|iphone|ipad/i.test(navigator.platform||navigator.userAgent)}get labels(){let t=this.isMac?Ol:zl;return this.keys.split(/\s+/).filter(Boolean).map(e=>t[e.toLowerCase()]??e.toUpperCase())}render(){let t=this.labels;return l`<span part="base" style="display:contents">
|
|
1156
1156
|
${t.length>0?t.map(e=>l`<kbd part="key">${e}</kbd>`):l`<kbd part="key"><slot></slot></kbd>`}
|
|
1157
|
-
</span>`}};Ws([n({type:String})],ca.prototype,"keys");Ws([n({type:String})],ca.prototype,"platform");g("kt-kbd",ca);var{I:jm}=Cs;var Ys=o=>o.strings===void 0;var
|
|
1157
|
+
</span>`}};Ws([n({type:String})],ca.prototype,"keys");Ws([n({type:String})],ca.prototype,"platform");g("kt-kbd",ca);var{I:jm}=Cs;var Ys=o=>o.strings===void 0;var Kl={},Xs=(o,t=Kl)=>o._$AH=t;var nt=la(class extends gr{constructor(o){if(super(o),o.type!==ce.PROPERTY&&o.type!==ce.ATTRIBUTE&&o.type!==ce.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ys(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===vt||t===d)return t;let e=o.element,a=o.name;if(o.type===ce.PROPERTY){if(t===e[a])return vt}else if(o.type===ce.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(a))return vt}else if(o.type===ce.ATTRIBUTE&&e.getAttribute(a)===t+"")return vt;return Xs(o),t}});function K(o){if(typeof o.attachInternals!="function")return null;let t=o.attachInternals();return typeof t.setFormValue!="function"?null:t}function B(o,t,e){e===void 0?o?.setFormValue(t):o?.setFormValue(t,e)}function H(o,t,e,a){!o||typeof o.setValidity!="function"||(Object.values(t).some(Boolean)?o.setValidity(t,e,a):o.setValidity({}))}var Rl=Object.defineProperty,me=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rl(t,e,r),r},Pt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultChecked=!1,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.formDisabled=!1,this.required=!1,this.size="medium",this.name="",this.value="on",this.label="",this.error="",this.ticked=!1}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
1158
1158
|
:host {
|
|
1159
1159
|
display: inline-flex;
|
|
1160
1160
|
vertical-align: middle;
|
|
@@ -1251,7 +1251,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1251
1251
|
border-color: var(--color-dark-24);
|
|
1252
1252
|
color: var(--text-disabled);
|
|
1253
1253
|
}
|
|
1254
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
1254
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultChecked=this.checked}willUpdate(t){if(this.hasUpdated&&(t.has("checked")||t.has("indeterminate"))&&(this.ticked=this.checked||this.indeterminate),t.has("checked")||t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.checked?this.value:null);let e=this.required&&!this.checked;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().checkRequired:""))}}formResetCallback(){this.checked=this.defaultChecked,this.indeterminate=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.checked=t===this.value}focus(t){this.input?.focus(t)}onChange(t){let e=t.target;this.checked=e.checked,this.indeterminate=!1,y(this,"kt-change",{checked:this.checked})}render(){let t=this.indeterminate?"minus":this.checked?"check":"";return l`${this.error?l`<span id="error-message" class="visually-hidden">${this.error}</span>`:d}<label part="base" class=${this.error?"error":""}>
|
|
1255
1255
|
<span class="control">
|
|
1256
1256
|
<input
|
|
1257
1257
|
part="input"
|
|
@@ -1270,7 +1270,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1270
1270
|
</span>
|
|
1271
1271
|
</span>
|
|
1272
1272
|
<span class="text"><slot></slot></span>
|
|
1273
|
-
</label>`}};
|
|
1273
|
+
</label>`}};me([A("input")],Pt.prototype,"input");me([n({type:Boolean,reflect:!0})],Pt.prototype,"checked");me([n({type:Boolean,reflect:!0})],Pt.prototype,"indeterminate");me([n({type:Boolean,reflect:!0})],Pt.prototype,"disabled");me([x()],Pt.prototype,"formDisabled");me([n({type:Boolean,reflect:!0})],Pt.prototype,"required");me([n({type:String,reflect:!0})],Pt.prototype,"size");me([n({type:String})],Pt.prototype,"name");me([n({type:String})],Pt.prototype,"value");me([n({type:String})],Pt.prototype,"label");me([n({type:String,reflect:!0})],Pt.prototype,"error");g("kt-checkbox",Pt);function Te(o){return o||document.documentElement.lang||navigator.language||"en"}var Zs=new Map;function Vt(o,t){let e=`${o}|${JSON.stringify(t)}`,a=Zs.get(e);return a||(a=new Intl.DateTimeFormat(o,t),Zs.set(e,a)),a}var ql=/^(\d{4})-(\d{2})-(\d{2})$/;function re(o,t){return new Date(Date.UTC(o,t,0)).getUTCDate()}function lt(o){let t=ql.exec(o?.trim()??"");if(!t)return null;let[e,a,r]=[Number(t[1]),Number(t[2]),Number(t[3])];return a<1||a>12||r<1||r>re(e,a)?null:{year:e,month:a,day:r}}function er(o){let t=(e,a=2)=>String(e).padStart(a,"0");return`${t(o.year,4)}-${t(o.month)}-${t(o.day)}`}function Co(o){let[t,e]=(o??"").split("/");return{start:lt(t),end:lt(e)}}function Ka(o,t){return`${er(o)}/${er(t)}`}function V(o,t){return o.year-t.year||o.month-t.month||o.day-t.day}function _r(o,t){return o!==null&&t!==null&&V(o,t)===0}function El(o,t,e){let[a,r]=V(t,e)<=0?[t,e]:[e,t];return V(o,a)>=0&&V(o,r)<=0}function Il(o){let t=new Date(o);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}function Be(o,t){return Il(Date.UTC(o.year,o.month-1,o.day+t))}function Le(o,t){let e=o.year*12+(o.month-1)+t,a=Math.floor(e/12),r=e%12+1;return{year:a,month:r,day:Math.min(o.day,re(a,r))}}function Fl(o){let t=new Date(Date.UTC(o.year,o.month-1,o.day)).getUTCDay();return t===0?7:t}function qi(o,t){return Be(o,-((Fl(o)-t+7)%7))}function Ul(o,t,e){let a=qi({year:o,month:t,day:1},e),r=[];for(let i=0;i<6;i+=1){let s=[];for(let p=0;p<7;p+=1)s.push(a),a=Be(a,1);r.push(s)}return r}function At(){let o=new Date;return{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}}function Ra(o){return new Date(o.year,o.month-1,o.day,12)}function Qs(o){try{let t=new Intl.Locale(o),e=t.getWeekInfo?.().firstDay??t.weekInfo?.firstDay;return e&&e>=1&&e<=7?e:1}catch{return 1}}var Nl=Object.defineProperty,ge=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Nl(t,e,r),r},Hl=120,jl=50,_l=1e3,Mt=class extends c{constructor(){super(...arguments),this.liveId=q("kt-calendar-live"),this.focusCell=!1,this.focusYear=!1,this.typed="",this.typedAt=0,this.committing=!1,this.view="day",this.month={...At(),day:1},this.focused=At(),this.anchor=null,this.value=null,this.range=!1,this.min="",this.max="",this.locale="",this.months=1,this.label=""}static{this.styles=[c.styles,f`
|
|
1274
1274
|
:host {
|
|
1275
1275
|
display: inline-block;
|
|
1276
1276
|
--day-size: 32px;
|
|
@@ -1517,7 +1517,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1517
1517
|
text-decoration: line-through;
|
|
1518
1518
|
cursor: not-allowed;
|
|
1519
1519
|
}
|
|
1520
|
-
`]}connectedCallback(){super.connectedCallback(),this.jumpTo(this.clamp(this.selection.start??At()),!1)}willUpdate(t){if(t.has("value")&&!this.committing&&this.hasUpdated){this.anchor=null;let e=this.selection.start;e&&this.jumpTo(this.clamp(e),!1)}this.committing=!1}updated(){this.view==="month"&&this.revealYear(this.focusYear),this.focusYear=!1,this.focusCell&&(this.focusCell=!1,this.shadowRoot?.querySelector('.cell[tabindex="0"]')?.focus())}revealYear(t){let e=this.shadowRoot?.querySelector(".years"),a=e?.querySelector('[aria-selected="true"]');if(!e||!a)return;let r=a.offsetTop-e.offsetTop;t?(e.scrollTop=r-(e.clientHeight-a.offsetHeight)/2,a.focus({preventScroll:!0})):r<e.scrollTop?e.scrollTop=r:r+a.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=r+a.offsetHeight-e.clientHeight)}focus(){this.focusCell=!0,this.requestUpdate()}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}get bounds(){return{min:lt(this.min),max:lt(this.max)}}clamp(t){let{min:e,max:a}=this.bounds;return e&&V(t,e)<0?e:a&&V(t,a)>0?a:t}isOutOfBounds(t){let{min:e,max:a}=this.bounds;return e!==null&&V(t,e)<0||a!==null&&V(t,a)>0}isSpanOutOfBounds(t,e){let{min:a,max:r}=this.bounds;return r!==null&&V(t,r)>0||a!==null&&V(e,a)<0}format(t,e){return Vt(this.resolvedLocale,t).format(Ra(e))}get monthSpan(){return this.months===2?2:1}jumpTo(t,e=!0){this.focused=t;let a=(t.year-this.month.year)*12+(t.month-this.month.month);a<0?this.month={year:t.year,month:t.month,day:1}:a>=this.monthSpan&&(this.month=Le({year:t.year,month:t.month,day:1},1-this.monthSpan)),this.focusCell=e}page(t){this.month=Le(this.month,t),this.focused=Le(this.focused,t)}setView(t){this.view=t,t==="month"?(this.focused={...this.month,day:this.focused.day},this.focusYear=!0):this.focusCell=!0}get yearRange(){let{min:t,max:e}=this.bounds,a=At().year;return{first:t?.year??a-Hl,last:e?.year??a+jl}}chooseDay(t){if(this.isOutOfBounds(t))return;if(this.focused=t,!this.range){this.commit(
|
|
1520
|
+
`]}connectedCallback(){super.connectedCallback(),this.jumpTo(this.clamp(this.selection.start??At()),!1)}willUpdate(t){if(t.has("value")&&!this.committing&&this.hasUpdated){this.anchor=null;let e=this.selection.start;e&&this.jumpTo(this.clamp(e),!1)}this.committing=!1}updated(){this.view==="month"&&this.revealYear(this.focusYear),this.focusYear=!1,this.focusCell&&(this.focusCell=!1,this.shadowRoot?.querySelector('.cell[tabindex="0"]')?.focus())}revealYear(t){let e=this.shadowRoot?.querySelector(".years"),a=e?.querySelector('[aria-selected="true"]');if(!e||!a)return;let r=a.offsetTop-e.offsetTop;t?(e.scrollTop=r-(e.clientHeight-a.offsetHeight)/2,a.focus({preventScroll:!0})):r<e.scrollTop?e.scrollTop=r:r+a.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=r+a.offsetHeight-e.clientHeight)}focus(){this.focusCell=!0,this.requestUpdate()}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}get bounds(){return{min:lt(this.min),max:lt(this.max)}}clamp(t){let{min:e,max:a}=this.bounds;return e&&V(t,e)<0?e:a&&V(t,a)>0?a:t}isOutOfBounds(t){let{min:e,max:a}=this.bounds;return e!==null&&V(t,e)<0||a!==null&&V(t,a)>0}isSpanOutOfBounds(t,e){let{min:a,max:r}=this.bounds;return r!==null&&V(t,r)>0||a!==null&&V(e,a)<0}format(t,e){return Vt(this.resolvedLocale,t).format(Ra(e))}get monthSpan(){return this.months===2?2:1}jumpTo(t,e=!0){this.focused=t;let a=(t.year-this.month.year)*12+(t.month-this.month.month);a<0?this.month={year:t.year,month:t.month,day:1}:a>=this.monthSpan&&(this.month=Le({year:t.year,month:t.month,day:1},1-this.monthSpan)),this.focusCell=e}page(t){this.month=Le(this.month,t),this.focused=Le(this.focused,t)}setView(t){this.view=t,t==="month"?(this.focused={...this.month,day:this.focused.day},this.focusYear=!0):this.focusCell=!0}get yearRange(){let{min:t,max:e}=this.bounds,a=At().year;return{first:t?.year??a-Hl,last:e?.year??a+jl}}chooseDay(t){if(this.isOutOfBounds(t))return;if(this.focused=t,!this.range){this.commit(er(t));return}if(!this.anchor){this.anchor=t;return}let[e,a]=V(this.anchor,t)<=0?[this.anchor,t]:[t,this.anchor];this.anchor=null,this.commit(Ka(e,a))}commit(t){this.committing=!0,this.value=t,y(this,"kt-change",{value:t})}chooseMonth(t){let e=Math.min(this.focused.day,re(this.focused.year,t));this.jumpTo(this.clamp({year:this.focused.year,month:t,day:e})),this.setView("day")}chooseYear(t,e=!0){let{first:a,last:r}=this.yearRange,i=Math.min(Math.max(t,a),r),s=Math.min(this.focused.day,re(i,this.focused.month));this.focused={year:i,month:this.focused.month,day:s},this.focusYear=e}onYearKeyDown(t){let{year:e}=this.focused,{first:a,last:r}=this.yearRange;if(/^\d$/.test(t.key)){let i=Date.now();this.typed=i-this.typedAt>_l?t.key:this.typed+t.key,this.typedAt=i,this.typed.length===4&&(this.chooseYear(Number(this.typed)),this.typed=""),t.preventDefault();return}switch(t.key){case"ArrowUp":this.chooseYear(e-1);break;case"ArrowDown":this.chooseYear(e+1);break;case"PageUp":this.chooseYear(e-10);break;case"PageDown":this.chooseYear(e+10);break;case"Home":this.chooseYear(a);break;case"End":this.chooseYear(r);break;case"Enter":case" ":this.focusCell=!0,this.requestUpdate();break;case"Escape":t.stopPropagation(),this.setView("day");break;default:return}t.preventDefault()}onDayKeyDown(t){let e=Qs(this.resolvedLocale),a=this.focused,r;switch(t.key){case"ArrowLeft":r=Be(a,-1);break;case"ArrowRight":r=Be(a,1);break;case"ArrowUp":r=Be(a,-7);break;case"ArrowDown":r=Be(a,7);break;case"Home":r=qi(a,e);break;case"End":r=Be(qi(a,e),6);break;case"PageUp":r=Le(a,t.shiftKey?-12:-1);break;case"PageDown":r=Le(a,t.shiftKey?12:1);break;case"Enter":case" ":t.preventDefault(),this.chooseDay(a);return;default:return}t.preventDefault(),this.jumpTo(r)}onPickerKeyDown(t){let e=r=>Le(this.focused,r),a;switch(t.key){case"ArrowLeft":a=e(-1);break;case"ArrowRight":a=e(1);break;case"ArrowUp":a=e(-3);break;case"ArrowDown":a=e(3);break;case"PageUp":a=e(-12);break;case"PageDown":a=e(12);break;case"Enter":case" ":t.preventDefault(),this.chooseMonth(this.focused.month);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.setView("day");return;default:return}t.preventDefault(),this.focused=a,this.focusCell=!0}renderHeader(){let t=v(),e=this.view==="month",a=e?this.focused:this.month,r=l`<div class="navs">
|
|
1521
1521
|
<button type="button" class="nav" aria-label=${t.previousMonth} @click=${()=>this.page(-1)}>
|
|
1522
1522
|
<kt-icon name="chevron-left" size="18"></kt-icon>
|
|
1523
1523
|
</button>
|
|
@@ -1540,12 +1540,12 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1540
1540
|
>
|
|
1541
1541
|
${r}
|
|
1542
1542
|
</div>`:r}
|
|
1543
|
-
</div>`}renderDay(t,e){let a=t.month!==e.month;if(a&&this.monthSpan===2)return l`<td class="blank" role="gridcell"></td>`;let{start:r,end:i}=this.selection,s=this.anchor??r,p=this.anchor?this.focused:i,[h,u]=s&&p&&V(s,p)>0?[p,s]:[s,p],m=this.range?
|
|
1543
|
+
</div>`}renderDay(t,e){let a=t.month!==e.month;if(a&&this.monthSpan===2)return l`<td class="blank" role="gridcell"></td>`;let{start:r,end:i}=this.selection,s=this.anchor??r,p=this.anchor?this.focused:i,[h,u]=s&&p&&V(s,p)>0?[p,s]:[s,p],m=this.range?_r(t,h)||_r(t,u):_r(t,r),b=this.range&&h!==null&&u!==null&&El(t,h,u),k=_r(t,At());return l`<td
|
|
1544
1544
|
part="day"
|
|
1545
1545
|
role="gridcell"
|
|
1546
|
-
class=${w({cell:!0,outside:a,current:k,selected:m,"in-range":b,"range-start":b&&
|
|
1547
|
-
data-date=${
|
|
1548
|
-
tabindex=${
|
|
1546
|
+
class=${w({cell:!0,outside:a,current:k,selected:m,"in-range":b,"range-start":b&&_r(t,h),"range-end":b&&_r(t,u)})}
|
|
1547
|
+
data-date=${er(t)}
|
|
1548
|
+
tabindex=${_r(t,this.focused)?0:-1}
|
|
1549
1549
|
aria-selected=${m?"true":"false"}
|
|
1550
1550
|
aria-disabled=${this.isOutOfBounds(t)?"true":d}
|
|
1551
1551
|
aria-current=${k?"date":d}
|
|
@@ -1614,7 +1614,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1614
1614
|
<span id=${this.liveId} class="visually-hidden" aria-live="polite">${e}</span>
|
|
1615
1615
|
${this.renderHeader()}
|
|
1616
1616
|
<div class="body">${this.view==="day"?this.renderDays():this.renderPicker()}</div>
|
|
1617
|
-
</div>`}};
|
|
1617
|
+
</div>`}};ge([x()],Mt.prototype,"view");ge([x()],Mt.prototype,"month");ge([x()],Mt.prototype,"focused");ge([x()],Mt.prototype,"anchor");ge([n({type:String,reflect:!0})],Mt.prototype,"value");ge([n({type:Boolean,reflect:!0})],Mt.prototype,"range");ge([n({type:String})],Mt.prototype,"min");ge([n({type:String})],Mt.prototype,"max");ge([n({type:String})],Mt.prototype,"locale");ge([n({type:Number,reflect:!0})],Mt.prototype,"months");ge([n({type:String})],Mt.prototype,"label");g("kt-calendar",Mt);function Vl(o,t,e){let a=o.length>=e.length?t:o+t;Number(a)>e.max&&(a=t);let r=a.length>=e.length||Number(a)*10>e.max;return{text:a,advance:r}}function Gl(o,t,e){let a=Math.abs(t)||1,r=e.min,i=e.min+Math.floor((e.max-e.min)/a)*a;if(o===null)return t>0?r:i;let s=o-e.min;if(t>0){let h=e.min+(Math.floor(s/a)+1)*a;return h>e.max?r:h}let p=s%a===0?o-a:e.min+Math.floor(s/a)*a;return p<e.min?i:p}function Ei(o,t){return String(o).padStart(t.length,"0")}var Wl=Object.defineProperty,It=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Wl(t,e,r),r},Js=o=>"key"in o,Yl=new Set(["/",".","-",":",","," "]),rt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.committing=!1,this.errorId=q("kt-segmented-error"),this.texts={},this.typedError="",this.focusedKey=null,this.formDisabled=!1,this.value=null,this.name="",this.label="",this.locale="",this.min="",this.max="",this.size="medium",this.disabled=!1,this.required=!1,this.error=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
1618
1618
|
:host {
|
|
1619
1619
|
display: block;
|
|
1620
1620
|
--field-height: var(--button-height);
|
|
@@ -1699,7 +1699,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1699
1699
|
flex: none;
|
|
1700
1700
|
color: var(--color-danger-text);
|
|
1701
1701
|
}
|
|
1702
|
-
`]}renderAfter(){return d}completeOnBlur(t,e){return null}get expanded(){return!1}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
1702
|
+
`]}renderAfter(){return d}completeOnBlur(t,e){return null}get expanded(){return!1}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,this.texts=this.fill(this.value)}willUpdate(t){if((t.has("value")||t.has("locale"))&&!this.committing&&(this.texts=this.fill(this.value),this.typedError=""),this.committing=!1,t.has("value")||t.has("required")||t.has("error")||t.has("typedError")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value===null&&!this.typedError;H(this.internals,{valueMissing:e,badInput:!!this.typedError,customError:!!this.error},this.error||this.typedError||(e?this.requiredMessage():""))}}formResetCallback(){this.value=this.defaultValue,this.texts=this.fill(this.value),this.typedError=""}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.segmentElements()[0]?.focus(t)}get inactive(){return this.disabled||this.formDisabled}get resolvedLocale(){return Te(this.locale)}commitValue(t){this.texts=this.fill(t),this.typedError="",this.apply(t)}setText(t,e){this.texts={...this.texts,[t]:e};let{value:a,error:r}=this.read(this.texts);this.typedError=r,this.apply(a)}apply(t){t!==this.value&&(this.committing=!0,this.value=t,y(this,"kt-change",{value:t}))}segmentElements(){return[...this.shadowRoot?.querySelectorAll('[role="spinbutton"]')??[]]}focusSegment(t){this.segmentElements()[t]?.focus()}applyKey(t,e,a){let r=this.texts[e.key]??"";if(/^\d$/.test(t)&&e.spec){let i=Vl(r,t,e.spec);return this.setText(e.key,i.text),i.advance&&this.focusSegment(a+1),!0}if(e.choices&&/^\p{L}$/u.test(t)){let i=e.choices.findIndex(s=>s.toLowerCase().startsWith(t.toLowerCase()));return i>=0&&(this.setText(e.key,String(i)),this.focusSegment(a+1)),!0}switch(t){case"ArrowUp":case"ArrowDown":{let i=t==="ArrowUp"?1:-1;if(e.spec){let s=r===""?null:Number(r),p=Gl(s,i*(e.step??1),e.spec);this.setText(e.key,Ei(p,e.spec))}else if(e.choices){let s=e.choices.length,p=r===""?i>0?-1:0:Number(r);this.setText(e.key,String((p+i+s)%s))}return!0}case"Home":case"End":if(e.spec){let i=t==="Home"?e.spec.min:e.spec.max;this.setText(e.key,Ei(i,e.spec))}return!0;case"ArrowLeft":return this.focusSegment(a-1),!0;case"ArrowRight":return this.focusSegment(a+1),!0;case"Backspace":case"Delete":return r?this.setText(e.key,e.choices?"":r.slice(0,-1)):t==="Backspace"&&this.focusSegment(a-1),!0;default:return Yl.has(t)?(r&&this.focusSegment(a+1),!0):t.length===1}}onKeyDown(t,e,a){this.inactive||t.metaKey||t.ctrlKey||t.altKey||this.applyKey(t.key,e,a)&&t.preventDefault()}onBeforeInput(t,e,a){if(t.preventDefault(),!this.inactive){if(t.inputType.startsWith("delete")){this.applyKey("Backspace",e,a);return}for(let r of t.data??"")this.applyKey(r,e,a)}}onFieldClick(t){if(this.inactive||t.target.closest('[role="spinbutton"], button, kt-tooltip'))return;let e=this.items().filter(Js),a=e.findIndex(r=>!this.texts[r.key]);this.focusSegment(a>=0?a:e.length-1)}renderSegment(t,e){let a=this.texts[t.key]??"",r=this.focusedKey===t.key,i=t.placeholder,s=d;return a!==""&&(s=Number(a),t.choices?i=t.choices[Number(a)]??"":t.spec&&(i=r?a:Ei(Number(a),t.spec))),l`<span
|
|
1703
1703
|
part="segment"
|
|
1704
1704
|
role="spinbutton"
|
|
1705
1705
|
class=${w({segment:!0,empty:a===""})}
|
|
@@ -1872,7 +1872,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
1872
1872
|
opacity var(--duration-fast) var(--easing-standard),
|
|
1873
1873
|
transform var(--duration-fast) var(--easing-standard);
|
|
1874
1874
|
}
|
|
1875
|
-
`]}items(){let t=v(),{order:e,separator:a}=tn(this.resolvedLocale),r=Number(this.texts.month)||0,i=this.texts.year?.length===4?Number(this.texts.year):2e3,s=r>=1&&r<=12?re(i,r):31,p={day:{key:"day",label:t.segmentDay,placeholder:t.placeholderDay,spec:{min:1,max:s,length:2}},month:{key:"month",label:t.segmentMonth,placeholder:t.placeholderMonth,spec:{min:1,max:12,length:2}},year:{key:"year",label:t.segmentYear,placeholder:t.placeholderYear,spec:{min:1,max:9999,length:4}}},h=[];return e.forEach((u,m)=>{m>0&&h.push({literal:a}),h.push(p[u])}),h}fill(t){let e=lt(t);return e?{day:String(e.day).padStart(2,"0"),month:String(e.month).padStart(2,"0"),year:String(e.year).padStart(4,"0")}:{day:"",month:"",year:""}}read(t){let{day:e="",month:a="",year:r=""}=t;if(!e||!a||r.length<4)return{value:null,error:""};let i=At(),s={value:null,error:v().dateInvalid(So(this.resolvedLocale,i))},p={year:Number(r),month:Number(a),day:Number(e)};if(p.month<1||p.month>12||p.day<1||p.day>re(p.year,p.month))return s;let h=lt(this.min),u=lt(this.max);return h&&V(p,h)<0||u&&V(p,u)>0?{value:null,error:v().dateOutOfRange}:{value:
|
|
1875
|
+
`]}items(){let t=v(),{order:e,separator:a}=tn(this.resolvedLocale),r=Number(this.texts.month)||0,i=this.texts.year?.length===4?Number(this.texts.year):2e3,s=r>=1&&r<=12?re(i,r):31,p={day:{key:"day",label:t.segmentDay,placeholder:t.placeholderDay,spec:{min:1,max:s,length:2}},month:{key:"month",label:t.segmentMonth,placeholder:t.placeholderMonth,spec:{min:1,max:12,length:2}},year:{key:"year",label:t.segmentYear,placeholder:t.placeholderYear,spec:{min:1,max:9999,length:4}}},h=[];return e.forEach((u,m)=>{m>0&&h.push({literal:a}),h.push(p[u])}),h}fill(t){let e=lt(t);return e?{day:String(e.day).padStart(2,"0"),month:String(e.month).padStart(2,"0"),year:String(e.year).padStart(4,"0")}:{day:"",month:"",year:""}}read(t){let{day:e="",month:a="",year:r=""}=t;if(!e||!a||r.length<4)return{value:null,error:""};let i=At(),s={value:null,error:v().dateInvalid(So(this.resolvedLocale,i))},p={year:Number(r),month:Number(a),day:Number(e)};if(p.month<1||p.month>12||p.day<1||p.day>re(p.year,p.month))return s;let h=lt(this.min),u=lt(this.max);return h&&V(p,h)<0||u&&V(p,u)>0?{value:null,error:v().dateOutOfRange}:{value:er(p),error:""}}completeOnBlur(t,e){if(t.key!=="year"||e.length===0||e.length>2)return null;let a=rn(e,At().year);return a===null?null:String(a).padStart(4,"0")}requiredMessage(){return v().dateRequired}get expanded(){return this.open}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}async toggleCalendar(){if(this.open){this.close(!0);return}this.inactive||(this.open=!0,await this.updateComplete,this.calendarElement?.focus())}close(t){this.open&&(this.open=!1,t&&this.focus())}onCalendarChange(t){t.stopPropagation(),this.commitValue(t.detail.value),this.close(!0)}onPanelKeyDown(t){t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.close(!0))}renderAfter(){if(!this.calendar)return d;let t=v();return l`<button
|
|
1876
1876
|
part="trigger"
|
|
1877
1877
|
type="button"
|
|
1878
1878
|
class="trigger"
|
|
@@ -2115,7 +2115,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2115
2115
|
color: var(--color-primary-text);
|
|
2116
2116
|
font-weight: 600;
|
|
2117
2117
|
}
|
|
2118
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
2118
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("range")||t.has("required")||t.has("error")||t.has("typedError")||this.stringsChanged(t)){let e=this.isComplete();B(this.internals,e?this.value:null);let a=this.required&&!e;H(this.internals,{valueMissing:a,badInput:!!this.typedError,customError:!!this.error},this.error||this.typedError||(a?v().dateRequired:""))}}formResetCallback(){this.value=this.defaultValue,this.editing=!1,this.typedError="",this.close(!1)}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.input?.focus(t)}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}isComplete(){let{start:t,end:e}=this.selection;return t!==null&&e!==null&&V(t,e)<=0}display(){let{start:t,end:e}=this.selection;if(!t||!e)return null;let a=Vt(this.resolvedLocale,{dateStyle:"medium"});return this.range?a.formatRange(Ra(t),Ra(e)):a.format(Ra(t))}static{this.WIDE_ENOUGH=720}async show(){this.inactive||this.open||(this.compact=window.innerWidth<Hi.WIDE_ENOUGH,this.open=!0,await this.updateComplete,this.calendar?.focus())}close(t){this.open&&(this.open=!1,t&&this.focus())}toggle(){this.open?this.close(!0):this.show()}openForTyping(){this.inactive||this.open||(this.compact=window.innerWidth<Hi.WIDE_ENOUGH,this.open=!0)}onCalendarChange(t){t.stopPropagation(),this.editing=!1,this.typedError="",this.value=t.detail.value,this.close(!0),y(this,"kt-change",{value:this.value})}apply(t){this.editing=!1,this.typedError="",this.close(!0),t!==this.value&&(this.value=t,y(this,"kt-change",{value:t}))}outOfBounds(t){let{start:e,end:a}=Co(t),r=lt(this.min),i=lt(this.max);return!e||!a?!0:r!==null&&V(e,r)<0||i!==null&&V(a,i)>0}renderPresets(){let t=this.presets??rd();return!this.range||t.length===0?d:l`<div
|
|
2119
2119
|
part="presets"
|
|
2120
2120
|
class="presets"
|
|
2121
2121
|
role="group"
|
|
@@ -2129,7 +2129,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2129
2129
|
>
|
|
2130
2130
|
${e.label}
|
|
2131
2131
|
</button>`)}
|
|
2132
|
-
</div>`}clear(){this.editing=!1,this.typedError="",this.value=null,y(this,"kt-change",{value:null}),this.focus()}onInput(t){this.text=t.target.value,this.editing=!0}commitTyped(){if(!this.editing)return;this.editing=!1;let t=this.text.trim();if(!t){this.typedError="",this.value!==null&&(this.value=null,y(this,"kt-change",{value:null}));return}let e=this.resolvedLocale,a=At(),r=this.range?on(t,e,a):(()=>{let h=an(t,e,a);return h&&{start:h,end:h}})();if(!r){this.text=t,this.editing=!0,this.typedError=v().dateInvalid(So(e,a));return}let i=lt(this.min),s=lt(this.max);if(i&&V(r.start,i)<0||s&&V(r.end,s)>0){this.text=t,this.editing=!0,this.typedError=v().dateOutOfRange;return}this.typedError="";let p=this.range?Ka(r.start,r.end):
|
|
2132
|
+
</div>`}clear(){this.editing=!1,this.typedError="",this.value=null,y(this,"kt-change",{value:null}),this.focus()}onInput(t){this.text=t.target.value,this.editing=!0}commitTyped(){if(!this.editing)return;this.editing=!1;let t=this.text.trim();if(!t){this.typedError="",this.value!==null&&(this.value=null,y(this,"kt-change",{value:null}));return}let e=this.resolvedLocale,a=At(),r=this.range?on(t,e,a):(()=>{let h=an(t,e,a);return h&&{start:h,end:h}})();if(!r){this.text=t,this.editing=!0,this.typedError=v().dateInvalid(So(e,a));return}let i=lt(this.min),s=lt(this.max);if(i&&V(r.start,i)<0||s&&V(r.end,s)>0){this.text=t,this.editing=!0,this.typedError=v().dateOutOfRange;return}this.typedError="";let p=this.range?Ka(r.start,r.end):er(r.start);p!==this.value&&(this.value=p,y(this,"kt-change",{value:p}))}onInputKeyDown(t){switch(t.key){case"Enter":t.preventDefault(),this.commitTyped(),this.typedError||this.close(!1);return;case"Escape":if(!this.editing&&!this.open)return;t.preventDefault(),t.stopPropagation(),this.editing=!1,this.typedError="",this.close(!1);return;case"ArrowDown":t.preventDefault(),this.show()}}onPanelKeyDown(t){t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.close(!0))}render(){let t=v(),e=this.display(),a=this.placeholder??(this.range?t.selectPeriod:t.selectDate),r=this.error||this.typedError,i=this.clearable&&this.value!==null&&!this.inactive&&!this.editing&&!r;return l`${r?l`<span id="error-message" class="visually-hidden">${r}</span>`:d}
|
|
2133
2133
|
<div
|
|
2134
2134
|
class=${w({open:this.open,error:!!r})}
|
|
2135
2135
|
@focusout=${this.onFocusOut}
|
|
@@ -2202,7 +2202,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2202
2202
|
type="button"
|
|
2203
2203
|
class="today"
|
|
2204
2204
|
?disabled=${this.outOfBounds(Ka(At(),At()))}
|
|
2205
|
-
@click=${()=>this.apply(
|
|
2205
|
+
@click=${()=>this.apply(er(At()))}
|
|
2206
2206
|
>
|
|
2207
2207
|
${t.presetToday}
|
|
2208
2208
|
</button>
|
|
@@ -2333,7 +2333,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2333
2333
|
color: var(--text-muted);
|
|
2334
2334
|
font: var(--font-normal-small);
|
|
2335
2335
|
}
|
|
2336
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
2336
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this)}willUpdate(t){(t.has("files")||t.has("name")||t.has("required")||this.stringsChanged(t))&&this.syncFormValue()}syncFormValue(){let t=null;if(this.name&&this.files.length>0){t=new FormData;for(let a of this.files)t.append(this.name,a)}B(this.internals,t);let e=this.required&&this.files.length===0;H(this.internals,{valueMissing:e},e?v().selectFile:"")}formResetCallback(){this.files=[],this.dragging=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){!(t instanceof FormData)||!this.name||(this.files=t.getAll(this.name).filter(e=>e instanceof File))}get selectedFiles(){return this.files}clear(){this.files=[],y(this,"kt-files-change",{files:this.files})}accepts(t){return this.maxSize>0&&t.size>this.maxSize?!1:this.accept?this.accept.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?t.name.toLowerCase().endsWith(e):e.endsWith("/*")?t.type.startsWith(e.slice(0,-1)):t.type.toLowerCase()===e):!0}addFiles(t){if(!t||t.length===0)return;let e=this.multiple?[...t]:[...t].slice(0,1),a=e.filter(i=>this.accepts(i)),r=e.filter(i=>!this.accepts(i));r.length>0&&y(this,"kt-files-rejected",{files:r,reason:this.maxSize>0&&r.some(i=>i.size>this.maxSize)?"size":"type"}),a.length!==0&&(this.files=this.multiple?[...this.files,...a]:a,y(this,"kt-files-change",{files:this.files}))}removeAt(t){this.files=this.files.filter((e,a)=>a!==t),y(this,"kt-files-change",{files:this.files})}browse(){this.inactive||this.fileInput?.click()}onZoneKeyDown(t){t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),this.browse())}onDragOver(t){this.inactive||(t.preventDefault(),this.dragging=!0)}onDrop(t){this.inactive||(t.preventDefault(),this.dragging=!1,this.addFiles(t.dataTransfer?.files??null))}render(){return l`<div
|
|
2337
2337
|
part="base"
|
|
2338
2338
|
class=${w({zone:!0,dragover:this.dragging})}
|
|
2339
2339
|
role="button"
|
|
@@ -2388,7 +2388,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2388
2388
|
></kt-button>
|
|
2389
2389
|
</li>`)}
|
|
2390
2390
|
</ul>`:d}
|
|
2391
|
-
</div>`}};Gt([A('input[type="file"]')],mt.prototype,"fileInput");Gt([x()],mt.prototype,"dragging");Gt([x()],mt.prototype,"files");Gt([n({type:String})],mt.prototype,"heading");Gt([n({type:String,attribute:"link-text"})],mt.prototype,"linkText");Gt([n({type:String,attribute:"recommended-size"})],mt.prototype,"recommendedSize");Gt([n({type:Boolean})],mt.prototype,"multiple");Gt([n({type:String})],mt.prototype,"accept");Gt([n({type:Number,attribute:"max-size"})],mt.prototype,"maxSize");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"disabled");Gt([x()],mt.prototype,"formDisabled");Gt([n({type:String})],mt.prototype,"name");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"required");g("kt-drag-drop",mt);var id=Object.defineProperty,
|
|
2391
|
+
</div>`}};Gt([A('input[type="file"]')],mt.prototype,"fileInput");Gt([x()],mt.prototype,"dragging");Gt([x()],mt.prototype,"files");Gt([n({type:String})],mt.prototype,"heading");Gt([n({type:String,attribute:"link-text"})],mt.prototype,"linkText");Gt([n({type:String,attribute:"recommended-size"})],mt.prototype,"recommendedSize");Gt([n({type:Boolean})],mt.prototype,"multiple");Gt([n({type:String})],mt.prototype,"accept");Gt([n({type:Number,attribute:"max-size"})],mt.prototype,"maxSize");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"disabled");Gt([x()],mt.prototype,"formDisabled");Gt([n({type:String})],mt.prototype,"name");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"required");g("kt-drag-drop",mt);var id=Object.defineProperty,qa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&id(t,e,r),r},sd={text:"14px",rect:"80px",circle:"40px"},rr=class extends c{constructor(){super(...arguments),this.variant="text",this.width="",this.height="",this.count=1,this.animated=!0}static{this.styles=[c.styles,f`
|
|
2392
2392
|
:host {
|
|
2393
2393
|
display: block;
|
|
2394
2394
|
}
|
|
@@ -2439,7 +2439,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2439
2439
|
data-index=${t}
|
|
2440
2440
|
></span>`}render(){return this.count<=1?this.line(0,!1):l`<span class="group">
|
|
2441
2441
|
${Array.from({length:this.count},(t,e)=>this.line(e,e===this.count-1))}
|
|
2442
|
-
</span>`}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}};
|
|
2442
|
+
</span>`}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}};qa([n({type:String,reflect:!0})],rr.prototype,"variant");qa([n({type:String})],rr.prototype,"width");qa([n({type:String})],rr.prototype,"height");qa([n({type:Number})],rr.prototype,"count");qa([n({type:Boolean})],rr.prototype,"animated");g("kt-skeleton",rr);var nd=Object.defineProperty,Vr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&nd(t,e,r),r},ve=class extends c{constructor(){super(...arguments),this.hasFooter=!1,this.heading="",this.description="",this.loading=!1,this.disabled=!1,this.loadingFields=3}static{this.styles=[c.styles,f`
|
|
2443
2443
|
:host {
|
|
2444
2444
|
display: block;
|
|
2445
2445
|
}
|
|
@@ -2541,7 +2541,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2541
2541
|
<div part="footer" class=${this.hasFooter?"footer":"footer empty"}>
|
|
2542
2542
|
<slot name="footer" @slotchange=${this.onFooterSlotChange}></slot>
|
|
2543
2543
|
</div>
|
|
2544
|
-
</fieldset>`}};
|
|
2544
|
+
</fieldset>`}};Vr([na()],ve.prototype,"fields");Vr([x()],ve.prototype,"hasFooter");Vr([n({type:String})],ve.prototype,"heading");Vr([n({type:String})],ve.prototype,"description");Vr([n({type:Boolean,reflect:!0})],ve.prototype,"loading");Vr([n({type:Boolean,reflect:!0})],ve.prototype,"disabled");Vr([n({type:Number,attribute:"loading-fields"})],ve.prototype,"loadingFields");g("kt-form",ve);var ld=[{id:"al",name:"Albania",dialCode:"355",format:"67 212 3456",trunkPrefix:"0"},{id:"dz",name:"Algeria",dialCode:"213",format:"551 23 45 67",trunkPrefix:"0"},{id:"ao",name:"Angola",dialCode:"244",format:"923 123 456"},{id:"ar",name:"Argentina",dialCode:"54",format:"11 2345 6789",trunkPrefix:"0"},{id:"au",name:"Australia",dialCode:"61",format:"412 345 678",trunkPrefix:"0"},{id:"at",name:"Austria",dialCode:"43",format:"664 1234567",trunkPrefix:"0"},{id:"bd",name:"Bangladesh",dialCode:"880",format:"1812 345678",trunkPrefix:"0"},{id:"be",name:"Belgium",dialCode:"32",format:"1 23 45 67 89",trunkPrefix:"0"},{id:"bo",name:"Bolivia",dialCode:"591",format:"7123 4567",trunkPrefix:"0"},{id:"br",name:"Brazil",dialCode:"55",format:"11 91234 5678",trunkPrefix:"0"},{id:"bg",name:"Bulgaria",dialCode:"359",format:"87 123 4567",trunkPrefix:"0"},{id:"cm",name:"Cameroon",dialCode:"237",format:"6 71 23 45 67"},{id:"ca",name:"Canada",dialCode:"1",format:"506-234-5678",trunkPrefix:"1"},{id:"cl",name:"Chile",dialCode:"56",format:"9 1234 5678"},{id:"cn",name:"China",dialCode:"86",format:"131 2345 6789",trunkPrefix:"0"},{id:"co",name:"Colombia",dialCode:"57",format:"321 123 4567",trunkPrefix:"0"},{id:"cr",name:"Costa Rica",dialCode:"506",format:"8312 3456"},{id:"ci",name:"C\xF4te d'Ivoire",dialCode:"225",format:"01 23 45 67 89"},{id:"hr",name:"Croatia",dialCode:"385",format:"91 234 5678",trunkPrefix:"0"},{id:"cy",name:"Cyprus",dialCode:"357",format:"96 123456"},{id:"cz",name:"Czechia",dialCode:"420",format:"601 123 456"},{id:"dk",name:"Denmark",dialCode:"45",format:"32 12 34 56"},{id:"cd",name:"DR Congo",dialCode:"243",format:"991 234 567",trunkPrefix:"0"},{id:"ec",name:"Ecuador",dialCode:"593",format:"99 123 4567",trunkPrefix:"0"},{id:"eg",name:"Egypt",dialCode:"20",format:"100 123 4567",trunkPrefix:"0"},{id:"ee",name:"Estonia",dialCode:"372",format:"5123 4567"},{id:"et",name:"Ethiopia",dialCode:"251",format:"91 123 4567",trunkPrefix:"0"},{id:"fi",name:"Finland",dialCode:"358",format:"41 234 5678",trunkPrefix:"0"},{id:"fr",name:"France",dialCode:"33",format:"1 23 45 67 89",trunkPrefix:"0"},{id:"ge",name:"Georgia",dialCode:"995",format:"555 123 456",trunkPrefix:"0"},{id:"de",name:"Germany",dialCode:"49",format:"1234 567890",trunkPrefix:"0"},{id:"gh",name:"Ghana",dialCode:"233",format:"23 123 4567",trunkPrefix:"0"},{id:"gr",name:"Greece",dialCode:"30",format:"691 234 5678"},{id:"gt",name:"Guatemala",dialCode:"502",format:"5123 4567"},{id:"hk",name:"Hong Kong",dialCode:"852",format:"5123 4567"},{id:"hu",name:"Hungary",dialCode:"36",format:"20 123 4567",trunkPrefix:"06"},{id:"is",name:"Iceland",dialCode:"354",format:"611 1234"},{id:"in",name:"India",dialCode:"91",format:"81234 56789",trunkPrefix:"0"},{id:"id",name:"Indonesia",dialCode:"62",format:"812 3456 7890",trunkPrefix:"0"},{id:"ir",name:"Iran",dialCode:"98",format:"912 345 6789",trunkPrefix:"0"},{id:"iq",name:"Iraq",dialCode:"964",format:"791 234 5678",trunkPrefix:"0"},{id:"ie",name:"Ireland",dialCode:"353",format:"85 123 4567",trunkPrefix:"0"},{id:"il",name:"Israel",dialCode:"972",format:"50 234 5678",trunkPrefix:"0"},{id:"it",name:"Italy",dialCode:"39",format:"312 345 6789"},{id:"jp",name:"Japan",dialCode:"81",format:"90 1234 5678",trunkPrefix:"0"},{id:"jo",name:"Jordan",dialCode:"962",format:"7 9012 3456",trunkPrefix:"0"},{id:"kz",name:"Kazakhstan",dialCode:"7",format:"771 000 9998"},{id:"ke",name:"Kenya",dialCode:"254",format:"712 123456",trunkPrefix:"0"},{id:"lv",name:"Latvia",dialCode:"371",format:"2123 4567"},{id:"lb",name:"Lebanon",dialCode:"961",format:"71 123 456",trunkPrefix:"0"},{id:"lt",name:"Lithuania",dialCode:"370",format:"612 34567",trunkPrefix:"0"},{id:"lu",name:"Luxembourg",dialCode:"352",format:"628 123 456"},{id:"my",name:"Malaysia",dialCode:"60",format:"12 345 6789",trunkPrefix:"0"},{id:"mx",name:"Mexico",dialCode:"52",format:"55 1234 5678"},{id:"ma",name:"Morocco",dialCode:"212",format:"650 123456",trunkPrefix:"0"},{id:"np",name:"Nepal",dialCode:"977",format:"984 1234567",trunkPrefix:"0"},{id:"nl",name:"Netherlands",dialCode:"31",format:"6 12345678",trunkPrefix:"0"},{id:"nz",name:"New Zealand",dialCode:"64",format:"21 123 4567",trunkPrefix:"0"},{id:"ng",name:"Nigeria",dialCode:"234",format:"802 123 4567",trunkPrefix:"0"},{id:"mk",name:"North Macedonia",dialCode:"389",format:"72 345 678",trunkPrefix:"0"},{id:"no",name:"Norway",dialCode:"47",format:"406 12 345"},{id:"pk",name:"Pakistan",dialCode:"92",format:"301 2345678",trunkPrefix:"0"},{id:"pa",name:"Panama",dialCode:"507",format:"6123 4567"},{id:"pe",name:"Peru",dialCode:"51",format:"912 345 678",trunkPrefix:"0"},{id:"ph",name:"Philippines",dialCode:"63",format:"905 123 4567",trunkPrefix:"0"},{id:"pl",name:"Poland",dialCode:"48",format:"512 345 678"},{id:"pt",name:"Portugal",dialCode:"351",format:"912 345 678"},{id:"qa",name:"Qatar",dialCode:"974",format:"3312 3456"},{id:"ro",name:"Romania",dialCode:"40",format:"712 034 567",trunkPrefix:"0"},{id:"ru",name:"Russia",dialCode:"7",format:"912 345 67 89"},{id:"sa",name:"Saudi Arabia",dialCode:"966",format:"51 234 5678",trunkPrefix:"0"},{id:"sn",name:"Senegal",dialCode:"221",format:"70 123 45 67"},{id:"rs",name:"Serbia",dialCode:"381",format:"60 123 4567",trunkPrefix:"0"},{id:"sg",name:"Singapore",dialCode:"65",format:"8123 4567"},{id:"sk",name:"Slovakia",dialCode:"421",format:"912 123 456",trunkPrefix:"0"},{id:"si",name:"Slovenia",dialCode:"386",format:"31 234 567",trunkPrefix:"0"},{id:"za",name:"South Africa",dialCode:"27",format:"71 123 4567",trunkPrefix:"0"},{id:"kr",name:"South Korea",dialCode:"82",format:"10 1234 5678",trunkPrefix:"0"},{id:"es",name:"Spain",dialCode:"34",format:"612 34 56 78"},{id:"lk",name:"Sri Lanka",dialCode:"94",format:"71 234 5678",trunkPrefix:"0"},{id:"se",name:"Sweden",dialCode:"46",format:"70 123 45 67",trunkPrefix:"0"},{id:"ch",name:"Switzerland",dialCode:"41",format:"12 345 67 89",trunkPrefix:"0"},{id:"tw",name:"Taiwan",dialCode:"886",format:"912 345 678",trunkPrefix:"0"},{id:"tz",name:"Tanzania",dialCode:"255",format:"621 234 567",trunkPrefix:"0"},{id:"th",name:"Thailand",dialCode:"66",format:"81 234 5678",trunkPrefix:"0"},{id:"tn",name:"Tunisia",dialCode:"216",format:"20 123 456"},{id:"tr",name:"T\xFCrkiye",dialCode:"90",format:"501 234 56 78",trunkPrefix:"0"},{id:"ug",name:"Uganda",dialCode:"256",format:"712 345678",trunkPrefix:"0"},{id:"ua",name:"Ukraine",dialCode:"380",format:"50 123 4567",trunkPrefix:"0"},{id:"ae",name:"United Arab Emirates",dialCode:"971",format:"50 123 4567",trunkPrefix:"0"},{id:"gb",name:"United Kingdom",dialCode:"44",format:"7123 456789",trunkPrefix:"0"},{id:"us",name:"United States",dialCode:"1",format:"201-555-0123",trunkPrefix:"1"},{id:"uy",name:"Uruguay",dialCode:"598",format:"94 231 234",trunkPrefix:"0"},{id:"ve",name:"Venezuela",dialCode:"58",format:"412 123 4567",trunkPrefix:"0"},{id:"vn",name:"Vietnam",dialCode:"84",format:"91 234 5678",trunkPrefix:"0"}],dd=127462,pd=65;function ln(o){return/^[a-z]{2}$/i.test(o)?String.fromCodePoint(...[...o.toUpperCase()].map(t=>dd+t.charCodeAt(0)-pd)):""}function cd(o){return o.replace(/\D/g,"")}function hd(o,t){if(!o)return"";let e=t?(t.format.match(/\d+/g)??[]).map(i=>i.length):[],a=[],r=o;for(let i of e){if(!r)break;a.push(r.slice(0,i)),r=r.slice(i)}if(e.length>0)r&&a.push(r);else for(;r;)a.push(r.slice(0,3)),r=r.slice(3);return a.join(" ")}function ud(o,t){let e=t?.trunkPrefix;return e&&o.startsWith(e)?e:void 0}function dn(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function fd(o,t){let e=dn(t.trim());if(!e)return o;let a=e.replace(/^\+/,"");return o.filter(r=>dn(r.name).includes(e)||a!==""&&r.dialCode.startsWith(a)||r.id===e)}var md=Object.defineProperty,X=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&md(t,e,r),r},Ao=18,gd=/^([a-z]{2}):(\d*)$/,F=class extends c{constructor(){super(...arguments),this.internals=null,this.passwordVisible=!1,this.countryOpen=!1,this.countryQuery="",this.focused=!1,this.errorDismissed=!1,this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".country-panel"),anchor:()=>this.shadowRoot?.querySelector(".field")}),this.value="",this.name="",this.type="text",this.placeholder="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.readonly=!1,this.required=!1,this.icon="",this.error="",this.clearable=!0,this.label="",this.autocomplete="",this.countries=ld,this.country="us",this.defaultValue="",this.closeCountryPanel=t=>{t.composedPath().includes(this)||(this.countryOpen=!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,f`
|
|
2545
2545
|
:host {
|
|
2546
2546
|
display: block;
|
|
2547
2547
|
}
|
|
@@ -2767,7 +2767,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2767
2767
|
color: var(--text-muted);
|
|
2768
2768
|
font: var(--font-normal-small);
|
|
2769
2769
|
}
|
|
2770
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.internals??=
|
|
2770
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.internals??=K(this),this.defaultValue=this.value,B(this.internals,this.formValue,this.formState)}updated(t){t.has("countryOpen")&&N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.floating.sync(this.countryOpen)}willUpdate(t){(t.has("value")||t.has("required")||t.has("error")||t.has("country")||t.has("countries")||t.has("type")||this.stringsChanged(t))&&(B(this.internals,this.formValue,this.formState),this.refreshValidity())}refreshValidity(){let t=this.required&&this.value.length===0,e=this.phoneError,a=this.error||e||(t?v().required:"");H(this.internals,{valueMissing:t,patternMismatch:!!e,customError:!!this.error},a)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeCountryPanel)}formResetCallback(){this.value=this.defaultValue,this.passwordVisible=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){let e=gd.exec(t);this.isPhone&&e?(this.country=e[1],this.value=e[2]):this.value=t}focus(t){this.input?.focus(t)}blur(){this.input?.blur()}select(){this.input?.select()}get isPhone(){return this.type==="tel"}get selectedCountry(){return this.countries.find(t=>t.id===this.country)}get formValue(){return!this.isPhone||!this.value?this.value:`+${this.selectedCountry?.dialCode??""}${this.value}`}get formState(){return this.isPhone?`${this.country}:${this.value}`:void 0}get phoneError(){if(!this.isPhone)return"";let t=ud(this.value,this.selectedCountry);return t?v().phoneTrunkPrefix(t):""}get shownError(){return this.error||this.phoneError}get displayValue(){return this.isPhone?hd(this.value,this.selectedCountry):this.value}get showClear(){return this.clearable&&this.value.length>0&&!this.readonly&&!this.inactive}get resolvedType(){return this.isPhone?"text":this.type!=="password"?this.type:this.passwordVisible?"text":"password"}onInput(t){let e=t.target.value;this.value=this.isPhone?cd(e):e,y(this,"kt-input",{value:this.value})}toggleCountryPanel(){this.countryOpen=!this.countryOpen,this.countryQuery=""}selectCountry(t){this.country=t.id,this.countryOpen=!1,this.countryQuery="",y(this,"kt-country-change",{country:t.id,dialCode:t.dialCode}),this.focus()}onCountryKeyDown(t){t.key==="Escape"&&this.countryOpen&&(t.stopPropagation(),this.countryOpen=!1,this.shadowRoot?.querySelector(".country")?.focus())}renderCountryPicker(){let t=this.selectedCountry,e=fd(this.countries,this.countryQuery);return l`<button
|
|
2771
2771
|
type="button"
|
|
2772
2772
|
class="country"
|
|
2773
2773
|
aria-haspopup="listbox"
|
|
@@ -2970,7 +2970,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
2970
2970
|
.open .toggle {
|
|
2971
2971
|
transform: scaleY(-1);
|
|
2972
2972
|
}
|
|
2973
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
2973
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}formResetCallback(){this.value=this.defaultValue,this.close()}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.input?.focus(t)}get selectedOption(){return this.options.find(t=>t.id===this.value)}get visibleOptions(){return yo(this.options,this.query)}get displayValue(){if(this.open&&this.query)return this.query;let t=this.selectedOption;return t?$t(t):this.query}openList(){this.inactive||this.open||(this.open=!0,this.activeIndex=Et(this.visibleOptions))}close(){this.open=!1,this.query="",this.activeIndex=-1}onInput(t){this.query=t.target.value,this.open=!0,this.activeIndex=Et(this.visibleOptions),y(this,"kt-filter",{query:this.query})}choose(t){t.disabled||(this.value=t.id,this.close(),y(this,"kt-change",{value:t.id,option:t}))}clear(t){t.stopPropagation(),this.value=null,this.query="",y(this,"kt-change",{value:null,option:null}),this.input?.focus()}onKeyDown(t){let e=this.visibleOptions;switch(t.key){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=tr(e,this.activeIndex,t.key==="ArrowDown"?1:-1);return;case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(e);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(e);return;case"Enter":{if(!this.open)return;t.preventDefault();let a=e[this.activeIndex];a&&this.choose(a);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.close();return;case"Tab":this.close()}}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.visibleOptions,e=this.selectedOption!==void 0&&!this.inactive;return l`<div
|
|
2974
2974
|
class=${w({open:this.open,error:!!this.error})}
|
|
2975
2975
|
@keydown=${this.onKeyDown}
|
|
2976
2976
|
>
|
|
@@ -3193,7 +3193,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3193
3193
|
width: 16px;
|
|
3194
3194
|
color: var(--color-primary-text);
|
|
3195
3195
|
}
|
|
3196
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
3196
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown),document.fonts?.ready.then(()=>this.fitChips())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}willUpdate(t){if(t.has("value")||t.has("name")||t.has("required")||t.has("error")||this.stringsChanged(t)){let e=null;if(this.value.length>0){e=new FormData;for(let r of this.value)e.append(this.name,String(r))}B(this.internals,e);let a=this.required&&this.value.length===0;H(this.internals,{valueMissing:a,customError:!!this.error},this.error||(a?v().selectOption:""))}}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open),this.observeWidth(),this.fitChips()}formResetCallback(){this.value=this.defaultValue,this.close()}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){let e=t instanceof FormData?t.getAll(this.name).map(String):t?[t]:[];this.value=e.map(a=>this.options.find(r=>String(r.id)===a)?.id??a)}focus(t){this.input?.focus(t)}get selectedOptions(){return this.value.map(t=>this.options.find(e=>e.id===t)??{id:t,label:String(t)})}get visibleOptions(){return yo(this.options,this.query)}isChosen(t){return this.value.includes(t.id)}openList(){this.inactive||this.open||(this.open=!0,this.activeIndex=Et(this.visibleOptions))}close(){this.open=!1,this.query="",this.activeIndex=-1}onInput(t){this.query=t.target.value,this.open=!0,this.activeIndex=Et(this.visibleOptions),y(this,"kt-filter",{query:this.query})}toggle(t){t.disabled||this.inactive||this.commit(this.isChosen(t)?this.value.filter(e=>e!==t.id):[...this.value,t.id])}removeValue(t){this.inactive||this.commit(this.value.filter(e=>e!==t))}commit(t){this.value=t,y(this,"kt-change",{value:t,options:this.selectedOptions})}onKeyDown(t){let e=this.visibleOptions;switch(t.key){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=tr(e,this.activeIndex,t.key==="ArrowDown"?1:-1);return;case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(e);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(e);return;case"Enter":{if(!this.open)return;t.preventDefault();let a=e[this.activeIndex];a&&this.toggle(a);return}case"Backspace":{let a=this.value[this.value.length-1];if(this.input?.value||a===void 0)return;this.removeValue(a);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.close();return;case"Tab":this.close()}}observeWidth(){if(this.resizeObserver||typeof ResizeObserver>"u")return;let t=this.shadowRoot?.querySelector(".control");t&&(this.resizeObserver=new ResizeObserver(()=>this.fitChips()),this.resizeObserver.observe(t))}fitChips(){let t=this.shadowRoot?.querySelector(".control"),e=this.shadowRoot?.querySelector(".chips");if(!t||!e)return;let a=[...e.querySelectorAll(".chip")];for(let k of a)k.hidden=!1;let r=getComputedStyle(t),i=parseFloat(r.columnGap)||0,s=t.querySelector(".toggle")?.getBoundingClientRect().width??0,p=t.clientWidth-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-pn-s-2*i;if(t.clientWidth===0||p<=0)return;let h=e.getBoundingClientRect().left,u=k=>a.filter($=>$.getBoundingClientRect().right-h<=k).length,m=u(p);if(m<a.length){let k=this.shadowRoot?.querySelector(".more")?.getBoundingClientRect().width;m=u(p-(k||xd)-i)}a.forEach((k,$)=>{k.hidden=$>=m});let b=a.length-m;b!==this.overflowCount&&(this.overflowCount=b)}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.visibleOptions,e=this.selectedOptions;return l`<div
|
|
3197
3197
|
class=${w({open:this.open,error:!!this.error})}
|
|
3198
3198
|
@keydown=${this.onKeyDown}
|
|
3199
3199
|
>
|
|
@@ -3277,7 +3277,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3277
3277
|
${$t(a)}
|
|
3278
3278
|
</li>`})}
|
|
3279
3279
|
</ul>
|
|
3280
|
-
</div>`}};xt([A("input")],ot.prototype,"input");xt([x()],ot.prototype,"open");xt([x()],ot.prototype,"placement");xt([x()],ot.prototype,"query");xt([x()],ot.prototype,"activeIndex");xt([x()],ot.prototype,"overflowCount");xt([n({attribute:!1})],ot.prototype,"options");xt([n({attribute:!1})],ot.prototype,"value");xt([n({type:String})],ot.prototype,"placeholder");xt([n({type:String})],ot.prototype,"name");xt([n({type:Boolean,reflect:!0})],ot.prototype,"disabled");xt([x()],ot.prototype,"formDisabled");xt([n({type:Boolean,reflect:!0})],ot.prototype,"required");xt([n({type:String,reflect:!0})],ot.prototype,"error");xt([n({type:String})],ot.prototype,"label");xt([n({type:String,attribute:"empty-text"})],ot.prototype,"emptyText");g("kt-multi-select",ot);var yd=Object.defineProperty,ji=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yd(t,e,r),r},
|
|
3280
|
+
</div>`}};xt([A("input")],ot.prototype,"input");xt([x()],ot.prototype,"open");xt([x()],ot.prototype,"placement");xt([x()],ot.prototype,"query");xt([x()],ot.prototype,"activeIndex");xt([x()],ot.prototype,"overflowCount");xt([n({attribute:!1})],ot.prototype,"options");xt([n({attribute:!1})],ot.prototype,"value");xt([n({type:String})],ot.prototype,"placeholder");xt([n({type:String})],ot.prototype,"name");xt([n({type:Boolean,reflect:!0})],ot.prototype,"disabled");xt([x()],ot.prototype,"formDisabled");xt([n({type:Boolean,reflect:!0})],ot.prototype,"required");xt([n({type:String,reflect:!0})],ot.prototype,"error");xt([n({type:String})],ot.prototype,"label");xt([n({type:String,attribute:"empty-text"})],ot.prototype,"emptyText");g("kt-multi-select",ot);var yd=Object.defineProperty,ji=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yd(t,e,r),r},Gr=class extends c{constructor(){super(...arguments),this.label="",this.required=!1}static{this.styles=[c.styles,f`
|
|
3281
3281
|
:host {
|
|
3282
3282
|
display: flex;
|
|
3283
3283
|
flex-direction: column;
|
|
@@ -3297,7 +3297,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3297
3297
|
`]}get control(){return this.defaultSlot?.assignedElements({flatten:!0}).find(t=>t instanceof HTMLElement)}labelControl(){let t=this.control;t&&("label"in t?t.label=this.label:t.setAttribute("aria-label",this.label))}updated(){this.labelControl()}focusControl(){this.control?.focus()}render(){return l`<label part="label" @click=${this.focusControl}>
|
|
3298
3298
|
${this.label}${this.required?l`<span class="required" aria-hidden="true">*</span>`:""}
|
|
3299
3299
|
</label>
|
|
3300
|
-
<slot @slotchange=${this.labelControl}></slot>`}};ji([A("slot")],
|
|
3300
|
+
<slot @slotchange=${this.labelControl}></slot>`}};ji([A("slot")],Gr.prototype,"defaultSlot");ji([n({type:String})],Gr.prototype,"label");ji([n({type:Boolean,reflect:!0})],Gr.prototype,"required");g("kt-label-input",Gr);var kd=Object.defineProperty,Tt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kd(t,e,r),r},ae=class extends c{constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.tabbable=!1,this.invalid=!1,this.groupDisabled=!1}static{this.styles=[c.styles,f`
|
|
3301
3301
|
:host {
|
|
3302
3302
|
display: block;
|
|
3303
3303
|
/* Whole, even pixels: an even circle around an even dot leaves the
|
|
@@ -3401,7 +3401,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3401
3401
|
flex-wrap: wrap;
|
|
3402
3402
|
column-gap: var(--gap-card);
|
|
3403
3403
|
}
|
|
3404
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
3404
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKeyDown)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}updated(){this.syncRadios()}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.radios.find(e=>e.tabbable)?.focus(t)}enabled(){return this.inactive?[]:this.radios.filter(t=>!t.disabled)}choose(t){t.value!==this.value&&(this.value=t.value,y(this,"kt-change",{value:this.value}))}render(){return l`${this.error?l`<span id="error-message" class="visually-hidden">${this.error}</span>`:d}
|
|
3405
3405
|
<div
|
|
3406
3406
|
part="base"
|
|
3407
3407
|
class="group"
|
|
@@ -3523,7 +3523,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3523
3523
|
.open .chevron {
|
|
3524
3524
|
transform: scaleY(-1);
|
|
3525
3525
|
}
|
|
3526
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
3526
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}formResetCallback(){this.value=this.defaultValue,this.open=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.shadowRoot?.querySelector(".trigger")?.focus(t)}get selectedOption(){return this.options.find(t=>t.id===this.value)}openList(){if(this.inactive)return;this.open=!0;let t=this.options.findIndex(e=>e.id===this.value);this.activeIndex=t>=0?t:Et(this.options)}closeList(){this.open=!1,this.activeIndex=-1}toggleList(){this.open?this.closeList():this.openList()}choose(t){t.disabled||(this.value=t.id,this.closeList(),this.focus(),y(this,"kt-change",{value:t.id,option:t}))}clear(t){t.stopPropagation(),this.value=null,y(this,"kt-change",{value:null,option:null})}onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":{if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=tr(this.options,this.activeIndex,t.key==="ArrowDown"?1:-1);return}case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(this.options);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(this.options);return;case"Enter":case" ":{if(t.preventDefault(),!this.open)return this.openList();let e=this.options[this.activeIndex];e&&this.choose(e);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.closeList();return;case"Tab":this.closeList()}}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.selectedOption,e=this.clearable&&t!==void 0&&!this.inactive;return l`<div
|
|
3527
3527
|
class=${w({open:this.open,error:!!this.error})}
|
|
3528
3528
|
@keydown=${this.onKeyDown}
|
|
3529
3529
|
>
|
|
@@ -3677,7 +3677,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3677
3677
|
display: flex;
|
|
3678
3678
|
color: var(--color-danger-text);
|
|
3679
3679
|
}
|
|
3680
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
3680
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,B(this.internals,this.value)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value.length===0;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().required:""))}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.control?.focus(t)}blur(){this.control?.blur()}onInput(t){this.value=t.target.value,y(this,"kt-input",{value:this.value})}onChange(t){t.stopPropagation(),y(this,"kt-change",{value:this.value})}render(){let t=this.maxlength!==void 0,e=this.maxlength!==void 0&&this.value.length>=this.maxlength;return l`<div
|
|
3681
3681
|
part="base"
|
|
3682
3682
|
class=${w({field:!0,error:!!this.error,disabled:this.inactive})}
|
|
3683
3683
|
>
|
|
@@ -3711,7 +3711,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3711
3711
|
${this.value.length} / ${this.maxlength}
|
|
3712
3712
|
</span>`:d}
|
|
3713
3713
|
</div>`:d}
|
|
3714
|
-
</div>`}};Yt([A("textarea")],gt.prototype,"control");Yt([n({type:String})],gt.prototype,"value");Yt([n({type:String})],gt.prototype,"name");Yt([n({type:String})],gt.prototype,"placeholder");Yt([n({type:Number})],gt.prototype,"rows");Yt([n({type:Number})],gt.prototype,"maxlength");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"disabled");Yt([x()],gt.prototype,"formDisabled");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"readonly");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"required");Yt([n({type:String,reflect:!0})],gt.prototype,"error");Yt([n({type:String})],gt.prototype,"label");Yt([n({type:String,reflect:!0})],gt.prototype,"resize");g("kt-textarea",gt);function wr(o){if(!Number.isFinite(o))return 0;let[t="",e]=o.toExponential().split("e"),a=(t.split(".")[1]??"").length;return Math.max(0,a-Number(e))}var Cd=Object.defineProperty,
|
|
3714
|
+
</div>`}};Yt([A("textarea")],gt.prototype,"control");Yt([n({type:String})],gt.prototype,"value");Yt([n({type:String})],gt.prototype,"name");Yt([n({type:String})],gt.prototype,"placeholder");Yt([n({type:Number})],gt.prototype,"rows");Yt([n({type:Number})],gt.prototype,"maxlength");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"disabled");Yt([x()],gt.prototype,"formDisabled");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"readonly");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"required");Yt([n({type:String,reflect:!0})],gt.prototype,"error");Yt([n({type:String})],gt.prototype,"label");Yt([n({type:String,reflect:!0})],gt.prototype,"resize");g("kt-textarea",gt);function wr(o){if(!Number.isFinite(o))return 0;let[t="",e]=o.toExponential().split("e"),a=(t.split(".")[1]??"").length;return Math.max(0,a-Number(e))}var Cd=Object.defineProperty,be=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Cd(t,e,r),r},Bt=class extends c{constructor(){super(...arguments),this.value="",this.min=0,this.max=100,this.step=1,this.range=!1,this.label="",this.name="",this.disabled=!1,this.showValue=!1,this.format=t=>String(t),this.formDisabled=!1,this.internals=null,this.defaultValue=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
3715
3715
|
:host {
|
|
3716
3716
|
display: block;
|
|
3717
3717
|
--kt-slider-thumb: calc(18px * var(--density-scale, 1));
|
|
@@ -3816,7 +3816,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3816
3816
|
input:disabled::-webkit-slider-thumb {
|
|
3817
3817
|
cursor: not-allowed;
|
|
3818
3818
|
}
|
|
3819
|
-
`]}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
3819
|
+
`]}connectedCallback(){super.connectedCallback(),this.internals??=K(this)}firstUpdated(){this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("min")||t.has("max")||t.has("step")||t.has("range")){let e=this.normalised(this.value);e!==this.value&&(this.value=e),B(this.internals,this.value)}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){t!==null&&(this.value=t)}get numbers(){return this.value.split("/").map(Number)}snap(t){if(!Number.isFinite(t))return this.min;let e=this.step>0?this.step:1,a=this.min+Math.round((t-this.min)/e)*e,r=Math.max(wr(e),wr(this.min));return Number(Math.min(this.max,Math.max(this.min,a)).toFixed(r))}normalised(t){let e=t===""?[]:t.split("/").map(Number);if(!this.range)return String(this.snap(e[0]??this.min));let a=this.snap(e[0]??this.min),r=this.snap(e[1]??this.max);return`${Math.min(a,r)}/${Math.max(a,r)}`}onSlide(t,e,a){let r=t.target,i=this.snap(Number(r.value));if(this.range){let[s,p]=this.numbers;e===0?i=Math.min(i,p):i=Math.max(i,s),r.value=String(i),this.value=e===0?`${i}/${p}`:`${s}/${i}`}else this.value=String(i);y(this,a?"kt-change":"kt-input",{value:this.value})}percent(t){return this.max>this.min?(t-this.min)/(this.max-this.min)*100:0}render(){let t=v(),e=this.numbers,[a,r]=this.range?[e[0],e[1]]:[this.min,e[0]],i=this.disabled||this.formDisabled,s=this.range?`${this.format(e[0])} \u2013 ${this.format(e[1])}`:this.format(e[0]),p=m=>m.charAt(0).toUpperCase()+m.slice(1),h=this.range?this.label?[`${this.label}, ${t.sliderMinimum}`,`${this.label}, ${t.sliderMaximum}`]:[p(t.sliderMinimum),p(t.sliderMaximum)]:[this.label],u=this.range&&e[0]===e[1]&&e[0]>this.min;return l`${this.showValue?l`<div class="head">
|
|
3820
3820
|
<span>${this.label}</span>
|
|
3821
3821
|
<span part="value" class="value">${s}</span>
|
|
3822
3822
|
</div>`:d}
|
|
@@ -3840,7 +3840,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3840
3840
|
@input=${k=>this.onSlide(k,b,!1)}
|
|
3841
3841
|
@change=${k=>this.onSlide(k,b,!0)}
|
|
3842
3842
|
/>`)}
|
|
3843
|
-
</div>`}};
|
|
3843
|
+
</div>`}};be([n({type:String,reflect:!0})],Bt.prototype,"value");be([n({type:Number})],Bt.prototype,"min");be([n({type:Number})],Bt.prototype,"max");be([n({type:Number})],Bt.prototype,"step");be([n({type:Boolean,reflect:!0})],Bt.prototype,"range");be([n({type:String})],Bt.prototype,"label");be([n({type:String})],Bt.prototype,"name");be([n({type:Boolean,reflect:!0})],Bt.prototype,"disabled");be([n({type:Boolean,attribute:"show-value"})],Bt.prototype,"showValue");be([n({attribute:!1})],Bt.prototype,"format");be([x()],Bt.prototype,"formDisabled");g("kt-slider",Bt);var Sd=Object.defineProperty,yt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Sd(t,e,r),r};function Pd(o){let t=new Intl.NumberFormat(o).formatToParts(12345.6);return{group:t.find(e=>e.type==="group")?.value??",",decimal:t.find(e=>e.type==="decimal")?.value??"."}}function Ad(o,t,e=!1){let{group:a,decimal:r}=Pd(t),i=o.replace(/[\u200e\u200f\u061c]/g,"").replace(/[\u2212\u2012\u2013\u2014]/g,"-").replace(/\s/g,"").split(a).join("").replace(r,".").replace(/[%\p{Sc}]/gu,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(i))return NaN;let s=Number(i);return e?s/100:s}var it=class extends c{constructor(){super(...arguments),this.value=null,this.min=Number.NEGATIVE_INFINITY,this.max=Number.POSITIVE_INFINITY,this.step=1,this.name="",this.label="",this.locale="",this.placeholder="",this.size="medium",this.disabled=!1,this.required=!1,this.error="",this.formatOptions={},this.focused=!1,this.formDisabled=!1,this.internals=null,this.defaultValue=null,this.errorId=q("kt-number-error"),this.rolling=0}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
3844
3844
|
:host {
|
|
3845
3845
|
display: block;
|
|
3846
3846
|
--field-height: var(--button-height);
|
|
@@ -3938,7 +3938,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3938
3938
|
outline: var(--outline-width) solid var(--color-primary-base);
|
|
3939
3939
|
outline-offset: -2px;
|
|
3940
3940
|
}
|
|
3941
|
-
`]}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
3941
|
+
`]}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.value=this.value===null?null:this.clamp(this.value),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().numberRequired:""))}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t===null||t===""?null:Number(t)}focus(t){this.input?.focus(t)}get resolvedLocale(){return Te(this.locale)}get inactive(){return this.disabled||this.formDisabled}clamp(t){let e=this.step>0?this.step:1,a=Number.isFinite(this.min)?this.min:0,r=a+Math.round((t-a)/e)*e,i=Math.max(wr(e),wr(a));return Number(Math.min(this.max,Math.max(this.min,r)).toFixed(i))}commit(t){let e=t===null?null:this.clamp(t);this.input&&(this.input.value=this.text(e)),e!==this.value&&(this.value=e,y(this,"kt-change",{value:e}))}text(t){if(t===null)return"";let e=Math.max(wr(this.step),wr(this.min));if(this.focused){let r=this.percent?t*100:t;return new Intl.NumberFormat(this.resolvedLocale,{maximumFractionDigits:20,useGrouping:!1}).format(Number(r.toPrecision(15)))}let a=this.formatOptions.minimumFractionDigits??0;return new Intl.NumberFormat(this.resolvedLocale,{maximumFractionDigits:Math.max(e,3,a),...this.formatOptions}).format(t)}get percent(){return this.formatOptions.style==="percent"}stepBy(t){if(this.inactive)return;let e=this.value,a=e??(Number.isFinite(this.min)?this.min:0);this.commit(e===null?a:a+t*this.step),e!==null&&this.value!==null&&this.value!==e&&(this.rolling=Math.sign(this.value-e))}updated(t){if(super.updated(t),!this.rolling)return;let e=`${this.rolling*.6}em`;this.rolling=0,qt(this.renderRoot.querySelector("input"),[{translate:`0 ${e}`,opacity:0},{translate:"0 0",opacity:1}],"--duration-fast","kt-number-roll")}onKeyDown(t){let e={ArrowUp:()=>this.stepBy(1),ArrowDown:()=>this.stepBy(-1),PageUp:()=>this.stepBy(10),PageDown:()=>this.stepBy(-10),Home:()=>Number.isFinite(this.min)&&this.commit(this.min),End:()=>Number.isFinite(this.max)&&this.commit(this.max),Enter:()=>this.readTyped()}[t.key];e&&(t.preventDefault(),e())}readTyped(){let t=this.input.value.trim();if(t===""){this.commit(null);return}let e=Ad(t,this.resolvedLocale,this.percent);if(Number.isNaN(e)){this.input.value=this.text(this.value);return}this.commit(e)}onFocus(){this.focused=!0,this.input.value=this.text(this.value)}onBlur(){this.readTyped(),this.focused=!1,this.input.value=this.text(this.value)}render(){let t=v(),e=this.inactive,a=this.value!==null&&this.value<=this.min,r=this.value!==null&&this.value>=this.max,i=this.text(this.value);return l`${this.error?l`<span id=${this.errorId} class="visually-hidden">${this.error}</span>`:d}
|
|
3942
3942
|
<div
|
|
3943
3943
|
part="field"
|
|
3944
3944
|
class=${w({field:!0,error:!!this.error,disabled:e})}
|
|
@@ -3986,7 +3986,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
3986
3986
|
>
|
|
3987
3987
|
<kt-icon name="plus" size="16"></kt-icon>
|
|
3988
3988
|
</button>
|
|
3989
|
-
</div>`}};yt([n({converter:{fromAttribute:o=>{let t=o===null||o.trim()===""?NaN:Number(o);return Number.isFinite(t)?t:null}}})],it.prototype,"value");yt([n({type:Number})],it.prototype,"min");yt([n({type:Number})],it.prototype,"max");yt([n({type:Number})],it.prototype,"step");yt([n({type:String})],it.prototype,"name");yt([n({type:String})],it.prototype,"label");yt([n({type:String})],it.prototype,"locale");yt([n({type:String})],it.prototype,"placeholder");yt([n({type:String,reflect:!0})],it.prototype,"size");yt([n({type:Boolean,reflect:!0})],it.prototype,"disabled");yt([n({type:Boolean,reflect:!0})],it.prototype,"required");yt([n({type:String,reflect:!0})],it.prototype,"error");yt([n({attribute:!1})],it.prototype,"formatOptions");yt([x()],it.prototype,"focused");yt([x()],it.prototype,"formDisabled");yt([A("input")],it.prototype,"input");g("kt-number-input",it);var Md=Object.defineProperty,_i=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Md(t,e,r),r};function Dd(o,t){let e=Vt(o,{hour:"2-digit",minute:"2-digit",hourCycle:t?"h12":"h23"}),a=e.formatToParts(new Date(2026,0,1,1,5)),r=a.map(p=>p.type),i=a.find(p=>p.type==="literal")?.value.trim()||":",s=p=>e.formatToParts(new Date(2026,0,1,p)).find(h=>h.type==="dayPeriod")?.value??(p<12?"AM":"PM");return{separator:i==="."?".":":",periodFirst:r.indexOf("dayPeriod")>=0&&r.indexOf("dayPeriod")<r.indexOf("hour"),periods:[s(1),s(13)]}}function Mo(o){let t=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec(o);if(!t)return null;let[e,a,r=0]=t.slice(1).map(i=>Number(i??0));return e>23||a>59||r>59?null:e*3600+a*60+r}var
|
|
3989
|
+
</div>`}};yt([n({converter:{fromAttribute:o=>{let t=o===null||o.trim()===""?NaN:Number(o);return Number.isFinite(t)?t:null}}})],it.prototype,"value");yt([n({type:Number})],it.prototype,"min");yt([n({type:Number})],it.prototype,"max");yt([n({type:Number})],it.prototype,"step");yt([n({type:String})],it.prototype,"name");yt([n({type:String})],it.prototype,"label");yt([n({type:String})],it.prototype,"locale");yt([n({type:String})],it.prototype,"placeholder");yt([n({type:String,reflect:!0})],it.prototype,"size");yt([n({type:Boolean,reflect:!0})],it.prototype,"disabled");yt([n({type:Boolean,reflect:!0})],it.prototype,"required");yt([n({type:String,reflect:!0})],it.prototype,"error");yt([n({attribute:!1})],it.prototype,"formatOptions");yt([x()],it.prototype,"focused");yt([x()],it.prototype,"formDisabled");yt([A("input")],it.prototype,"input");g("kt-number-input",it);var Md=Object.defineProperty,_i=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Md(t,e,r),r};function Dd(o,t){let e=Vt(o,{hour:"2-digit",minute:"2-digit",hourCycle:t?"h12":"h23"}),a=e.formatToParts(new Date(2026,0,1,1,5)),r=a.map(p=>p.type),i=a.find(p=>p.type==="literal")?.value.trim()||":",s=p=>e.formatToParts(new Date(2026,0,1,p)).find(h=>h.type==="dayPeriod")?.value??(p<12?"AM":"PM");return{separator:i==="."?".":":",periodFirst:r.indexOf("dayPeriod")>=0&&r.indexOf("dayPeriod")<r.indexOf("hour"),periods:[s(1),s(13)]}}function Mo(o){let t=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec(o);if(!t)return null;let[e,a,r=0]=t.slice(1).map(i=>Number(i??0));return e>23||a>59||r>59?null:e*3600+a*60+r}var Ea=o=>String(o).padStart(2,"0"),Wr=class extends rt{constructor(){super(...arguments),this.seconds=!1,this.hourCycle="",this.step=1}get twelve(){if(this.hourCycle)return this.hourCycle==="h12";let t=Vt(this.resolvedLocale,{hour:"numeric"}).resolvedOptions().hourCycle;return t==="h11"||t==="h12"}willUpdate(t){(t.has("hourCycle")||t.has("seconds"))&&(this.texts=this.fill(this.value)),super.willUpdate(t)}items(){let t=v(),e=this.twelve,{separator:a,periodFirst:r,periods:i}=Dd(this.resolvedLocale,e),s=(h,u,m,b,k=1)=>({key:h,label:u,placeholder:t.placeholderTime,spec:{min:m,max:b,length:2},step:k}),p=[e?s("hour",t.segmentHour,1,12):s("hour",t.segmentHour,0,23),{literal:a},s("minute",t.segmentMinute,0,59,Math.max(1,Math.round(this.step)||1))];if(this.seconds&&p.push({literal:a},s("second",t.segmentSecond,0,59)),e){let h={key:"period",label:t.segmentDayPeriod,placeholder:t.placeholderTime,choices:i};r?p.unshift(h,{literal:" "}):p.push({literal:" "},h)}return p}fill(t){let e=t===null?null:Mo(t);if(e===null)return{hour:"",minute:"",second:"",period:""};let a=Math.floor(e/3600);return{hour:Ea(this.twelve?a%12||12:a),minute:Ea(Math.floor(e/60)%60),second:Ea(e%60),period:a<12?"0":"1"}}read(t){let{hour:e="",minute:a="",second:r="",period:i=""}=t,s=this.twelve;if(e.length<2||a.length<2||this.seconds&&r.length<2||s&&i==="")return{value:null,error:""};let p=Number(e);if(s){if(p<1||p>12)return{value:null,error:""};p=p%12+(i==="1"?12:0)}let h=`${Ea(p)}:${a}${this.seconds?`:${r}`:""}`,u=Mo(h);if(u===null)return{value:null,error:""};let m=Mo(this.min),b=Mo(this.max);return m!==null&&u<m||b!==null&&u>b?{value:null,error:v().timeOutOfRange}:{value:h,error:""}}completeOnBlur(t,e){if(!t.spec||e.length!==1)return null;let a=Number(e);return a<t.spec.min?null:Ea(a)}requiredMessage(){return v().timeRequired}};_i([n({type:Boolean,reflect:!0})],Wr.prototype,"seconds");_i([n({type:String,attribute:"hour-cycle"})],Wr.prototype,"hourCycle");_i([n({type:Number})],Wr.prototype,"step");g("kt-time-input",Wr);var Td=Object.defineProperty,Yr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Td(t,e,r),r},xe=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultChecked=!1,this.checked=!1,this.disabled=!1,this.formDisabled=!1,this.size="medium",this.name="",this.value="on",this.label=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
3990
3990
|
:host {
|
|
3991
3991
|
display: inline-flex;
|
|
3992
3992
|
align-items: center;
|
|
@@ -4072,7 +4072,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4072
4072
|
color: var(--text-disabled);
|
|
4073
4073
|
cursor: not-allowed;
|
|
4074
4074
|
}
|
|
4075
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
4075
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultChecked=this.checked,this.syncFormValue()}willUpdate(t){(t.has("checked")||t.has("value"))&&this.syncFormValue()}syncFormValue(){B(this.internals,this.checked?this.value:null)}formResetCallback(){this.checked=this.defaultChecked}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.checked=t===this.value}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}toggle(){this.inactive||(this.checked=!this.checked,y(this,"kt-change",{checked:this.checked}))}render(){return l`<button
|
|
4076
4076
|
part="base"
|
|
4077
4077
|
type="button"
|
|
4078
4078
|
role="switch"
|
|
@@ -4086,7 +4086,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4086
4086
|
<span part="thumb" class="thumb"></span>
|
|
4087
4087
|
</span>
|
|
4088
4088
|
</button>
|
|
4089
|
-
<span id="label" class="label" @click=${this.toggle}><slot></slot></span>`}};
|
|
4089
|
+
<span id="label" class="label" @click=${this.toggle}><slot></slot></span>`}};Yr([n({type:Boolean,reflect:!0})],xe.prototype,"checked");Yr([n({type:Boolean,reflect:!0})],xe.prototype,"disabled");Yr([x()],xe.prototype,"formDisabled");Yr([n({type:String,reflect:!0})],xe.prototype,"size");Yr([n({type:String})],xe.prototype,"name");Yr([n({type:String})],xe.prototype,"value");Yr([n({type:String})],xe.prototype,"label");g("kt-toggle",xe);var Ld=Object.defineProperty,cn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ld(t,e,r),r},ua=class extends c{constructor(){super(...arguments),this.items=[],this.label=void 0}static{this.styles=[c.styles,f`
|
|
4090
4090
|
:host {
|
|
4091
4091
|
display: block;
|
|
4092
4092
|
}
|
|
@@ -4209,7 +4209,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4209
4209
|
<slot></slot>
|
|
4210
4210
|
</div>
|
|
4211
4211
|
<div class="actions"><slot name="actions"></slot></div>
|
|
4212
|
-
</div>`}};Do([n({type:String})],$r.prototype,"eyebrow");Do([n({type:String})],$r.prototype,"heading");Do([n({type:String})],$r.prototype,"description");Do([n({type:String,reflect:!0})],$r.prototype,"level");g("kt-page-header",$r);var fa=class{constructor(t,e){this.options=e,this.observer=null,this.observed=[],this.frame=0,this.placed=null,t.addController(this)}hostConnected(){typeof ResizeObserver=="function"&&(this.observer??=new ResizeObserver(()=>this.place()))}hostDisconnected(){this.observer?.disconnect(),this.observed=[],this.placed=null,cancelAnimationFrame(this.frame)}hostUpdated(){this.place()}place(){let t=this.options.container();if(!t)return;let e=this.options.selected();if(this.observe(t,e),!e){delete t.dataset.indicator,this.placed=null;return}let a=[e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight],r=a.join(" ");if(this.placed?.item===e&&this.placed.box===r)return;let i=this.placed?.item===e;this.placed={item:e,box:r};let s=t.style;s.setProperty("--kt-indicator-x",`${a[0]}px`),s.setProperty("--kt-indicator-y",`${a[1]}px`),s.setProperty("--kt-indicator-width",`${a[2]}px`),s.setProperty("--kt-indicator-height",`${a[3]}px`),(!t.dataset.indicator||i)&&(t.dataset.indicator="placed",cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>{t.dataset.indicator==="placed"&&(t.dataset.indicator="ready")}))}observe(...t){if(!this.observer)return;let e=t.filter(a=>!!a);if(!(e.length===this.observed.length&&e.every((a,r)=>a===this.observed[r]))){this.observer.disconnect();for(let a of e)this.observer.observe(a);this.observed=e}}};var Od=Object.defineProperty,
|
|
4212
|
+
</div>`}};Do([n({type:String})],$r.prototype,"eyebrow");Do([n({type:String})],$r.prototype,"heading");Do([n({type:String})],$r.prototype,"description");Do([n({type:String,reflect:!0})],$r.prototype,"level");g("kt-page-header",$r);var fa=class{constructor(t,e){this.options=e,this.observer=null,this.observed=[],this.frame=0,this.placed=null,t.addController(this)}hostConnected(){typeof ResizeObserver=="function"&&(this.observer??=new ResizeObserver(()=>this.place()))}hostDisconnected(){this.observer?.disconnect(),this.observed=[],this.placed=null,cancelAnimationFrame(this.frame)}hostUpdated(){this.place()}place(){let t=this.options.container();if(!t)return;let e=this.options.selected();if(this.observe(t,e),!e){delete t.dataset.indicator,this.placed=null;return}let a=[e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight],r=a.join(" ");if(this.placed?.item===e&&this.placed.box===r)return;let i=this.placed?.item===e;this.placed={item:e,box:r};let s=t.style;s.setProperty("--kt-indicator-x",`${a[0]}px`),s.setProperty("--kt-indicator-y",`${a[1]}px`),s.setProperty("--kt-indicator-width",`${a[2]}px`),s.setProperty("--kt-indicator-height",`${a[3]}px`),(!t.dataset.indicator||i)&&(t.dataset.indicator="placed",cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>{t.dataset.indicator==="placed"&&(t.dataset.indicator="ready")}))}observe(...t){if(!this.observer)return;let e=t.filter(a=>!!a);if(!(e.length===this.observed.length&&e.every((a,r)=>a===this.observed[r]))){this.observer.disconnect();for(let a of e)this.observer.observe(a);this.observed=e}}};var Od=Object.defineProperty,ze=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Od(t,e,r),r},zd={small:16,medium:20,large:24},Ft=class extends c{constructor(){super(),this.internals=null,this.defaultValue=null,this.options=[],this.value=null,this.size="medium",this.orientation="horizontal",this.disabled=!1,this.formDisabled=!1,this.label="",this.name="",this.required=!1,new fa(this,{container:()=>this.renderRoot.querySelector(".track"),selected:()=>this.renderRoot.querySelector(".option.selected")})}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
4213
4213
|
:host {
|
|
4214
4214
|
display: inline-block;
|
|
4215
4215
|
}
|
|
@@ -4351,7 +4351,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4351
4351
|
flex: 1;
|
|
4352
4352
|
text-align: center;
|
|
4353
4353
|
}
|
|
4354
|
-
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
4354
|
+
`]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("required")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e},e?v().selectOption:"")}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=this.options.find(e=>String(e.value)===t)?.value??t}get selectedIndex(){return this.options.findIndex(t=>t.value===this.value)}choose(t){this.inactive||t.disabled||this.value===t.value||(this.value=t.value,y(this,"kt-change",{value:t.value,option:t}))}onKeyDown(t){let e=this.orientation==="vertical"?"ArrowDown":"ArrowRight",a=this.orientation==="vertical"?"ArrowUp":"ArrowLeft",r;if(t.key===e)r=this.step(1);else if(t.key===a)r=this.step(-1);else if(t.key==="Home")r=this.options.findIndex(p=>!p.disabled);else if(t.key==="End")r=this.options.length-1-[...this.options].reverse().findIndex(p=>!p.disabled);else return;if(t.preventDefault(),r===void 0||r<0)return;let i=this.options[r];if(!i)return;let s=r;this.choose(i),this.updateComplete.then(()=>this.segments[s]?.focus())}step(t){let e=this.options.length;if(e===0)return;let a=this.selectedIndex<0?t===1?-1:0:this.selectedIndex;for(let r=1;r<=e;r+=1){let i=((a+t*r)%e+e)%e;if(!this.options[i]?.disabled)return i}}render(){let t=this.selectedIndex,e=t>=0?t:this.options.findIndex(a=>!a.disabled);return l`<div
|
|
4355
4355
|
part="base"
|
|
4356
4356
|
class=${w({track:!0,[this.size]:!0,vertical:this.orientation==="vertical"})}
|
|
4357
4357
|
role="radiogroup"
|
|
@@ -4372,10 +4372,10 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4372
4372
|
?disabled=${this.inactive||a.disabled}
|
|
4373
4373
|
@click=${()=>this.choose(a)}
|
|
4374
4374
|
>
|
|
4375
|
-
${a.icon?l`<kt-icon name=${a.icon} size=${
|
|
4375
|
+
${a.icon?l`<kt-icon name=${a.icon} size=${zd[this.size]}></kt-icon>`:d}
|
|
4376
4376
|
${p?d:l`<span class="text">${s}</span>`}
|
|
4377
4377
|
</button>`})}
|
|
4378
|
-
</div>`}};
|
|
4378
|
+
</div>`}};ze([sa(".option")],Ft.prototype,"segments");ze([n({attribute:!1})],Ft.prototype,"options");ze([n({type:String})],Ft.prototype,"value");ze([n({type:String,reflect:!0})],Ft.prototype,"size");ze([n({type:String,reflect:!0})],Ft.prototype,"orientation");ze([n({type:Boolean,reflect:!0})],Ft.prototype,"disabled");ze([x()],Ft.prototype,"formDisabled");ze([n({type:String})],Ft.prototype,"label");ze([n({type:String})],Ft.prototype,"name");ze([n({type:Boolean,reflect:!0})],Ft.prototype,"required");g("kt-segmented-control",Ft);var Kd=Object.defineProperty,ma=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Kd(t,e,r),r},Ke=class extends c{constructor(){super(...arguments),this.sections=[],this.activeHref="",this.label=void 0,this.flush=!1,this.collapsed=!1,this.overrides={}}static{this.styles=[c.styles,f`
|
|
4379
4379
|
:host {
|
|
4380
4380
|
display: block;
|
|
4381
4381
|
}
|
|
@@ -4562,7 +4562,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4562
4562
|
${t.title?l`<h6 part="title" class="title">${t.title}</h6>`:d}
|
|
4563
4563
|
${this.renderItems(t.items,0,String(e))}
|
|
4564
4564
|
</div>`)}
|
|
4565
|
-
</nav>`}};ma([n({attribute:!1})],
|
|
4565
|
+
</nav>`}};ma([n({attribute:!1})],Ke.prototype,"sections");ma([n({type:String,attribute:"active-href"})],Ke.prototype,"activeHref");ma([n({type:String})],Ke.prototype,"label");ma([n({type:Boolean,reflect:!0})],Ke.prototype,"flush");ma([n({type:Boolean,reflect:!0})],Ke.prototype,"collapsed");ma([x()],Ke.prototype,"overrides");g("kt-sub-menu-navigation",Ke);var Rd=Object.defineProperty,ga=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rd(t,e,r),r},Re=class extends c{constructor(){super(),this.tabs=[],this.value=null,this.disabled=!1,this.loading=!1,this.label="",new fa(this,{container:()=>this.renderRoot.querySelector(".tablist"),selected:()=>this.renderRoot.querySelector(".tab.selected")})}static{this.styles=[c.styles,f`
|
|
4566
4566
|
:host {
|
|
4567
4567
|
display: block;
|
|
4568
4568
|
}
|
|
@@ -4676,7 +4676,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4676
4676
|
${a.label??String(a.value)}
|
|
4677
4677
|
</button>`})}
|
|
4678
4678
|
<span class="indicator" aria-hidden="true"></span>
|
|
4679
|
-
</div>`}};ga([sa(".tab")],
|
|
4679
|
+
</div>`}};ga([sa(".tab")],Re.prototype,"tabElements");ga([n({attribute:!1})],Re.prototype,"tabs");ga([n({type:String})],Re.prototype,"value");ga([n({type:Boolean,reflect:!0})],Re.prototype,"disabled");ga([n({type:Boolean,reflect:!0})],Re.prototype,"loading");ga([n({type:String})],Re.prototype,"label");g("kt-tabs",Re);var qd=Object.defineProperty,Ia=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&qd(t,e,r),r},ar=class extends c{constructor(){super(...arguments),this.steps=[],this.current="",this.label="",this.orientation="horizontal",this.navigable=!1,this.entering=new Set}static{this.styles=[c.styles,f`
|
|
4680
4680
|
:host {
|
|
4681
4681
|
display: block;
|
|
4682
4682
|
--kt-steps-marker: calc(28px * var(--density-scale, 1));
|
|
@@ -4896,7 +4896,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
4896
4896
|
><span class="fill"></span
|
|
4897
4897
|
></span>`:d}
|
|
4898
4898
|
</li>`})}
|
|
4899
|
-
</ol>`}};
|
|
4899
|
+
</ol>`}};Ia([n({attribute:!1})],ar.prototype,"steps");Ia([n({type:String,reflect:!0})],ar.prototype,"current");Ia([n({type:String})],ar.prototype,"label");Ia([n({type:String,reflect:!0})],ar.prototype,"orientation");Ia([n({type:Boolean,reflect:!0})],ar.prototype,"navigable");g("kt-steps",ar);var Ed=Object.defineProperty,Fa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ed(t,e,r),r},or=class extends c{constructor(){super(...arguments),this.menuOpen=!1,this.sticky=!1,this.navAlign="center",this.bordered=!0,this.label=""}static{this.styles=[c.styles,f`
|
|
4900
4900
|
:host {
|
|
4901
4901
|
display: block;
|
|
4902
4902
|
--kt-header-height: 64px;
|
|
@@ -5044,7 +5044,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5044
5044
|
</div>
|
|
5045
5045
|
|
|
5046
5046
|
<div part="bottom" class="bottom"><slot name="bottom"></slot></div>
|
|
5047
|
-
</header>`}};
|
|
5047
|
+
</header>`}};Fa([x()],or.prototype,"menuOpen");Fa([n({type:Boolean,reflect:!0})],or.prototype,"sticky");Fa([n({type:String,reflect:!0,attribute:"nav-align"})],or.prototype,"navAlign");Fa([n({type:Boolean,reflect:!0})],or.prototype,"bordered");Fa([n({type:String})],or.prototype,"label");g("kt-header",or);var Id=Object.defineProperty,qe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Id(t,e,r),r},Ut=class extends c{constructor(){super(...arguments),this.value="",this.placeholder="",this.label="",this.disabled=!1,this.maxRows=8,this.submitOn="enter",this.sending=!1,this.hasAttachments=!1}static{this.styles=[c.styles,f`
|
|
5048
5048
|
:host {
|
|
5049
5049
|
display: block;
|
|
5050
5050
|
}
|
|
@@ -5137,7 +5137,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5137
5137
|
@click=${()=>this.submit()}
|
|
5138
5138
|
></kt-button>
|
|
5139
5139
|
</div>
|
|
5140
|
-
</div>`}};qe([n({type:String})],Ut.prototype,"value");qe([n({type:String})],Ut.prototype,"placeholder");qe([n({type:String})],Ut.prototype,"label");qe([n({type:Boolean,reflect:!0})],Ut.prototype,"disabled");qe([n({type:Number,attribute:"max-rows"})],Ut.prototype,"maxRows");qe([n({type:String,attribute:"submit-on"})],Ut.prototype,"submitOn");qe([x()],Ut.prototype,"sending");qe([x()],Ut.prototype,"hasAttachments");qe([A("textarea")],Ut.prototype,"field");qe([A("kt-button")],Ut.prototype,"button");g("kt-prompt-input",Ut);var Fd=Object.defineProperty,
|
|
5140
|
+
</div>`}};qe([n({type:String})],Ut.prototype,"value");qe([n({type:String})],Ut.prototype,"placeholder");qe([n({type:String})],Ut.prototype,"label");qe([n({type:Boolean,reflect:!0})],Ut.prototype,"disabled");qe([n({type:Number,attribute:"max-rows"})],Ut.prototype,"maxRows");qe([n({type:String,attribute:"submit-on"})],Ut.prototype,"submitOn");qe([x()],Ut.prototype,"sending");qe([x()],Ut.prototype,"hasAttachments");qe([A("textarea")],Ut.prototype,"field");qe([A("kt-button")],Ut.prototype,"button");g("kt-prompt-input",Ut);var Fd=Object.defineProperty,Cr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Fd(t,e,r),r},oe=class extends c{constructor(){super(...arguments),this.from="assistant",this.name="",this.avatar="",this.time="",this.datetime="",this.thinking=!1,this.streaming=!1,this.continued=!1}static{this.styles=[c.styles,f`
|
|
5141
5141
|
:host {
|
|
5142
5142
|
display: block;
|
|
5143
5143
|
}
|
|
@@ -5155,6 +5155,31 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5155
5155
|
flex: none;
|
|
5156
5156
|
line-height: 0;
|
|
5157
5157
|
}
|
|
5158
|
+
/* A run's next message: the small avatar's room (24px) kept, so the words line up. */
|
|
5159
|
+
.avatar.spacer {
|
|
5160
|
+
position: relative;
|
|
5161
|
+
width: 24px;
|
|
5162
|
+
}
|
|
5163
|
+
/* Its time, in the gutter: there for a screen reader, shown on hover or focus. */
|
|
5164
|
+
.gutter-time {
|
|
5165
|
+
position: absolute;
|
|
5166
|
+
top: 0.35em;
|
|
5167
|
+
right: -4px;
|
|
5168
|
+
color: var(--text-muted);
|
|
5169
|
+
font: var(--font-normal-small);
|
|
5170
|
+
font-size: 10px;
|
|
5171
|
+
line-height: 1.6;
|
|
5172
|
+
white-space: nowrap;
|
|
5173
|
+
opacity: 0;
|
|
5174
|
+
transition: opacity var(--duration-fast) var(--easing-standard);
|
|
5175
|
+
}
|
|
5176
|
+
:host(:hover) .gutter-time,
|
|
5177
|
+
:host(:focus-within) .gutter-time {
|
|
5178
|
+
opacity: 1;
|
|
5179
|
+
}
|
|
5180
|
+
:host([continued]) .meta {
|
|
5181
|
+
display: none;
|
|
5182
|
+
}
|
|
5158
5183
|
|
|
5159
5184
|
.body {
|
|
5160
5185
|
display: grid;
|
|
@@ -5275,14 +5300,22 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5275
5300
|
aria-label=${this.name||d}
|
|
5276
5301
|
aria-busy=${e?"true":d}
|
|
5277
5302
|
>
|
|
5278
|
-
${t?d:l`<div class="avatar">
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5303
|
+
${t?d:this.continued?l`<div class="avatar spacer">
|
|
5304
|
+
${this.time?l`<time class="gutter-time" datetime=${this.datetime||d}
|
|
5305
|
+
>${this.time}</time
|
|
5306
|
+
>`:d}
|
|
5307
|
+
</div>`:l`<div class="avatar">
|
|
5308
|
+
<slot name="avatar"
|
|
5309
|
+
><kt-avatar
|
|
5310
|
+
name=${this.name}
|
|
5311
|
+
src=${this.avatar||d}
|
|
5312
|
+
size="small"
|
|
5313
|
+
></kt-avatar
|
|
5314
|
+
></slot>
|
|
5315
|
+
</div>`}
|
|
5283
5316
|
<div class="body">
|
|
5284
5317
|
${this.name||this.time?l`<div part="meta" class="meta">
|
|
5285
|
-
${this.name&&!t?l`<span class="name">${this.name}</span>`:d}
|
|
5318
|
+
${this.name&&!t&&!this.continued?l`<span class="name">${this.name}</span>`:d}
|
|
5286
5319
|
${this.time?l`<time datetime=${this.datetime||d}>${this.time}</time>`:d}
|
|
5287
5320
|
</div>`:d}
|
|
5288
5321
|
${this.thinking?l`<span class="dots" aria-hidden="true"><i></i><i></i><i></i></span
|
|
@@ -5290,7 +5323,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5290
5323
|
${t?l`<div part="bubble" class="bubble">${a}</div>`:a}
|
|
5291
5324
|
<div class="actions"><slot name="actions"></slot></div>
|
|
5292
5325
|
</div>
|
|
5293
|
-
</article>`}};
|
|
5326
|
+
</article>`}};Cr([n({type:String,reflect:!0})],oe.prototype,"from");Cr([n({type:String})],oe.prototype,"name");Cr([n({type:String})],oe.prototype,"avatar");Cr([n({type:String})],oe.prototype,"time");Cr([n({type:String})],oe.prototype,"datetime");Cr([n({type:Boolean,reflect:!0})],oe.prototype,"thinking");Cr([n({type:Boolean,reflect:!0})],oe.prototype,"streaming");Cr([n({type:Boolean,reflect:!0})],oe.prototype,"continued");g("kt-chat-message",oe);var Ud=Object.defineProperty,ir=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ud(t,e,r),r},Xt=class extends c{constructor(){super(...arguments),this.collapsed=!1,this.sidebarOpen=!1,this.breakpoint=900,this.noToggle=!1,this.noLandmarks=!1,this.label="",this.narrow=!1,this.sidebarId=q("kt-app-shell-sidebar"),this.observer=null,this.onKeyDown=t=>{t.key==="Escape"&&this.narrow&&this.sidebarOpen&&(t.preventDefault(),this.closeDrawer())}}static{this.styles=[c.styles,f`
|
|
5294
5327
|
:host {
|
|
5295
5328
|
display: block;
|
|
5296
5329
|
height: 100%;
|
|
@@ -5425,7 +5458,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5425
5458
|
</aside>`}
|
|
5426
5459
|
<div class="backdrop" @click=${()=>this.closeDrawer()}></div>
|
|
5427
5460
|
${this.noLandmarks?l`<div part="main" class="main"><slot></slot></div>`:l`<main part="main" class="main"><slot></slot></main>`}
|
|
5428
|
-
</div>`}};
|
|
5461
|
+
</div>`}};ir([n({type:Boolean,reflect:!0})],Xt.prototype,"collapsed");ir([n({type:Boolean,reflect:!0,attribute:"sidebar-open"})],Xt.prototype,"sidebarOpen");ir([n({type:Number})],Xt.prototype,"breakpoint");ir([n({type:Boolean,attribute:"no-toggle"})],Xt.prototype,"noToggle");ir([n({type:Boolean,attribute:"no-landmarks"})],Xt.prototype,"noLandmarks");ir([n({type:String})],Xt.prototype,"label");ir([x()],Xt.prototype,"narrow");ir([A(".sidebar")],Xt.prototype,"aside");ir([A(".toggle")],Xt.prototype,"toggle");g("kt-app-shell",Xt);var Nd=Object.defineProperty,Ua=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Nd(t,e,r),r},sr=class extends c{constructor(){super(...arguments),this.items=[],this.layout="horizontal",this.columns=1,this.bordered=!1,this.label=""}static{this.styles=[c.styles,f`
|
|
5429
5462
|
:host {
|
|
5430
5463
|
display: block;
|
|
5431
5464
|
container-type: inline-size;
|
|
@@ -5501,7 +5534,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5501
5534
|
<dt part="term">${t.term}</dt>
|
|
5502
5535
|
${t.detail?l`<dd part="detail">${t.detail}</dd>`:l`<dd part="detail" class="empty">—</dd>`}
|
|
5503
5536
|
</div>`)}
|
|
5504
|
-
</dl>`}};
|
|
5537
|
+
</dl>`}};Ua([n({attribute:!1})],sr.prototype,"items");Ua([n({type:String,reflect:!0})],sr.prototype,"layout");Ua([n({type:Number,reflect:!0})],sr.prototype,"columns");Ua([n({type:Boolean,reflect:!0})],sr.prototype,"bordered");Ua([n({type:String})],sr.prototype,"label");g("kt-description-list",sr);var Hd=Object.defineProperty,To=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Hd(t,e,r),r},Sr=class extends c{constructor(){super(...arguments),this.people=[],this.max=4,this.size="medium",this.label=""}static{this.styles=[c.styles,f`
|
|
5505
5538
|
:host {
|
|
5506
5539
|
display: inline-block;
|
|
5507
5540
|
--kt-avatar-size: 32px;
|
|
@@ -5554,7 +5587,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5554
5587
|
>+${e}</span
|
|
5555
5588
|
>
|
|
5556
5589
|
</li>`:d}
|
|
5557
|
-
</ul>`}};To([n({attribute:!1})],
|
|
5590
|
+
</ul>`}};To([n({attribute:!1})],Sr.prototype,"people");To([n({type:Number})],Sr.prototype,"max");To([n({type:String,reflect:!0})],Sr.prototype,"size");To([n({type:String})],Sr.prototype,"label");g("kt-avatar-group",Sr);var jd=Object.defineProperty,Xr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&jd(t,e,r),r},ye=class extends c{constructor(){super(...arguments),this.value="",this.label="",this.copiedLabel="",this.iconOnly=!1,this.variant="secondary",this.size="medium"}static{this.styles=[c.styles,f`
|
|
5558
5591
|
:host {
|
|
5559
5592
|
display: inline-flex;
|
|
5560
5593
|
vertical-align: middle;
|
|
@@ -5617,7 +5650,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5617
5650
|
color: var(--color-danger-text);
|
|
5618
5651
|
font: var(--font-normal-small);
|
|
5619
5652
|
}
|
|
5620
|
-
`]}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
5653
|
+
`]}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.value=this.clean(this.value),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("length")||t.has("type")){let e=this.clean(this.value);e!==this.value&&(this.value=e)}}updated(t){if(t.has("value")||t.has("required")||t.has("error")||t.has("length")||this.stringsChanged(t)){B(this.internals,this.value||null);let e=this.required&&this.value.length<this.length;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().otpRequired:""),this.boxes?.[0])}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t??""}focus(t){this.box(Math.min(this.value.length,this.length-1))?.focus(t)}get inactive(){return this.disabled||this.formDisabled}clean(t){let e=this.type==="numeric"?/[0-9]/:/[A-Za-z0-9]/;return[...t].filter(a=>e.test(a)).join("").toUpperCase().slice(0,Math.max(1,this.length))}box(t){return this.boxes?.[t]}commit(t){let e=this.clean(t);if(e===this.value){this.requestUpdate();return}this.value=e,y(this,"kt-change",{value:e}),e.length===this.length&&y(this,"kt-complete",{value:e})}onInput(t,e){let a=this.clean(t.target.value),r=Math.min(e,this.value.length);if(!a){this.commit(this.value);return}let i=(this.value.slice(0,r)+a).slice(0,this.length);this.commit(i+this.value.slice(r+a.length)),this.updateComplete.then(()=>this.box(Math.min(i.length,this.length-1))?.focus())}onKeyDown(t,e){let a=r=>{t.preventDefault(),this.box(Math.max(0,Math.min(this.length-1,r)))?.focus()};switch(t.key){case"Backspace":{t.preventDefault();let r=e<this.value.length?e:this.value.length-1;if(r<0)return;this.commit(this.value.slice(0,r)+this.value.slice(r+1)),this.updateComplete.then(()=>this.box(r)?.focus());break}case"ArrowLeft":a(e-1);break;case"ArrowRight":a(Math.min(e+1,this.value.length));break;case"Home":a(0);break;case"End":a(this.value.length);break}}onPaste(t,e){let a=this.clean(t.clipboardData?.getData("text")??"");if(!a)return;t.preventDefault();let r=Math.min(e,this.value.length),i=(this.value.slice(0,r)+a).slice(0,this.length);this.commit(i),this.updateComplete.then(()=>this.box(Math.min(i.length,this.length-1))?.focus())}render(){let t=v(),e=Math.max(1,Math.round(this.length));return l`<div part="group" class="group" role="group" aria-label=${this.label||d}>
|
|
5621
5654
|
${Array.from({length:e},(a,r)=>{let i=this.value[r]??"";return l`<input
|
|
5622
5655
|
part="box"
|
|
5623
5656
|
.value=${nt(i)}
|
|
@@ -5636,7 +5669,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5636
5669
|
@focus=${s=>s.target.select()}
|
|
5637
5670
|
/>`})}
|
|
5638
5671
|
</div>
|
|
5639
|
-
${this.error?l`<p part="error" class="error" id=${this.errorId}>${this.error}</p>`:d}`}};Ee([n({type:String})],Nt.prototype,"value");Ee([n({type:Number})],Nt.prototype,"length");Ee([n({type:String})],Nt.prototype,"type");Ee([n({type:String})],Nt.prototype,"label");Ee([n({type:String})],Nt.prototype,"name");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"required");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"disabled");Ee([n({type:String,reflect:!0})],Nt.prototype,"error");Ee([x()],Nt.prototype,"formDisabled");Ee([sa("input")],Nt.prototype,"boxes");g("kt-otp-input",Nt);var Vd=Object.defineProperty,Gd=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Vd(t,e,r),r},
|
|
5672
|
+
${this.error?l`<p part="error" class="error" id=${this.errorId}>${this.error}</p>`:d}`}};Ee([n({type:String})],Nt.prototype,"value");Ee([n({type:Number})],Nt.prototype,"length");Ee([n({type:String})],Nt.prototype,"type");Ee([n({type:String})],Nt.prototype,"label");Ee([n({type:String})],Nt.prototype,"name");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"required");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"disabled");Ee([n({type:String,reflect:!0})],Nt.prototype,"error");Ee([x()],Nt.prototype,"formDisabled");Ee([sa("input")],Nt.prototype,"boxes");g("kt-otp-input",Nt);var Vd=Object.defineProperty,Gd=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Vd(t,e,r),r},Na=class extends c{constructor(){super(...arguments),this.multiple=!1,this.onToggle=t=>{let e=t.target;if(e.parentElement!==this)return;if(!this.multiple&&e.open)for(let r of this.sections)r!==e&&(r.open=!1);let a=this.sections.flatMap((r,i)=>r.open?[i]:[]);y(this,"kt-change",{open:a})},this.onKeyDown=t=>{let e=t.target;if(e.parentElement!==this||t.composedPath()[0].localName!=="summary")return;let a=this.sections,r=a.indexOf(e),i={ArrowDown:(r+1)%a.length,ArrowUp:(r-1+a.length)%a.length,Home:0,End:a.length-1}[t.key];i!==void 0&&(t.preventDefault(),a[i]?.focus())}}static{this.styles=[c.styles,f`
|
|
5640
5673
|
:host {
|
|
5641
5674
|
display: block;
|
|
5642
5675
|
}
|
|
@@ -5644,7 +5677,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5644
5677
|
::slotted(kt-collapsible:first-child) {
|
|
5645
5678
|
border-top: var(--border-width) solid var(--border-subtle);
|
|
5646
5679
|
}
|
|
5647
|
-
`]}connectedCallback(){super.connectedCallback(),this.addEventListener("kt-toggle",this.onToggle),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("kt-toggle",this.onToggle),this.removeEventListener("keydown",this.onKeyDown)}get sections(){return[...this.children].filter(t=>t.localName==="kt-collapsible")}firstUpdated(){this.settle()}settle(){if(this.multiple)return;let t=!1;for(let e of this.sections)e.open&&(t&&(e.open=!1),t=!0)}render(){return l`<slot @slotchange=${()=>this.settle()}></slot>`}};Gd([n({type:Boolean,reflect:!0})],
|
|
5680
|
+
`]}connectedCallback(){super.connectedCallback(),this.addEventListener("kt-toggle",this.onToggle),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("kt-toggle",this.onToggle),this.removeEventListener("keydown",this.onKeyDown)}get sections(){return[...this.children].filter(t=>t.localName==="kt-collapsible")}firstUpdated(){this.settle()}settle(){if(this.multiple)return;let t=!1;for(let e of this.sections)e.open&&(t&&(e.open=!1),t=!0)}render(){return l`<slot @slotchange=${()=>this.settle()}></slot>`}};Gd([n({type:Boolean,reflect:!0})],Na.prototype,"multiple");g("kt-accordion",Na);var Wd=Object.defineProperty,Pr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Wd(t,e,r),r},ie=class extends c{constructor(){super(...arguments),this.name="",this.email="",this.avatar="",this.items=[],this.showName=!1,this.block=!1,this.open=!1,this.menuId=q("kt-user-menu"),this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.trigger,align:()=>this.block?"start":"end",matchWidth:()=>this.block}),this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.hide(!1)}}static{this.styles=[c.styles,ht,f`
|
|
5648
5681
|
:host {
|
|
5649
5682
|
display: inline-block;
|
|
5650
5683
|
}
|
|
@@ -5859,7 +5892,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5859
5892
|
${this.items.map(t=>this.renderItem(t))}
|
|
5860
5893
|
</ul>
|
|
5861
5894
|
<div class="extra"><slot></slot></div>
|
|
5862
|
-
</div>`:d}`}};
|
|
5895
|
+
</div>`:d}`}};Pr([n({type:String})],ie.prototype,"name");Pr([n({type:String})],ie.prototype,"email");Pr([n({type:String})],ie.prototype,"avatar");Pr([n({attribute:!1})],ie.prototype,"items");Pr([n({type:Boolean,reflect:!0,attribute:"show-name"})],ie.prototype,"showName");Pr([n({type:Boolean,reflect:!0})],ie.prototype,"block");Pr([x()],ie.prototype,"open");Pr([A(".trigger")],ie.prototype,"trigger");g("kt-user-menu",ie);var Yd=Object.defineProperty,Ha=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Yd(t,e,r),r},nr=class extends c{constructor(){super(...arguments),this.items=[],this.expanded=[],this.selected="",this.label="",this.active=""}static{this.styles=[c.styles,f`
|
|
5863
5896
|
:host {
|
|
5864
5897
|
display: block;
|
|
5865
5898
|
}
|
|
@@ -5958,7 +5991,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
5958
5991
|
${a.item.icon?l`<kt-icon class="icon" name=${a.item.icon} size="16"></kt-icon>`:d}
|
|
5959
5992
|
<span class="label">${a.item.label}</span>
|
|
5960
5993
|
</li>`})}
|
|
5961
|
-
</ul>`}};
|
|
5994
|
+
</ul>`}};Ha([n({attribute:!1})],nr.prototype,"items");Ha([n({attribute:!1})],nr.prototype,"expanded");Ha([n({type:String})],nr.prototype,"selected");Ha([n({type:String})],nr.prototype,"label");Ha([x()],nr.prototype,"active");g("kt-tree",nr);var mn=o=>{let t=o/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},Vi=o=>255*(o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055);function Xd([o,t,e]){let[a,r,i]=[o,t,e].map(mn),s=Math.cbrt(.4122214708*a+.5363325363*r+.0514459929*i),p=Math.cbrt(.2119034982*a+.6806995451*r+.1073969566*i),h=Math.cbrt(.0883024619*a+.2817188376*r+.6299787005*i),u=.2104542553*s+.793617785*p-.0040720468*h,m=1.9779984951*s-2.428592205*p+.4505937099*h,b=.0259040371*s+.7827717662*p-.808675766*h;return[u,Math.hypot(m,b),(Math.atan2(b,m)*180/Math.PI+360)%360]}function _a([o,t,e]){let a=t*Math.cos(e*Math.PI/180),r=t*Math.sin(e*Math.PI/180),i=(o+.3963377774*a+.2158037573*r)**3,s=(o-.1055613458*a-.0638541728*r)**3,p=(o-.0894841775*a-1.291485548*r)**3;return[Vi(4.0767416621*i-3.3077115913*s+.2309699292*p),Vi(-1.2684380046*i+2.6097574011*s-.3413193965*p),Vi(-.0041960863*i-.7034186147*s+1.707614701*p)]}var hn=o=>o.every(t=>t>=-.5&&t<=255.5);function gn(o,t,e){if(hn(_a([o,e,t])))return e;let a=0,r=e;for(let i=0;i<24;i+=1){let s=(a+r)/2;hn(_a([o,s,t]))?a=s:r=s}return a}var Wi=o=>o.map(t=>Math.min(255,Math.max(0,Math.round(t))));function un(o){let[t,e,a]=o.map(mn);return .2126*t+.7152*e+.0722*a}function Bo(o,t){let[e,a]=[un(o),un(t)].sort((r,i)=>i-r);return(e+.05)/(a+.05)}var fn=(o,t,e)=>o.map((a,r)=>a*t+e[r]*(1-t)),Lo=o=>`#${Wi(o).map(t=>t.toString(16).padStart(2,"0")).join("")}`;function Yi(o){let t=o.trim().toLowerCase(),e=/^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(t);if(e){let a=e[1].length===3?[...e[1]].map(r=>r+r).join(""):e[1];return[0,2,4].map(r=>parseInt(a.slice(r,r+2),16))}if(e=/^rgba?\(\s*(\d*\.?\d+)[\s,]+(\d*\.?\d+)[\s,]+(\d*\.?\d+)(?:\s*[,/]\s*\d*\.?\d+%?)?\s*\)$/.exec(t),e){let a=e.slice(1,4).map(Number);if(a.every(r=>r<=255))return a}if(e=/^oklch\(\s*(\d*\.?\d+)(%?)\s+(\d*\.?\d+)\s+(\d*\.?\d+)(?:deg)?\s*(?:\/\s*\d*\.?\d+%?\s*)?\)$/.exec(t),e){let a=Number(e[1])/(e[2]?100:1),r=Number(e[4]);if(a<=1)return Wi(_a([a,gn(a,r,Number(e[3])),r]))}throw new TypeError(`Not a colour Kanto can read: "${o}". Use #rrggbb, rgb() or oklch().`)}var vn={base:"#5f5dea",hover:"#5856e0",textDark:"#8e97ff",textLight:"#4f30ef",wash:"rgba(111, 116, 246, 0.16)",neutralHue:278,neutralChroma:1},Oo=[{id:"violet",label:"Violet",color:"#5f5dea"},{id:"blue",label:"Blue",color:"#1f6feb"},{id:"teal",label:"Teal",color:"#0d9488"},{id:"green",label:"Green",color:"#16a34a"},{id:"orange",label:"Orange",color:"#ea580c"},{id:"pink",label:"Pink",color:"#db2777"},{id:"slate",label:"Slate",color:"#64748b"}],Zd=[.3074,.018,16.5],Qd=[[1,0,0],[.9023,.0081,8.2]],Jd=[244,244,245],Gi=4.6;function bn(o){let[t,e,a]=Xd(Yi(o)),r=e<5e-4?0:a,i=Math.round(Math.min(1,e/.08)*100)/100,s=T=>_a([T,gn(T,r,e),r]),p=([T,et,z])=>_a([T,et*i,r+z]),h=Math.min(t,.72);for(;h>0&&Bo(Jd,s(h))<Gi;)h-=.0025;let u=s(h),m=T=>[T,fn(u,.12,T),fn(u,.16,T)],b=m(p(Zd)),k=.45;for(;k<1&&b.some(T=>Bo(s(k),T)<Gi);)k+=.0025;let $=Qd.map(p).flatMap(m),D=.7;for(;D>0&&$.some(T=>Bo(s(D),T)<Gi);)D-=.0025;let[S,P,O]=Wi(u);return{base:Lo(u),hover:Lo(s(Math.max(0,h-.025))),textDark:Lo(s(k)),textLight:Lo(s(D)),wash:`rgba(${S}, ${P}, ${O}, 0.16)`,neutralHue:Math.round(r*10)/10,neutralChroma:i}}function Xi(o){return{"--accent-base":o.base,"--accent-hover":o.hover,"--accent-text-dark":o.textDark,"--accent-text-light":o.textLight,"--accent-wash":o.wash,"--neutral-hue":String(o.neutralHue),"--neutral-chroma":String(o.neutralChroma)}}var tp=Object.keys(Xi(vn));function Zi(o,t=document.documentElement){if(o===null){for(let e of tp)t.style.removeProperty(e);t.dataset.accent==="custom"&&delete t.dataset.accent;return}for(let[e,a]of Object.entries(Xi(bn(o))))t.style.setProperty(e,a);t.dataset.accent??="custom"}var ep=Object.defineProperty,Zr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ep(t,e,r),r},rp=/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i;function ja(o){let t=rp.exec(o.trim());if(!t)return null;let e=t[1].toLowerCase();return`#${e.length===3?[...e].map(a=>a+a).join(""):e}`}var ke=class extends c{constructor(){super(...arguments),this.value="",this.swatches=Oo.map(t=>({value:t.color,label:t.label})),this.label="",this.name="",this.disabled=!1,this.noCustom=!1,this.formDisabled=!1,this.internals=null,this.defaultValue=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
|
|
5962
5995
|
:host {
|
|
5963
5996
|
display: inline-block;
|
|
5964
5997
|
--kt-swatch-size: 24px;
|
|
@@ -6035,7 +6068,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
6035
6068
|
.hex:focus {
|
|
6036
6069
|
outline-color: var(--color-primary-base);
|
|
6037
6070
|
}
|
|
6038
|
-
`]}connectedCallback(){super.connectedCallback(),this.internals??=
|
|
6071
|
+
`]}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.value=ja(this.value)??"",this.defaultValue=this.value}willUpdate(t){if(t.has("value")){let e=ja(this.value)??"";e!==this.value&&(this.value=e),B(this.internals,this.value||null)}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t??""}get inactive(){return this.disabled||this.formDisabled}get presets(){return this.swatches.flatMap(t=>{let e=ja(t.value);return e?t.label===void 0?[{value:e}]:[{value:e,label:t.label}]:[]})}pick(t){!t||t===this.value||this.inactive||(this.value=t,y(this,"kt-change",{value:t}))}onKeyDown(t,e){let a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key];if(a===void 0)return;t.preventDefault();let r=this.presets,i=r[(e+a+r.length)%r.length];this.pick(i.value),this.updateComplete.then(()=>this.shadowRoot?.querySelectorAll('[role="radio"]')[r.indexOf(i)]?.focus())}render(){let t=v(),e=this.presets,a=e.findIndex(i=>i.value===this.value),r=a===-1&&!!this.value;return l`<div class="picker">
|
|
6039
6072
|
<div
|
|
6040
6073
|
part="swatches"
|
|
6041
6074
|
class="swatches"
|
|
@@ -6069,7 +6102,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
6069
6102
|
aria-label=${t.customColour}
|
|
6070
6103
|
.value=${nt(this.value||e[0]?.value||"#000000")}
|
|
6071
6104
|
?disabled=${this.inactive}
|
|
6072
|
-
@input=${i=>this.pick(
|
|
6105
|
+
@input=${i=>this.pick(ja(i.target.value))}
|
|
6073
6106
|
/>
|
|
6074
6107
|
</label>
|
|
6075
6108
|
<input
|
|
@@ -6083,9 +6116,9 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
6083
6116
|
aria-label=${t.hexColour}
|
|
6084
6117
|
.value=${nt(this.value)}
|
|
6085
6118
|
?disabled=${this.inactive}
|
|
6086
|
-
@input=${i=>this.pick(
|
|
6119
|
+
@input=${i=>this.pick(ja(i.target.value))}
|
|
6087
6120
|
/>`}
|
|
6088
|
-
</div>`}};Zr([n({type:String})],ke.prototype,"value");Zr([n({attribute:!1})],ke.prototype,"swatches");Zr([n({type:String})],ke.prototype,"label");Zr([n({type:String})],ke.prototype,"name");Zr([n({type:Boolean,reflect:!0})],ke.prototype,"disabled");Zr([n({type:Boolean,attribute:"no-custom"})],ke.prototype,"noCustom");Zr([x()],ke.prototype,"formDisabled");g("kt-color-picker",ke);var ap=Object.defineProperty,
|
|
6121
|
+
</div>`}};Zr([n({type:String})],ke.prototype,"value");Zr([n({attribute:!1})],ke.prototype,"swatches");Zr([n({type:String})],ke.prototype,"label");Zr([n({type:String})],ke.prototype,"name");Zr([n({type:Boolean,reflect:!0})],ke.prototype,"disabled");Zr([n({type:Boolean,attribute:"no-custom"})],ke.prototype,"noCustom");Zr([x()],ke.prototype,"formDisabled");g("kt-color-picker",ke);var ap=Object.defineProperty,zo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ap(t,e,r),r},Ar=class extends c{constructor(){super(...arguments),this.steps=[],this.open=!1,this.index=0,this.lit=null,this.titleId=q("kt-tour-title"),this.frame=0,this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".card:not(.centred)"),anchor:()=>this.target,side:()=>this.side()}),this.onKeyDown=t=>{t.key==="Escape"&&this.close()},this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.measure())}}static{this.styles=[c.styles,ht,f`
|
|
6089
6122
|
:host {
|
|
6090
6123
|
display: contents;
|
|
6091
6124
|
}
|
|
@@ -6183,7 +6216,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
6183
6216
|
>`:d}
|
|
6184
6217
|
<kt-button size="small" @click=${()=>this.next()}>${a?e.done:e.next}</kt-button>
|
|
6185
6218
|
</div>
|
|
6186
|
-
</div>`}};
|
|
6219
|
+
</div>`}};zo([n({attribute:!1})],Ar.prototype,"steps");zo([x()],Ar.prototype,"open");zo([x()],Ar.prototype,"index");zo([x()],Ar.prototype,"lit");g("kt-tour",Ar);function Q(o,t,e="",a=2){switch(Number.isFinite(o)?Math.min(6,Math.max(1,Math.round(o))):a){case 1:return l`<h1 class=${e}>${t}</h1>`;case 3:return l`<h3 class=${e}>${t}</h3>`;case 4:return l`<h4 class=${e}>${t}</h4>`;case 5:return l`<h5 class=${e}>${t}</h5>`;case 6:return l`<h6 class=${e}>${t}</h6>`;default:return l`<h2 class=${e}>${t}</h2>`}}var op=Object.defineProperty,va=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&op(t,e,r),r},ip={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-alert",neutral:"info"},Ie=class extends c{constructor(){super(...arguments),this.variant="info",this.heading="",this.description="",this.dismissible=!1,this.noIcon=!1,this.icon=""}static{this.styles=[c.styles,f`
|
|
6187
6220
|
:host {
|
|
6188
6221
|
display: block;
|
|
6189
6222
|
}
|
|
@@ -6607,7 +6640,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
6607
6640
|
`,xn=0;function W(o){return xn+=1,`${o}-${xn}`}function ut({title:o,lead:t,level:e,id:a}){return!o&&!t?d:l`<div class="block-head">
|
|
6608
6641
|
${o?l`<div id=${a}>${Q(e,o,"block-heading",2)}</div>`:d}
|
|
6609
6642
|
${t?l`<p class="block-lead">${t}</p>`:d}
|
|
6610
|
-
</div>`}function
|
|
6643
|
+
</div>`}function Ko(o,t=""){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(o),a=e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])):new Date(o);return Number.isNaN(a.getTime())?o:new Intl.DateTimeFormat(t||document.documentElement.lang||void 0,{dateStyle:"medium"}).format(a)}var hp=Object.defineProperty,ba=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&hp(t,e,r),r},Ue=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.layout="stacked",this.headingLevel=1,this.filled=new Set,this.headingId=W("kt-hero"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
|
|
6611
6644
|
.hero {
|
|
6612
6645
|
display: grid;
|
|
6613
6646
|
gap: calc(var(--gap-card) * 2.5);
|
|
@@ -7158,7 +7191,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7158
7191
|
<ul class="list" role="list">
|
|
7159
7192
|
${this.testimonials.map(t=>this.testimonial(t))}
|
|
7160
7193
|
</ul>
|
|
7161
|
-
</section>`}};xa([n({type:String})],Ne.prototype,"heading");xa([n({type:String})],Ne.prototype,"lead");xa([n({type:String,reflect:!0})],Ne.prototype,"align");xa([n({attribute:!1})],Ne.prototype,"testimonials");xa([n({type:String,reflect:!0})],Ne.prototype,"layout");xa([n({type:Number,attribute:"heading-level"})],Ne.prototype,"headingLevel");g("kt-testimonials",Ne);var bp=Object.defineProperty,
|
|
7194
|
+
</section>`}};xa([n({type:String})],Ne.prototype,"heading");xa([n({type:String})],Ne.prototype,"lead");xa([n({type:String,reflect:!0})],Ne.prototype,"align");xa([n({attribute:!1})],Ne.prototype,"testimonials");xa([n({type:String,reflect:!0})],Ne.prototype,"layout");xa([n({type:Number,attribute:"heading-level"})],Ne.prototype,"headingLevel");g("kt-testimonials",Ne);var bp=Object.defineProperty,Ro=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&bp(t,e,r),r},Mr=class extends c{constructor(){super(...arguments),this.heading="",this.align="center",this.colour=!1,this.headingLevel=2,this.headingId=W("kt-logo-cloud")}static{this.styles=[c.styles,st,f`
|
|
7162
7195
|
:host {
|
|
7163
7196
|
--kt-logo-height: 28px;
|
|
7164
7197
|
}
|
|
@@ -7216,7 +7249,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7216
7249
|
${Q(this.headingLevel,this.heading,"caption",2)}
|
|
7217
7250
|
</div>`:d}
|
|
7218
7251
|
<div part="logos" class="logos"><slot></slot></div>
|
|
7219
|
-
</section>`}};
|
|
7252
|
+
</section>`}};Ro([n({type:String})],Mr.prototype,"heading");Ro([n({type:String,reflect:!0})],Mr.prototype,"align");Ro([n({type:Boolean,reflect:!0})],Mr.prototype,"colour");Ro([n({type:Number,attribute:"heading-level"})],Mr.prototype,"headingLevel");g("kt-logo-cloud",Mr);var xp=Object.defineProperty,qo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&xp(t,e,r),r},Dr=class extends c{constructor(){super(...arguments),this.open=!1,this.heading="",this.plain=!1,this.folding=!1,this.fold=null}static{this.styles=[c.styles,f`
|
|
7220
7253
|
:host {
|
|
7221
7254
|
display: block;
|
|
7222
7255
|
}
|
|
@@ -7291,7 +7324,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7291
7324
|
<div part="content" class="content">
|
|
7292
7325
|
<div class="inner"><slot></slot></div>
|
|
7293
7326
|
</div>
|
|
7294
|
-
</details>`}};qo([n({type:Boolean,reflect:!0})],
|
|
7327
|
+
</details>`}};qo([n({type:Boolean,reflect:!0})],Dr.prototype,"open");qo([n({type:String})],Dr.prototype,"heading");qo([n({type:Boolean,reflect:!0})],Dr.prototype,"plain");qo([x()],Dr.prototype,"folding");g("kt-collapsible",Dr);var yp=Object.defineProperty,lr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yp(t,e,r),r},Zt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.items=[],this.multiple=!1,this.openFirst=!1,this.layout="stacked",this.headingLevel=2,this.hasNote=!1,this.headingId=W("kt-faq")}static{this.styles=[c.styles,st,f`
|
|
7295
7328
|
.head {
|
|
7296
7329
|
display: grid;
|
|
7297
7330
|
gap: var(--gap-card);
|
|
@@ -7353,7 +7386,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7353
7386
|
>${t.answer}</kt-collapsible
|
|
7354
7387
|
>`)}
|
|
7355
7388
|
</kt-accordion>
|
|
7356
|
-
</section>`}};
|
|
7389
|
+
</section>`}};lr([n({type:String})],Zt.prototype,"heading");lr([n({type:String})],Zt.prototype,"lead");lr([n({type:String,reflect:!0})],Zt.prototype,"align");lr([n({attribute:!1})],Zt.prototype,"items");lr([n({type:Boolean,reflect:!0})],Zt.prototype,"multiple");lr([n({type:Boolean,attribute:"open-first"})],Zt.prototype,"openFirst");lr([n({type:String,reflect:!0})],Zt.prototype,"layout");lr([n({type:Number,attribute:"heading-level"})],Zt.prototype,"headingLevel");lr([x()],Zt.prototype,"hasNote");g("kt-faq",Zt);var kp=Object.defineProperty,dr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kp(t,e,r),r},Qt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.posts=[],this.columns=3,this.layout="grid",this.locale="",this.headingLevel=2,this.hasMore=!1,this.headingId=W("kt-post-grid")}static{this.styles=[c.styles,st,f`
|
|
7357
7390
|
:host {
|
|
7358
7391
|
--kt-post-columns: 3;
|
|
7359
7392
|
}
|
|
@@ -7516,7 +7549,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7516
7549
|
>${t.author.name}</span
|
|
7517
7550
|
>`:d}
|
|
7518
7551
|
${t.date?l`<time datetime=${t.date}
|
|
7519
|
-
>${
|
|
7552
|
+
>${Ko(t.date,this.locale)}</time
|
|
7520
7553
|
>`:d}
|
|
7521
7554
|
</div>`:d}
|
|
7522
7555
|
</div>
|
|
@@ -7533,7 +7566,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7533
7566
|
<div class=${this.hasMore?"more":"more empty"}>
|
|
7534
7567
|
<slot name="more" @slotchange=${this.readMore}></slot>
|
|
7535
7568
|
</div>
|
|
7536
|
-
</section>`}};
|
|
7569
|
+
</section>`}};dr([n({type:String})],Qt.prototype,"heading");dr([n({type:String})],Qt.prototype,"lead");dr([n({type:String,reflect:!0})],Qt.prototype,"align");dr([n({attribute:!1})],Qt.prototype,"posts");dr([n({type:Number,reflect:!0})],Qt.prototype,"columns");dr([n({type:String,reflect:!0})],Qt.prototype,"layout");dr([n({type:String})],Qt.prototype,"locale");dr([n({type:Number,attribute:"heading-level"})],Qt.prototype,"headingLevel");dr([x()],Qt.prototype,"hasMore");g("kt-post-grid",Qt);var wp=Object.defineProperty,jt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&wp(t,e,r),r},yn={back:"All posts",minRead:o=>`${o} min read`},$p=230,ft=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.date="",this.author="",this.authorRole="",this.avatar="",this.readingTime=0,this.tags=[],this.backHref="",this.locale="",this.headingLevel=1,this.texts={},this.counted=0,this.filled=new Set,this.headingId=W("kt-blog-post"),this.readSlots=()=>{let t=new Set;for(let a of this.shadowRoot?.querySelectorAll("slot")??[])E(a)&&t.add(a.name);this.filled=t;let e=(this.shadowRoot?.querySelector("slot:not([name])")?.assignedNodes({flatten:!0})??[]).map(a=>a.textContent??"").join(" ").split(/\s+/).filter(Boolean).length;this.counted=e?Math.max(1,Math.round(e/$p)):0}}static{this.styles=[c.styles,f`
|
|
7537
7570
|
:host {
|
|
7538
7571
|
--kt-post-measure: 700px;
|
|
7539
7572
|
display: block;
|
|
@@ -7704,7 +7737,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7704
7737
|
</span>
|
|
7705
7738
|
</span>`:d}
|
|
7706
7739
|
<span class="when">
|
|
7707
|
-
${this.date?l`<time datetime=${this.date}>${
|
|
7740
|
+
${this.date?l`<time datetime=${this.date}>${Ko(this.date,this.locale)}</time>`:d}
|
|
7708
7741
|
${e?l`<span class="reading">${t.minRead(e)}</span>`:d}
|
|
7709
7742
|
</span>
|
|
7710
7743
|
</div>`}render(){let t={...yn,...this.texts};return l`<article part="base" aria-labelledby=${this.headingId}>
|
|
@@ -7725,7 +7758,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7725
7758
|
<footer class=${this.filled.has("end")?"end column":"end column empty"}>
|
|
7726
7759
|
<slot name="end" @slotchange=${this.readSlots}></slot>
|
|
7727
7760
|
</footer>
|
|
7728
|
-
</article>`}};jt([n({type:String})],ft.prototype,"heading");jt([n({type:String})],ft.prototype,"lead");jt([n({type:String})],ft.prototype,"date");jt([n({type:String})],ft.prototype,"author");jt([n({type:String,attribute:"author-role"})],ft.prototype,"authorRole");jt([n({type:String})],ft.prototype,"avatar");jt([n({type:Number,attribute:"reading-time"})],ft.prototype,"readingTime");jt([n({attribute:!1})],ft.prototype,"tags");jt([n({type:String,attribute:"back-href"})],ft.prototype,"backHref");jt([n({type:String})],ft.prototype,"locale");jt([n({type:Number,attribute:"heading-level"})],ft.prototype,"headingLevel");jt([n({attribute:!1})],ft.prototype,"texts");jt([x()],ft.prototype,"counted");jt([x()],ft.prototype,"filled");g("kt-blog-post",ft);var Cp=Object.defineProperty,Pe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Cp(t,e,r),r},Sp={email:"Email address",placeholder:"you@example.com",subscribe:"Subscribe",invalid:"Enter an email address, like name@example.com.",failed:"That did not go through. Try again in a moment.",done:"You are in. Check your inbox to confirm."},Pp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
|
7761
|
+
</article>`}};jt([n({type:String})],ft.prototype,"heading");jt([n({type:String})],ft.prototype,"lead");jt([n({type:String})],ft.prototype,"date");jt([n({type:String})],ft.prototype,"author");jt([n({type:String,attribute:"author-role"})],ft.prototype,"authorRole");jt([n({type:String})],ft.prototype,"avatar");jt([n({type:Number,attribute:"reading-time"})],ft.prototype,"readingTime");jt([n({attribute:!1})],ft.prototype,"tags");jt([n({type:String,attribute:"back-href"})],ft.prototype,"backHref");jt([n({type:String})],ft.prototype,"locale");jt([n({type:Number,attribute:"heading-level"})],ft.prototype,"headingLevel");jt([n({attribute:!1})],ft.prototype,"texts");jt([x()],ft.prototype,"counted");jt([x()],ft.prototype,"filled");g("kt-blog-post",ft);var Cp=Object.defineProperty,Pe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Cp(t,e,r),r},Sp={email:"Email address",placeholder:"you@example.com",subscribe:"Subscribe",invalid:"Enter an email address, like name@example.com.",failed:"That did not go through. Try again in a moment.",done:"You are in. Check your inbox to confirm."},Pp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,zt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.variant="panel",this.layout="stacked",this.subscribed=!1,this.headingLevel=2,this.texts={},this.hasNote=!1,this.headingId=W("kt-newsletter")}static{this.styles=[c.styles,st,f`
|
|
7729
7762
|
.panel {
|
|
7730
7763
|
display: grid;
|
|
7731
7764
|
gap: calc(var(--gap-card) * 1.5);
|
|
@@ -7852,7 +7885,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7852
7885
|
</div>
|
|
7853
7886
|
</div>
|
|
7854
7887
|
</div>
|
|
7855
|
-
</section>`}};Pe([n({type:String})],
|
|
7888
|
+
</section>`}};Pe([n({type:String})],zt.prototype,"heading");Pe([n({type:String})],zt.prototype,"lead");Pe([n({type:String,reflect:!0})],zt.prototype,"align");Pe([n({type:String,reflect:!0})],zt.prototype,"variant");Pe([n({type:String,reflect:!0})],zt.prototype,"layout");Pe([n({type:Boolean,reflect:!0})],zt.prototype,"subscribed");Pe([n({type:Number,attribute:"heading-level"})],zt.prototype,"headingLevel");Pe([n({attribute:!1})],zt.prototype,"texts");Pe([x()],zt.prototype,"hasNote");Pe([A("kt-input")],zt.prototype,"field");Pe([A("kt-button")],zt.prototype,"button");g("kt-newsletter",zt);var Ap=Object.defineProperty,ya=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ap(t,e,r),r},He=class extends c{constructor(){super(...arguments),this.heading="",this.description="",this.layout="split",this.danger=!1,this.headingLevel=2,this.filled=new Set,this.headingId=W("kt-settings-section"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,f`
|
|
7856
7889
|
:host {
|
|
7857
7890
|
display: block;
|
|
7858
7891
|
container-type: inline-size;
|
|
@@ -7953,7 +7986,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
7953
7986
|
<span class="actions"><slot name="actions" @slotchange=${this.readSlots}></slot></span>
|
|
7954
7987
|
</div>
|
|
7955
7988
|
</div>
|
|
7956
|
-
</section>`}};ya([n({type:String})],He.prototype,"heading");ya([n({type:String})],He.prototype,"description");ya([n({type:String,reflect:!0})],He.prototype,"layout");ya([n({type:Boolean,reflect:!0})],He.prototype,"danger");ya([n({type:Number,attribute:"heading-level"})],He.prototype,"headingLevel");ya([x()],He.prototype,"filled");g("kt-settings-section",He);var Mp=Object.defineProperty,
|
|
7989
|
+
</section>`}};ya([n({type:String})],He.prototype,"heading");ya([n({type:String})],He.prototype,"description");ya([n({type:String,reflect:!0})],He.prototype,"layout");ya([n({type:Boolean,reflect:!0})],He.prototype,"danger");ya([n({type:Number,attribute:"heading-level"})],He.prototype,"headingLevel");ya([x()],He.prototype,"filled");g("kt-settings-section",He);var Mp=Object.defineProperty,pr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Mp(t,e,r),r},Jt=class extends c{constructor(){super(...arguments),this.value=0,this.max=100,this.size="medium",this.variant="primary",this.showValue=!1,this.showLabel=!1,this.striped=!1,this.animated=!1,this.label=""}static{this.styles=[c.styles,f`
|
|
7957
7990
|
:host {
|
|
7958
7991
|
display: block;
|
|
7959
7992
|
width: 100%;
|
|
@@ -8098,7 +8131,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8098
8131
|
style=${ct({width:`${t}%`})}
|
|
8099
8132
|
></div>
|
|
8100
8133
|
</div>
|
|
8101
|
-
</div>`}};
|
|
8134
|
+
</div>`}};pr([n({type:Number})],Jt.prototype,"value");pr([n({type:Number})],Jt.prototype,"max");pr([n({type:String,reflect:!0})],Jt.prototype,"size");pr([n({type:String,reflect:!0})],Jt.prototype,"variant");pr([n({type:Boolean,attribute:"show-value"})],Jt.prototype,"showValue");pr([n({type:Boolean,attribute:"show-label"})],Jt.prototype,"showLabel");pr([n({type:Boolean,reflect:!0})],Jt.prototype,"striped");pr([n({type:Boolean,reflect:!0})],Jt.prototype,"animated");pr([n({type:String})],Jt.prototype,"label");g("kt-progress-bar",Jt);var Dp=Object.defineProperty,ka=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dp(t,e,r),r},Tp={progress:(o,t)=>`${o} of ${t} done`,done:"Done:",start:"Start"},je=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.steps=[],this.headingLevel=1,this.texts={},this.filled=new Set,this.headingId=W("kt-empty-page"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
|
|
8102
8135
|
.block {
|
|
8103
8136
|
justify-items: center;
|
|
8104
8137
|
max-width: 720px;
|
|
@@ -8431,7 +8464,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8431
8464
|
<slot name="legal" @slotchange=${this.readLegal}></slot>
|
|
8432
8465
|
</div>
|
|
8433
8466
|
</div>
|
|
8434
|
-
</footer>`}};wa([n({attribute:!1})],_e.prototype,"columns");wa([n({type:String,reflect:!0})],_e.prototype,"variant");wa([n({type:Boolean,reflect:!0})],_e.prototype,"bordered");wa([n({type:Number,attribute:"heading-level"})],_e.prototype,"headingLevel");wa([n({type:String})],_e.prototype,"label");wa([x()],_e.prototype,"hasLegal");g("kt-footer",_e);var Bp=Object.defineProperty,
|
|
8467
|
+
</footer>`}};wa([n({attribute:!1})],_e.prototype,"columns");wa([n({type:String,reflect:!0})],_e.prototype,"variant");wa([n({type:Boolean,reflect:!0})],_e.prototype,"bordered");wa([n({type:Number,attribute:"heading-level"})],_e.prototype,"headingLevel");wa([n({type:String})],_e.prototype,"label");wa([x()],_e.prototype,"hasLegal");g("kt-footer",_e);var Bp=Object.defineProperty,cr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Bp(t,e,r),r},Op={small:16,medium:20,large:24},Kt=class extends c{constructor(){super(...arguments),this.selected=!1,this.disabled=!1,this.variant="primary",this.size="medium",this.value="",this.icon="",this.iconPosition="left",this.label="",this.managed=!1}static{this.styles=[c.styles,f`
|
|
8435
8468
|
:host {
|
|
8436
8469
|
display: inline-flex;
|
|
8437
8470
|
}
|
|
@@ -8552,7 +8585,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8552
8585
|
${this.iconPosition==="left"?a:d}
|
|
8553
8586
|
${e?d:l`<span class="text"><slot></slot></span>`}
|
|
8554
8587
|
${this.iconPosition==="right"?a:d}
|
|
8555
|
-
</button>`}};
|
|
8588
|
+
</button>`}};cr([n({type:Boolean,reflect:!0})],Kt.prototype,"selected");cr([n({type:Boolean,reflect:!0})],Kt.prototype,"disabled");cr([n({type:String,reflect:!0})],Kt.prototype,"variant");cr([n({type:String,reflect:!0})],Kt.prototype,"size");cr([n({type:String})],Kt.prototype,"value");cr([n({type:String})],Kt.prototype,"icon");cr([n({type:String,attribute:"icon-position"})],Kt.prototype,"iconPosition");cr([n({type:String})],Kt.prototype,"label");cr([n({attribute:!1})],Kt.prototype,"managed");g("kt-toggle-button",Kt);var zp=Object.defineProperty,Va=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&zp(t,e,r),r},hr=class extends c{constructor(){super(...arguments),this.multiple=!1,this.orientation="horizontal",this.label="",this.value=null,this.onButtonClick=t=>{let e=t.composedPath().find(a=>a instanceof Kt);if(!(!e||e.disabled)&&this.buttons?.includes(e)){if(this.multiple){let a=Array.isArray(this.value)?this.value:[];this.value=a.includes(e.value)?a.filter(r=>r!==e.value):[...a,e.value]}else this.value=this.value===e.value?null:e.value;this.syncButtons(),y(this,"kt-change",{value:this.value})}}}static{this.styles=[c.styles,f`
|
|
8556
8589
|
:host {
|
|
8557
8590
|
display: inline-flex;
|
|
8558
8591
|
width: fit-content;
|
|
@@ -8611,7 +8644,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8611
8644
|
aria-label=${this.label||v().options}
|
|
8612
8645
|
>
|
|
8613
8646
|
<slot @slotchange=${this.syncButtons}></slot>
|
|
8614
|
-
</div>`}};
|
|
8647
|
+
</div>`}};Va([na({selector:"kt-toggle-button"})],hr.prototype,"buttons");Va([n({type:Boolean,reflect:!0})],hr.prototype,"multiple");Va([n({type:String,reflect:!0})],hr.prototype,"orientation");Va([n({type:String})],hr.prototype,"label");Va([n({attribute:!1})],hr.prototype,"value");g("kt-toggle-button-group",hr);var Kp=Object.defineProperty,Eo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Kp(t,e,r),r},Tr=class extends c{constructor(){super(...arguments),this.icon="inbox",this.heading="",this.description="",this.compact=!1}static{this.styles=[c.styles,f`
|
|
8615
8648
|
:host {
|
|
8616
8649
|
display: block;
|
|
8617
8650
|
}
|
|
@@ -8671,7 +8704,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8671
8704
|
${this.description?l`<p class="description">${this.description}</p>`:d}
|
|
8672
8705
|
<slot></slot>
|
|
8673
8706
|
<div class="actions"><slot name="actions"></slot></div>
|
|
8674
|
-
</div>`}};Eo([n({type:String})],
|
|
8707
|
+
</div>`}};Eo([n({type:String})],Tr.prototype,"icon");Eo([n({type:String})],Tr.prototype,"heading");Eo([n({type:String})],Tr.prototype,"description");Eo([n({type:Boolean,reflect:!0})],Tr.prototype,"compact");g("kt-empty-state",Tr);var Rp=Object.defineProperty,$a=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rp(t,e,r),r},qp={success:{icon:"circle-check",progress:"success"},information:{icon:"info",progress:"info"},warning:{icon:"triangle-alert",progress:"warning"},error:{icon:"circle-alert",progress:"danger"}},kn=50,Ve=class extends c{constructor(){super(...arguments),this.remaining=0,this.variant="information",this.heading="",this.description="",this.dismissible=!1,this.duration=0}static{this.styles=[c.styles,f`
|
|
8675
8708
|
:host {
|
|
8676
8709
|
display: block;
|
|
8677
8710
|
}
|
|
@@ -8838,7 +8871,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8838
8871
|
label=${v().timeRemaining}
|
|
8839
8872
|
></kt-progress-bar>
|
|
8840
8873
|
</div>`:d}
|
|
8841
|
-
</div>`}};$a([x()],Ve.prototype,"remaining");$a([n({type:String,reflect:!0})],Ve.prototype,"variant");$a([n({type:String})],Ve.prototype,"heading");$a([n({type:String})],Ve.prototype,"description");$a([n({type:Boolean})],Ve.prototype,"dismissible");$a([n({type:Number})],Ve.prototype,"duration");g("kt-toast",Ve);var Ep=Object.defineProperty,wn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ep(t,e,r),r},
|
|
8874
|
+
</div>`}};$a([x()],Ve.prototype,"remaining");$a([n({type:String,reflect:!0})],Ve.prototype,"variant");$a([n({type:String})],Ve.prototype,"heading");$a([n({type:String})],Ve.prototype,"description");$a([n({type:Boolean})],Ve.prototype,"dismissible");$a([n({type:Number})],Ve.prototype,"duration");g("kt-toast",Ve);var Ep=Object.defineProperty,wn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ep(t,e,r),r},Lr=class extends c{constructor(){super(...arguments),this.position="bottom-right",this.limit=5,this.pauseAll=()=>{for(let t of this.toasts)t.pause()},this.resumeAll=()=>{for(let t of this.toasts)t.resume()}}static{this.styles=[c.styles,f`
|
|
8842
8875
|
:host {
|
|
8843
8876
|
position: fixed;
|
|
8844
8877
|
z-index: var(--z-toast);
|
|
@@ -8876,7 +8909,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8876
8909
|
::slotted(kt-toast[leaving]) {
|
|
8877
8910
|
pointer-events: none;
|
|
8878
8911
|
}
|
|
8879
|
-
`]}get toasts(){return[...this.querySelectorAll("kt-toast:not([leaving])")]}show(t={}){let e=document.createElement("kt-toast");return e.variant=t.variant??"information",e.heading=t.heading??"",e.description=t.description??"",e.dismissible=t.dismissible??!0,e.duration=t.duration??0,e.addEventListener("kt-toast-close",()=>this.dismiss(e),{once:!0}),this.position.startsWith("top")?this.prepend(e):this.append(e),this.enforceLimit(),e.updateComplete.then(()=>{e.isConnected&&!e.hasAttribute("leaving")&&this.move(e,"in")}),e}dismiss(t){if(t.hasAttribute("leaving"))return;t.setAttribute("leaving",""),t.setAttribute("aria-hidden","true");let e=this.move(t,"out");e?e.finished.then(()=>t.remove(),()=>t.remove()):t.remove()}clear(){for(let t of this.toasts)this.dismiss(t)}move(t,e){let a=br(this,e==="in"?"--duration-normal":"--duration-fast");if(a<=0||typeof t.animate!="function")return null;for(let k of t.getAnimations())k.cancel();let r=`${t.getBoundingClientRect().height}px`,i=`-${getComputedStyle(this).rowGap}`,s=t.previousElementSibling?"marginTop":"marginBottom",p=e==="in"?`translateY(${this.position.startsWith("top")?-8:8}px)`:`translateX(${this.position.endsWith("left")?-16:16}px)`,h={opacity:1,height:r,transform:"none",[s]:"0px"},u={opacity:0,height:"0px",transform:p,[s]:i};t.style.overflow="clip";let m=t.animate(e==="in"?[u,h]:[h,u],{duration:a,easing:
|
|
8912
|
+
`]}get toasts(){return[...this.querySelectorAll("kt-toast:not([leaving])")]}show(t={}){let e=document.createElement("kt-toast");return e.variant=t.variant??"information",e.heading=t.heading??"",e.description=t.description??"",e.dismissible=t.dismissible??!0,e.duration=t.duration??0,e.addEventListener("kt-toast-close",()=>this.dismiss(e),{once:!0}),this.position.startsWith("top")?this.prepend(e):this.append(e),this.enforceLimit(),e.updateComplete.then(()=>{e.isConnected&&!e.hasAttribute("leaving")&&this.move(e,"in")}),e}dismiss(t){if(t.hasAttribute("leaving"))return;t.setAttribute("leaving",""),t.setAttribute("aria-hidden","true");let e=this.move(t,"out");e?e.finished.then(()=>t.remove(),()=>t.remove()):t.remove()}clear(){for(let t of this.toasts)this.dismiss(t)}move(t,e){let a=br(this,e==="in"?"--duration-normal":"--duration-fast");if(a<=0||typeof t.animate!="function")return null;for(let k of t.getAnimations())k.cancel();let r=`${t.getBoundingClientRect().height}px`,i=`-${getComputedStyle(this).rowGap}`,s=t.previousElementSibling?"marginTop":"marginBottom",p=e==="in"?`translateY(${this.position.startsWith("top")?-8:8}px)`:`translateX(${this.position.endsWith("left")?-16:16}px)`,h={opacity:1,height:r,transform:"none",[s]:"0px"},u={opacity:0,height:"0px",transform:p,[s]:i};t.style.overflow="clip";let m=t.animate(e==="in"?[u,h]:[h,u],{duration:a,easing:Ki(this),fill:e==="out"?"forwards":"none"});m.id=`kt-toast-${e}`;let b=()=>{e==="in"&&t.style.removeProperty("overflow")};return m.finished.then(b,b),m}enforceLimit(){if(this.limit<=0)return;let t=this.toasts,e=t.length-this.limit,a=this.position.startsWith("top")?[...t].reverse():t;for(let r=0;r<e;r+=1){let i=a[r];i&&this.dismiss(i)}}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.pauseAll),this.addEventListener("pointerleave",this.resumeAll)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointerenter",this.pauseAll),this.removeEventListener("pointerleave",this.resumeAll)}render(){return l`<slot></slot>`}};wn([n({type:String,reflect:!0})],Lr.prototype,"position");wn([n({type:Number})],Lr.prototype,"limit");g("kt-toast-container",Lr);var Qi=class{constructor(){this.position="bottom-right"}getContainer(){if(this.container?.isConnected)return this.container;let t=document.querySelector("kt-toast-container");if(t)return this.container=t,t;let e=new Lr;return e.position=this.position,document.body.append(e),this.container=e,e}show(t){return this.getContainer().show(t)}success(t,e={}){return this.show({duration:4e3,...e,variant:"success",heading:t})}info(t,e={}){return this.show({duration:4e3,...e,variant:"information",heading:t})}warning(t,e={}){return this.show({duration:6e3,...e,variant:"warning",heading:t})}error(t,e={}){return this.show({duration:0,...e,variant:"error",heading:t})}clear(){this.container?.clear()}},Ip=new Qi;function Ge(o){if(!o.open){if(typeof o.showModal=="function"){o.showModal();return}o.setAttribute("open","")}}function Br(o){if(o.open){if(typeof o.close=="function"){o.close();return}o.removeAttribute("open")}}function Or(o,t){if(t.target!==o)return!1;let e=o.getBoundingClientRect();return e.width===0&&e.height===0?!1:t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom}var Fp=Object.defineProperty,zr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Fp(t,e,r),r},se=class extends c{constructor(){super(...arguments),this.open=!1,this.heading=void 0,this.message="",this.confirmLabel=void 0,this.cancelLabel=void 0,this.variant="danger"}static{this.styles=[c.styles,f`
|
|
8880
8913
|
:host {
|
|
8881
8914
|
display: contents;
|
|
8882
8915
|
}
|
|
@@ -8957,7 +8990,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8957
8990
|
transition: none;
|
|
8958
8991
|
}
|
|
8959
8992
|
}
|
|
8960
|
-
`]}updated(t){t.has("open")&&(this.open?(Ge(this.dialog),this.cancelButton?.focus()):
|
|
8993
|
+
`]}updated(t){t.has("open")&&(this.open?(Ge(this.dialog),this.cancelButton?.focus()):Br(this.dialog))}confirm(){this.open=!1,y(this,"kt-confirm")}cancel(){this.open=!1,y(this,"kt-cancel")}onDialogClose(){this.open&&this.cancel()}onDialogClick(t){Or(this.dialog,t)&&this.cancel()}render(){return l`<dialog
|
|
8961
8994
|
part="dialog"
|
|
8962
8995
|
role="alertdialog"
|
|
8963
8996
|
aria-label=${this.heading??v().confirmHeading}
|
|
@@ -8979,7 +9012,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
8979
9012
|
>${this.confirmLabel??v().confirm}</kt-button
|
|
8980
9013
|
>
|
|
8981
9014
|
</div>
|
|
8982
|
-
</dialog>`}};
|
|
9015
|
+
</dialog>`}};zr([A("dialog")],se.prototype,"dialog");zr([A("kt-button[data-cancel]")],se.prototype,"cancelButton");zr([n({type:Boolean,reflect:!0})],se.prototype,"open");zr([n({type:String})],se.prototype,"heading");zr([n({type:String})],se.prototype,"message");zr([n({type:String,attribute:"confirm-label"})],se.prototype,"confirmLabel");zr([n({type:String,attribute:"cancel-label"})],se.prototype,"cancelLabel");zr([n({type:String,reflect:!0})],se.prototype,"variant");g("kt-confirm-dialog",se);var Up=Object.defineProperty,ea=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Up(t,e,r),r},Ae=class extends c{constructor(){super(...arguments),this.open=!1,this.heading="",this.description="",this.size="medium",this.noCloseButton=!1,this.noBackdropClose=!1,this.hasFooter=!1}static{this.styles=[c.styles,f`
|
|
8983
9016
|
:host {
|
|
8984
9017
|
display: contents;
|
|
8985
9018
|
}
|
|
@@ -9089,7 +9122,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9089
9122
|
transition: none;
|
|
9090
9123
|
}
|
|
9091
9124
|
}
|
|
9092
|
-
`]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):
|
|
9125
|
+
`]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):Br(this.dialog)),this.readFooter()}readFooter(){let t=E(this.shadowRoot?.querySelector('slot[name="footer"]'));t!==this.hasFooter&&(this.hasFooter=t,this.requestUpdate())}requestClose(){if(y(this,"kt-close").defaultPrevented){this.dialog.open||Ge(this.dialog);return}this.open=!1}onDialogClose(){this.open&&this.requestClose()}onDialogClick(t){this.noBackdropClose||Or(this.dialog,t)&&this.requestClose()}render(){let t=!!this.heading||!!this.description;return l`<dialog
|
|
9093
9126
|
part="dialog"
|
|
9094
9127
|
aria-label=${this.heading||d}
|
|
9095
9128
|
@close=${this.onDialogClose}
|
|
@@ -9116,7 +9149,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9116
9149
|
<div part="footer" class=${this.hasFooter?"footer":"footer empty"}>
|
|
9117
9150
|
<slot name="footer" @slotchange=${this.readFooter}></slot>
|
|
9118
9151
|
</div>
|
|
9119
|
-
</dialog>`}};ea([A("dialog")],Ae.prototype,"dialog");ea([n({type:Boolean,reflect:!0})],Ae.prototype,"open");ea([n({type:String})],Ae.prototype,"heading");ea([n({type:String})],Ae.prototype,"description");ea([n({type:String,reflect:!0})],Ae.prototype,"size");ea([n({type:Boolean,attribute:"no-close-button"})],Ae.prototype,"noCloseButton");ea([n({type:Boolean,attribute:"no-backdrop-close"})],Ae.prototype,"noBackdropClose");g("kt-modal",Ae);function Ji(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function Np(o,t,e){let a=Ji(o.label),r=Ji([...o.keywords??[],o.group??""].join(" ")),i=`${a} ${r}`;if(!e.every(p=>i.includes(p)))return 1/0;if(a.startsWith(t))return 0;let s=a.split(/[^\p{L}\p{N}]+/u);return e.every(p=>s.some(h=>h.startsWith(p)))?1:e.every(p=>a.includes(p))?2:3}function Hp(o,t){let e=Ji(t.trim());if(!e)return[...o];let a=e.split(/\s+/);return o.map((r,i)=>({command:r,index:i,rank:Np(r,e,a)})).filter(r=>r.rank!==1/0).sort((r,i)=>r.rank-i.rank||r.index-i.index).map(r=>r.command)}var jp=Object.defineProperty,Kr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&jp(t,e,r),r};function _p(o){let t=new Map;for(let e of o){let a=e.group??"";t.has(a)||t.set(a,[]),t.get(a).push(e)}return[...t].map(([e,a])=>({name:e,commands:a}))}var
|
|
9152
|
+
</dialog>`}};ea([A("dialog")],Ae.prototype,"dialog");ea([n({type:Boolean,reflect:!0})],Ae.prototype,"open");ea([n({type:String})],Ae.prototype,"heading");ea([n({type:String})],Ae.prototype,"description");ea([n({type:String,reflect:!0})],Ae.prototype,"size");ea([n({type:Boolean,attribute:"no-close-button"})],Ae.prototype,"noCloseButton");ea([n({type:Boolean,attribute:"no-backdrop-close"})],Ae.prototype,"noBackdropClose");g("kt-modal",Ae);function Ji(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function Np(o,t,e){let a=Ji(o.label),r=Ji([...o.keywords??[],o.group??""].join(" ")),i=`${a} ${r}`;if(!e.every(p=>i.includes(p)))return 1/0;if(a.startsWith(t))return 0;let s=a.split(/[^\p{L}\p{N}]+/u);return e.every(p=>s.some(h=>h.startsWith(p)))?1:e.every(p=>a.includes(p))?2:3}function Hp(o,t){let e=Ji(t.trim());if(!e)return[...o];let a=e.split(/\s+/);return o.map((r,i)=>({command:r,index:i,rank:Np(r,e,a)})).filter(r=>r.rank!==1/0).sort((r,i)=>r.rank-i.rank||r.index-i.index).map(r=>r.command)}var jp=Object.defineProperty,Kr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&jp(t,e,r),r};function _p(o){let t=new Map;for(let e of o){let a=e.group??"";t.has(a)||t.set(a,[]),t.get(a).push(e)}return[...t].map(([e,a])=>({name:e,commands:a}))}var ne=class extends c{constructor(){super(...arguments),this.commands=[],this.open=!1,this.placeholder="",this.hotkey="k",this.query="",this.activeIndex=0,this.listId=q("kt-command-list"),this.returnFocus=null,this.onDocumentKeyDown=t=>{if(!this.hotkey||t.defaultPrevented||t.repeat||!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey)return;let e=this.hotkey.toLowerCase();(t.key?.toLowerCase()===e||t.code===`Key${e.toUpperCase()}`)&&(t.preventDefault(),this.open=!this.open)}}static{this.styles=[c.styles,f`
|
|
9120
9153
|
:host {
|
|
9121
9154
|
display: contents;
|
|
9122
9155
|
}
|
|
@@ -9260,7 +9293,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9260
9293
|
transition: none;
|
|
9261
9294
|
}
|
|
9262
9295
|
}
|
|
9263
|
-
`]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.onDocumentKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.onDocumentKeyDown)}get results(){return Hp(this.commands,this.query)}willUpdate(t){t.has("open")&&this.open&&(this.query="",this.activeIndex=this.firstEnabled(this.results)),t.has("commands")&&(this.activeIndex=this.firstEnabled(this.results))}updated(t){let e=t;(e.has("activeIndex")||e.has("query"))&&this.renderRoot.querySelector(`#${this.optionId(this.activeIndex)}`)?.scrollIntoView({block:"nearest"}),t.has("open")&&(this.open?(this.returnFocus=Vp(),Ge(this.dialog),this.input.value="",this.input.focus(),y(this,"kt-open")):t.get("open")===!0&&(
|
|
9296
|
+
`]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.onDocumentKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.onDocumentKeyDown)}get results(){return Hp(this.commands,this.query)}willUpdate(t){t.has("open")&&this.open&&(this.query="",this.activeIndex=this.firstEnabled(this.results)),t.has("commands")&&(this.activeIndex=this.firstEnabled(this.results))}updated(t){let e=t;(e.has("activeIndex")||e.has("query"))&&this.renderRoot.querySelector(`#${this.optionId(this.activeIndex)}`)?.scrollIntoView({block:"nearest"}),t.has("open")&&(this.open?(this.returnFocus=Vp(),Ge(this.dialog),this.input.value="",this.input.focus(),y(this,"kt-open")):t.get("open")===!0&&(Br(this.dialog),this.returnFocus?.isConnected&&this.returnFocus.focus(),this.returnFocus=null,y(this,"kt-close")))}firstEnabled(t){return t.findIndex(e=>!e.disabled)}step(t,e,a){for(let r=1;r<=t.length;r+=1){let i=(e+a*r+t.length*r)%t.length;if(!t[i].disabled)return i}return-1}onInput(){this.query=this.input.value,this.activeIndex=this.firstEnabled(this.results)}onKeyDown(t){let e=this.results;switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),e.length&&(this.activeIndex=this.step(e,this.activeIndex,t.key==="ArrowDown"?1:-1));break;case"Home":case"End":if(!e.length)return;t.preventDefault(),this.activeIndex=t.key==="Home"?this.firstEnabled(e):this.step(e,0,-1);break;case"Enter":{t.preventDefault();let a=e[this.activeIndex];a&&this.run(a);break}case"Escape":t.preventDefault(),this.open=!1;break}}run(t){t.disabled||(this.open=!1,y(this,"kt-select",{id:t.id,command:t}))}onDialogCancel(t){t.preventDefault(),this.open=!1}onDialogClose(){this.open&&(this.open=!1)}onDialogClick(t){Or(this.dialog,t)&&(this.open=!1)}optionId(t){return`${this.listId}-${t}`}render(){let t=v(),e=this.results,a=e[this.activeIndex],r=-1;return l`<dialog
|
|
9264
9297
|
part="dialog"
|
|
9265
9298
|
aria-label=${t.commandPalette}
|
|
9266
9299
|
@cancel=${this.onDialogCancel}
|
|
@@ -9312,7 +9345,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9312
9345
|
<span><kt-kbd>↵</kt-kbd>${t.commandHintRun}</span>
|
|
9313
9346
|
<span><kt-kbd>esc</kt-kbd>${t.commandHintClose}</span>
|
|
9314
9347
|
</div>
|
|
9315
|
-
</dialog>`}};Kr([n({attribute:!1})],
|
|
9348
|
+
</dialog>`}};Kr([n({attribute:!1})],ne.prototype,"commands");Kr([n({type:Boolean,reflect:!0})],ne.prototype,"open");Kr([n({type:String})],ne.prototype,"placeholder");Kr([n({type:String})],ne.prototype,"hotkey");Kr([x()],ne.prototype,"query");Kr([x()],ne.prototype,"activeIndex");Kr([A("dialog")],ne.prototype,"dialog");Kr([A("input")],ne.prototype,"input");function Vp(){let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}g("kt-command-palette",ne);var Gp=Object.defineProperty,Ca=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Gp(t,e,r),r},We=class extends c{constructor(){super(...arguments),this.open=!1,this.eyebrow=void 0,this.heading="",this.size="small",this.noBackdropClose=!1}static{this.styles=[c.styles,f`
|
|
9316
9349
|
:host {
|
|
9317
9350
|
display: contents;
|
|
9318
9351
|
}
|
|
@@ -9405,12 +9438,20 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9405
9438
|
overflow: auto;
|
|
9406
9439
|
}
|
|
9407
9440
|
|
|
9441
|
+
/* Wider, for a panel that holds more than a form: a comparison, a stack. */
|
|
9442
|
+
:host([size='medium']) dialog {
|
|
9443
|
+
width: 480px;
|
|
9444
|
+
}
|
|
9445
|
+
:host([size='large']) dialog {
|
|
9446
|
+
width: 720px;
|
|
9447
|
+
}
|
|
9448
|
+
|
|
9408
9449
|
@media (prefers-reduced-motion: reduce) {
|
|
9409
9450
|
dialog {
|
|
9410
9451
|
transition: none;
|
|
9411
9452
|
}
|
|
9412
9453
|
}
|
|
9413
|
-
`]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):
|
|
9454
|
+
`]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):Br(this.dialog))}requestClose(){if(y(this,"kt-close").defaultPrevented){this.dialog.open||Ge(this.dialog);return}this.open=!1}onDialogClose(){this.open&&this.requestClose()}onDialogClick(t){this.noBackdropClose||Or(this.dialog,t)&&this.requestClose()}render(){return l`<dialog
|
|
9414
9455
|
part="dialog"
|
|
9415
9456
|
aria-label=${this.heading||d}
|
|
9416
9457
|
@close=${this.onDialogClose}
|
|
@@ -9434,47 +9475,47 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9434
9475
|
|
|
9435
9476
|
<div part="body" class="body"><slot></slot></div>
|
|
9436
9477
|
<slot name="footer"></slot>
|
|
9437
|
-
</dialog>`}};
|
|
9478
|
+
</dialog>`}};Ca([A("dialog")],We.prototype,"dialog");Ca([n({type:Boolean,reflect:!0})],We.prototype,"open");Ca([n({type:String})],We.prototype,"eyebrow");Ca([n({type:String})],We.prototype,"heading");Ca([n({type:String,reflect:!0})],We.prototype,"size");Ca([n({type:Boolean,attribute:"no-backdrop-close"})],We.prototype,"noBackdropClose");g("kt-side-panel",We);function Wp(o){let t=Math.floor(Math.log10(o)),e=o/10**t;return(e<1.5?1:e<3?2:e<7?5:10)*10**t}function rs(o,t,e){if(t===o&&o===0)t=1;else if(t===o){let u=Math.abs(o);o-=u,t+=u}let a=Wp((t-o)/Math.max(1,e-1)),r=Math.max(0,-Math.floor(Math.log10(a))),i=u=>Number(u.toFixed(r))||0,s=i(Math.floor(o/a)*a),p=i(Math.ceil(t/a)*a),h=[];for(let u=0;s+u*a<=p+a/2;u+=1)h.push(i(s+u*a));return{min:s,max:p,step:a,values:h}}function Yp(o,t,{includeZero:e}){let a=t.flat();for(let p of o){let h=Math.max(0,...p.map(u=>u.length));for(let u=0;u<h;u+=1){let m=0,b=0;for(let k of p){let $=k[u]??0;$>=0?m+=$:b+=$}a.push(m,b)}}let r=a.filter(Number.isFinite);if(r.length===0)return{lo:0,hi:1};let i=Math.min(...r),s=Math.max(...r);return e&&(i=Math.min(i,0),s=Math.max(s,0)),{lo:i,hi:s}}function Fo(o,t,e,a){let r=rs(a.min??o,a.max??t,e),i=a.min??r.min,s=a.max??r.max;return s<=i?r:{min:i,max:s,step:r.step,values:r.values.filter(p=>p>=i&&p<=s)}}function Rr(o,t,e,a){return e+(o-t.min)/(t.max-t.min)*(a-e)}function Uo(o,t){return Math.min(6,Math.max(3,Math.round(o/t)))}var Pa=Math.PI*2,Xe=o=>Math.round(o*100)/100||0,J=([o,t])=>`${Xe(o)},${Xe(t)}`;function Ga(o,t=!0){return o.map((e,a)=>`${a===0&&t?"M":"L"}${J(e)}`).join(" ")}function Xp(o){let t=o.length;if(t<3)return[];let e=o.slice(0,-1).map(([r,i],s)=>{let[p,h]=o[s+1];return p===r?0:(h-i)/(p-r)}),a=o.map((r,i)=>{if(i===0)return e[0];if(i===t-1)return e[t-2];let s=e[i-1],p=e[i];return s*p<=0?0:(s+p)/2});return e.forEach((r,i)=>{if(r===0){a[i]=0,a[i+1]=0;return}let s=a[i]/r,p=a[i+1]/r,h=s*s+p*p;if(h>9){let u=3/Math.sqrt(h);a[i]=u*s*r,a[i+1]=u*p*r}}),e.map((r,i)=>{let s=o[i],p=o[i+1],h=(p[0]-s[0])/3;return{from:s,c1:[s[0]+h,s[1]+a[i]*h],c2:[p[0]-h,p[1]-a[i+1]*h],to:p}})}function Zp(o,t=!0){return o.length<3?Ga(o,t):[t?`M${J(o[0])}`:`L${J(o[0])}`,...Xp(o).map(({c1:e,c2:a,to:r})=>`C${J(e)} ${J(a)} ${J(r)}`)].join(" ")}function _t(o,t,e,a){return[o+e*Math.sin(a),t-e*Math.cos(a)]}function Qp(o,t,e,a,r,i){let s=i-r;if(s<=0||a<=0)return"";if(s>=Pa-1e-6){let m=(b,k)=>{let $=_t(o,t,b,0),D=_t(o,t,b,Math.PI),S=`A${Xe(b)},${Xe(b)} 0 1 ${k}`;return`M${J($)} ${S} ${J(D)} ${S} ${J($)} Z`};return e>0?`${m(a,1)} ${m(e,0)}`:m(a,1)}let p=s>Math.PI?1:0,h=`A${Xe(a)},${Xe(a)} 0 ${p} 1 ${J(_t(o,t,a,i))}`;if(e<=0)return`M${J([o,t])} L${J(_t(o,t,a,r))} ${h} Z`;let u=`A${Xe(e)},${Xe(e)} 0 ${p} 0 ${J(_t(o,t,e,r))}`;return`M${J(_t(o,t,a,r))} ${h} L${J(_t(o,t,e,i))} ${u} Z`}function $n(o,t,e,a,r,i){let s=Math.max(0,i==="top"||i==="bottom"?Math.min(r,e/2,a):Math.min(r,a/2,e)),[p,h,u,m]=[o,t,o+e,t+a],b=$=>`A${Xe(s)},${Xe(s)} 0 0 1 ${J($)}`,k=$=>`L${J($)}`;if(i==="none"||s===0)return`M${J([p,h])} ${k([u,h])} ${k([u,m])} ${k([p,m])} Z`;switch(i){case"top":return`M${J([p,m])} ${k([p,h+s])} ${b([p+s,h])} ${k([u-s,h])} ${b([u,h+s])} ${k([u,m])} Z`;case"bottom":return`M${J([p,h])} ${k([u,h])} ${k([u,m-s])} ${b([u-s,m])} ${k([p+s,m])} ${b([p,m-s])} Z`;case"right":return`M${J([p,h])} ${k([u-s,h])} ${b([u,h+s])} ${k([u,m-s])} ${b([u-s,m])} ${k([p,m])} Z`;case"left":return`M${J([u,h])} ${k([u,m])} ${k([p+s,m])} ${b([p,m-s])} ${k([p,h+s])} ${b([p+s,h])} Z`}}var Ye={top:12,right:8,bottom:24},No=12,Cn={vertical:48,horizontal:96},ra=o=>o?.values??[];function Jp(o){let{series:t,hidden:e,labels:a,measure:r,format:i,noAxis:s,width:p,height:h}=o,u=t.map(L=>L.type??o.type),m=t.map((L,kt)=>kt).filter(L=>!e.has(L)),b=m.map(L=>u[L]),k=Math.max(a.length,0,...t.map(L=>ra(L).length)),$=b.length>0?b.includes("bar"):o.type==="bar",D=o.horizontal&&$&&(b.length===0||b.every(L=>L==="bar")),S=L=>m.filter(kt=>u[kt]===L).map(kt=>ra(t[kt])),P=o.stacked?[S("bar"),S("area")].filter(L=>L.length):[],O=o.stacked?S("line"):m.map(L=>ra(t[L])),T=b.length>0?b.some(L=>L!=="line"):o.type!=="line",{lo:et,hi:z}=Yp(P,O,{includeZero:T}),C={min:o.min,max:o.max};if(!D){let L=Math.max(0,h-Ye.top-Ye.bottom),kt=Fo(et,z,Uo(L,Cn.vertical),C),Xa=s?0:Math.max(0,...kt.values.map(En=>r(i(En)))),ns=s?4:Math.ceil(Xa)+No;return{box:{x:ns,y:Ye.top,width:Math.max(0,p-ns-Ye.right),height:L},ticks:kt,count:k,horizontal:D,banded:$,marks:u,visible:m}}let R=Math.max(0,...a.map(r)),I=Math.ceil(Math.min(R,p*.4))+No,Y=Math.max(0,p-I-Ye.right),de=Fo(et,z,Uo(Y,Cn.horizontal),C),pe=s?Ye.right:Math.max(Ye.right,r(i(de.max))/2);return{box:{x:I,y:Ye.top,width:Math.max(0,p-I-pe),height:Math.max(0,h-Ye.top-(s?4:Ye.bottom))},ticks:de,count:k,horizontal:D,banded:$,marks:u,visible:m}}function qr(o,t){let{box:e,count:a,horizontal:r,banded:i}=o,s=r?e.y:e.x,p=r?e.height:e.width;return i?s+(t+.5)*p/Math.max(1,a):a<=1?s+p/2:s+t/(a-1)*p}function ur(o,t){let{box:e,ticks:a,horizontal:r}=o;return r?Rr(t,a,e.x,e.x+e.width):Rr(t,a,e.y+e.height,e.y)}function tc(o,t,e){let{box:a,count:r,horizontal:i,banded:s}=o;if(r===0)return-1;let p=i?e-a.y:t-a.x,h=i?a.height:a.width;if(h<=0)return-1;let u=s?Math.floor(p/(h/r)):Math.round(p/h*(r-1));return Math.min(Math.max(u,0),r-1)}var ec=.64,ts=2,Sn=4,Pn={grouped:40,stacked:48},rc=12;function An(o,t){for(let e=o.length-1;e>=0;e-=1)if(t(o[e]))return e;return-1}function ac(o,t,e){if(e(o)<=t)return o;let a=o;for(;a.length>1&&e(`${a}\u2026`)>t;)a=a.slice(0,-1);return`${a}\u2026`}function oc(o){let{layout:t,noGrid:e,noAxis:a,format:r}=o,{box:i,ticks:s,horizontal:p}=t,h=e?d:s.values.map(b=>{let k=ur(t,b);return p?M`<line class="grid" x1=${k} y1=${i.y} x2=${k} y2=${i.y+i.height} />`:M`<line class="grid" x1=${i.x} y1=${k} x2=${i.x+i.width} y2=${k} />`}),u=s.min<0&&s.max>0?(()=>{let b=ur(t,0);return p?M`<line class="baseline" x1=${b} y1=${i.y} x2=${b} y2=${i.y+i.height} />`:M`<line class="baseline" x1=${i.x} y1=${b} x2=${i.x+i.width} y2=${b} />`})():d,m=a?d:s.values.map(b=>{let k=ur(t,b);return p?M`<text class="tick-label" x=${k} y=${i.y+i.height+16} text-anchor="middle">${r(b)}</text>`:M`<text class="tick-label" x=${i.x-8} y=${k} text-anchor="end" dominant-baseline="middle">${r(b)}</text>`});return M`${h}${u}${m}`}function ic(o){let{layout:t,labels:e,measure:a}=o,{box:r,count:i,horizontal:s,banded:p}=t;if(s){let m=Math.max(1,Math.ceil(i/Math.max(1,Math.floor(r.height/18))));return M`${e.map((b,k)=>k%m===0?M`<text
|
|
9438
9479
|
class="axis-label"
|
|
9439
9480
|
x=${r.x-8}
|
|
9440
|
-
y=${
|
|
9481
|
+
y=${qr(t,k)}
|
|
9441
9482
|
text-anchor="end"
|
|
9442
9483
|
dominant-baseline="middle"
|
|
9443
9484
|
>${ac(b,r.x-No,a)}</text>`:d)}`}let h=Math.max(0,...e.map(a))+No,u=Math.max(1,Math.ceil(i/Math.max(1,Math.floor(r.width/h))));return M`${e.map((m,b)=>{if(b%u!==0)return d;let k=p||i<=1?"middle":b===0?"start":b===i-1?"end":"middle";return M`<text
|
|
9444
9485
|
class="axis-label"
|
|
9445
|
-
x=${
|
|
9486
|
+
x=${qr(t,b)}
|
|
9446
9487
|
y=${r.y+r.height+16}
|
|
9447
9488
|
text-anchor=${k}
|
|
9448
|
-
>${m}</text>`})}`}function sc(o,t,e){return t.map((a,r)=>[
|
|
9489
|
+
>${m}</text>`})}`}function sc(o,t,e){return t.map((a,r)=>[qr(o.layout,r),ur(o.layout,a+(e?.[r]??0))])}function es(o,t,e=!0){return o.smooth?Zp(t,e):Ga(t,e)}function nc(o){let{layout:t,series:e,colorOf:a,active:r,idPrefix:i,stacked:s,smooth:p}=o,{box:h,count:u,visible:m,marks:b}=t,k=ur(t,Math.min(Math.max(0,t.ticks.min),t.ticks.max)),$=new Array(u).fill(0),D=[],S=[];for(let O of m){let T=b[O];if(T==="bar")continue;let et=ra(e[O]);if(et.length===0)continue;let z=a(O),C=T==="area"&&s?[...$]:void 0,R=sc(o,et,C);if(T==="area"){let I=`${i}-fill-${O}`,Y=C?et.map((pe,L)=>[qr(t,L),ur(t,C[L])]):[[R.at(-1)[0],k],[R[0][0],k]],de=C?es(o,[...Y].reverse(),!1):Ga(Y,!1);D.push(M`
|
|
9449
9490
|
<defs>
|
|
9450
9491
|
<linearGradient id=${I} x1="0" y1="0" x2="0" y2="1">
|
|
9451
|
-
<stop offset="0%" stop-color=${
|
|
9452
|
-
<stop offset="100%" stop-color=${
|
|
9492
|
+
<stop offset="0%" stop-color=${z} stop-opacity="0.28" />
|
|
9493
|
+
<stop offset="100%" stop-color=${z} stop-opacity="0.02" />
|
|
9453
9494
|
</linearGradient>
|
|
9454
9495
|
</defs>
|
|
9455
|
-
<path class="area" d=${`${es(o,
|
|
9456
|
-
x1=${
|
|
9457
|
-
x2=${
|
|
9496
|
+
<path class="area" d=${`${es(o,R)} ${de} Z`} fill=${`url(#${I})`} />`),C&&et.forEach((pe,L)=>$[L]=C[L]+pe)}if(S.push(M`<path class="line" d=${es(o,R)} stroke=${z} pathLength="1" />`),u<=rc&&!p&&S.push(M`${R.map(([I,Y])=>M`<circle class="point" cx=${I} cy=${Y} r="3" fill=${z} />`)}`),r>=0&&R[r]){let[I,Y]=R[r];S.push(M`<circle class="marker" cx=${I} cy=${Y} r="5" fill=${z} />`)}}let P=r>=0&&!t.banded?M`<line class="crosshair"
|
|
9497
|
+
x1=${qr(t,r)} y1=${h.y}
|
|
9498
|
+
x2=${qr(t,r)} y2=${h.y+h.height} />`:d;return M`${D}${P}${S}`}function Mn(o,t){let{layout:e,active:a,colorOf:r}=o,{from:i,to:s,offset:p,thickness:h,outer:u,series:m,index:b}=t,k=s<i,$=ur(e,i),D=ur(e,s),S=.5,P=Math.sign(D-$)||1;i!==0&&($+=S*P),u||(D-=S*P),Math.abs(D-$)<1&&(D=$+P);let O=Math.min($,D),T=Math.abs(D-$),et=u?e.horizontal?k?"left":"right":k?"bottom":"top":"none",z=e.horizontal?$n(O,p,T,h,Sn,et):$n(p,O,h,T,Sn,et);return M`<path
|
|
9458
9499
|
class=${`bar${k?" negative":""}${e.horizontal?" sideways":""}`}
|
|
9459
|
-
d=${
|
|
9500
|
+
d=${z}
|
|
9460
9501
|
fill=${r(m)}
|
|
9461
9502
|
data-series=${m}
|
|
9462
9503
|
data-index=${b}
|
|
9463
9504
|
opacity=${a===-1||a===b?1:.45}
|
|
9464
|
-
/>`}function lc(o){let{layout:t,series:e}=o,{box:a,count:r,horizontal:i,visible:s,marks:p}=t,h=s.filter(b=>p[b]==="bar");if(h.length===0||r===0)return d;let u=(i?a.height:a.width)/r*ec,m=[];for(let b=0;b<r;b+=1){let k=
|
|
9505
|
+
/>`}function lc(o){let{layout:t,series:e}=o,{box:a,count:r,horizontal:i,visible:s,marks:p}=t,h=s.filter(b=>p[b]==="bar");if(h.length===0||r===0)return d;let u=(i?a.height:a.width)/r*ec,m=[];for(let b=0;b<r;b+=1){let k=qr(t,b);if(o.stacked){let S=Math.max(2,Math.min(Pn.stacked,u)),P=h.map(C=>ra(e[C])[b]??0),O=An(P,C=>C>0),T=An(P,C=>C<0),et=0,z=0;P.forEach((C,R)=>{if(C===0)return;let I=C>0?et:z,Y=I+C;C>0?et=Y:z=Y,m.push(Mn(o,{from:I,to:Y,offset:k-S/2,thickness:S,outer:R===(C>0?O:T),series:h[R],index:b}))});continue}let $=Math.max(2,Math.min(Pn.grouped,(u-ts*(h.length-1))/h.length)),D=$*h.length+ts*(h.length-1);h.forEach((S,P)=>{let O=ra(e[S])[b];O===void 0||O===0||m.push(Mn(o,{from:0,to:O,offset:k-D/2+P*($+ts),thickness:$,outer:!0,series:S,index:b}))})}return M`${m}`}function dc(o){return M`
|
|
9465
9506
|
${oc(o)}
|
|
9466
9507
|
${lc(o)}
|
|
9467
9508
|
${nc(o)}
|
|
9468
|
-
${ic(o)}`}function pc(o){let{layout:t,series:e,active:a,stacked:r}=o,i=u=>ra(e[u])[a]??0,s=t.ticks.min;for(let u of["bar","area","line"]){let m=t.visible.filter(k=>t.marks[k]===u).map(i);if(m.length===0)continue;let b=r&&u!=="line"?m.filter(k=>k>0).reduce((k,$)=>k+$,0):Math.max(...m);s=Math.max(s,b)}let p=
|
|
9509
|
+
${ic(o)}`}function pc(o){let{layout:t,series:e,active:a,stacked:r}=o,i=u=>ra(e[u])[a]??0,s=t.ticks.min;for(let u of["bar","area","line"]){let m=t.visible.filter(k=>t.marks[k]===u).map(i);if(m.length===0)continue;let b=r&&u!=="line"?m.filter(k=>k>0).reduce((k,$)=>k+$,0):Math.max(...m);s=Math.max(s,b)}let p=qr(t,a),h=ur(t,Math.min(s,t.ticks.max));return t.horizontal?{x:h,y:p}:{x:p,y:h}}var Sa={top:16,right:16,bottom:24},cc=12,hc=24,Dn=3,uc=4,fc=24,Wa=o=>o?.points??[];function mc(o){return o.series.flatMap((t,e)=>o.hidden.has(e)?[]:Wa(t))}function Tn(o){return o.length===0?[0,1]:[Math.min(...o),Math.max(...o)]}function gc(o){let{width:t,height:e,measure:a,format:r,formatX:i,noAxis:s}=o,p=mc(o),h=Math.max(0,e-Sa.top-Sa.bottom),[u,m]=Tn(p.map(T=>T.y)),b=Fo(u,m,Uo(h,48),{min:o.min,max:o.max}),k=s?0:Math.max(0,...b.values.map(T=>a(r(T)))),$=s?4:Math.ceil(k)+cc,[D,S]=Tn(p.map(T=>T.x)),P=Fo(D,S,Uo(Math.max(0,t-$-Sa.right),96),{min:null,max:null}),O=s?Sa.right:Math.max(Sa.right,a(i(P.max))/2);return{box:{x:$,y:Sa.top,width:Math.max(0,t-$-O),height:h},x:P,y:b,maxR:o.bubble?Math.max(0,...p.map(T=>T.r??0)):0}}function Ho(o,t){let{box:e}=o;return[Rr(t.x,o.x,e.x,e.x+e.width),Rr(t.y,o.y,e.y+e.height,e.y)]}function vc(o,t){return o===void 0||t<=0||o<=0?Dn:Math.max(Dn,hc*Math.sqrt(o/t))}function as(o,t,e){return o.bubble?vc(e.r,t.maxR):uc}function bc(o,t,e,a){let r=null,i=1/0;return o.series.forEach((s,p)=>{o.hidden.has(p)||Wa(s).forEach((h,u)=>{let[m,b]=Ho(t,h),k=Math.hypot(m-e,b-a),$=Math.max(fc,as(o,t,h)+4);k<=$&&k<i&&(r={series:p,index:u},i=k)})}),r}function Ln(o){let t=Wa(o);return t.map((e,a)=>a).sort((e,a)=>t[e].x-t[a].x)}function xc(o){let{layout:t,noGrid:e,noAxis:a,format:r,formatX:i,bubble:s,colorOf:p,active:h,activeSeries:u}=o,{box:m}=t,b=e?d:M`
|
|
9469
9510
|
${t.y.values.map(S=>{let P=Rr(S,t.y,m.y+m.height,m.y);return M`<line class="grid" x1=${m.x} y1=${P} x2=${m.x+m.width} y2=${P} />`})}
|
|
9470
9511
|
${t.x.values.map(S=>{let P=Rr(S,t.x,m.x,m.x+m.width);return M`<line class="grid" x1=${P} y1=${m.y} x2=${P} y2=${m.y+m.height} />`})}`,k=a?d:M`
|
|
9471
9512
|
${t.y.values.map(S=>M`<text class="tick-label" x=${m.x-8} y=${Rr(S,t.y,m.y+m.height,m.y)}
|
|
9472
9513
|
text-anchor="end" dominant-baseline="middle">${r(S)}</text>`)}
|
|
9473
9514
|
${t.x.values.map(S=>M`<text class="tick-label" x=${Rr(S,t.x,m.x,m.x+m.width)}
|
|
9474
|
-
y=${m.y+m.height+16} text-anchor="middle">${i(S)}</text>`)}`,$=o.series.flatMap((S,P)=>o.hidden.has(P)?[]:Wa(S).map((O,T)=>({point:O,index:T,seriesIndex:P,radius:as(o,t,O)}))).sort((S,P)=>P.radius-S.radius).map(({point:S,index:P,seriesIndex:O,radius:T})=>{let[et,
|
|
9515
|
+
y=${m.y+m.height+16} text-anchor="middle">${i(S)}</text>`)}`,$=o.series.flatMap((S,P)=>o.hidden.has(P)?[]:Wa(S).map((O,T)=>({point:O,index:T,seriesIndex:P,radius:as(o,t,O)}))).sort((S,P)=>P.radius-S.radius).map(({point:S,index:P,seriesIndex:O,radius:T})=>{let[et,z]=Ho(t,S),C=p(O);return M`<circle
|
|
9475
9516
|
class="dot"
|
|
9476
9517
|
cx=${et}
|
|
9477
|
-
cy=${
|
|
9518
|
+
cy=${z}
|
|
9478
9519
|
r=${T}
|
|
9479
9520
|
fill=${C}
|
|
9480
9521
|
fill-opacity=${s?.55:.85}
|
|
@@ -9483,7 +9524,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9483
9524
|
data-series=${O}
|
|
9484
9525
|
data-index=${P}
|
|
9485
9526
|
/>`}),D=(()=>{let S=Wa(o.series[u])[h];if(!S||o.hidden.has(u))return d;let[P,O]=Ho(t,S);return M`<circle class="focus-ring" cx=${P} cy=${O}
|
|
9486
|
-
r=${as(o,t,S)+4} fill="none" stroke=${p(u)} stroke-width="2" />`})();return M`${b}${k}${$}${D}`}var yc=8,kc=.62,Bn=4,jo=12;function wc(o){let{width:t,height:e,kind:a,series:r,hidden:i,labels:s,measure:p}=o,h=t/2,u=e/2;if(a==="radar"){let
|
|
9527
|
+
r=${as(o,t,S)+4} fill="none" stroke=${p(u)} stroke-width="2" />`})();return M`${b}${k}${$}${D}`}var yc=8,kc=.62,Bn=4,jo=12;function wc(o){let{width:t,height:e,kind:a,series:r,hidden:i,labels:s,measure:p}=o,h=t/2,u=e/2;if(a==="radar"){let z=r.flatMap((L,kt)=>i.has(kt)?[]:L.values??[]),C=Math.min(0,...z),R=Math.max(0,...z),I=rs(C,R===C?C+1:R,Bn),Y=Math.min(Math.max(0,...s.map(p)),t*.25)+jo,de=Math.max(0,Math.min(h-Y,u-jo*2)),pe=Math.max(s.length,...r.map(L=>L.values?.length??0));return{cx:h,cy:u,outer:de,inner:0,slices:Array.from({length:pe},(L,kt)=>{let Xa=kt*Pa/Math.max(1,pe);return{index:kt,value:0,start:Xa,end:Xa,outer:de}}),ticks:I,total:0}}let m=r[0]?.values??[],b=Math.max(s.length,m.length),k=z=>i.has(z)?0:Math.max(0,m[z]??0),$=Array.from({length:b},(z,C)=>k(C)).reduce((z,C)=>z+C,0),D=Math.max(0,Math.min(t,e)/2-yc),S=Math.max(0,...Array.from({length:b},(z,C)=>k(C))),P=rs(0,S||1,Bn),O=Array.from({length:b},(z,C)=>C).filter(z=>!i.has(z)).length,T=0,et=Array.from({length:b},(z,C)=>{let R=k(C),I=T;return a==="polar-area"?(i.has(C)||(T+=Pa/Math.max(1,O)),{index:C,value:R,start:I,end:T,outer:D*Math.sqrt(R/P.max)}):(T+=$>0?R/$*Pa:0,{index:C,value:R,start:I,end:T,outer:D})});return{cx:h,cy:u,outer:D,inner:a==="doughnut"?D*kc:0,slices:et,ticks:P,total:$}}function $c(o,t,e,a){let r=e-o.cx,i=a-o.cy,s=Math.hypot(r,i),p=Math.atan2(r,-i);if(p<0&&(p+=Pa),t==="radar"){let h=o.slices.length;return h===0||s>o.outer+jo*2?-1:Math.round(p/(Pa/h))%h}return s>o.outer||s<o.inner?-1:o.slices.find(({start:h,end:u})=>u>h&&p>=h&&p<u)?.index??-1}function Cc(o,t){let e=o.slices[t];if(!e)return[o.cx,o.cy];let a=(e.start+e.end)/2,r=o.inner>0?(o.inner+e.outer)/2:e.outer*.6;return _t(o.cx,o.cy,r,a)}function Io(o,t){let{ticks:e,outer:a}=o;return(t-e.min)/(e.max-e.min)*a}function Sc(o){let{layout:t,active:e,sliceColor:a,kind:r,noGrid:i,format:s,centerLabel:p}=o,{cx:h,cy:u,inner:m,ticks:b}=t,k=r==="polar-area"&&!i?b.values.filter(P=>P>0).map(P=>M`<circle class="grid" cx=${h} cy=${u} r=${t.outer*Math.sqrt(P/b.max)} fill="none" />`):d,$=t.slices.filter(P=>P.end>P.start&&P.outer>0),D=$.map(P=>M`<path
|
|
9487
9528
|
class="slice"
|
|
9488
9529
|
d=${Qp(h,u,m,P.outer,P.start,P.end)}
|
|
9489
9530
|
fill=${a(P.index)}
|
|
@@ -9496,10 +9537,10 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9496
9537
|
/>`),S=r==="doughnut"?M`
|
|
9497
9538
|
<text class="center-value" x=${h} y=${u} text-anchor="middle" dominant-baseline="middle">${s(t.total)}</text>
|
|
9498
9539
|
${m>36?M`<text class="center-label" x=${h} y=${u+20} text-anchor="middle" dominant-baseline="middle">${p}</text>`:d}`:d;return M`${k}${D}${S}`}function Pc(o){let{layout:t,series:e,hidden:a,labels:r,colorOf:i,active:s,noGrid:p,noAxis:h,format:u}=o,{cx:m,cy:b,outer:k,ticks:$,slices:D}=t,S=D.map(C=>C.start),P=p?d:M`
|
|
9499
|
-
${$.values.filter(C=>C>$.min).map(C=>{let
|
|
9500
|
-
${S.map(C=>{let[
|
|
9540
|
+
${$.values.filter(C=>C>$.min).map(C=>{let R=Io(t,C);return M`<path class="grid" fill="none" d=${`${Ga(S.map(I=>_t(m,b,R,I)))} Z`} />`})}
|
|
9541
|
+
${S.map(C=>{let[R,I]=_t(m,b,k,C);return M`<line class="grid" x1=${m} y1=${b} x2=${R} y2=${I} />`})}`,O=h?d:$.values.filter(C=>C>$.min).map(C=>M`<text class="tick-label ring-label" x=${m+4} y=${b-Io(t,C)+3} dominant-baseline="hanging">${u(C)}</text>`),T=S.map((C,R)=>{let I=Math.sin(C),Y=Math.cos(C),de=I>.1?"start":I<-.1?"end":"middle",[pe,L]=_t(m,b,k+(Math.abs(Y)>.5?8:jo),C),kt=Y>.5?"auto":Y<-.5?"hanging":"middle";return M`<text class="axis-label" x=${pe} y=${L} text-anchor=${de} dominant-baseline=${kt}>${r[R]??""}</text>`}),et=e.map((C,R)=>{if(a.has(R))return d;let I=i(R),Y=S.map((pe,L)=>_t(m,b,Io(t,C.values?.[L]??$.min),pe)),de=s>=0&&Y[s]?M`<circle class="marker" cx=${Y[s][0]} cy=${Y[s][1]} r="5" fill=${I} />`:d;return M`
|
|
9501
9542
|
<path class="radar" d=${`${Ga(Y)} Z`} stroke=${I} fill=${I} />
|
|
9502
|
-
${
|
|
9543
|
+
${de}`}),z=s>=0&&S[s]!==void 0?(()=>{let[C,R]=_t(m,b,k,S[s]);return M`<line class="crosshair" x1=${m} y1=${b} x2=${C} y2=${R} />`})():d;return M`${P}${z}${et}${O}${T}`}function Ac(o){return o.kind==="radar"?Pc(o):Sc(o)}var Mc=Object.defineProperty,tt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Mc(t,e,r),r},On=8,j=class extends c{constructor(){super(...arguments),this.tableId=q("kt-chart-table"),this.box={width:0,height:0},this.active=-1,this.activeSeries=-1,this.hiddenSeries=new Set,this.type="area",this.series=[],this.labels=[],this.height=200,this.format=t=>String(t),this.formatX=t=>String(t),this.noGrid=!1,this.noAxis=!1,this.showTable=!1,this.smooth=!1,this.stacked=!1,this.horizontal=!1,this.min=null,this.max=null,this.centerLabel=void 0,this.totalLabel=void 0,this.label="",this.colorOf=t=>{let e=this.series[t];return e?.color?e.color:this.series.length===1?"var(--color-primary-base)":`var(--chart-series-${t%On+1})`},this.measure=t=>{if(this.measureContext===void 0)try{let e=document.createElement("canvas").getContext("2d"),a=getComputedStyle(this).getPropertyValue("--font-family-body").trim();e&&(e.font=`12px ${a||"sans-serif"}`),this.measureContext=e}catch{this.measureContext=null}return this.measureContext?this.measureContext.measureText(t).width:t.length*6.5},this.sliceColor=t=>`var(--chart-series-${t%On+1})`}static{this.styles=[c.styles,f`
|
|
9503
9544
|
:host {
|
|
9504
9545
|
display: block;
|
|
9505
9546
|
position: relative;
|
|
@@ -9898,7 +9939,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
9898
9939
|
</svg>
|
|
9899
9940
|
${this.renderTooltip()}
|
|
9900
9941
|
</div>
|
|
9901
|
-
${this.renderLegend()} ${this.renderTable()}`}};tt([A(".plot")],j.prototype,"plot");tt([x()],j.prototype,"box");tt([x()],j.prototype,"active");tt([x()],j.prototype,"activeSeries");tt([x()],j.prototype,"hiddenSeries");tt([n({type:String,reflect:!0})],j.prototype,"type");tt([n({attribute:!1})],j.prototype,"series");tt([n({attribute:!1})],j.prototype,"labels");tt([n({type:Number})],j.prototype,"height");tt([n({attribute:!1})],j.prototype,"format");tt([n({attribute:!1})],j.prototype,"formatX");tt([n({type:Boolean,attribute:"no-grid"})],j.prototype,"noGrid");tt([n({type:Boolean,attribute:"no-axis"})],j.prototype,"noAxis");tt([n({type:Boolean,reflect:!0,attribute:"show-table"})],j.prototype,"showTable");tt([n({type:Boolean})],j.prototype,"smooth");tt([n({type:Boolean})],j.prototype,"stacked");tt([n({type:Boolean})],j.prototype,"horizontal");tt([n({type:Number})],j.prototype,"min");tt([n({type:Number})],j.prototype,"max");tt([n({type:String,attribute:"center-label"})],j.prototype,"centerLabel");tt([n({type:String,attribute:"total-label"})],j.prototype,"totalLabel");tt([n({type:String})],j.prototype,"label");g("kt-chart",j);var Dc=Object.defineProperty,
|
|
9942
|
+
${this.renderLegend()} ${this.renderTable()}`}};tt([A(".plot")],j.prototype,"plot");tt([x()],j.prototype,"box");tt([x()],j.prototype,"active");tt([x()],j.prototype,"activeSeries");tt([x()],j.prototype,"hiddenSeries");tt([n({type:String,reflect:!0})],j.prototype,"type");tt([n({attribute:!1})],j.prototype,"series");tt([n({attribute:!1})],j.prototype,"labels");tt([n({type:Number})],j.prototype,"height");tt([n({attribute:!1})],j.prototype,"format");tt([n({attribute:!1})],j.prototype,"formatX");tt([n({type:Boolean,attribute:"no-grid"})],j.prototype,"noGrid");tt([n({type:Boolean,attribute:"no-axis"})],j.prototype,"noAxis");tt([n({type:Boolean,reflect:!0,attribute:"show-table"})],j.prototype,"showTable");tt([n({type:Boolean})],j.prototype,"smooth");tt([n({type:Boolean})],j.prototype,"stacked");tt([n({type:Boolean})],j.prototype,"horizontal");tt([n({type:Number})],j.prototype,"min");tt([n({type:Number})],j.prototype,"max");tt([n({type:String,attribute:"center-label"})],j.prototype,"centerLabel");tt([n({type:String,attribute:"total-label"})],j.prototype,"totalLabel");tt([n({type:String})],j.prototype,"label");g("kt-chart",j);var Dc=Object.defineProperty,Er=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dc(t,e,r),r},le=class extends c{constructor(){super(...arguments),this.label="",this.used="",this.total="",this.value=0,this.segments=[],this.max=0,this.showLegend=!1,this.format=t=>String(t)}static{this.styles=[c.styles,f`
|
|
9902
9943
|
:host {
|
|
9903
9944
|
display: block;
|
|
9904
9945
|
}
|
|
@@ -10004,7 +10045,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
10004
10045
|
<span class="value">${this.format(a.value)}</span>
|
|
10005
10046
|
</li>`)}
|
|
10006
10047
|
</ul>`:d}
|
|
10007
|
-
</div>`}};
|
|
10048
|
+
</div>`}};Er([n({type:String})],le.prototype,"label");Er([n({type:String})],le.prototype,"used");Er([n({type:String})],le.prototype,"total");Er([n({type:Number})],le.prototype,"value");Er([n({attribute:!1})],le.prototype,"segments");Er([n({type:Number})],le.prototype,"max");Er([n({type:Boolean,attribute:"show-legend"})],le.prototype,"showLegend");Er([n({attribute:!1})],le.prototype,"format");g("kt-meter",le);var Tc=Object.defineProperty,os=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tc(t,e,r),r},aa=class extends c{constructor(){super(...arguments),this.page=1,this.totalPages=1,this.label=void 0}static{this.styles=[c.styles,f`
|
|
10008
10049
|
:host {
|
|
10009
10050
|
display: block;
|
|
10010
10051
|
}
|
|
@@ -10124,7 +10165,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
10124
10165
|
</div>`}
|
|
10125
10166
|
${this.caption?l`<span class="caption">${this.caption}</span>`:d}
|
|
10126
10167
|
<slot></slot>
|
|
10127
|
-
</div>`}};fr([n({type:String})],te.prototype,"label");fr([n({type:String})],te.prototype,"value");fr([n({type:String})],te.prototype,"delta");fr([n({type:String,reflect:!0})],te.prototype,"trend");fr([n({type:Boolean})],te.prototype,"inverted");fr([n({type:String})],te.prototype,"icon");fr([n({type:String})],te.prototype,"caption");fr([n({type:String,reflect:!0})],te.prototype,"size");fr([n({type:Boolean,reflect:!0})],te.prototype,"loading");g("kt-stat",te);var Bc=50;function Oc({rowCount:o,rowHeight:t,viewportHeight:e,scrollTop:a,overscan:r}){if(o===0)return{start:0,end:0};if(t<=0)return{start:0,end:Math.min(o,Bc)};let i=Math.ceil(e/t),s=Math.min(Math.floor(a/t),Math.max(0,o-i)),p=Math.ceil((a+e)/t);return{start:Math.max(0,s-r),end:Math.min(o,p+r)}}var
|
|
10168
|
+
</div>`}};fr([n({type:String})],te.prototype,"label");fr([n({type:String})],te.prototype,"value");fr([n({type:String})],te.prototype,"delta");fr([n({type:String,reflect:!0})],te.prototype,"trend");fr([n({type:Boolean})],te.prototype,"inverted");fr([n({type:String})],te.prototype,"icon");fr([n({type:String})],te.prototype,"caption");fr([n({type:String,reflect:!0})],te.prototype,"size");fr([n({type:Boolean,reflect:!0})],te.prototype,"loading");g("kt-stat",te);var Bc=50;function Oc({rowCount:o,rowHeight:t,viewportHeight:e,scrollTop:a,overscan:r}){if(o===0)return{start:0,end:0};if(t<=0)return{start:0,end:Math.min(o,Bc)};let i=Math.ceil(e/t),s=Math.min(Math.floor(a/t),Math.max(0,o-i)),p=Math.ceil((a+e)/t);return{start:Math.max(0,s-r),end:Math.min(o,p+r)}}var zc=Object.defineProperty,Z=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&zc(t,e,r),r},Kc=8,zn=new Map;function Rc(o){let t=zn.get(o);return t||(t=new Intl.Collator(o,{numeric:!0,sensitivity:"base"}),zn.set(o,t)),t}function Kn(o){if(typeof o=="string")return o;if(typeof o=="number"||typeof o=="boolean"||typeof o=="bigint")return String(o);try{return JSON.stringify(o)??""}catch{return""}}function _o(o){return o.id??o.uid??o}var U=class extends c{constructor(){super(...arguments),this.page=1,this.manual=!1,this.virtual=!1,this.scrollOffset=0,this.viewportHeight=0,this.headerHeight=0,this.rowHeight=0,this.totalRows=0,this.columns=[],this.data=[],this.selectable=!1,this.selectionMode="multiple",this.selected=[],this.pageSize=0,this.loading=!1,this.compact=!1,this.sortKey=null,this.sortDirection=null,this.emptyText=void 0,this.loadingText=void 0,this.label="",this.locale="",this.onScroll=t=>{this.scrollOffset=t.currentTarget.scrollTop}}static{this.styles=[c.styles,f`
|
|
10128
10169
|
:host {
|
|
10129
10170
|
display: block;
|
|
10130
10171
|
width: 100%;
|
|
@@ -10276,7 +10317,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
10276
10317
|
padding: calc(10px * var(--density-scale, 1)) calc(12px * var(--density-scale, 1));
|
|
10277
10318
|
}
|
|
10278
10319
|
}
|
|
10279
|
-
`]}get sortedRows(){if(this.manual)return this.data;let t=this.sortCache,e=Te(this.locale);if(t?.data===this.data&&t.key===this.sortKey&&t.direction===this.sortDirection&&t.locale===e)return t.rows;let a=this.sort(
|
|
10320
|
+
`]}get sortedRows(){if(this.manual)return this.data;let t=this.sortCache,e=Te(this.locale);if(t?.data===this.data&&t.key===this.sortKey&&t.direction===this.sortDirection&&t.locale===e)return t.rows;let a=this.sort(Rc(e));return this.sortCache={data:this.data,key:this.sortKey,direction:this.sortDirection,locale:e,rows:a},a}sort(t){if(!this.sortKey||!this.sortDirection)return this.data;let e=this.sortKey,a=this.sortDirection==="asc"?1:-1;return[...this.data].sort((r,i)=>{let s=r[e],p=i[e],h=s==null,u=p==null;return h&&u?0:h?1:u?-1:typeof s=="number"&&typeof p=="number"?(s-p)*a:t.compare(Kn(s),Kn(p))*a})}get totalPages(){if(this.pageSize<=0)return 1;let t=this.manual?this.totalRows||this.data.length:this.data.length;return Math.max(1,Math.ceil(t/this.pageSize))}get visibleRows(){let t=this.sortedRows;if(this.pageSize<=0||this.manual)return t;let e=Math.min(this.page,this.totalPages);return t.slice((e-1)*this.pageSize,e*this.pageSize)}toggleSort(t){t.sortable&&(this.sortKey!==t.key?(this.sortKey=t.key,this.sortDirection="asc"):this.sortDirection==="asc"?this.sortDirection="desc":(this.sortKey=null,this.sortDirection=null),this.manual&&(this.page=1),y(this,"kt-sort-change",{key:this.sortKey,direction:this.sortDirection}))}isSelected(t){return this.selected.includes(_o(t))}toggleSelection(t){let e=_o(t);this.selectionMode==="single"?this.selected=this.isSelected(t)?[]:[e]:this.selected=this.isSelected(t)?this.selected.filter(a=>a!==e):[...this.selected,e],y(this,"kt-selection-change",{selected:this.selected,rows:this.selectedRows})}toggleAll(){let t=this.visibleRows.map(_o),e=t.every(a=>this.selected.includes(a));this.selected=e?this.selected.filter(a=>!t.includes(a)):[...new Set([...this.selected,...t])],y(this,"kt-selection-change",{selected:this.selected,rows:this.selectedRows})}get selectedRows(){return this.data.filter(t=>this.selected.includes(_o(t)))}get isVirtual(){return this.virtual&&this.pageSize<=0}updated(t){if(t.has("compact")&&(this.rowHeight=0),!this.isVirtual){this.observe(void 0);return}let e=this.shadowRoot?.querySelector(".scroller")??void 0;this.observe(e);let a=this.shadowRoot?.querySelector('tbody tr[part="row"]');a&&this.rowHeight===0&&(this.rowHeight=a.getBoundingClientRect().height);let r=this.shadowRoot?.querySelector("thead");r&&(this.headerHeight=r.getBoundingClientRect().height),e&&(this.viewportHeight=e.clientHeight)}disconnectedCallback(){super.disconnectedCallback(),this.observe(void 0)}observe(t){t!==this.observed&&(this.resizeObserver?.disconnect(),this.observed=t,!(!t||typeof ResizeObserver>"u")&&(this.resizeObserver??=new ResizeObserver(([e])=>{e&&(this.viewportHeight=e.target.clientHeight)}),this.resizeObserver.observe(t)))}onPageChange(t){t.stopPropagation(),this.page=t.detail.page,y(this,"kt-page-change",{page:this.page})}sortStateFor(t){return this.sortKey!==t.key||!this.sortDirection?"none":this.sortDirection==="asc"?"ascending":"descending"}renderHeaderCell(t){let e=t.label??t.key,a=this.sortKey===t.key&&this.sortDirection!==null;return l`<th
|
|
10280
10321
|
part="header-cell"
|
|
10281
10322
|
scope="col"
|
|
10282
10323
|
style=${ct(t.width?{width:t.width}:{})}
|
|
@@ -10295,7 +10336,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
10295
10336
|
<td colspan=${e}>
|
|
10296
10337
|
<div class="placeholder">${this.emptyText??v().noData}</div>
|
|
10297
10338
|
</td>
|
|
10298
|
-
</tr>`;if(!this.isVirtual)return l`${t.map((s,p)=>this.renderRow(s,p))}`;let{start:a,end:r}=Oc({rowCount:t.length,rowHeight:this.rowHeight,viewportHeight:Math.max(0,this.viewportHeight-this.headerHeight),scrollTop:Math.max(0,this.scrollOffset-this.headerHeight),overscan:
|
|
10339
|
+
</tr>`;if(!this.isVirtual)return l`${t.map((s,p)=>this.renderRow(s,p))}`;let{start:a,end:r}=Oc({rowCount:t.length,rowHeight:this.rowHeight,viewportHeight:Math.max(0,this.viewportHeight-this.headerHeight),scrollTop:Math.max(0,this.scrollOffset-this.headerHeight),overscan:Kc}),i=s=>s>0&&this.rowHeight>0?l`<tr class="spacer" aria-hidden="true">
|
|
10299
10340
|
<td colspan=${e} style=${`height: ${s*this.rowHeight}px`}></td>
|
|
10300
10341
|
</tr>`:d;return l`${i(a)}${t.slice(a,r).map((s,p)=>this.renderRow(s,a+p))}${i(t.length-r)}`}renderRow(t,e){let a=this.isSelected(t);return l`<tr
|
|
10301
10342
|
part="row"
|
|
@@ -10511,4 +10552,4 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
|
|
|
10511
10552
|
</div>`:d}
|
|
10512
10553
|
<div class="body"><slot></slot></div>
|
|
10513
10554
|
</div>
|
|
10514
|
-
</div>`}};oa([n({type:String})],Me.prototype,"heading");oa([n({type:String})],Me.prototype,"time");oa([n({type:String})],Me.prototype,"icon");oa([n({type:String,reflect:!0})],Me.prototype,"variant");oa([n({type:Boolean,reflect:!0})],Me.prototype,"last");oa([n({type:Boolean,reflect:!0})],Me.prototype,"compact");g("kt-timeline",Ya);g("kt-timeline-item",Me);var Ec=[{id:"dark",label:"Dark"},{id:"light",label:"Light"},{id:"auto",label:"Auto"}],Ic=[{id:"kanto",label:"Kanto",family:"'Mulish', system-ui, sans-serif"},{id:"system",label:"System",family:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif"},{id:"inter",label:"Inter",family:"'Inter', system-ui, sans-serif"},{id:"plex",label:"IBM Plex Sans",family:"'IBM Plex Sans', system-ui, sans-serif"},{id:"geist",label:"Geist",family:"'Geist', system-ui, sans-serif"}],Fc=[{id:"sharp",label:"Sharp"},{id:"default",label:"Default"},{id:"round",label:"Round"}],Uc=[{id:"compact",label:"Compact"},{id:"default",label:"Default"},{id:"comfortable",label:"Comfortable"}],Nc=[{id:"small",label:"Small"},{id:"default",label:"Default"},{id:"large",label:"Large"}],
|
|
10555
|
+
</div>`}};oa([n({type:String})],Me.prototype,"heading");oa([n({type:String})],Me.prototype,"time");oa([n({type:String})],Me.prototype,"icon");oa([n({type:String,reflect:!0})],Me.prototype,"variant");oa([n({type:Boolean,reflect:!0})],Me.prototype,"last");oa([n({type:Boolean,reflect:!0})],Me.prototype,"compact");g("kt-timeline",Ya);g("kt-timeline-item",Me);var Ec=[{id:"dark",label:"Dark"},{id:"light",label:"Light"},{id:"auto",label:"Auto"}],Ic=[{id:"kanto",label:"Kanto",family:"'Mulish', system-ui, sans-serif"},{id:"system",label:"System",family:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif"},{id:"inter",label:"Inter",family:"'Inter', system-ui, sans-serif"},{id:"plex",label:"IBM Plex Sans",family:"'IBM Plex Sans', system-ui, sans-serif"},{id:"geist",label:"Geist",family:"'Geist', system-ui, sans-serif"}],Fc=[{id:"sharp",label:"Sharp"},{id:"default",label:"Default"},{id:"round",label:"Round"}],Uc=[{id:"compact",label:"Compact"},{id:"default",label:"Default"},{id:"comfortable",label:"Comfortable"}],Nc=[{id:"small",label:"Small"},{id:"default",label:"Default"},{id:"large",label:"Large"}],Rn={theme:"dark",accent:"violet",font:"kanto",radius:"default",density:"default",textSize:"default"},qn={theme:Ec,font:Ic,radius:Fc,density:Uc,textSize:Nc},is=Object.keys(qn),ss=o=>qn[o].map(t=>t.id);function B2(o,t=document.documentElement){for(let i of is){let s=o[i];if(s!==void 0&&!ss(i).includes(s))throw new TypeError(`Unknown ${i} "${s}". Use one of: ${ss(i).join(", ")}.`)}let e=Oo.find(i=>i.id===o.accent);o.accent!==void 0&&!e&&Yi(o.accent);let a=t===document.documentElement,r=(i,s)=>s===Rn[i]&&(a||i==="theme");for(let i of is){let s=o[i];s!==void 0&&(r(i,s)?delete t.dataset[i]:t.dataset[i]=s)}o.accent!==void 0&&(e?(Zi(null,t),r("accent",e.id)?delete t.dataset.accent:t.dataset.accent=e.id):(delete t.dataset.accent,Zi(o.accent,t)))}function O2(o=document.documentElement){let t={...Rn};for(let r of is){let i=o.dataset[r];i!==void 0&&ss(r).includes(i)&&(t[r]=i)}let e=o.style.getPropertyValue("--accent-base").trim(),a=o.dataset.accent;return e?t.accent=e:a&&Oo.some(r=>r.id===a)&&(t.accent=a),t}export{Oo as KT_ACCENTS,vn as KT_DEFAULT_ACCENT,Rn as KT_DEFAULT_APPEARANCE,Uc as KT_DENSITIES,Ic as KT_FONTS,Fc as KT_RADII,Nc as KT_TEXT_SIZES,Ec as KT_THEMES,Na as KtAccordion,Ie as KtAlert,Xt as KtAppShell,Ht as KtAuthForm,he as KtAvatar,Sr as KtAvatarGroup,Rt as KtBadge,ft as KtBlogPost,ua as KtBreadcrumb,Us as KtButton,Mt as KtCalendar,ee as KtCard,j as KtChart,oe as KtChatMessage,Pt as KtCheckbox,Gs as KtCode,Dr as KtCollapsible,ke as KtColorPicker,ne as KtCommandPalette,se as KtConfirmDialog,ye as KtCopyButton,Ce as KtCta,kr as KtDateInput,sn as KtDatePicker,sr as KtDescriptionList,mt as KtDragDrop,Ct as KtDropdown,c as KtElement,je as KtEmptyPage,Tr as KtEmptyState,we as KtErrorPage,Zt as KtFaq,$e as KtFeatureGrid,_e as KtFooter,ve as KtForm,or as KtHeader,Ue as KtHero,vr as KtIcon,F as KtInput,dt as KtInputMenu,ca as KtKbd,Gr as KtLabelInput,Mr as KtLogoCloud,le as KtMeter,Ae as KtModal,ot as KtMultiSelect,zt as KtNewsletter,it as KtNumberInput,Nt as KtOtpInput,$r as KtPageHeader,aa as KtPagination,Qt as KtPostGrid,Ot as KtPricingTable,Jt as KtProgressBar,Ut as KtPromptInput,ae as KtRadio,Wt as KtRadioGroup,Ft as KtSegmentedControl,pt as KtSelect,He as KtSettingsSection,We as KtSidePanel,rr as KtSkeleton,Bt as KtSlider,St as KtSplitButton,te as KtStat,ar as KtSteps,Ke as KtSubMenuNavigation,U as KtTable,Re as KtTabs,Ne as KtTestimonials,gt as KtTextarea,Wr as KtTimeInput,Ya as KtTimeline,Me as KtTimelineItem,Ve as KtToast,Lr as KtToastContainer,xe as KtToggle,Kt as KtToggleButton,hr as KtToggleButtonGroup,Oe as KtTooltip,Ar as KtTour,nr as KtTree,ie as KtUserMenu,bn as accentPalette,Xi as accentProperties,Bo as contrastRatio,ai as defaultStrings,g as defineElement,zi as getIcon,v as getStrings,Yi as parseColor,O2 as readAppearance,Ts as registerIcon,Ls as registerIcons,tl as registeredIcons,Jn as resetStrings,Zi as setAccent,B2 as setAppearance,Ps as setStrings,Ip as toaster};
|