@golemui/gui-lit 1.1.1-rc.0 → 1.1.1-rc.2

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/index.umd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- (function(te,dt){typeof exports=="object"&&typeof module<"u"?dt(exports,require("@golemui/core"),require("@golemui/gui-shared"),require("@golemui/lit"),require("lit"),require("lit/decorators.js"),require("@lit/context"),require("rxjs"),require("lit/directives/class-map.js"),require("lit-html/directives/style-map.js"),require("lit-html/directives/repeat.js"),require("lit/directives/if-defined.js"),require("lit/directives/live.js"),require("lit/directives/repeat.js"),require("lit/directives/unsafe-html.js")):typeof define=="function"&&define.amd?define(["exports","@golemui/core","@golemui/gui-shared","@golemui/lit","lit","lit/decorators.js","@lit/context","rxjs","lit/directives/class-map.js","lit-html/directives/style-map.js","lit-html/directives/repeat.js","lit/directives/if-defined.js","lit/directives/live.js","lit/directives/repeat.js","lit/directives/unsafe-html.js"],dt):(te=typeof globalThis<"u"?globalThis:te||self,dt(te["gui-lit"]={},te.core,null,te.lit$1,te.lit,te.decorators_js,te.context,te.rxjs,te.classMap_js,te.styleMap_js,te.repeat_js,te.ifDefined_js,te.live_js,te.repeat_js$1,te.unsafeHtml_js))})(this,(function(te,dt,oy,c,l,n,f,vr,_,vt,qe,pa,gn,Dr,bn){"use strict";const wr={LAYOUTS:"LAYOUTS",DISPLAYS:"DISPLAYS"};function fn(e){return function(t,i=()=>!0){return{kind:"leaf",selectorType:e,matcher:i,config:t}}}function ie(e,t){return typeof e=="function"?e:{type:t,...e??{}}}const vn=(e,t)=>({type:"ITEMS",itemType:wr.DISPLAYS,items:[{render:e}],tags:t??[]}),Ai=new Map,Dn=new Map;function $r(e,t,i){if(Ai.has(e))throw new Error(`Item type "${e}" is already registered.`);Ai.set(e,t),i&&Dn.set(e,i)}function Ci(e){const t=Ai.get(e);if(!t)throw new Error(`No handler registered for item type "${e}". Did you forget to import the registration module?`);return t}function kr(e){return Ai.has(e)}function P(e){const t=d=>{if(!e.sensibleDefaults)return{};let p={...e.sensibleDefaults.base};for(const u of d){const h=u.config;for(const m of e.sensibleDefaults.fields){const y=m;h[y]!=null&&(p={...p,[y]:h[y]})}}return p},i=(d,p)=>e.sensibleDefaults?e.sensibleDefaults.apply(d,p):d,a=d=>{switch(e.entryShape){case"bare":return{baseDef:d};case"keyed":{const p=d;return{baseDef:p.def,path:p.key}}case"compound":{const p=d;return{baseDef:p.def,children:p.children}}}},r={rollUpSensibleDefaults:t,applySensibleDefaults:i,mapToWidget:e.mapToWidget,parseEntry:a,...e.afterMerge?{afterMerge:e.afterMerge}:{},...e.buildCustomWidget?{buildCustomWidget:e.buildCustomWidget}:{},...e.getChildren?{getChildren:e.getChildren}:{}};$r(e.itemType,r,e.kind);const s=fn(e.itemType);return{gsl:s,gslByUid:(d,p)=>s(p,(u=>u.uid===d))}}function J(e){const{uid:t,path:i,label:a,disabled:r,readonly:s,defaultValue:o,tags:d,type:p,size:u,onLoad:h,onChange:m,onFilter:y,on:g,states:A,include:q,exclude:Ne,validator:st,...ft}=e;return ft}function wn(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()):""}function X(e,t){return e.label!=null||t.suppressAutomaticLabels||!e.path?e:{...e,label:wn(e.path)}}function je(e,t){return e.placeholder!=null||t.suppressAutomaticPlaceholders||!e.path?e:{...e,placeholder:e.path}}function $n(e){switch(e.type){case"text":return Sn(e);case"number":return _n(e);case"boolean":return kn(e);default:throw new Error(`Unsupported field type "${e.type}"`)}}function kn(e){const t=J(e);return{uid:e.uid??"",kind:"input",type:"toggle",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"boolean")}:{},props:t}}function Sn(e){const t=J(e);return{uid:e.uid??"",kind:"input",type:"textinput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:ie(e.validator,"string")}}function _n(e){const t=J(e);return{uid:e.uid??"",kind:"input",type:"number",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:ie(e.validator,"number")}}P({itemType:"INPUTS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>{let i=X(e,t);return i=je(i,t),i}},mapToWidget:$n}),P({itemType:"SELECT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"select",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),P({itemType:"DROPDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),P({itemType:"RADIOGROUP",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"radiogroup",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),P({itemType:"CHECKBOX",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"checkbox",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"boolean")}:{},props:J(e)})}),P({itemType:"TEXTAREA",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"textarea",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"PASSWORD",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"password",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"CURRENCY",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"currency",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"number")}:{},props:J(e)})}),P({itemType:"MARKDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"markdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"LIST",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"list",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),P({itemType:"CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"calendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"DATE_TIME_CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"datePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"RANGE_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"RANGE_DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"RANGE_DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"RANGE_DATE_TIME_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"RANGE_DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"RANGE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),P({itemType:"RANGE_DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDatePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),P({itemType:"RANGE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})});function Tn(e){const t={};return e.addLabel!=null&&(t.addLabel=e.addLabel),e.removeLabel!=null&&(t.removeLabel=e.removeLabel),e.limit!=null&&(t.limit=e.limit),e.title!=null&&(t.title=e.title),e.addButtonIcon!=null&&(t.addButtonIcon=e.addButtonIcon),e.removeButtonIcon!=null&&(t.removeButtonIcon=e.removeButtonIcon),t}function An(e){return{uid:e.uid??"",kind:"input",type:"repeater",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:{...Tn(e),template:{kind:"layout",type:"flex",children:[],props:{direction:"column"}}}}}function ua(e,t){for(const i of e){if(typeof i=="function")continue;const a=i;typeof a.path=="string"&&a.path&&!a.path.startsWith(t)&&(a.path=t+a.path),"children"in a&&Array.isArray(a.children)&&ua(a.children,t);const r=a.props;r?.template?.children&&Array.isArray(r.template.children)&&ua(r.template.children,t)}}function Cn(e,t){const i=t.walkChildren(t.children??[]),a=e.kind==="static"?e.def.path??"":e.fn({})?.path??"";a&&ua(i,a+".items.");const r={kind:"layout",type:"flex",uid:"",children:i,props:{direction:"column"}};if(e.kind==="static"){const o=t.mapStaticDef(e.def,"REPEATER");return{...o,props:{...o.props,template:r}}}const s=e.fn;return(o=>{const d=s(o),p=t.mapStaticDef(d,"REPEATER");return{...p,props:{...p.props,template:r}}})}function Ln(e){return{baseDef:e.def,path:e.key,children:e.children}}function En(e){return e.children}$r("REPEATER",{parseEntry:Ln,rollUpSensibleDefaults:()=>({}),applySensibleDefaults:e=>e,mapToWidget:An,buildCustomWidget:Cn,getChildren:En},"input");const Sr={onLoad:"load",onChange:"change",onFilter:"filter",onBlur:"blur"},xn=Object.keys(Sr);function _r(e){if(e.length>0)return null;try{const t=e();return typeof t=="string"?t:null}catch{return null}}class Pn{extractOnClickFromMergeResult(t,i,a){if(t.kind==="dynamic"){const o=t.fn;return{kind:"dynamic",fn:p=>{const u=o(p);return this.wireOnClick(u,i,a)}}}const r=t.def;return{kind:"static",def:this.wireOnClick(r,i,a)}}wireOnClick(t,i,a){const r=a.next(),s=t.onClick;if(typeof s=="function"){const{onClick:o,...d}=t,p=s(void 0);return typeof p=="string"?{...d,uid:r,on:{click:p}}:(i.set(r,u=>s(u.data)),{...d,uid:r,on:{click:r}})}return{...t,uid:r}}wireInputLayoutEvents(t,i,a){if(t.kind==="dynamic"){const s=t.fn;return{kind:"dynamic",fn:d=>{const p=s(d);return this.wireEventProperties(p,i,a)}}}return{kind:"static",def:this.wireEventProperties(t.def,i,a)}}wireEventProperties(t,i,a){const r={...t.on||{}};let s=!1;const o={...t};for(const d of xn){const p=t[d];if(p==null)continue;const u=Sr[d];if(typeof p=="function"){const h=_r(p);if(h!=null)r[u]=h;else{const m=a.next();i.set(m,p),r[u]=m}s=!0}else typeof p=="string"&&(r[u]=p,s=!0);delete o[d]}return s&&(o.on=r),o}}const ha=new Pn;function On(e){const{uid:t,label:i,actionType:a,disabled:r,on:s,onClick:o,data:d,type:p,tags:u,size:h,include:m,exclude:y,states:g,...A}=e;return{uid:t??"",kind:"action",type:"button",disabled:r,actionType:a,label:i,...s!=null?{on:s}:{},props:A}}P({itemType:"ACTIONS",kind:"action",entryShape:"bare",mapToWidget:On,afterMerge:(e,t)=>ha.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)});function Mn(e){const{uid:t,widgetName:i,tags:a,size:r,onChange:s,include:o,exclude:d,...p}=e,{on:u,...h}=p;return{uid:t??"",kind:"layout",type:i??"flex",props:{direction:h.direction??"column",...h},children:[]}}function In(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"LAYOUTS"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"LAYOUTS"),children:i}})}function Rn(e){return e.children}P({itemType:"LAYOUTS",kind:"layout",entryShape:"compound",mapToWidget:Mn,buildCustomWidget:In,getChildren:Rn});function ma(e){return{errors:void 0,touched:void 0,translate:void 0,...e??{},$form:e?.$form??{}}}function Fn(e){return{uid:"",kind:"display",type:"renderer",props:{render:e.render}}}function Bn(e,t){if(e.kind==="static"){const a=e.def;return(r=>({uid:"",kind:"display",type:"renderer",...a.include!=null?{include:a.include}:{},...a.exclude!=null?{exclude:a.exclude}:{},props:{render:a.render(ma(r))}}))}const i=e.fn;return(a=>{const r=i(a);return{uid:"",kind:"display",type:"renderer",...r.include!=null?{include:r.include}:{},...r.exclude!=null?{exclude:r.exclude}:{},props:{render:r.render(ma(a))}}})}P({itemType:"DISPLAYS",kind:"display",entryShape:"bare",mapToWidget:Fn,buildCustomWidget:Bn}),P({itemType:"ALERTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"alert",props:{text:e.text,...e.level!=null?{level:e.level}:{}}})}),P({itemType:"MARKDOWN_TEXTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"markdownText",props:{md:e.md}})});function Nn(e){return{uid:e.uid??"",kind:"layout",type:"tabs",props:{tabs:e.tabs,renderMode:e.renderMode??"all",...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function qn(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"TABS"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"TABS"),children:i}})}function zn(e){return e.children}P({itemType:"TABS",kind:"layout",entryShape:"compound",mapToWidget:Nn,buildCustomWidget:qn,getChildren:zn});function Gn(e){return{uid:e.uid??"",kind:"layout",type:"accordion",props:{sections:e.sections,renderMode:e.renderMode??"all",...e.singleOpen!=null?{singleOpen:e.singleOpen}:{},...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function Vn(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"ACCORDION"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"ACCORDION"),children:i}})}function Un(e){return e.children}P({itemType:"ACCORDION",kind:"layout",entryShape:"compound",mapToWidget:Gn,buildCustomWidget:Vn,getChildren:Un}),P({itemType:"CUSTOM_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:e.customType,path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.defaultValue!=null?{defaultValue:e.defaultValue}:{},...e.validator!=null?{validator:e.validator}:{},props:e.props??{}})}),P({itemType:"CUSTOM_ACTION",kind:"action",entryShape:"bare",mapToWidget:e=>{const{uid:t,label:i,disabled:a,on:r,onClick:s,data:o,customType:d,tags:p,size:u,include:h,exclude:m,states:y,props:g,...A}=e;return{uid:t??"",kind:"action",type:e.customType,label:i,disabled:a,...r!=null?{on:r}:{},props:{...g,...A}}},afterMerge:(e,t)=>ha.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)}),P({itemType:"CUSTOM_DISPLAY",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:e.customType,props:e.props??{}})});function Zn(e){return{uid:e.uid??"",kind:"layout",type:e.customType,props:e.props??{},children:[]}}function Yn(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"CUSTOM_LAYOUT"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"CUSTOM_LAYOUT"),children:i}})}function Hn(e){return e.children}P({itemType:"CUSTOM_LAYOUT",kind:"layout",entryShape:"compound",mapToWidget:Zn,buildCustomWidget:Yn,getChildren:Hn}),P({itemType:"TAGS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>je(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"tags",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})});const Tr={INPUTS:new Set(["INPUTS","TEXTAREA","PASSWORD","SELECT","DROPDOWN","RADIOGROUP","CHECKBOX","CALENDAR","DATE_TIME_CALENDAR","DATE_TIME_PICKER","DATE_INPUT","DATE_PICKER","RANGE_CALENDAR","RANGE_DATE_INPUT","RANGE_DATE_TIME_INPUT","RANGE_DATE_TIME_CALENDAR","RANGE_DATE_TIME_PICKER","RANGE_TIME_INPUT","RANGE_DATE_PICKER","RANGE_TIME_PICKER","TIME_INPUT","TIME_PICKER","DATE_TIME_INPUT","CURRENCY","MARKDOWN","LIST","CUSTOM_INPUT","REPEATER","TAGS"]),ACTIONS:new Set(["ACTIONS","CUSTOM_ACTION"]),DISPLAYS:new Set(["DISPLAYS","ALERTS","MARKDOWN_TEXTS","CUSTOM_DISPLAY"]),LAYOUTS:new Set(["LAYOUTS","TABS","ACCORDION","CUSTOM_LAYOUT"])};function Wn(e,t){const i=Tr[e];return i?i.has(t):e===t}class Kn{resolve(t,i){const a=[];for(const s of i)s.kind==="aggregated"?this.collectFromAggregated(s,t,a):this.collectFromLeaf(s,t,a);const r=this.rollUpSensibleDefaults(a);return{leafSelectors:a,sensibleDefaults:r}}collectFromAggregated(t,i,a){if(t.matcher(i))for(const r of t.children)this.collectFromLeaf(r,i,a)}collectFromLeaf(t,i,a){Wn(t.selectorType,i.itemType??"")&&t.matcher(i)&&a.push(t)}rollUpSensibleDefaults(t){const i=new Map,a=(s,o)=>{const d=i.get(s)??[];d.push(o),i.set(s,d)};for(const s of t){const o=Tr[s.selectorType];if(o)for(const d of o)a(d,s);else a(s.selectorType,s)}const r={};for(const[s,o]of i)kr(s)&&(r[s]=Ci(s).rollUpSensibleDefaults(o));return r}}const Jn=new Kn;class Xn{deepMerge(t,i){if(i==null)return t;if(t==null||typeof t!="object"||typeof i!="object"||Array.isArray(t)||Array.isArray(i))return i;const a={...t};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(typeof i[r]=="object"&&!Array.isArray(i[r])&&i[r]!==null&&typeof t[r]=="object"&&!Array.isArray(t[r])&&t[r]!==null?a[r]=this.deepMerge(t[r],i[r]):a[r]=i[r]);return a}}const Qn=new Xn;class jn{constructor(t){this.objectUtils=t}merge(t,i,a){let r={},s=null;typeof t=="function"&&(s=t);const o=this.collectDecorators(a);for(const u of o){if(s!=null){s=this.composeRuntimeFunctions(s,u);continue}if(typeof u=="function"){const h=u({...r,...typeof t=="function"?{}:t});if(typeof h=="function"){s=this.createPromotedFunction(r,t,h,i,a);continue}r=this.objectUtils.deepMerge(r,h)}else r=this.objectUtils.deepMerge(r,u)}if(s!=null)return{kind:"dynamic",fn:this.wrapWithSensibleDefaults(s,r,i,a)};const d=this.objectUtils.deepMerge(t,r);return{kind:"static",def:this.applySensibleDefaults({...d},i,a)}}collectDecorators(t){const i=[];for(const a of t.leafSelectors){const r=a.config;r.override!=null&&i.push(r.override)}return i}applySensibleDefaults(t,i,a){if(!kr(i))return t;const r=a.sensibleDefaults[i]??{};return Ci(i).applySensibleDefaults(t,r)}createPromotedFunction(t,i,a,r,s){return o=>{const d=a(o);let p=this.objectUtils.deepMerge(t,d);return p=this.objectUtils.deepMerge(p,i),this.applySensibleDefaults(p,r,s)}}wrapWithSensibleDefaults(t,i,a,r){return s=>{let o=t(s);return Object.keys(i).length>0&&(o=this.objectUtils.deepMerge(i,o)),this.applySensibleDefaults(o,a,r)}}composeRuntimeFunctions(t,i){return typeof i=="function"?a=>{const r=t(a),s=i(r);return typeof s=="function"?s(a):this.objectUtils.deepMerge(s,r)}:a=>{const r=t(a);return this.objectUtils.deepMerge(r,i)}}}const eo=new jn(Qn);class to{mapToWidget(t,i){if(t.kind==="dynamic"){const a=t.fn;return(r=>{const s=a(r);return this.mapStaticDef(s,i)})}return this.mapStaticDef(t.def,i)}mapStaticDef(t,i){const a=Ci(i).mapToWidget(t);return this.applyBaseWidgetFields(a,t)}applyBaseWidgetFields(t,i){return i.size!=null&&(t.size=i.size),i.defaultValue!=null&&t.kind==="input"&&(t.defaultValue=i.defaultValue),i.on!=null&&(t.on=i.on),i.include!=null&&(t.include=i.include),i.exclude!=null&&(t.exclude=i.exclude),t}}const io=new to;class ao{normalizeSelectors(t){const i=Array.isArray(t)?t:[t],a=[],r=[];for(const s of i)s.kind==="leaf"?r.push(s):a.push(s);return r.length>0&&a.unshift({kind:"aggregated",matcher:()=>!0,children:r}),a}extractFormConfig(){return{suppressAutomaticStack:!1}}}const ro=new ao,so={input:new Set(["disabled","readonly","label","validator","size"]),action:new Set(["disabled","label","size"]),layout:new Set(["size"]),display:new Set([])},Ar={onChange:"change",onLoad:"load",onFilter:"filter",onClick:"click"};class no{extractFromMergeResult(t,i){const a={};for(const d of i){const p=d.targetState,u=d.config,h=u.override&&typeof u.override!="function"?u.override:u;a[p]={...a[p]||{},...h}}if(t.kind==="dynamic"){const d=t.fn;return{cleanedResult:{kind:"dynamic",fn:u=>{const h=d(u),{states:m,...y}=h;return y}},stateData:{stateOverrides:a}}}const{states:r,...s}=t.def,o={};for(const[d,p]of Object.entries(a))o[d]={...p};if(r)for(const[d,p]of Object.entries(r))o[d]={...o[d]||{},...p};return{cleanedResult:{kind:"static",def:s},stateData:{stateOverrides:o}}}applyToWidget(t,i,a,r){const{stateOverrides:s}=i;if(Object.keys(s).length===0)return t;const o={...t},d=t.kind,p=so[d]||new Set;t.props&&(o.props={...t.props}),t.on&&(o.on={...t.on});for(const[u,h]of Object.entries(s))for(const[m,y]of Object.entries(h))m==="visible"?this.applyVisibility(o,u,y):Ar[m]?this.applyStateEvent(o,u,m,y,a,r):p.has(m)?o[`${m}.${u}`]=y:(o.props||(o.props={}),o.props[`${m}.${u}`]=y);return o}hasStateData(t){return Object.keys(t.stateOverrides).length>0}applyVisibility(t,i,a){if(a){const r=t.include?.in||[];t.include={...t.include||{},in:[...r,i]}}else{const r=t.exclude?.from||[];t.exclude={...t.exclude||{},from:[...r,i]}}}applyStateEvent(t,i,a,r,s,o){const d=Ar[a];if(t.on||(t.on={}),typeof r=="function"){const p=_r(r);if(p!=null)t.on[`${d}.${i}`]=p;else{const u=o.next();s.set(u,r),t.on[`${d}.${i}`]=u}}else typeof r=="string"&&(t.on[`${d}.${i}`]=r)}}const oo=new no;function lo(){let e=0;return{next:()=>`event_${e++}`}}class po{constructor(t,i,a,r,s){this.resolver=t,this.merger=i,this.mapper=a,this.eventWiring=r,this.stateExpansion=s}walkAndMap(t,i,a){const r=new Map,s=lo(),o={value:0},d=new Set;return{widgets:this.walkItems(t,i,r,a,s,o,d),eventRegistry:r}}walkItems(t,i,a,r,s,o,d){return t.flatMap(p=>{if(p.type!=="ITEMS")throw new Error("Unexpected gui shortcut type");return p.items.map(u=>this.processItem(u,p.itemType,p.tags,i,a,r,s,o,d))})}processItem(t,i,a,r,s,o,d,p,u){const h=i,m=Ci(i),y=m.parseEntry(t),g=this.buildBaseDef(y),A=this.buildDecoratorForMatching(g,h,a),q=this.resolver.resolve(A,r),Ne=q.leafSelectors.filter(Ze=>Ze.targetState!=null),st={leafSelectors:q.leafSelectors.filter(Ze=>Ze.targetState==null),sensibleDefaults:q.sensibleDefaults};let ft=this.merger.merge(g,h,st);m.afterMerge&&(ft=m.afterMerge(ft,{eventRegistry:s,formConfig:o,eventIdGenerator:d})),ft=this.eventWiring.wireInputLayoutEvents(ft,s,d);const{cleanedResult:yn,stateData:fr}=this.stateExpansion.extractFromMergeResult(ft,Ne);let ut;if(m.buildCustomWidget){const Ze=this.buildCustomWidgetContext(y.children,r,s,o,d,p,u);ut=this.buildCustomWidget(m,yn,Ze)}else ut=this.mapper.mapToWidget(yn,h);if(typeof ut!="function"){const Ze=ut;Ze.uid||(Ze.path&&!u.has(Ze.path)?(Ze.uid=Ze.path,u.add(Ze.path)):Ze.uid=`dx_${p.value++}`)}if(this.stateExpansion.hasStateData(fr))if(typeof ut=="function"){const Ze=ut;ut=(sy=>{const ny=Ze(sy);return this.stateExpansion.applyToWidget(ny,fr,s,d)})}else ut=this.stateExpansion.applyToWidget(ut,fr,s,d);return ut}buildCustomWidgetContext(t,i,a,r,s,o,d){return{children:t,mapStaticDef:(p,u)=>this.mapper.mapStaticDef(p,u),walkChildren:p=>this.walkItems(p,i,a,r,s,o,d)}}buildCustomWidget(t,i,a){return t.buildCustomWidget(i,a)}buildBaseDef(t){const i=t.baseDef;return typeof i=="function"?a=>{const r=ma(a),s=i(r);return t.path!=null?{...s,path:t.path}:s}:t.path!=null?{...i,path:t.path}:i}buildDecoratorForMatching(t,i,a){if(typeof t=="function")return{itemType:i,tags:[...a]};const r=[...a,..."tags"in t&&t.tags?t.tags:[]],s="uid"in t?t.uid:void 0,o="type"in t?t.type:void 0;return{itemType:i,tags:r,uid:s,type:o}}}class uo{constructor(t,i){this.selectorNormalizer=t,this.walker=i}processDxFacade(t,i=[],a){const{defs:r,gslSelectors:s,formConfig:o}=this.prepareForm(t,i,a),{widgets:d,eventRegistry:p}=this.walker.walkAndMap(r,s,o),u=d[0];return this.buildResult({form:u},p,o)}prepareForm(t,i,a){const s=(Array.isArray(t)?[...t]:[t]).map(p=>typeof p=="function"?vn(p):p),o=this.selectorNormalizer.normalizeSelectors(i),d={...this.selectorNormalizer.extractFormConfig(),...a};if(!d.suppressAutomaticStack){const p={def:{uid:"#root",direction:"column",widgetName:"flex"},children:s};return{defs:[{type:"ITEMS",itemType:wr.LAYOUTS,items:[p],tags:[]}],gslSelectors:o,formConfig:d}}return{defs:s,gslSelectors:o,formConfig:d}}convertStateNames(t){const i={};for(const[a,r]of Object.entries(t))i[a.replace(/\$/g,":")]=r;return i}buildResult(t,i,a){a.states&&Object.keys(a.states).length>0&&(t={...t,states:this.convertStateNames(a.states)});const r={form:t};return i.size>0&&(r.events=s=>{const o=i.get(s.name);if(o){const d=u=>{if(u&&typeof u=="object"&&"path"in u&&!("type"in u)){const{path:h,...m}=u;for(const[y,g]of Object.entries(m))s.callback({type:"OVERRIDE_WIDGET_PROP",payload:{path:h,prop:y,value:g}})}else s.callback(u)},p={...s,callback:d,update:d};o(p)}}),a.dependencies&&(r.dependencies=a.dependencies),a.functions&&(r.functions=a.functions),a.widgetLoaders&&(r.widgetLoaders=a.widgetLoaders),a.validateOn&&(r.validateOn=a.validateOn),a.itemRenderers&&(r.itemRenderers=a.itemRenderers),r}}const ho=new po(Jn,eo,io,ha,oo),mo=new uo(ro,ho);function Cr(e){return typeof e=="function"?!0:Array.isArray(e)?e.length===0||e.every(Lr):Lr(e)}function Lr(e){if(typeof e=="function")return!0;if(e===null||typeof e!="object")return!1;const t=e;return t.type==="ITEMS"&&typeof t.itemType=="string"}function co(e){if(!e||typeof e!="object"||Array.isArray(e))return;const t=e.form;if(Cr(t))throw new Error("[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object.")}const Er=Object.freeze({}),yo=Object.freeze({}),xr=new WeakMap;function ca(e,t){return e==null?t:typeof e=="object"?e:{}}function go(e,t,i){if(!Cr(e))return co(e),{formDef:e};const a=ca(e,Er),r=ca(t,Er),s=ca(i,yo);let o=xr.get(a);o||(o=new WeakMap,xr.set(a,o));let d=o.get(r);d||(d=new WeakMap,o.set(r,d));const p=d.get(s);if(p)return p;const u=mo.processDxFacade(e,t,i),h={formDef:u.form,formEvent:u.events,dependencies:u.dependencies,functions:u.functions,widgetLoaders:u.widgetLoaders,validateOn:u.validateOn,itemRenderers:u.itemRenderers};return d.set(s,h),h}function b(e,t,i){function a(d,p){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:p,constr:o,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,p);const u=o.prototype,h=Object.keys(u);for(let m=0;m<h.length;m++){const y=h[m];y in d||(d[y]=u[y].bind(d))}}const r=i?.Parent??Object;class s extends r{}Object.defineProperty(s,"name",{value:e});function o(d){var p;const u=i?.Parent?new s:this;a(u,d),(p=u._zod).deferred??(p.deferred=[]);for(const h of u._zod.deferred)h();return u}return Object.defineProperty(o,"init",{value:a}),Object.defineProperty(o,Symbol.hasInstance,{value:d=>i?.Parent&&d instanceof i.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}class At extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const bo={};function Dt(e){return bo}function ya(e,t){return typeof t=="bigint"?t.toString():t}function ga(e){return e==null}function ba(e){const t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const Or=Symbol("evaluating");function Q(e,t,i){let a;Object.defineProperty(e,t,{get(){if(a!==Or)return a===void 0&&(a=Or,a=i()),a},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function fo(...e){const t={};for(const i of e){const a=Object.getOwnPropertyDescriptors(i);Object.assign(t,a)}return Object.defineProperties({},t)}function vo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Mr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fa(e){if(Ir(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const i=t.prototype;return!(Ir(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Rr(e){return fa(e)?{...e}:Array.isArray(e)?[...e]:e}function va(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fr(e,t,i){const a=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(a._zod.parent=e),a}function z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}const Do={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ct(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function wo(e,t){return t.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}function Li(e){return typeof e=="string"?e:e?.message}function wt(e,t,i){const a={...e,path:e.path??[]};if(!e.message){const r=Li(e.inst?._zod.def?.error?.(e))??Li(t?.error?.(e))??Li(i.customError?.(e))??Li(i.localeError?.(e))??"Invalid input";a.message=r}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function Da(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Rt(...e){const[t,i,a]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:a}:{...t}}const Br=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ya,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Nr=b("$ZodError",Br),Ei=b("$ZodError",Br,{Parent:Error});function $o(e,t=i=>i.message){const i={},a=[];for(const r of e.issues)r.path.length>0?(i[r.path[0]]=i[r.path[0]]||[],i[r.path[0]].push(t(r))):a.push(t(r));return{formErrors:a,fieldErrors:i}}function ko(e,t=i=>i.message){const i={_errors:[]},a=r=>{for(const s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>a({issues:o}));else if(s.code==="invalid_key")a({issues:s.issues});else if(s.code==="invalid_element")a({issues:s.issues});else if(s.path.length===0)i._errors.push(t(s));else{let o=i,d=0;for(;d<s.path.length;){const p=s.path[d];d===s.path.length-1?(o[p]=o[p]||{_errors:[]},o[p]._errors.push(t(s))):o[p]=o[p]||{_errors:[]},o=o[p],d++}}};return a(e),i}const xi=e=>(t,i,a,r)=>{const s=a?Object.assign(a,{async:!1}):{async:!1},o=t._zod.run({value:i,issues:[]},s);if(o instanceof Promise)throw new At;if(o.issues.length){const d=new(r?.Err??e)(o.issues.map(p=>wt(p,s,Dt())));throw Mr(d,r?.callee),d}return o.value},So=xi(Ei),Pi=e=>async(t,i,a,r)=>{const s=a?Object.assign(a,{async:!0}):{async:!0};let o=t._zod.run({value:i,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const d=new(r?.Err??e)(o.issues.map(p=>wt(p,s,Dt())));throw Mr(d,r?.callee),d}return o.value},_o=Pi(Ei),Oi=e=>(t,i,a)=>{const r=a?{...a,async:!1}:{async:!1},s=t._zod.run({value:i,issues:[]},r);if(s instanceof Promise)throw new At;return s.issues.length?{success:!1,error:new(e??Nr)(s.issues.map(o=>wt(o,r,Dt())))}:{success:!0,data:s.value}},qr=Oi(Ei),Mi=e=>async(t,i,a)=>{const r=a?Object.assign(a,{async:!0}):{async:!0};let s=t._zod.run({value:i,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>wt(o,r,Dt())))}:{success:!0,data:s.value}},zr=Mi(Ei),To=e=>(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return xi(e)(t,i,r)},Ao=e=>(t,i,a)=>xi(e)(t,i,a),Co=e=>async(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Pi(e)(t,i,r)},Lo=e=>async(t,i,a)=>Pi(e)(t,i,a),Eo=e=>(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Oi(e)(t,i,r)},xo=e=>(t,i,a)=>Oi(e)(t,i,a),Po=e=>async(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Mi(e)(t,i,r)},Oo=e=>async(t,i,a)=>Mi(e)(t,i,a),Mo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Gr=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Io=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ro=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Fo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Bo=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Vr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",No=new RegExp(`^${Vr}$`);function Ur(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qo(e){return new RegExp(`^${Ur(e)}$`)}function zo(e){const t=Ur({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${i.join("|")})`;return new RegExp(`^${Vr}T(?:${a})$`)}const Go=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vo=/^-?\d+$/,Uo=/^-?\d+(?:\.\d+)?$/,Zo=/^(?:true|false)$/i,Yo=/^[^A-Z]*$/,Ho=/^[^a-z]*$/,Je=b("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),Zr={number:"number",bigint:"bigint",object:"date"},Wo=b("$ZodCheckLessThan",(e,t)=>{Je.init(e,t);const i=Zr[typeof t.value];e._zod.onattach.push(a=>{const r=a._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ko=b("$ZodCheckGreaterThan",(e,t)=>{Je.init(e,t);const i=Zr[typeof t.value];e._zod.onattach.push(a=>{const r=a._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jo=b("$ZodCheckNumberFormat",(e,t)=>{Je.init(e,t),t.format=t.format||"float64";const i=t.format?.includes("int"),a=i?"int":"number",[r,s]=Do[t.format];e._zod.onattach.push(o=>{const d=o._zod.bag;d.format=t.format,d.minimum=r,d.maximum=s,i&&(d.pattern=Vo)}),e._zod.check=o=>{const d=o.value;if(i){if(!Number.isInteger(d)){o.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?o.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):o.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}d<r&&o.issues.push({origin:"number",input:d,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),d>s&&o.issues.push({origin:"number",input:d,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Xo=b("$ZodCheckMaxLength",(e,t)=>{var i;Je.init(e,t),(i=e._zod.def).when??(i.when=a=>{const r=a.value;return!ga(r)&&r.length!==void 0}),e._zod.onattach.push(a=>{const r=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const r=a.value;if(r.length<=t.maximum)return;const o=Da(r);a.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Qo=b("$ZodCheckMinLength",(e,t)=>{var i;Je.init(e,t),(i=e._zod.def).when??(i.when=a=>{const r=a.value;return!ga(r)&&r.length!==void 0}),e._zod.onattach.push(a=>{const r=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const r=a.value;if(r.length>=t.minimum)return;const o=Da(r);a.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jo=b("$ZodCheckLengthEquals",(e,t)=>{var i;Je.init(e,t),(i=e._zod.def).when??(i.when=a=>{const r=a.value;return!ga(r)&&r.length!==void 0}),e._zod.onattach.push(a=>{const r=a._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=a=>{const r=a.value,s=r.length;if(s===t.length)return;const o=Da(r),d=s>t.length;a.issues.push({origin:o,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),Ii=b("$ZodCheckStringFormat",(e,t)=>{var i,a;Je.init(e,t),e._zod.onattach.push(r=>{const s=r._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(i=e._zod).check??(i.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),el=b("$ZodCheckRegex",(e,t)=>{Ii.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),tl=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Yo),Ii.init(e,t)}),il=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ho),Ii.init(e,t)}),al=b("$ZodCheckIncludes",(e,t)=>{Je.init(e,t);const i=va(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${i}`:i);t.pattern=a,e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(a)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),rl=b("$ZodCheckStartsWith",(e,t)=>{Je.init(e,t);const i=new RegExp(`^${va(t.prefix)}.*`);t.pattern??(t.pattern=i),e._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),sl=b("$ZodCheckEndsWith",(e,t)=>{Je.init(e,t);const i=new RegExp(`.*${va(t.suffix)}$`);t.pattern??(t.pattern=i),e._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),nl=b("$ZodCheckOverwrite",(e,t)=>{Je.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}}),ol={major:4,minor:3,patch:6},$e=b("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ol;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const r of a)for(const s of r._zod.onattach)s(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(o,d,p)=>{let u=Ct(o),h;for(const m of d){if(m._zod.def.when){if(!m._zod.def.when(o))continue}else if(u)continue;const y=o.issues.length,g=m._zod.check(o);if(g instanceof Promise&&p?.async===!1)throw new At;if(h||g instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await g,o.issues.length!==y&&(u||(u=Ct(o,y)))});else{if(o.issues.length===y)continue;u||(u=Ct(o,y))}}return h?h.then(()=>o):o},s=(o,d,p)=>{if(Ct(o))return o.aborted=!0,o;const u=r(d,a,p);if(u instanceof Promise){if(p.async===!1)throw new At;return u.then(h=>e._zod.parse(h,p))}return e._zod.parse(u,p)};e._zod.run=(o,d)=>{if(d.skipChecks)return e._zod.parse(o,d);if(d.direction==="backward"){const u=e._zod.parse({value:o.value,issues:[]},{...d,skipChecks:!0});return u instanceof Promise?u.then(h=>s(h,o,d)):s(u,o,d)}const p=e._zod.parse(o,d);if(p instanceof Promise){if(d.async===!1)throw new At;return p.then(u=>r(u,a,d))}return r(p,a,d)}}Q(e,"~standard",()=>({validate:r=>{try{const s=qr(e,r);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return zr(e,r).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),wa=b("$ZodString",(e,t)=>{$e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Go(e._zod.bag),e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),et=b("$ZodStringFormat",(e,t)=>{Ii.init(e,t),wa.init(e,t)}),ll=b("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Gr(a))}else t.pattern??(t.pattern=Gr());et.init(e,t)}),dl=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Io),et.init(e,t)}),pl=b("$ZodURL",(e,t)=>{et.init(e,t),e._zod.check=i=>{try{const a=i.value.trim(),r=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort})),t.normalize?i.value=r.href:i.value=a;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),ul=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zo(t)),et.init(e,t)}),hl=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=No),et.init(e,t)}),ml=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qo(t)),et.init(e,t)}),cl=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Mo),et.init(e,t)}),yl=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ro),et.init(e,t),e._zod.bag.format="ipv4"}),gl=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Fo),et.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}}),bl=b("$ZodCustomStringFormat",(e,t)=>{et.init(e,t),e._zod.check=i=>{t.fn(i.value)||i.issues.push({code:"invalid_format",format:t.format,input:i.value,inst:e,continue:!t.abort})}}),Yr=b("$ZodNumber",(e,t)=>{$e.init(e,t),e._zod.pattern=e._zod.bag.pattern??Uo,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}const r=i.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return i;const s=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...s?{received:s}:{}}),i}}),fl=b("$ZodNumberFormat",(e,t)=>{Jo.init(e,t),Yr.init(e,t)}),vl=b("$ZodBoolean",(e,t)=>{$e.init(e,t),e._zod.pattern=Zo,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=!!i.value}catch{}const r=i.value;return typeof r=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),i}}),Dl=b("$ZodAny",(e,t)=>{$e.init(e,t),e._zod.parse=i=>i});function Hr(e,t,i){e.issues.length&&t.issues.push(...wo(i,e.issues)),t.value[i]=e.value}const Wr=b("$ZodArray",(e,t)=>{$e.init(e,t),e._zod.parse=(i,a)=>{const r=i.value;if(!Array.isArray(r))return i.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),i;i.value=Array(r.length);const s=[];for(let o=0;o<r.length;o++){const d=r[o],p=t.element._zod.run({value:d,issues:[]},a);p instanceof Promise?s.push(p.then(u=>Hr(u,i,o))):Hr(p,i,o)}return s.length?Promise.all(s).then(()=>i):i}});function Kr(e,t,i,a){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const r=e.filter(s=>!Ct(s));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(s=>s.issues.map(o=>wt(o,a,Dt())))}),t)}const wl=b("$ZodUnion",(e,t)=>{$e.init(e,t),Q(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Q(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Q(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Q(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${r.map(s=>ba(s.source)).join("|")})$`)}});const i=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(r,s)=>{if(i)return a(r,s);let o=!1;const d=[];for(const p of t.options){const u=p._zod.run({value:r.value,issues:[]},s);if(u instanceof Promise)d.push(u),o=!0;else{if(u.issues.length===0)return u;d.push(u)}}return o?Promise.all(d).then(p=>Kr(p,r,e,s)):Kr(d,r,e,s)}}),$l=b("$ZodIntersection",(e,t)=>{$e.init(e,t),e._zod.parse=(i,a)=>{const r=i.value,s=t.left._zod.run({value:r,issues:[]},a),o=t.right._zod.run({value:r,issues:[]},a);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([p,u])=>Jr(i,p,u)):Jr(i,s,o)}});function $a(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(fa(e)&&fa(t)){const i=Object.keys(t),a=Object.keys(e).filter(s=>i.indexOf(s)!==-1),r={...e,...t};for(const s of a){const o=$a(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};r[s]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let a=0;a<e.length;a++){const r=e[a],s=t[a],o=$a(r,s);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i.push(o.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Jr(e,t,i){const a=new Map;let r;for(const d of t.issues)if(d.code==="unrecognized_keys"){r??(r=d);for(const p of d.keys)a.has(p)||a.set(p,{}),a.get(p).l=!0}else e.issues.push(d);for(const d of i.issues)if(d.code==="unrecognized_keys")for(const p of d.keys)a.has(p)||a.set(p,{}),a.get(p).r=!0;else e.issues.push(d);const s=[...a].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(s.length&&r&&e.issues.push({...r,keys:s}),Ct(e))return e;const o=$a(t.value,i.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const kl=b("$ZodTransform",(e,t)=>{$e.init(e,t),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new Pr(e.constructor.name);const r=t.transform(i.value,i);if(a.async)return(r instanceof Promise?r:Promise.resolve(r)).then(o=>(i.value=o,i));if(r instanceof Promise)throw new At;return i.value=r,i}});function Xr(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ka=b("$ZodOptional",(e,t)=>{$e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Q(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${ba(i.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>Xr(s,i.value)):Xr(r,i.value)}return i.value===void 0?i:t.innerType._zod.run(i,a)}}),Sl=b("$ZodExactOptional",(e,t)=>{ka.init(e,t),Q(e._zod,"values",()=>t.innerType._zod.values),Q(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(i,a)=>t.innerType._zod.run(i,a)}),_l=b("$ZodNullable",(e,t)=>{$e.init(e,t),Q(e._zod,"optin",()=>t.innerType._zod.optin),Q(e._zod,"optout",()=>t.innerType._zod.optout),Q(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${ba(i.source)}|null)$`):void 0}),Q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:t.innerType._zod.run(i,a)}),Tl=b("$ZodDefault",(e,t)=>{$e.init(e,t),e._zod.optin="optional",Q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);if(i.value===void 0)return i.value=t.defaultValue,i;const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>Qr(s,t)):Qr(r,t)}});function Qr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Al=b("$ZodPrefault",(e,t)=>{$e.init(e,t),e._zod.optin="optional",Q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,a)=>(a.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,a))}),Cl=b("$ZodNonOptional",(e,t)=>{$e.init(e,t),Q(e._zod,"values",()=>{const i=t.innerType._zod.values;return i?new Set([...i].filter(a=>a!==void 0)):void 0}),e._zod.parse=(i,a)=>{const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>jr(s,e)):jr(r,e)}});function jr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ll=b("$ZodCatch",(e,t)=>{$e.init(e,t),Q(e._zod,"optin",()=>t.innerType._zod.optin),Q(e._zod,"optout",()=>t.innerType._zod.optout),Q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>(i.value=s.value,s.issues.length&&(i.value=t.catchValue({...i,error:{issues:s.issues.map(o=>wt(o,a,Dt()))},input:i.value}),i.issues=[]),i)):(i.value=r.value,r.issues.length&&(i.value=t.catchValue({...i,error:{issues:r.issues.map(s=>wt(s,a,Dt()))},input:i.value}),i.issues=[]),i)}}),El=b("$ZodPipe",(e,t)=>{$e.init(e,t),Q(e._zod,"values",()=>t.in._zod.values),Q(e._zod,"optin",()=>t.in._zod.optin),Q(e._zod,"optout",()=>t.out._zod.optout),Q(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){const s=t.out._zod.run(i,a);return s instanceof Promise?s.then(o=>Ri(o,t.in,a)):Ri(s,t.in,a)}const r=t.in._zod.run(i,a);return r instanceof Promise?r.then(s=>Ri(s,t.out,a)):Ri(r,t.out,a)}});function Ri(e,t,i){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}const xl=b("$ZodReadonly",(e,t)=>{$e.init(e,t),Q(e._zod,"propValues",()=>t.innerType._zod.propValues),Q(e._zod,"values",()=>t.innerType._zod.values),Q(e._zod,"optin",()=>t.innerType?._zod?.optin),Q(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(es):es(r)}});function es(e){return e.value=Object.freeze(e.value),e}const ts=b("$ZodCustom",(e,t)=>{Je.init(e,t),$e.init(e,t),e._zod.parse=(i,a)=>i,e._zod.check=i=>{const a=i.value,r=t.fn(a);if(r instanceof Promise)return r.then(s=>is(s,i,a,e));is(r,i,a,e)}});function is(e,t,i,a){if(!e){const r={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(r.params=a._zod.def.params),t.issues.push(Rt(r))}}var as;class Pl{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){const a=i[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){const i=t._zod.parent;if(i){const a={...this.get(i)??{}};delete a.id;const r={...a,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ol(){return new Pl}(as=globalThis).__zod_globalRegistry??(as.__zod_globalRegistry=Ol());const Ft=globalThis.__zod_globalRegistry;function Ml(e,t){return new e({type:"string",...z(t)})}function Il(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Rl(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function Fl(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function Bl(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function Nl(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function ql(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function zl(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Gl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Vl(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Ul(e,t){return new e({type:"number",checks:[],...z(t)})}function Zl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Yl(e,t){return new e({type:"boolean",...z(t)})}function Hl(e){return new e({type:"any"})}function Wl(e,t){return new Wo({check:"less_than",...z(t),value:e,inclusive:!0})}function Kl(e,t){return new Ko({check:"greater_than",...z(t),value:e,inclusive:!0})}function Fi(e,t){return new Xo({check:"max_length",...z(t),maximum:e})}function Lt(e,t){return new Qo({check:"min_length",...z(t),minimum:e})}function rs(e,t){return new jo({check:"length_equals",...z(t),length:e})}function ss(e,t){return new el({check:"string_format",format:"regex",...z(t),pattern:e})}function Jl(e){return new tl({check:"string_format",format:"lowercase",...z(e)})}function Xl(e){return new il({check:"string_format",format:"uppercase",...z(e)})}function Ql(e,t){return new al({check:"string_format",format:"includes",...z(t),includes:e})}function jl(e,t){return new rl({check:"string_format",format:"starts_with",...z(t),prefix:e})}function ed(e,t){return new sl({check:"string_format",format:"ends_with",...z(t),suffix:e})}function Et(e){return new nl({check:"overwrite",tx:e})}function td(e){return Et(t=>t.normalize(e))}function id(){return Et(e=>e.trim())}function ad(){return Et(e=>e.toLowerCase())}function rd(){return Et(e=>e.toUpperCase())}function sd(){return Et(e=>vo(e))}function nd(e,t,i){return new e({type:"array",element:t,...z(i)})}function ns(e,t,i){return new e({type:"custom",check:"custom",fn:t,...z(i)})}function os(e){const t=od(i=>(i.addIssue=a=>{if(typeof a=="string")i.issues.push(Rt(a,i.value,t._zod.def));else{const r=a;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=i.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),i.issues.push(Rt(r))}},e(i.value,i)));return t}function od(e,t){const i=new Je({check:"custom",...z(t)});return i._zod.check=e,i}function ld(e,t,i,a={}){const r=z(a),s={...z(a),check:"string_format",type:"string",format:t,fn:typeof i=="function"?i:d=>i.test(d),...r};return i instanceof RegExp&&(s.pattern=i),new e(s)}function ls(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ft,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ze(e,t,i={path:[],schemaPath:[]}){var a;const r=e._zod.def,s=t.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,o);const d=e._zod.toJSONSchema?.();if(d)o.schema=d;else{const h={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,h);else{const y=o.schema,g=t.processors[r.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);g(e,t,y,h)}const m=e._zod.parent;m&&(o.ref||(o.ref=m),ze(m,t,h),t.seen.get(m).isParent=!0)}const p=t.metadataRegistry.get(e);return p&&Object.assign(o.schema,p),t.io==="input"&&Ge(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((a=o.schema).default??(a.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ds(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const o of e.seen.entries()){const d=e.metadataRegistry.get(o[0])?.id;if(d){const p=a.get(d);if(p&&p!==o[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(d,o[0])}}const r=o=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(o[0])?.id,y=e.external.uri??(A=>A);if(m)return{ref:y(m)};const g=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=g,{defId:g,ref:`${y("__shared")}#/${d}/${g}`}}if(o[1]===i)return{ref:"#"};const u=`#/${d}/`,h=o[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:u+h}},s=o=>{if(o[1].schema.$ref)return;const d=o[1],{ref:p,defId:u}=r(o);d.def={...d.schema},u&&(d.defId=u);const h=d.schema;for(const m in h)delete h[m];h.$ref=p};if(e.cycles==="throw")for(const o of e.seen.entries()){const d=o[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
1
+ (function(te,ut){typeof exports=="object"&&typeof module<"u"?ut(exports,require("@golemui/core"),require("@golemui/gui-shared"),require("@golemui/lit"),require("lit"),require("lit/decorators.js"),require("@lit/context"),require("rxjs"),require("lit/directives/class-map.js"),require("lit-html/directives/style-map.js"),require("lit-html/directives/repeat.js"),require("lit/directives/if-defined.js"),require("lit/directives/live.js"),require("lit/directives/repeat.js"),require("lit/directives/unsafe-html.js")):typeof define=="function"&&define.amd?define(["exports","@golemui/core","@golemui/gui-shared","@golemui/lit","lit","lit/decorators.js","@lit/context","rxjs","lit/directives/class-map.js","lit-html/directives/style-map.js","lit-html/directives/repeat.js","lit/directives/if-defined.js","lit/directives/live.js","lit/directives/repeat.js","lit/directives/unsafe-html.js"],ut):(te=typeof globalThis<"u"?globalThis:te||self,ut(te["gui-lit"]={},te.core,null,te.lit$1,te.lit,te.decorators_js,te.context,te.rxjs,te.classMap_js,te.styleMap_js,te.repeat_js,te.ifDefined_js,te.live_js,te.repeat_js$1,te.unsafeHtml_js))})(this,(function(te,ut,df,m,d,n,f,ds,S,wt,qe,ma,no,us,oo){"use strict";function Ct(e){return function(t,i=()=>!0){return{kind:"leaf",selectorType:e,matcher:i,config:t}}}const ct={INPUTS:"INPUTS",ACTIONS:"ACTIONS",LAYOUTS:"LAYOUTS",DISPLAYS:"DISPLAYS"},Je={...ct};class lo{constructor(){this.handlerByItemType=new Map,this.kindByItemType=new Map}registerItemType(t,i,a){if(this.handlerByItemType.has(t))throw new Error(`Item type "${t}" is already registered.`);this.handlerByItemType.set(t,i),a&&this.kindByItemType.set(t,a)}getItemTypeKind(t){return this.kindByItemType.get(t)}getRegisteredItemTypes(){return[...this.handlerByItemType.keys()]}getItemTypesOfKind(t){const i=[];for(const[a,r]of this.kindByItemType)r===t&&i.push(a);return i}getItemTypeHandler(t){const i=this.handlerByItemType.get(t);if(!i)throw new Error(`No handler registered for item type "${t}". Register its definition in the widget set's registry with registerShortcutType (for the gui widget set: add it to guiShortcutTypes in registry.ts).`);return i}hasItemTypeHandler(t){return this.handlerByItemType.has(t)}}function uo(){return new lo}function P(e){const t=l=>{if(!e.sensibleDefaults)return{};let u={...e.sensibleDefaults.base};for(const p of l){const h=p.config;for(const c of e.sensibleDefaults.fields){const y=c;h[y]!=null&&(u={...u,[y]:h[y]})}}return u},i=(l,u)=>e.sensibleDefaults?e.sensibleDefaults.apply(l,u):l,a=l=>{switch(e.entryShape){case"bare":return{baseDef:l};case"keyed":{const u=l;return{baseDef:u.def,path:u.key}}case"compound":{const u=l;return{baseDef:u.def,children:u.children}}}},r={rollUpSensibleDefaults:t,applySensibleDefaults:i,mapToWidget:e.mapToWidget,parseEntry:a,...e.afterMerge?{afterMerge:e.afterMerge}:{},...e.buildCustomWidget?{buildCustomWidget:e.buildCustomWidget}:{},...e.getChildren?{getChildren:e.getChildren}:{}},s=Ct(e.itemType),o=(l,u)=>s(u,(p=>p.uid===l));return{itemType:e.itemType,kind:e.kind,handler:r,gsl:s,gslByUid:o}}function po(e,t){e.registerItemType(t.itemType,t.handler,t.kind)}const ho=["tag","state","tagsAnd","tagsOr"];function co(e,t){if(t.length===0)return e;const i=t.find(s=>s.kind==="state"),a=t.filter(s=>s.kind!=="state"),r=e.matcher;return{...e,matcher:s=>{if(!r(s))return!1;for(const o of a){const l=s.tags??[];if(o.kind==="tagsAnd"){for(const u of o.tags)if(!l.includes(u))return!1}else{if(o.tags.length===0)continue;if(!o.tags.some(u=>l.includes(u)))return!1}}return!0},...i?{targetState:i.name}:{}}}function Ii(e){return(t,i)=>e(i,a=>a.uid===t)}function mo(){const e=Ct(ct.INPUTS),t=Ct(ct.ACTIONS),i=Ct(ct.DISPLAYS),a=Ct(ct.LAYOUTS);return{inputs:e,inputByUid:Ii(e),actions:t,actionByUid:Ii(t),displays:i,displayByUid:Ii(i),layouts:a,layoutByUid:Ii(a)}}function Nt(e,t){const i={tag:a=>Nt(e,[...t,{kind:"tagsAnd",tags:[a]}]),state:a=>Nt(e,[...t,{kind:"state",name:a}]),tagsAnd:a=>Nt(e,[...t,{kind:"tagsAnd",tags:a}]),tagsOr:a=>Nt(e,[...t,{kind:"tagsOr",tags:a}])};for(const[a,r]of Object.entries(e))i[a]=(...s)=>co(r(...s),t);return i}function yo(e){const t=ho.filter(a=>a in e);if(t.length>0)throw new Error(`Selector factory map must not use the reserved scope method name(s): ${t.join(", ")}.`);const i={...mo(),...e};return Nt(i,[])}const ps={[ct.INPUTS]:"input",[ct.ACTIONS]:"action",[ct.DISPLAYS]:"display",[ct.LAYOUTS]:"layout"};class go{constructor(t){this.registry=t}resolve(t,i){const a=[];for(const s of i)s.kind==="aggregated"?this.collectFromAggregated(s,t,a):this.collectFromLeaf(s,t,a);const r=this.rollUpSensibleDefaults(a);return{leafSelectors:a,sensibleDefaults:r}}selectorMatchesItemType(t,i){const a=ps[t];return a?this.registry.getItemTypeKind(i)===a:t===i}collectFromAggregated(t,i,a){if(t.matcher(i))for(const r of t.children)this.collectFromLeaf(r,i,a)}collectFromLeaf(t,i,a){this.selectorMatchesItemType(t.selectorType,i.itemType??"")&&t.matcher(i)&&a.push(t)}rollUpSensibleDefaults(t){const i=new Map,a=(s,o)=>{const l=i.get(s)??[];l.push(o),i.set(s,l)};for(const s of t){const o=ps[s.selectorType];if(o)for(const l of this.registry.getItemTypesOfKind(o))a(l,s);else a(s.selectorType,s)}const r={};for(const[s,o]of i)this.registry.hasItemTypeHandler(s)&&(r[s]=this.registry.getItemTypeHandler(s).rollUpSensibleDefaults(o));return r}}class bo{deepMerge(t,i){if(i==null)return t;if(t==null||typeof t!="object"||typeof i!="object"||Array.isArray(t)||Array.isArray(i))return i;const a={...t};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(typeof i[r]=="object"&&!Array.isArray(i[r])&&i[r]!==null&&typeof t[r]=="object"&&!Array.isArray(t[r])&&t[r]!==null?a[r]=this.deepMerge(t[r],i[r]):a[r]=i[r]);return a}}const fo=new bo;class vo{constructor(t,i){this.objectUtils=t,this.registry=i}merge(t,i,a){let r={},s=null;typeof t=="function"&&(s=t);const o=this.collectDecorators(a);for(const p of o){if(s!=null){s=this.composeRuntimeFunctions(s,p);continue}if(typeof p=="function"){const h=p({...r,...typeof t=="function"?{}:t});if(typeof h=="function"){s=this.createPromotedFunction(r,t,h,i,a);continue}r=this.objectUtils.deepMerge(r,h)}else r=this.objectUtils.deepMerge(r,p)}if(s!=null)return{kind:"dynamic",fn:this.wrapWithSensibleDefaults(s,r,i,a)};const l=this.objectUtils.deepMerge(t,r);return{kind:"static",def:this.applySensibleDefaults({...l},i,a)}}collectDecorators(t){const i=[];for(const a of t.leafSelectors){const r=a.config;r.override!=null&&i.push(r.override)}return i}applySensibleDefaults(t,i,a){if(!this.registry.hasItemTypeHandler(i))return t;const r=a.sensibleDefaults[i]??{};return this.registry.getItemTypeHandler(i).applySensibleDefaults(t,r)}createPromotedFunction(t,i,a,r,s){return o=>{const l=a(o);let u=this.objectUtils.deepMerge(t,l);return u=this.objectUtils.deepMerge(u,i),this.applySensibleDefaults(u,r,s)}}wrapWithSensibleDefaults(t,i,a,r){return s=>{let o=t(s);return Object.keys(i).length>0&&(o=this.objectUtils.deepMerge(i,o)),this.applySensibleDefaults(o,a,r)}}composeRuntimeFunctions(t,i){return typeof i=="function"?a=>{const r=t(a),s=i(r);return typeof s=="function"?s(a):this.objectUtils.deepMerge(s,r)}:a=>{const r=t(a);return this.objectUtils.deepMerge(r,i)}}}class Do{constructor(t){this.registry=t}mapToWidget(t,i){if(t.kind==="dynamic"){const a=t.fn;return(r=>{const s=a(r);return this.mapStaticDef(s,i)})}return this.mapStaticDef(t.def,i)}mapStaticDef(t,i){const a=this.registry.getItemTypeHandler(i).mapToWidget(t);return this.applyBaseWidgetFields(a,t)}applyBaseWidgetFields(t,i){return i.size!=null&&(t.size=i.size),i.defaultValue!=null&&t.kind==="input"&&(t.defaultValue=i.defaultValue),i.on!=null&&(t.on=i.on),i.include!=null&&(t.include=i.include),i.exclude!=null&&(t.exclude=i.exclude),t}}class wo{normalizeSelectors(t){const i=Array.isArray(t)?t:[t],a=[],r=[];for(const s of i)s.kind==="leaf"?r.push(s):a.push(s);return r.length>0&&a.unshift({kind:"aggregated",matcher:()=>!0,children:r}),a}extractFormConfig(){return{suppressAutomaticStack:!1}}}const hs={onLoad:"load",onChange:"change",onFilter:"filter",onBlur:"blur"},$o=Object.keys(hs);function cs(e){if(e.length>0)return null;try{const t=e();return typeof t=="string"?t:null}catch{return null}}class ko{extractOnClickFromMergeResult(t,i,a){if(t.kind==="dynamic"){const o=t.fn;return{kind:"dynamic",fn:u=>{const p=o(u);return this.wireOnClick(p,i,a)}}}const r=t.def;return{kind:"static",def:this.wireOnClick(r,i,a)}}wireOnClick(t,i,a){const r=a.next(),s=t.onClick;if(typeof s=="function"){const{onClick:o,...l}=t,u=s(void 0);return typeof u=="string"?{...l,uid:r,on:{click:u}}:(i.set(r,p=>s(p.data)),{...l,uid:r,on:{click:r}})}return{...t,uid:r}}wireInputLayoutEvents(t,i,a){if(t.kind==="dynamic"){const s=t.fn;return{kind:"dynamic",fn:l=>{const u=s(l);return this.wireEventProperties(u,i,a)}}}return{kind:"static",def:this.wireEventProperties(t.def,i,a)}}wireEventProperties(t,i,a){const r={...t.on||{}};let s=!1;const o={...t};for(const l of $o){const u=t[l];if(u==null)continue;const p=hs[l];if(typeof u=="function"){const h=cs(u);if(h!=null)r[p]=h;else{const c=a.next();i.set(c,u),r[p]=c}s=!0}else typeof u=="string"&&(r[p]=u,s=!0);delete o[l]}return s&&(o.on=r),o}}const ya=new ko,To={input:new Set(["disabled","readonly","label","validator","size"]),action:new Set(["disabled","label","size"]),layout:new Set(["size"]),display:new Set([])},ms={onChange:"change",onLoad:"load",onFilter:"filter",onClick:"click"};class So{extractFromMergeResult(t,i){const a={};for(const l of i){const u=l.targetState,p=l.config,h=p.override&&typeof p.override!="function"?p.override:p;a[u]={...a[u]||{},...h}}if(t.kind==="dynamic"){const l=t.fn;return{cleanedResult:{kind:"dynamic",fn:p=>{const h=l(p),{states:c,...y}=h;return y}},stateData:{stateOverrides:a}}}const{states:r,...s}=t.def,o={};for(const[l,u]of Object.entries(a))o[l]={...u};if(r)for(const[l,u]of Object.entries(r))o[l]={...o[l]||{},...u};return{cleanedResult:{kind:"static",def:s},stateData:{stateOverrides:o}}}applyToWidget(t,i,a,r){const{stateOverrides:s}=i;if(Object.keys(s).length===0)return t;const o={...t},l=t.kind,u=To[l]||new Set;t.props&&(o.props={...t.props}),t.on&&(o.on={...t.on});for(const[p,h]of Object.entries(s))for(const[c,y]of Object.entries(h))c==="visible"?this.applyVisibility(o,p,y):ms[c]?this.applyStateEvent(o,p,c,y,a,r):u.has(c)?o[`${c}.${p}`]=y:(o.props||(o.props={}),o.props[`${c}.${p}`]=y);return o}hasStateData(t){return Object.keys(t.stateOverrides).length>0}applyVisibility(t,i,a){if(a){const r=t.include?.in||[];t.include={...t.include||{},in:[...r,i]}}else{const r=t.exclude?.from||[];t.exclude={...t.exclude||{},from:[...r,i]}}}applyStateEvent(t,i,a,r,s,o){const l=ms[a];if(t.on||(t.on={}),typeof r=="function"){const u=cs(r);if(u!=null)t.on[`${l}.${i}`]=u;else{const p=o.next();s.set(p,r),t.on[`${l}.${i}`]=p}}else typeof r=="string"&&(t.on[`${l}.${i}`]=r)}}const _o=new So;function ga(e){return{errors:void 0,touched:void 0,translate:void 0,...e??{},$form:e?.$form??{}}}function Ao(){let e=0;return{next:()=>`event_${e++}`}}class Eo{constructor(t,i,a,r,s,o){this.registry=t,this.resolver=i,this.merger=a,this.mapper=r,this.eventWiring=s,this.stateExpansion=o}walkAndMap(t,i,a){const r=new Map,s=Ao(),o={value:0},l=new Set;return{widgets:this.walkItems(t,i,r,a,s,o,l),eventRegistry:r}}walkItems(t,i,a,r,s,o,l){return t.flatMap(u=>{if(u.type!=="ITEMS")throw new Error(`Unexpected shortcut type "${u.type}"`);return u.items.map(p=>this.processItem(p,u.itemType,u.tags,i,a,r,s,o,l))})}processItem(t,i,a,r,s,o,l,u,p){const h=i,c=this.registry.getItemTypeHandler(i),y=c.parseEntry(t),g=this.buildBaseDef(y),_=this.buildDecoratorForMatching(g,h,a),L=this.resolver.resolve(_,r),Ae=L.leafSelectors.filter(Ze=>Ze.targetState!=null),nt={leafSelectors:L.leafSelectors.filter(Ze=>Ze.targetState==null),sensibleDefaults:L.sensibleDefaults};let Dt=this.merger.merge(g,h,nt);c.afterMerge&&(Dt=c.afterMerge(Dt,{eventRegistry:s,formConfig:o,eventIdGenerator:l})),Dt=this.eventWiring.wireInputLayoutEvents(Dt,s,l);const{cleanedResult:so,stateData:ls}=this.stateExpansion.extractFromMergeResult(Dt,Ae);let ht;if(c.buildCustomWidget){const Ze=this.buildCustomWidgetContext(y.children,r,s,o,l,u,p);ht=this.buildCustomWidget(c,so,Ze)}else ht=this.mapper.mapToWidget(so,h);if(typeof ht!="function"){const Ze=ht;Ze.uid||(Ze.path&&!p.has(Ze.path)?(Ze.uid=Ze.path,p.add(Ze.path)):Ze.uid=`dx_${u.value++}`)}if(this.stateExpansion.hasStateData(ls))if(typeof ht=="function"){const Ze=ht;ht=(of=>{const lf=Ze(of);return this.stateExpansion.applyToWidget(lf,ls,s,l)})}else ht=this.stateExpansion.applyToWidget(ht,ls,s,l);return ht}buildCustomWidgetContext(t,i,a,r,s,o,l){return{children:t,mapStaticDef:(u,p)=>this.mapper.mapStaticDef(u,p),walkChildren:u=>this.walkItems(u,i,a,r,s,o,l)}}buildCustomWidget(t,i,a){return t.buildCustomWidget(i,a)}buildBaseDef(t){const i=t.baseDef;return typeof i=="function"?a=>{const r=ga(a),s=i(r);return t.path!=null?{...s,path:t.path}:s}:t.path!=null?{...i,path:t.path}:i}buildDecoratorForMatching(t,i,a){if(typeof t=="function")return{itemType:i,tags:[...a]};const r=[...a,..."tags"in t&&t.tags?t.tags:[]],s="uid"in t?t.uid:void 0,o="type"in t?t.type:void 0;return{itemType:i,tags:r,uid:s,type:o}}}class Co{constructor(t,i,a){this.selectorNormalizer=t,this.walker=i,this.adapter=a}processDxFacade(t,i=[],a){const{defs:r,gslSelectors:s,formConfig:o}=this.prepareForm(t,i,a),{widgets:l,eventRegistry:u}=this.walker.walkAndMap(r,s,o),p=l[0];return this.buildResult({form:p},u,o)}prepareForm(t,i,a){const s=(Array.isArray(t)?[...t]:[t]).map(u=>typeof u=="function"?this.adapter.bareItemToWidget(u):u),o=this.selectorNormalizer.normalizeSelectors(i),l={...this.selectorNormalizer.extractFormConfig(),...a};return l.suppressAutomaticStack?{defs:s,gslSelectors:o,formConfig:l}:{defs:[this.adapter.rootEntry(s)],gslSelectors:o,formConfig:l}}convertStateNames(t){const i={};for(const[a,r]of Object.entries(t))i[a.replace(/\$/g,":")]=r;return i}buildResult(t,i,a){a.states&&Object.keys(a.states).length>0&&(t={...t,states:this.convertStateNames(a.states)});const r={form:t};return i.size>0&&(r.events=s=>{const o=i.get(s.name);if(o){const l=p=>{if(p&&typeof p=="object"&&"path"in p&&!("type"in p)){const{path:h,...c}=p;for(const[y,g]of Object.entries(c))s.callback({type:"OVERRIDE_WIDGET_PROP",payload:{path:h,prop:y,value:g}})}else s.callback(p)},u={...s,callback:l,update:l};o(u)}}),a.dependencies&&(r.dependencies=a.dependencies),a.functions&&(r.functions=a.functions),a.widgetLoaders&&(r.widgetLoaders=a.widgetLoaders),a.validateOn&&(r.validateOn=a.validateOn),a.itemRenderers&&(r.itemRenderers=a.itemRenderers),r}}function Lo(e){const{registry:t,adapter:i}=e,a=new Eo(t,new go(t),new vo(fo,t),new Do(t),ya,_o);return new Co(new wo,a,i)}function ys(e){return typeof e=="function"?!0:Array.isArray(e)?e.length===0||e.every(gs):gs(e)}function gs(e){if(typeof e=="function")return!0;if(e===null||typeof e!="object")return!1;const t=e;return t.type==="ITEMS"&&typeof t.itemType=="string"}function Io(e){if(!e||typeof e!="object"||Array.isArray(e))return;const t=e.form;if(ys(t))throw new Error("[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object.")}function xo(e){const t=Object.freeze({}),i=Object.freeze({}),a=new WeakMap;function r(s,o){return s==null?o:typeof s=="object"?s:{}}return function(o,l,u){if(!ys(o))return Io(o),{formDef:o};const p=r(o,t),h=r(l,t),c=r(u,i);let y=a.get(p);y||(y=new WeakMap,a.set(p,y));let g=y.get(h);g||(g=new WeakMap,y.set(h,g));const _=g.get(c);if(_)return _;const L=e.processDxFacade(o,l,u),Ae={formDef:L.form,formEvent:L.events,dependencies:L.dependencies,functions:L.functions,widgetLoaders:L.widgetLoaders,validateOn:L.validateOn,itemRenderers:L.itemRenderers};return g.set(c,Ae),Ae}}function Po(e){if("selectors"in e.facade)throw new Error(`The "${e.name}" implementation facade must not contain a "selectors" key: that slot of the namespace is filled by the selector chain.`);const t=Lo({registry:e.registry,adapter:e.adapter});return{name:e.name,registry:e.registry,namespace:{...e.facade,selectors:e.selectors},formDefs:t,resolveFormInput:xo(t)}}function J(e){const{uid:t,path:i,label:a,disabled:r,readonly:s,defaultValue:o,tags:l,type:u,size:p,onLoad:h,onChange:c,onFilter:y,on:g,states:_,include:L,exclude:Ae,validator:nt,...Dt}=e;return Dt}function ie(e,t){return typeof e=="function"?e:{type:t,...e??{}}}function Mo(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()):""}function X(e,t){return e.label!=null||t.suppressAutomaticLabels||!e.path?e:{...e,label:Mo(e.path)}}function et(e,t){return e.placeholder!=null||t.suppressAutomaticPlaceholders||!e.path?e:{...e,placeholder:e.path}}function Oo(e){switch(e.type){case"text":return Fo(e);case"number":return Bo(e);case"boolean":return Ro(e);default:throw new Error(`Unsupported field type "${e.type}"`)}}function Ro(e){const t=J(e);return{uid:e.uid??"",kind:"input",type:"toggle",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"boolean")}:{},props:t}}function Fo(e){const t=J(e);return{uid:e.uid??"",kind:"input",type:"textinput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:ie(e.validator,"string")}}function Bo(e){const t=J(e);return{uid:e.uid??"",kind:"input",type:"number",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:ie(e.validator,"number")}}const ba=P({itemType:"INPUTS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>{let i=X(e,t);return i=et(i,t),i}},mapToWidget:Oo}),xi=ba.gsl,No=ba.gslByUid;function qo(e){const{uid:t,label:i,actionType:a,disabled:r,on:s,onClick:o,data:l,type:u,tags:p,size:h,include:c,exclude:y,states:g,..._}=e;return{uid:t??"",kind:"action",type:"button",disabled:r,actionType:a,label:i,...s!=null?{on:s}:{},props:_}}const fa=P({itemType:"ACTIONS",kind:"action",entryShape:"bare",mapToWidget:qo,afterMerge:(e,t)=>ya.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)}),zo=fa.gsl,Uo=fa.gslByUid;function Go(e){const{uid:t,widgetName:i,tags:a,size:r,onChange:s,include:o,exclude:l,...u}=e,{on:p,...h}=u;return{uid:t??"",kind:"layout",type:i??"flex",props:{direction:h.direction??"column",...h},children:[]}}function Vo(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"LAYOUTS"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"LAYOUTS"),children:i}})}function Zo(e){return e.children}const va=P({itemType:"LAYOUTS",kind:"layout",entryShape:"compound",mapToWidget:Go,buildCustomWidget:Vo,getChildren:Zo}),Yo=va.gsl,Ho=va.gslByUid;function Wo(e){return{uid:"",kind:"display",type:"renderer",props:{render:e.render}}}function Ko(e,t){if(e.kind==="static"){const a=e.def;return(r=>({uid:"",kind:"display",type:"renderer",...a.include!=null?{include:a.include}:{},...a.exclude!=null?{exclude:a.exclude}:{},props:{render:a.render(ga(r))}}))}const i=e.fn;return(a=>{const r=i(a);return{uid:"",kind:"display",type:"renderer",...r.include!=null?{include:r.include}:{},...r.exclude!=null?{exclude:r.exclude}:{},props:{render:r.render(ga(a))}}})}const Da=P({itemType:"DISPLAYS",kind:"display",entryShape:"bare",mapToWidget:Wo,buildCustomWidget:Ko}),Jo=Da.gsl,Xo=Da.gslByUid,wa=P({itemType:"CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"calendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),Qo=wa.gsl,jo=wa.gslByUid,$a=P({itemType:"DATE_TIME_CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),el=$a.gsl,tl=$a.gslByUid,ka=P({itemType:"DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),il=ka.gsl,al=ka.gslByUid,Ta=P({itemType:"TEXTAREA",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"textarea",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),rl=Ta.gsl,sl=Ta.gslByUid,Sa=P({itemType:"PASSWORD",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"password",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),nl=Sa.gsl,ol=Sa.gslByUid,_a=P({itemType:"CHECKBOX",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"checkbox",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"boolean")}:{},props:J(e)})}),ll=_a.gsl,dl=_a.gslByUid,Aa=P({itemType:"DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),ul=Aa.gsl,pl=Aa.gslByUid,Ea=P({itemType:"TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),hl=Ea.gsl,cl=Ea.gslByUid,Ca=P({itemType:"TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),ml=Ca.gsl,yl=Ca.gslByUid,La=P({itemType:"DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),gl=La.gsl,bl=La.gslByUid,Ia=P({itemType:"CURRENCY",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"currency",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"number")}:{},props:J(e)})}),fl=Ia.gsl,vl=Ia.gslByUid,xa=P({itemType:"RANGE_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),Dl=xa.gsl,wl=xa.gslByUid,Pa=P({itemType:"SELECT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"select",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),$l=Pa.gsl,kl=Pa.gslByUid,Ma=P({itemType:"RADIOGROUP",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"radiogroup",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),Tl=Ma.gsl,Sl=Ma.gslByUid;function _l(e){return{uid:e.uid??"",kind:"layout",type:"tabs",props:{tabs:e.tabs,renderMode:e.renderMode??"all",...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function Al(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"TABS"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"TABS"),children:i}})}function El(e){return e.children}const Oa=P({itemType:"TABS",kind:"layout",entryShape:"compound",mapToWidget:_l,buildCustomWidget:Al,getChildren:El}),Cl=Oa.gsl,Ll=Oa.gslByUid,Ra=P({itemType:"LIST",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"list",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),Il=Ra.gsl,xl=Ra.gslByUid,Fa=P({itemType:"TAGS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"tags",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})});Fa.gsl,Fa.gslByUid;const Ba=P({itemType:"ALERTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"alert",props:{text:e.text,...e.level!=null?{level:e.level}:{}}})}),Pl=Ba.gsl,Ml=Ba.gslByUid,Na=P({itemType:"MARKDOWN_TEXTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"markdownText",props:{md:e.md}})}),Ol=Na.gsl,Rl=Na.gslByUid,qa=P({itemType:"DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"datePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),Fl=qa.gsl,Bl=qa.gslByUid,za=P({itemType:"DROPDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:J(e)})}),Nl=za.gsl,ql=za.gslByUid;function zl(e){return{uid:e.uid??"",kind:"layout",type:"accordion",props:{sections:e.sections,renderMode:e.renderMode??"all",...e.singleOpen!=null?{singleOpen:e.singleOpen}:{},...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function Ul(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"ACCORDION"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"ACCORDION"),children:i}})}function Gl(e){return e.children}const Ua=P({itemType:"ACCORDION",kind:"layout",entryShape:"compound",mapToWidget:zl,buildCustomWidget:Ul,getChildren:Gl}),Vl=Ua.gsl,Zl=Ua.gslByUid;function Yl(e){const t={};return e.addLabel!=null&&(t.addLabel=e.addLabel),e.removeLabel!=null&&(t.removeLabel=e.removeLabel),e.limit!=null&&(t.limit=e.limit),e.title!=null&&(t.title=e.title),e.addButtonIcon!=null&&(t.addButtonIcon=e.addButtonIcon),e.removeButtonIcon!=null&&(t.removeButtonIcon=e.removeButtonIcon),t}function Hl(e){return{uid:e.uid??"",kind:"input",type:"repeater",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:{...Yl(e),template:{kind:"layout",type:"flex",children:[],props:{direction:"column"}}}}}function Ga(e,t){for(const i of e){if(typeof i=="function")continue;const a=i;typeof a.path=="string"&&a.path&&!a.path.startsWith(t)&&(a.path=t+a.path),"children"in a&&Array.isArray(a.children)&&Ga(a.children,t);const r=a.props;r?.template?.children&&Array.isArray(r.template.children)&&Ga(r.template.children,t)}}function Wl(e,t){const i=t.walkChildren(t.children??[]),a=e.kind==="static"?e.def.path??"":e.fn({})?.path??"";a&&Ga(i,a+".items.");const r={kind:"layout",type:"flex",uid:"",children:i,props:{direction:"column"}};if(e.kind==="static"){const o=t.mapStaticDef(e.def,"REPEATER");return{...o,props:{...o.props,template:r}}}const s=e.fn;return(o=>{const l=s(o),u=t.mapStaticDef(l,"REPEATER");return{...u,props:{...u.props,template:r}}})}function Kl(e){return{baseDef:e.def,path:e.key,children:e.children}}function Jl(e){return e.children}const Xl={parseEntry:Kl,rollUpSensibleDefaults:()=>({}),applySensibleDefaults:e=>e,mapToWidget:Hl,buildCustomWidget:Wl,getChildren:Jl},Va=Ct("REPEATER"),bs=(e,t)=>Va(t,(i=>i.uid===e)),Ql={itemType:"REPEATER",kind:"input",handler:Xl,gsl:Va,gslByUid:bs},Za=P({itemType:"MARKDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"markdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"string")}:{},props:J(e)})}),jl=Za.gsl,ed=Za.gslByUid,Ya=P({itemType:"RANGE_DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),td=Ya.gsl,id=Ya.gslByUid,Ha=P({itemType:"RANGE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),ad=Ha.gsl,rd=Ha.gslByUid,Wa=P({itemType:"RANGE_DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),sd=Wa.gsl,nd=Wa.gslByUid,Ka=P({itemType:"RANGE_DATE_TIME_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),od=Ka.gsl,ld=Ka.gslByUid,Ja=P({itemType:"RANGE_DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),dd=Ja.gsl,ud=Ja.gslByUid,Xa=P({itemType:"RANGE_DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>et(X(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDatePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),pd=Xa.gsl,hd=Xa.gslByUid,Qa=P({itemType:"RANGE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:ie(e.validator,"array")}:{},props:J(e)})}),cd=Qa.gsl,md=Qa.gslByUid,ja=P({itemType:"CUSTOM_DISPLAY",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:e.customType,props:e.props??{}})}),yd=ja.gsl,gd=ja.gslByUid,er=P({itemType:"CUSTOM_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>X(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:e.customType,path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.defaultValue!=null?{defaultValue:e.defaultValue}:{},...e.validator!=null?{validator:e.validator}:{},props:e.props??{}})}),bd=er.gsl,fd=er.gslByUid,tr=P({itemType:"CUSTOM_ACTION",kind:"action",entryShape:"bare",mapToWidget:e=>{const{uid:t,label:i,disabled:a,on:r,onClick:s,data:o,customType:l,tags:u,size:p,include:h,exclude:c,states:y,props:g,..._}=e;return{uid:t??"",kind:"action",type:e.customType,label:i,disabled:a,...r!=null?{on:r}:{},props:{...g,..._}}},afterMerge:(e,t)=>ya.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)}),vd=tr.gsl,Dd=tr.gslByUid;function wd(e){return{uid:e.uid??"",kind:"layout",type:e.customType,props:e.props??{},children:[]}}function $d(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"CUSTOM_LAYOUT"),children:i};const a=e.fn;return(r=>{const s=a(r);return{...t.mapStaticDef(s,"CUSTOM_LAYOUT"),children:i}})}function kd(e){return e.children}const ir=P({itemType:"CUSTOM_LAYOUT",kind:"layout",entryShape:"compound",mapToWidget:wd,buildCustomWidget:$d,getChildren:kd}),Td=ir.gsl,Sd=ir.gslByUid,_d=[ba,fa,va,Da,wa,$a,ka,Ta,Sa,_a,Aa,Ea,Ca,La,Ia,xa,Pa,Ma,Oa,Ra,Fa,Ba,Na,qa,za,Ua,Ql,Za,Ya,Ha,Wa,Ka,Ja,Xa,Qa,ja,er,tr,ir],fs=uo();for(const e of _d)po(fs,e);function Ad(e,t,i){if(typeof t=="function"){const r=t;return{items:[{key:e,def:o=>({type:"text",...r(o)})}],type:"ITEMS",itemType:Je.INPUTS,tags:i??[]}}const a={type:"text",...t};return{items:[{key:e,def:a}],type:"ITEMS",itemType:Je.INPUTS,tags:i??[]}}function Ed(e,t,i){if(typeof t=="function"){const r=t;return{items:[{key:e,def:o=>({type:"number",...r(o)})}],type:"ITEMS",itemType:Je.INPUTS,tags:i??[]}}const a={type:"number",...t};return{items:[{key:e,def:a}],type:"ITEMS",itemType:Je.INPUTS,tags:i??[]}}function Cd(e,t,i){if(typeof t=="function"){const r=t;return{items:[{key:e,def:o=>({type:"boolean",...r(o)})}],type:"ITEMS",itemType:Je.INPUTS,tags:i??[]}}const a={type:"boolean",...t};return{items:[{key:e,def:a}],type:"ITEMS",itemType:Je.INPUTS,tags:i??[]}}function Ld(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:e,def:u=>({type:"select",...s(u)})}],tags:i??[]}}const a={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:e,def:a}],tags:i??[]}}function Id(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:e,def:u=>({type:"dropdown",...s(u)})}],tags:i??[]}}const a={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:e,def:a}],tags:i??[]}}function xd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:e,def:u=>({type:"radiogroup",...s(u)})}],tags:i??[]}}const a={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:e,def:a}],tags:i??[]}}function Pd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:e,def:u=>({type:"checkbox",...s(u)})}],tags:i??[]}}const a={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:e,def:a}],tags:i??[]}}function Md(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:e,def:u=>({type:"textarea",...s(u)})}],tags:i??[]}}const a={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:e,def:a}],tags:i??[]}}function Od(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:e,def:u=>({type:"password",...s(u)})}],tags:i??[]}}const a={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:e,def:a}],tags:i??[]}}function Rd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:e,def:u=>({type:"currency",...s(u)})}],tags:i??[]}}const a={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:e,def:a}],tags:i??[]}}function Fd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:e,def:u=>({type:"markdown",...s(u)})}],tags:i??[]}}const a={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:e,def:a}],tags:i??[]}}function Bd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"LIST",items:[{key:e,def:u=>({type:"list",...s(u)})}],tags:i??[]}}const a={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:e,def:a}],tags:i??[]}}function Nd(e,t,i){if(typeof t=="function"){const r=t;return{items:[o=>({type:"calendar",path:e,...r(o)})],type:"ITEMS",itemType:"CALENDAR",tags:i??[]}}return{items:[{type:"calendar",path:e,...t}],type:"ITEMS",itemType:"CALENDAR",tags:i??[]}}function qd(e,t,i){if(typeof t=="function"){const r=t;return{items:[o=>({type:"dateTimeCalendar",path:e,...r(o)})],type:"ITEMS",itemType:"DATE_TIME_CALENDAR",tags:i??[]}}return{items:[{type:"dateTimeCalendar",path:e,...t}],type:"ITEMS",itemType:"DATE_TIME_CALENDAR",tags:i??[]}}function zd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:e,def:u=>({type:"dateInput",...s(u)})}],tags:i??[]}}const a={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:e,def:a}],tags:i??[]}}function Ud(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:e,def:u=>({type:"datePicker",...s(u)})}],tags:i??[]}}const a={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:e,def:a}],tags:i??[]}}function Gd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"DATE_TIME_PICKER",items:[{key:e,def:u=>({type:"dateTimePicker",...s(u)})}],tags:i??[]}}const a={type:"dateTimePicker",...t};return{type:"ITEMS",itemType:"DATE_TIME_PICKER",items:[{key:e,def:a}],tags:i??[]}}function Vd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:e,def:u=>({type:"rangeCalendar",...s(u)})}],tags:i??[]}}const a={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:e,def:a}],tags:i??[]}}function Zd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:e,def:u=>({type:"rangeDateInput",...s(u)})}],tags:i??[]}}const a={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:e,def:a}],tags:i??[]}}function Yd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_INPUT",items:[{key:e,def:u=>({type:"rangeDateTimeInput",...s(u)})}],tags:i??[]}}const a={type:"rangeDateTimeInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_INPUT",items:[{key:e,def:a}],tags:i??[]}}function Hd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_CALENDAR",items:[{key:e,def:u=>({type:"rangeDateTimeCalendar",...s(u)})}],tags:i??[]}}const a={type:"rangeDateTimeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_CALENDAR",items:[{key:e,def:a}],tags:i??[]}}function Wd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_PICKER",items:[{key:e,def:u=>({type:"rangeDateTimePicker",...s(u)})}],tags:i??[]}}const a={type:"rangeDateTimePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_PICKER",items:[{key:e,def:a}],tags:i??[]}}function Kd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_TIME_INPUT",items:[{key:e,def:u=>({type:"rangeTimeInput",...s(u)})}],tags:i??[]}}const a={type:"rangeTimeInput",...t};return{type:"ITEMS",itemType:"RANGE_TIME_INPUT",items:[{key:e,def:a}],tags:i??[]}}function Jd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:e,def:u=>({type:"rangeDatePicker",...s(u)})}],tags:i??[]}}const a={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:e,def:a}],tags:i??[]}}function Xd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"RANGE_TIME_PICKER",items:[{key:e,def:u=>({type:"rangeTimePicker",...s(u)})}],tags:i??[]}}const a={type:"rangeTimePicker",...t};return{type:"ITEMS",itemType:"RANGE_TIME_PICKER",items:[{key:e,def:a}],tags:i??[]}}function Qd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"TIME_INPUT",items:[{key:e,def:u=>({type:"timeInput",...s(u)})}],tags:i??[]}}const a={type:"timeInput",...t};return{type:"ITEMS",itemType:"TIME_INPUT",items:[{key:e,def:a}],tags:i??[]}}function jd(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"TIME_PICKER",items:[{key:e,def:u=>({type:"timePicker",...s(u)})}],tags:i??[]}}const a={type:"timePicker",...t};return{type:"ITEMS",itemType:"TIME_PICKER",items:[{key:e,def:a}],tags:i??[]}}function eu(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"DATE_TIME_INPUT",items:[{key:e,def:u=>({type:"dateTimeInput",...s(u)})}],tags:i??[]}}const a={type:"dateTimeInput",...t};return{type:"ITEMS",itemType:"DATE_TIME_INPUT",items:[{key:e,def:a}],tags:i??[]}}function tu(e,t,i,a){if(typeof i=="function"){const o=i;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:p=>({customType:e,...o(p)})}],tags:a??[]}}const r={customType:e,...i};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:r}],tags:a??[]}}function iu(e,t){return{items:[e],type:"ITEMS",itemType:Je.ACTIONS,tags:t??[]}}function au(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[l=>({customType:e,...s(l)})],tags:i??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:e,...t}],tags:i??[]}}const vs=(e,t)=>({type:"ITEMS",itemType:Je.DISPLAYS,items:[{render:e}],tags:t??[]});function ru(e,t){return{type:"ITEMS",itemType:"ALERTS",items:[e],tags:t??[]}}function su(e,t){return{type:"ITEMS",itemType:"MARKDOWN_TEXTS",items:[e],tags:t??[]}}function nu(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[p=>({customType:e,...l(p)})],tags:i??[]}}const{uid:a,...r}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:e,...a!=null?{uid:a}:{},props:Object.keys(r).length>0?r:void 0}],tags:i??[]}}const ar=(e,t,i)=>({type:"ITEMS",itemType:Je.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:e}],tags:i??[]}),ou=(e,t,i)=>ar(e,{direction:"row",...t??{}},i),lu=(e,t,i)=>ar(e,{direction:"column",...t??{}},i),rr=(e,t,i)=>({type:"ITEMS",itemType:Je.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:e}],tags:i??[]}),du=(e,t,i)=>rr(e,{direction:"row",...t??{}},i),uu=(e,t,i)=>rr(e,{direction:"column",...t??{}},i);function Ds(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function pu(e,t,i){const a=e.map(o=>({label:o.label,uid:o.uid??Ds(o.label)})),r=e.map(o=>({type:"ITEMS",itemType:Je.LAYOUTS,items:[{def:{uid:o.uid??Ds(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"TABS",items:[{def:{tabs:a,...t},children:r}],tags:i??[]}}function ws(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function hu(e,t,i){const a=e.map(o=>({label:o.label,uid:o.uid??ws(o.label)})),r=e.map(o=>({type:"ITEMS",itemType:Je.LAYOUTS,items:[{def:{uid:o.uid??ws(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"ACCORDION",items:[{def:{sections:a,...t},children:r}],tags:i??[]}}function cu(e,t,i,a){if(typeof i=="function"){const o=i;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:p=>({customType:e,...o(p)}),children:t}],tags:a??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:e,...i},children:t}],tags:a??[]}}function mu(e,t,i){const{template:a,...r}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:e,def:r,children:a}],tags:i??[]}}function yu(e,t,i){if(typeof t=="function"){const s=t;return{type:"ITEMS",itemType:"TAGS",items:[{key:e,def:u=>({type:"tags",...s(u)})}],tags:i??[]}}const a={type:"tags",...t};return{type:"ITEMS",itemType:"TAGS",items:[{key:e,def:a}],tags:i??[]}}const gu=yo({inputs:xi,inputByUid:No,textInputs:e=>xi(e,t=>t.type==="text"),numberInputs:e=>xi(e,t=>t.type==="number"),booleanInputs:e=>xi(e,t=>t.type==="boolean"),selects:$l,selectByUid:kl,dropdowns:Nl,dropdownByUid:ql,radiogroups:Tl,radiogroupByUid:Sl,checkboxes:ll,checkboxByUid:dl,textareas:rl,textareaByUid:sl,passwords:nl,passwordByUid:ol,currencies:fl,currencyByUid:vl,markdowns:jl,markdownByUid:ed,lists:Il,listByUid:xl,calendars:Qo,calendarByUid:jo,dateTimeCalendars:el,dateTimeCalendarByUid:tl,dateInputs:ul,dateInputByUid:pl,timeInputs:hl,timeInputByUid:cl,timePickers:ml,timePickerByUid:yl,dateTimeInputs:gl,dateTimeInputByUid:bl,datePickers:Fl,datePickerByUid:Bl,dateTimePickers:il,dateTimePickerByUid:al,rangeCalendars:Dl,rangeCalendarByUid:wl,rangeDateInputs:td,rangeDateInputByUid:id,rangeTimeInputs:ad,rangeTimeInputByUid:rd,rangeDateTimeInputs:sd,rangeDateTimeInputByUid:nd,rangeDateTimeCalendars:od,rangeDateTimeCalendarByUid:ld,rangeDateTimePickers:dd,rangeDateTimePickerByUid:ud,rangeDatePickers:pd,rangeDatePickerByUid:hd,rangeTimePickers:cd,rangeTimePickerByUid:md,repeaters:Va,repeaterByUid:bs,actions:zo,actionByUid:Uo,layouts:Yo,layoutByUid:Ho,displays:Jo,displayByUid:Xo,alerts:Pl,alertByUid:Ml,markdownTexts:Ol,markdownTextByUid:Rl,tabs:Cl,tabsByUid:Ll,accordions:Vl,accordionByUid:Zl,customInputs:bd,customInputByUid:fd,customActions:vd,customActionByUid:Dd,customDisplays:yd,customDisplayByUid:gd,customLayouts:Td,customLayoutByUid:Sd}),bu=Po({name:"gui",registry:fs,facade:{inputs:{textInput:Ad,numberInput:Ed,booleanInput:Cd,select:Ld,dropdown:Id,radiogroup:xd,checkbox:Pd,textarea:Md,password:Od,currency:Rd,markdown:Fd,list:Bd,calendar:Nd,dateTimeCalendar:qd,dateInput:zd,datePicker:Ud,dateTimePicker:Gd,timeInput:Qd,timePicker:jd,dateTimeInput:eu,rangeCalendar:Vd,rangeDateInput:Zd,rangeDateTimeInput:Yd,rangeDateTimeCalendar:Hd,rangeDateTimePicker:Wd,rangeTimeInput:Kd,rangeDatePicker:Jd,rangeTimePicker:Xd,repeater:mu,tags:yu,custom:tu},actions:{button:iu,custom:au},displays:{display:vs,alert:ru,markdownText:su,custom:nu},layouts:{flex:ar,horizontalFlex:ou,verticalFlex:lu,grid:rr,horizontalGrid:du,verticalGrid:uu,tabs:pu,accordion:hu,custom:cu}},selectors:gu,adapter:{bareItemToWidget:e=>vs(e),rootEntry:e=>{const t={def:{uid:"#root",direction:"column",widgetName:"flex"},children:e};return{type:"ITEMS",itemType:Je.LAYOUTS,items:[t],tags:[]}}}}).resolveFormInput;function b(e,t,i){function a(l,u){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:u,constr:o,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,u);const p=o.prototype,h=Object.keys(p);for(let c=0;c<h.length;c++){const y=h[c];y in l||(l[y]=p[y].bind(l))}}const r=i?.Parent??Object;class s extends r{}Object.defineProperty(s,"name",{value:e});function o(l){var u;const p=i?.Parent?new s:this;a(p,l),(u=p._zod).deferred??(u.deferred=[]);for(const h of p._zod.deferred)h();return p}return Object.defineProperty(o,"init",{value:a}),Object.defineProperty(o,Symbol.hasInstance,{value:l=>i?.Parent&&l instanceof i.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}class Lt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $s extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const fu={};function $t(e){return fu}function sr(e,t){return typeof t=="bigint"?t.toString():t}function nr(e){return e==null}function or(e){const t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const ks=Symbol("evaluating");function Q(e,t,i){let a;Object.defineProperty(e,t,{get(){if(a!==ks)return a===void 0&&(a=ks,a=i()),a},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function vu(...e){const t={};for(const i of e){const a=Object.getOwnPropertyDescriptors(i);Object.assign(t,a)}return Object.defineProperties({},t)}function Du(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ts="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ss(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function lr(e){if(Ss(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const i=t.prototype;return!(Ss(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function _s(e){return lr(e)?{...e}:Array.isArray(e)?[...e]:e}function dr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function As(e,t,i){const a=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(a._zod.parent=e),a}function z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}const wu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function It(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function $u(e,t){return t.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}function Pi(e){return typeof e=="string"?e:e?.message}function kt(e,t,i){const a={...e,path:e.path??[]};if(!e.message){const r=Pi(e.inst?._zod.def?.error?.(e))??Pi(t?.error?.(e))??Pi(i.customError?.(e))??Pi(i.localeError?.(e))??"Invalid input";a.message=r}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function qt(...e){const[t,i,a]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:a}:{...t}}const Es=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,sr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Cs=b("$ZodError",Es),Mi=b("$ZodError",Es,{Parent:Error});function ku(e,t=i=>i.message){const i={},a=[];for(const r of e.issues)r.path.length>0?(i[r.path[0]]=i[r.path[0]]||[],i[r.path[0]].push(t(r))):a.push(t(r));return{formErrors:a,fieldErrors:i}}function Tu(e,t=i=>i.message){const i={_errors:[]},a=r=>{for(const s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>a({issues:o}));else if(s.code==="invalid_key")a({issues:s.issues});else if(s.code==="invalid_element")a({issues:s.issues});else if(s.path.length===0)i._errors.push(t(s));else{let o=i,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(s))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return a(e),i}const Oi=e=>(t,i,a,r)=>{const s=a?Object.assign(a,{async:!1}):{async:!1},o=t._zod.run({value:i,issues:[]},s);if(o instanceof Promise)throw new Lt;if(o.issues.length){const l=new(r?.Err??e)(o.issues.map(u=>kt(u,s,$t())));throw Ts(l,r?.callee),l}return o.value},Su=Oi(Mi),Ri=e=>async(t,i,a,r)=>{const s=a?Object.assign(a,{async:!0}):{async:!0};let o=t._zod.run({value:i,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const l=new(r?.Err??e)(o.issues.map(u=>kt(u,s,$t())));throw Ts(l,r?.callee),l}return o.value},_u=Ri(Mi),Fi=e=>(t,i,a)=>{const r=a?{...a,async:!1}:{async:!1},s=t._zod.run({value:i,issues:[]},r);if(s instanceof Promise)throw new Lt;return s.issues.length?{success:!1,error:new(e??Cs)(s.issues.map(o=>kt(o,r,$t())))}:{success:!0,data:s.value}},Ls=Fi(Mi),Bi=e=>async(t,i,a)=>{const r=a?Object.assign(a,{async:!0}):{async:!0};let s=t._zod.run({value:i,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>kt(o,r,$t())))}:{success:!0,data:s.value}},Is=Bi(Mi),Au=e=>(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Oi(e)(t,i,r)},Eu=e=>(t,i,a)=>Oi(e)(t,i,a),Cu=e=>async(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Ri(e)(t,i,r)},Lu=e=>async(t,i,a)=>Ri(e)(t,i,a),Iu=e=>(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Fi(e)(t,i,r)},xu=e=>(t,i,a)=>Fi(e)(t,i,a),Pu=e=>async(t,i,a)=>{const r=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Bi(e)(t,i,r)},Mu=e=>async(t,i,a)=>Bi(e)(t,i,a),Ou=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xs=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ru=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Fu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Nu=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Ps="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qu=new RegExp(`^${Ps}$`);function Ms(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zu(e){return new RegExp(`^${Ms(e)}$`)}function Uu(e){const t=Ms({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${i.join("|")})`;return new RegExp(`^${Ps}T(?:${a})$`)}const Gu=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vu=/^-?\d+$/,Zu=/^-?\d+(?:\.\d+)?$/,Yu=/^(?:true|false)$/i,Hu=/^[^A-Z]*$/,Wu=/^[^a-z]*$/,Xe=b("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),Os={number:"number",bigint:"bigint",object:"date"},Ku=b("$ZodCheckLessThan",(e,t)=>{Xe.init(e,t);const i=Os[typeof t.value];e._zod.onattach.push(a=>{const r=a._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ju=b("$ZodCheckGreaterThan",(e,t)=>{Xe.init(e,t);const i=Os[typeof t.value];e._zod.onattach.push(a=>{const r=a._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xu=b("$ZodCheckNumberFormat",(e,t)=>{Xe.init(e,t),t.format=t.format||"float64";const i=t.format?.includes("int"),a=i?"int":"number",[r,s]=wu[t.format];e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,l.minimum=r,l.maximum=s,i&&(l.pattern=Vu)}),e._zod.check=o=>{const l=o.value;if(i){if(!Number.isInteger(l)){o.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}l<r&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),l>s&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Qu=b("$ZodCheckMaxLength",(e,t)=>{var i;Xe.init(e,t),(i=e._zod.def).when??(i.when=a=>{const r=a.value;return!nr(r)&&r.length!==void 0}),e._zod.onattach.push(a=>{const r=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const r=a.value;if(r.length<=t.maximum)return;const o=ur(r);a.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ju=b("$ZodCheckMinLength",(e,t)=>{var i;Xe.init(e,t),(i=e._zod.def).when??(i.when=a=>{const r=a.value;return!nr(r)&&r.length!==void 0}),e._zod.onattach.push(a=>{const r=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const r=a.value;if(r.length>=t.minimum)return;const o=ur(r);a.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ep=b("$ZodCheckLengthEquals",(e,t)=>{var i;Xe.init(e,t),(i=e._zod.def).when??(i.when=a=>{const r=a.value;return!nr(r)&&r.length!==void 0}),e._zod.onattach.push(a=>{const r=a._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=a=>{const r=a.value,s=r.length;if(s===t.length)return;const o=ur(r),l=s>t.length;a.issues.push({origin:o,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),Ni=b("$ZodCheckStringFormat",(e,t)=>{var i,a;Xe.init(e,t),e._zod.onattach.push(r=>{const s=r._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(i=e._zod).check??(i.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),tp=b("$ZodCheckRegex",(e,t)=>{Ni.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ip=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Hu),Ni.init(e,t)}),ap=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wu),Ni.init(e,t)}),rp=b("$ZodCheckIncludes",(e,t)=>{Xe.init(e,t);const i=dr(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${i}`:i);t.pattern=a,e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(a)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),sp=b("$ZodCheckStartsWith",(e,t)=>{Xe.init(e,t);const i=new RegExp(`^${dr(t.prefix)}.*`);t.pattern??(t.pattern=i),e._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),np=b("$ZodCheckEndsWith",(e,t)=>{Xe.init(e,t);const i=new RegExp(`.*${dr(t.suffix)}$`);t.pattern??(t.pattern=i),e._zod.onattach.push(a=>{const r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),op=b("$ZodCheckOverwrite",(e,t)=>{Xe.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}}),lp={major:4,minor:3,patch:6},$e=b("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=lp;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const r of a)for(const s of r._zod.onattach)s(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(o,l,u)=>{let p=It(o),h;for(const c of l){if(c._zod.def.when){if(!c._zod.def.when(o))continue}else if(p)continue;const y=o.issues.length,g=c._zod.check(o);if(g instanceof Promise&&u?.async===!1)throw new Lt;if(h||g instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await g,o.issues.length!==y&&(p||(p=It(o,y)))});else{if(o.issues.length===y)continue;p||(p=It(o,y))}}return h?h.then(()=>o):o},s=(o,l,u)=>{if(It(o))return o.aborted=!0,o;const p=r(l,a,u);if(p instanceof Promise){if(u.async===!1)throw new Lt;return p.then(h=>e._zod.parse(h,u))}return e._zod.parse(p,u)};e._zod.run=(o,l)=>{if(l.skipChecks)return e._zod.parse(o,l);if(l.direction==="backward"){const p=e._zod.parse({value:o.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(h=>s(h,o,l)):s(p,o,l)}const u=e._zod.parse(o,l);if(u instanceof Promise){if(l.async===!1)throw new Lt;return u.then(p=>r(p,a,l))}return r(u,a,l)}}Q(e,"~standard",()=>({validate:r=>{try{const s=Ls(e,r);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Is(e,r).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),pr=b("$ZodString",(e,t)=>{$e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Gu(e._zod.bag),e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),tt=b("$ZodStringFormat",(e,t)=>{Ni.init(e,t),pr.init(e,t)}),dp=b("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=xs(a))}else t.pattern??(t.pattern=xs());tt.init(e,t)}),up=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ru),tt.init(e,t)}),pp=b("$ZodURL",(e,t)=>{tt.init(e,t),e._zod.check=i=>{try{const a=i.value.trim(),r=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort})),t.normalize?i.value=r.href:i.value=a;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),hp=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Uu(t)),tt.init(e,t)}),cp=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=qu),tt.init(e,t)}),mp=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=zu(t)),tt.init(e,t)}),yp=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ou),tt.init(e,t)}),gp=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Fu),tt.init(e,t),e._zod.bag.format="ipv4"}),bp=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bu),tt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}}),fp=b("$ZodCustomStringFormat",(e,t)=>{tt.init(e,t),e._zod.check=i=>{t.fn(i.value)||i.issues.push({code:"invalid_format",format:t.format,input:i.value,inst:e,continue:!t.abort})}}),Rs=b("$ZodNumber",(e,t)=>{$e.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zu,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}const r=i.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return i;const s=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...s?{received:s}:{}}),i}}),vp=b("$ZodNumberFormat",(e,t)=>{Xu.init(e,t),Rs.init(e,t)}),Dp=b("$ZodBoolean",(e,t)=>{$e.init(e,t),e._zod.pattern=Yu,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=!!i.value}catch{}const r=i.value;return typeof r=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),i}}),wp=b("$ZodAny",(e,t)=>{$e.init(e,t),e._zod.parse=i=>i});function Fs(e,t,i){e.issues.length&&t.issues.push(...$u(i,e.issues)),t.value[i]=e.value}const Bs=b("$ZodArray",(e,t)=>{$e.init(e,t),e._zod.parse=(i,a)=>{const r=i.value;if(!Array.isArray(r))return i.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),i;i.value=Array(r.length);const s=[];for(let o=0;o<r.length;o++){const l=r[o],u=t.element._zod.run({value:l,issues:[]},a);u instanceof Promise?s.push(u.then(p=>Fs(p,i,o))):Fs(u,i,o)}return s.length?Promise.all(s).then(()=>i):i}});function Ns(e,t,i,a){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const r=e.filter(s=>!It(s));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(s=>s.issues.map(o=>kt(o,a,$t())))}),t)}const $p=b("$ZodUnion",(e,t)=>{$e.init(e,t),Q(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Q(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Q(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Q(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${r.map(s=>or(s.source)).join("|")})$`)}});const i=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(r,s)=>{if(i)return a(r,s);let o=!1;const l=[];for(const u of t.options){const p=u._zod.run({value:r.value,issues:[]},s);if(p instanceof Promise)l.push(p),o=!0;else{if(p.issues.length===0)return p;l.push(p)}}return o?Promise.all(l).then(u=>Ns(u,r,e,s)):Ns(l,r,e,s)}}),kp=b("$ZodIntersection",(e,t)=>{$e.init(e,t),e._zod.parse=(i,a)=>{const r=i.value,s=t.left._zod.run({value:r,issues:[]},a),o=t.right._zod.run({value:r,issues:[]},a);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([u,p])=>qs(i,u,p)):qs(i,s,o)}});function hr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lr(e)&&lr(t)){const i=Object.keys(t),a=Object.keys(e).filter(s=>i.indexOf(s)!==-1),r={...e,...t};for(const s of a){const o=hr(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};r[s]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let a=0;a<e.length;a++){const r=e[a],s=t[a],o=hr(r,s);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i.push(o.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function qs(e,t,i){const a=new Map;let r;for(const l of t.issues)if(l.code==="unrecognized_keys"){r??(r=l);for(const u of l.keys)a.has(u)||a.set(u,{}),a.get(u).l=!0}else e.issues.push(l);for(const l of i.issues)if(l.code==="unrecognized_keys")for(const u of l.keys)a.has(u)||a.set(u,{}),a.get(u).r=!0;else e.issues.push(l);const s=[...a].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(s.length&&r&&e.issues.push({...r,keys:s}),It(e))return e;const o=hr(t.value,i.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Tp=b("$ZodTransform",(e,t)=>{$e.init(e,t),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new $s(e.constructor.name);const r=t.transform(i.value,i);if(a.async)return(r instanceof Promise?r:Promise.resolve(r)).then(o=>(i.value=o,i));if(r instanceof Promise)throw new Lt;return i.value=r,i}});function zs(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const cr=b("$ZodOptional",(e,t)=>{$e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Q(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${or(i.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>zs(s,i.value)):zs(r,i.value)}return i.value===void 0?i:t.innerType._zod.run(i,a)}}),Sp=b("$ZodExactOptional",(e,t)=>{cr.init(e,t),Q(e._zod,"values",()=>t.innerType._zod.values),Q(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(i,a)=>t.innerType._zod.run(i,a)}),_p=b("$ZodNullable",(e,t)=>{$e.init(e,t),Q(e._zod,"optin",()=>t.innerType._zod.optin),Q(e._zod,"optout",()=>t.innerType._zod.optout),Q(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${or(i.source)}|null)$`):void 0}),Q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:t.innerType._zod.run(i,a)}),Ap=b("$ZodDefault",(e,t)=>{$e.init(e,t),e._zod.optin="optional",Q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);if(i.value===void 0)return i.value=t.defaultValue,i;const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>Us(s,t)):Us(r,t)}});function Us(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Ep=b("$ZodPrefault",(e,t)=>{$e.init(e,t),e._zod.optin="optional",Q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,a)=>(a.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,a))}),Cp=b("$ZodNonOptional",(e,t)=>{$e.init(e,t),Q(e._zod,"values",()=>{const i=t.innerType._zod.values;return i?new Set([...i].filter(a=>a!==void 0)):void 0}),e._zod.parse=(i,a)=>{const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>Gs(s,e)):Gs(r,e)}});function Gs(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Lp=b("$ZodCatch",(e,t)=>{$e.init(e,t),Q(e._zod,"optin",()=>t.innerType._zod.optin),Q(e._zod,"optout",()=>t.innerType._zod.optout),Q(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(s=>(i.value=s.value,s.issues.length&&(i.value=t.catchValue({...i,error:{issues:s.issues.map(o=>kt(o,a,$t()))},input:i.value}),i.issues=[]),i)):(i.value=r.value,r.issues.length&&(i.value=t.catchValue({...i,error:{issues:r.issues.map(s=>kt(s,a,$t()))},input:i.value}),i.issues=[]),i)}}),Ip=b("$ZodPipe",(e,t)=>{$e.init(e,t),Q(e._zod,"values",()=>t.in._zod.values),Q(e._zod,"optin",()=>t.in._zod.optin),Q(e._zod,"optout",()=>t.out._zod.optout),Q(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){const s=t.out._zod.run(i,a);return s instanceof Promise?s.then(o=>qi(o,t.in,a)):qi(s,t.in,a)}const r=t.in._zod.run(i,a);return r instanceof Promise?r.then(s=>qi(s,t.out,a)):qi(r,t.out,a)}});function qi(e,t,i){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}const xp=b("$ZodReadonly",(e,t)=>{$e.init(e,t),Q(e._zod,"propValues",()=>t.innerType._zod.propValues),Q(e._zod,"values",()=>t.innerType._zod.values),Q(e._zod,"optin",()=>t.innerType?._zod?.optin),Q(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);const r=t.innerType._zod.run(i,a);return r instanceof Promise?r.then(Vs):Vs(r)}});function Vs(e){return e.value=Object.freeze(e.value),e}const Zs=b("$ZodCustom",(e,t)=>{Xe.init(e,t),$e.init(e,t),e._zod.parse=(i,a)=>i,e._zod.check=i=>{const a=i.value,r=t.fn(a);if(r instanceof Promise)return r.then(s=>Ys(s,i,a,e));Ys(r,i,a,e)}});function Ys(e,t,i,a){if(!e){const r={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(r.params=a._zod.def.params),t.issues.push(qt(r))}}var Hs;class Pp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){const a=i[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){const i=t._zod.parent;if(i){const a={...this.get(i)??{}};delete a.id;const r={...a,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Mp(){return new Pp}(Hs=globalThis).__zod_globalRegistry??(Hs.__zod_globalRegistry=Mp());const zt=globalThis.__zod_globalRegistry;function Op(e,t){return new e({type:"string",...z(t)})}function Rp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Fp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function Bp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function Np(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function qp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function zp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function Up(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Gp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Vp(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Zp(e,t){return new e({type:"number",checks:[],...z(t)})}function Yp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Hp(e,t){return new e({type:"boolean",...z(t)})}function Wp(e){return new e({type:"any"})}function Kp(e,t){return new Ku({check:"less_than",...z(t),value:e,inclusive:!0})}function Jp(e,t){return new Ju({check:"greater_than",...z(t),value:e,inclusive:!0})}function zi(e,t){return new Qu({check:"max_length",...z(t),maximum:e})}function xt(e,t){return new ju({check:"min_length",...z(t),minimum:e})}function Ws(e,t){return new ep({check:"length_equals",...z(t),length:e})}function Ks(e,t){return new tp({check:"string_format",format:"regex",...z(t),pattern:e})}function Xp(e){return new ip({check:"string_format",format:"lowercase",...z(e)})}function Qp(e){return new ap({check:"string_format",format:"uppercase",...z(e)})}function jp(e,t){return new rp({check:"string_format",format:"includes",...z(t),includes:e})}function eh(e,t){return new sp({check:"string_format",format:"starts_with",...z(t),prefix:e})}function th(e,t){return new np({check:"string_format",format:"ends_with",...z(t),suffix:e})}function Pt(e){return new op({check:"overwrite",tx:e})}function ih(e){return Pt(t=>t.normalize(e))}function ah(){return Pt(e=>e.trim())}function rh(){return Pt(e=>e.toLowerCase())}function sh(){return Pt(e=>e.toUpperCase())}function nh(){return Pt(e=>Du(e))}function oh(e,t,i){return new e({type:"array",element:t,...z(i)})}function Js(e,t,i){return new e({type:"custom",check:"custom",fn:t,...z(i)})}function Xs(e){const t=lh(i=>(i.addIssue=a=>{if(typeof a=="string")i.issues.push(qt(a,i.value,t._zod.def));else{const r=a;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=i.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),i.issues.push(qt(r))}},e(i.value,i)));return t}function lh(e,t){const i=new Xe({check:"custom",...z(t)});return i._zod.check=e,i}function dh(e,t,i,a={}){const r=z(a),s={...z(a),check:"string_format",type:"string",format:t,fn:typeof i=="function"?i:l=>i.test(l),...r};return i instanceof RegExp&&(s.pattern=i),new e(s)}function Qs(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??zt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ze(e,t,i={path:[],schemaPath:[]}){var a;const r=e._zod.def,s=t.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,o);const l=e._zod.toJSONSchema?.();if(l)o.schema=l;else{const h={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,h);else{const y=o.schema,g=t.processors[r.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);g(e,t,y,h)}const c=e._zod.parent;c&&(o.ref||(o.ref=c),ze(c,t,h),t.seen.get(c).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(o.schema,u),t.io==="input"&&Ue(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((a=o.schema).default??(a.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function js(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const o of e.seen.entries()){const l=e.metadataRegistry.get(o[0])?.id;if(l){const u=a.get(l);if(u&&u!==o[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(l,o[0])}}const r=o=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const c=e.external.registry.get(o[0])?.id,y=e.external.uri??(_=>_);if(c)return{ref:y(c)};const g=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=g,{defId:g,ref:`${y("__shared")}#/${l}/${g}`}}if(o[1]===i)return{ref:"#"};const p=`#/${l}/`,h=o[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:p+h}},s=o=>{if(o[1].schema.$ref)return;const l=o[1],{ref:u,defId:p}=r(o);l.def={...l.schema},p&&(l.defId=p);const h=l.schema;for(const c in h)delete h[c];h.$ref=u};if(e.cycles==="throw")for(const o of e.seen.entries()){const l=o[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
2
2
 
3
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const d=o[1];if(t===o[0]){s(o);continue}if(e.external){const u=e.external.registry.get(o[0])?.id;if(t!==o[0]&&u){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(d.cycle){s(o);continue}if(d.count>1&&e.reused==="ref"){s(o);continue}}}function ps(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=o=>{const d=e.seen.get(o);if(d.ref===null)return;const p=d.def??d.schema,u={...p},h=d.ref;if(d.ref=null,h){a(h);const y=e.seen.get(h),g=y.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(g)):Object.assign(p,g),Object.assign(p,u),o._zod.parent===h)for(const q in p)q==="$ref"||q==="allOf"||q in u||delete p[q];if(g.$ref&&y.def)for(const q in p)q==="$ref"||q==="allOf"||q in y.def&&JSON.stringify(p[q])===JSON.stringify(y.def[q])&&delete p[q]}const m=o._zod.parent;if(m&&m!==h){a(m);const y=e.seen.get(m);if(y?.schema.$ref&&(p.$ref=y.schema.$ref,y.def))for(const g in p)g==="$ref"||g==="allOf"||g in y.def&&JSON.stringify(p[g])===JSON.stringify(y.def[g])&&delete p[g]}e.override({zodSchema:o,jsonSchema:p,path:d.path??[]})};for(const o of[...e.seen.entries()].reverse())a(o[0]);const r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(o)}Object.assign(r,i.def??i.schema);const s=e.external?.defs??{};for(const o of e.seen.entries()){const d=o[1];d.def&&d.defId&&(s[d.defId]=d.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{const o=JSON.parse(JSON.stringify(r));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Bi(t,"input",e.processors),output:Bi(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function Ge(e,t){const i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Ge(a.element,i);if(a.type==="set")return Ge(a.valueType,i);if(a.type==="lazy")return Ge(a.getter(),i);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return Ge(a.innerType,i);if(a.type==="intersection")return Ge(a.left,i)||Ge(a.right,i);if(a.type==="record"||a.type==="map")return Ge(a.keyType,i)||Ge(a.valueType,i);if(a.type==="pipe")return Ge(a.in,i)||Ge(a.out,i);if(a.type==="object"){for(const r in a.shape)if(Ge(a.shape[r],i))return!0;return!1}if(a.type==="union"){for(const r of a.options)if(Ge(r,i))return!0;return!1}if(a.type==="tuple"){for(const r of a.items)if(Ge(r,i))return!0;return!!(a.rest&&Ge(a.rest,i))}return!1}const dd=(e,t={})=>i=>{const a=ls({...i,processors:t});return ze(e,a),ds(a,e),ps(a,e)},Bi=(e,t,i={})=>a=>{const{libraryOptions:r,target:s}=a??{},o=ls({...r??{},target:s,io:t,processors:i});return ze(e,o),ds(o,e),ps(o,e)},pd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ud=(e,t,i,a)=>{const r=i;r.type="string";const{minimum:s,maximum:o,format:d,patterns:p,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(r.minLength=s),typeof o=="number"&&(r.maxLength=o),d&&(r.format=pd[d]??d,r.format===""&&delete r.format,d==="time"&&delete r.format),u&&(r.contentEncoding=u),p&&p.size>0){const h=[...p];h.length===1?r.pattern=h[0].source:h.length>1&&(r.allOf=[...h.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},hd=(e,t,i,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},md=(e,t,i,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},cd=(e,t,i,a)=>{const r=i,s=e._zod.def,{minimum:o,maximum:d}=e._zod.bag;typeof o=="number"&&(r.minItems=o),typeof d=="number"&&(r.maxItems=d),r.type="array",r.items=ze(s.element,t,{...a,path:[...a.path,"items"]})},yd=(e,t,i,a)=>{const r=e._zod.def,s=r.inclusive===!1,o=r.options.map((d,p)=>ze(d,t,{...a,path:[...a.path,s?"oneOf":"anyOf",p]}));s?i.oneOf=o:i.anyOf=o},gd=(e,t,i,a)=>{const r=e._zod.def,s=ze(r.left,t,{...a,path:[...a.path,"allOf",0]}),o=ze(r.right,t,{...a,path:[...a.path,"allOf",1]}),d=u=>"allOf"in u&&Object.keys(u).length===1,p=[...d(s)?s.allOf:[s],...d(o)?o.allOf:[o]];i.allOf=p},bd=(e,t,i,a)=>{const r=e._zod.def,s=ze(r.innerType,t,a),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=r.innerType,i.nullable=!0):i.anyOf=[s,{type:"null"}]},fd=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType},vd=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType,i.default=JSON.parse(JSON.stringify(r.defaultValue))},Dd=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType,t.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},wd=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType;let o;try{o=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=o},$d=(e,t,i,a)=>{const r=e._zod.def,s=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;ze(s,t,a);const o=t.seen.get(e);o.ref=s},kd=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType,i.readOnly=!0},us=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType},Sd=b("ZodISODateTime",(e,t)=>{ul.init(e,t),Ni.init(e,t)});function _d(e){return ql(Sd,e)}const Td=b("ZodISODate",(e,t)=>{hl.init(e,t),Ni.init(e,t)});function Ad(e){return zl(Td,e)}const Cd=b("ZodISOTime",(e,t)=>{ml.init(e,t),Ni.init(e,t)});function Ld(e){return Gl(Cd,e)}const Ed=b("ZodISODuration",(e,t)=>{cl.init(e,t),Ni.init(e,t)});function xd(e){return Vl(Ed,e)}const tt=b("ZodError",(e,t)=>{Nr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>ko(e,i)},flatten:{value:i=>$o(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,ya,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,ya,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Pd=xi(tt),Od=Pi(tt),Md=Oi(tt),Id=Mi(tt),Rd=To(tt),Fd=Ao(tt),Bd=Co(tt),Nd=Lo(tt),qd=Eo(tt),zd=xo(tt),Gd=Po(tt),Vd=Oo(tt),Ve=b("ZodType",(e,t)=>($e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Bi(e,"input"),output:Bi(e,"output")}}),e.toJSONSchema=dd(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...i)=>e.clone(fo(t,{checks:[...t.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(i,a)=>Fr(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.parse=(i,a)=>Pd(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>Md(e,i,a),e.parseAsync=async(i,a)=>Od(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>Id(e,i,a),e.spa=e.safeParseAsync,e.encode=(i,a)=>Rd(e,i,a),e.decode=(i,a)=>Fd(e,i,a),e.encodeAsync=async(i,a)=>Bd(e,i,a),e.decodeAsync=async(i,a)=>Nd(e,i,a),e.safeEncode=(i,a)=>qd(e,i,a),e.safeDecode=(i,a)=>zd(e,i,a),e.safeEncodeAsync=async(i,a)=>Gd(e,i,a),e.safeDecodeAsync=async(i,a)=>Vd(e,i,a),e.refine=(i,a)=>e.check(yp(i,a)),e.superRefine=i=>e.check(gp(i)),e.overwrite=i=>e.check(Et(i)),e.optional=()=>hs(e),e.exactOptional=()=>tp(e),e.nullable=()=>ms(e),e.nullish=()=>hs(ms(e)),e.nonoptional=i=>lp(e,i),e.array=()=>Yd(e),e.or=i=>Wd([e,i]),e.and=i=>Jd(e,i),e.transform=i=>cs(e,Qd(i)),e.default=i=>rp(e,i),e.prefault=i=>np(e,i),e.catch=i=>pp(e,i),e.pipe=i=>cs(e,i),e.readonly=()=>mp(e),e.describe=i=>{const a=e.clone();return Ft.add(a,{description:i}),a},Object.defineProperty(e,"description",{get(){return Ft.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Ft.get(e);const a=e.clone();return Ft.add(a,i[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Ud=b("_ZodString",(e,t)=>{wa.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(a,r,s)=>ud(e,a,r);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...a)=>e.check(ss(...a)),e.includes=(...a)=>e.check(Ql(...a)),e.startsWith=(...a)=>e.check(jl(...a)),e.endsWith=(...a)=>e.check(ed(...a)),e.min=(...a)=>e.check(Lt(...a)),e.max=(...a)=>e.check(Fi(...a)),e.length=(...a)=>e.check(rs(...a)),e.nonempty=(...a)=>e.check(Lt(1,...a)),e.lowercase=a=>e.check(Jl(a)),e.uppercase=a=>e.check(Xl(a)),e.trim=()=>e.check(id()),e.normalize=(...a)=>e.check(td(...a)),e.toLowerCase=()=>e.check(ad()),e.toUpperCase=()=>e.check(rd()),e.slugify=()=>e.check(sd())}),Ni=b("ZodStringFormat",(e,t)=>{et.init(e,t),Ud.init(e,t)}),Zd=b("ZodArray",(e,t)=>{Wr.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>cd(e,i,a,r),e.element=t.element,e.min=(i,a)=>e.check(Lt(i,a)),e.nonempty=i=>e.check(Lt(1,i)),e.max=(i,a)=>e.check(Fi(i,a)),e.length=(i,a)=>e.check(rs(i,a)),e.unwrap=()=>e.element});function Yd(e,t){return nd(Zd,e,t)}const Hd=b("ZodUnion",(e,t)=>{wl.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>yd(e,i,a,r),e.options=t.options});function Wd(e,t){return new Hd({type:"union",options:e,...z(t)})}const Kd=b("ZodIntersection",(e,t)=>{$l.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>gd(e,i,a,r)});function Jd(e,t){return new Kd({type:"intersection",left:e,right:t})}const Xd=b("ZodTransform",(e,t)=>{kl.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>md(e,i),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new Pr(e.constructor.name);i.addIssue=s=>{if(typeof s=="string")i.issues.push(Rt(s,i.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=e),i.issues.push(Rt(o))}};const r=t.transform(i.value,i);return r instanceof Promise?r.then(s=>(i.value=s,i)):(i.value=r,i)}});function Qd(e){return new Xd({type:"transform",transform:e})}const jd=b("ZodOptional",(e,t)=>{ka.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>us(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function hs(e){return new jd({type:"optional",innerType:e})}const ep=b("ZodExactOptional",(e,t)=>{Sl.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>us(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function tp(e){return new ep({type:"optional",innerType:e})}const ip=b("ZodNullable",(e,t)=>{_l.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>bd(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function ms(e){return new ip({type:"nullable",innerType:e})}const ap=b("ZodDefault",(e,t)=>{Tl.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>vd(e,i,a,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function rp(e,t){return new ap({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Rr(t)}})}const sp=b("ZodPrefault",(e,t)=>{Al.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>Dd(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function np(e,t){return new sp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Rr(t)}})}const op=b("ZodNonOptional",(e,t)=>{Cl.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>fd(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function lp(e,t){return new op({type:"nonoptional",innerType:e,...z(t)})}const dp=b("ZodCatch",(e,t)=>{Ll.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>wd(e,i,a,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pp(e,t){return new dp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const up=b("ZodPipe",(e,t)=>{El.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>$d(e,i,a,r),e.in=t.in,e.out=t.out});function cs(e,t){return new up({type:"pipe",in:e,out:t})}const hp=b("ZodReadonly",(e,t)=>{xl.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>kd(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function mp(e){return new hp({type:"readonly",innerType:e})}const cp=b("ZodCustom",(e,t)=>{ts.init(e,t),Ve.init(e,t),e._zod.processJSONSchema=(i,a,r)=>hd(e,i)});function yp(e,t={}){return ns(cp,e,t)}function gp(e){return os(e)}const $t=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");$e.init(e,t),e.def=t,e.type=t.type,e.parse=(i,a)=>So(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>qr(e,i,a),e.parseAsync=async(i,a)=>_o(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>zr(e,i,a),e.check=(...i)=>e.clone({...t,checks:[...t.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]},{parent:!0}),e.with=e.check,e.clone=(i,a)=>Fr(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.apply=i=>i(e)}),ys=b("ZodMiniString",(e,t)=>{wa.init(e,t),$t.init(e,t)});function gs(e){return Ml(ys,e)}const xt=b("ZodMiniStringFormat",(e,t)=>{et.init(e,t),ys.init(e,t)}),bp=b("ZodMiniEmail",(e,t)=>{dl.init(e,t),xt.init(e,t)});function fp(e){return Il(bp,e)}const vp=b("ZodMiniUUID",(e,t)=>{ll.init(e,t),xt.init(e,t)});function Dp(e){return Rl(vp,e)}const wp=b("ZodMiniURL",(e,t)=>{pl.init(e,t),xt.init(e,t)});function $p(e){return Fl(wp,e)}const kp=b("ZodMiniIPv4",(e,t)=>{yl.init(e,t),xt.init(e,t)});function Sp(e){return Bl(kp,e)}const _p=b("ZodMiniIPv6",(e,t)=>{gl.init(e,t),xt.init(e,t)});function Tp(e){return Nl(_p,e)}const Ap=b("ZodMiniCustomStringFormat",(e,t)=>{bl.init(e,t),xt.init(e,t)});function Cp(e){return ld(Ap,"hostname",Bo,e)}const bs=b("ZodMiniNumber",(e,t)=>{Yr.init(e,t),$t.init(e,t)});function fs(e){return Ul(bs,e)}const Lp=b("ZodMiniNumberFormat",(e,t)=>{fl.init(e,t),bs.init(e,t)});function Ep(e){return Zl(Lp,e)}const xp=b("ZodMiniBoolean",(e,t)=>{vl.init(e,t),$t.init(e,t)});function vs(e){return Yl(xp,e)}const Pp=b("ZodMiniAny",(e,t)=>{Dl.init(e,t),$t.init(e,t)});function Sa(){return Hl(Pp)}const Op=b("ZodMiniArray",(e,t)=>{Wr.init(e,t),$t.init(e,t)});function Ds(e,t){return new Op({type:"array",element:e,...z(t)})}const Mp=b("ZodMiniOptional",(e,t)=>{ka.init(e,t),$t.init(e,t)});function Ip(e){return new Mp({type:"optional",innerType:e})}const Rp=b("ZodMiniCustom",(e,t)=>{ts.init(e,t),$t.init(e,t)});function xe(e,t={}){return ns(Rp,e,t)}function ws(e){return os(e)}const _a={email:{schema:fp()},hostname:{schema:Cp()},ipv4:{schema:Sp()},ipv6:{schema:Tp()},url:{schema:$p()},uuid:{schema:Dp()},date:{schema:Ad()},time:{schema:Ld()},"date-time":{schema:_d({local:!0,offset:!0})},duration:{schema:xd()}},$s=Object.keys(_a),Fp=e=>(t,i)=>{switch(t.type){case"string":return Bp(t,i);case"integer":case"number":return qp(t,i);case"boolean":return zp(t,i);case"array":return Gp(t,i);case"custom":{if(!e)throw new Error('Validator type "custom" requires a customValidators object, but it was not supplied.');return Vp(t,e)}default:{const a=t;throw new Error(`Unknown validator config: ${JSON.stringify(a)}. The "type" property must be one of: "string", "number", "integer", "boolean", "array", "custom".`)}}};function ue(e,t){if(e!==void 0)return typeof e=="string"?e:t?.translate(e.key,e.params,e.default)??e.default}function Bp(e,t){return Bt(e,i=>{const a=ue(i.messages?.invalid,t);let r=a?gs(a):gs();if(i.required===!0){const s=ue(i.messages?.required,t)??"This field is required";r=r.check(xe(o=>o.length>0,{error:s}))}if(typeof i.minLength=="number"){const s=ue(i.messages?.minLength,t),o=i.minLength;r=r.check(s?xe(d=>d.length>=o,{error:s}):Lt(o))}if(typeof i.maxLength=="number"){const s=ue(i.messages?.maxLength,t),o=i.maxLength;r=r.check(s?xe(d=>d.length<=o,{error:s}):Fi(o))}if(typeof i.pattern=="string"){const s=ue(i.messages?.pattern,t),o=new RegExp(i.pattern);r=r.check(s?xe(d=>o.test(d),{error:s}):ss(o))}if(i.enum){const s=i.enum,o=ue(i.messages?.enum,t);r=r.check(xe(d=>s.includes(d),o?{error:o}:void 0))}if(i.const!==void 0){const s=ue(i.messages?.const,t);r=r.check(xe(o=>o===i.const,s?{error:s}:void 0))}if(i.format!==void 0)if($s.includes(i.format)){const s=ue(i.messages?.format,t);r=r.check(s?ws((o,d)=>{const p=dt.standardValidate(_a[i.format].schema,o);dt.isStandardValidateSuccess(p)||d.addIssue({code:"custom",path:[],message:s})}):_a[i.format].schema)}else throw new Error(`Unknown string validation format: ${JSON.stringify(i.format)}. The "format" property must be one of: ${$s.map(s=>`"${s}"`).join(", ")}.`);return r})}const Np=(e,t)=>{if(t===0)return!1;const i=e/t;return Math.abs(i-Math.round(i))<1e-10};function qp(e,t){return Bt(e,i=>{const a=ue(i.messages?.invalid,t);let r=a?fs(a):fs();if(i.type==="integer"&&(r=r.check(Ep())),i.minimum!==void 0){const s=ue(i.messages?.minimum,t),o=i.minimum;r=r.check(s?xe(d=>d>=o,{error:s}):Kl(o))}if(i.maximum!==void 0){const s=ue(i.messages?.maximum,t),o=i.maximum;r=r.check(s?xe(d=>d<=o,{error:s}):Wl(o))}if(i.exclusiveMinimum!==void 0){const s=ue(i.messages?.exclusiveMinimum,t),o=i.exclusiveMinimum;r=r.check(xe(d=>d>o,s?{error:s}:void 0))}if(i.exclusiveMaximum!==void 0){const s=ue(i.messages?.exclusiveMaximum,t),o=i.exclusiveMaximum;r=r.check(xe(d=>d<o,s?{error:s}:void 0))}if(i.multipleOf!==void 0){const s=ue(i.messages?.multipleOf,t),o=i.multipleOf;r=r.check(xe(d=>Np(d,o),s?{error:s}:void 0))}if(i.enum){const s=i.enum,o=ue(i.messages?.enum,t);r=r.check(xe(d=>s.includes(d),o?{error:o}:void 0))}if(i.const!==void 0){const s=ue(i.messages?.const,t);r=r.check(xe(o=>o===i.const,s?{error:s}:void 0))}return r})}function zp(e,t){return Bt(e,i=>{const a=ue(i.messages?.invalid,t);let r=a?vs(a):vs();if(i.const!==void 0){const s=ue(i.messages?.const,t);r=r.check(xe(o=>o===i.const,s?{error:s}:void 0))}return r})}function Gp(e,t){return Bt(e,i=>{const a=ue(i.messages?.invalid,t);let r=a?Ds(Sa(),a):Ds(Sa());if(i.required===!0){const s=ue(i.messages?.required,t)??"This field is required";r=r.check(xe(o=>o.length>0,{error:s}))}if(typeof i.minItems=="number"){const s=ue(i.messages?.minItems,t),o=i.minItems;r=r.check(s?xe(d=>d.length>=o,{error:s}):Lt(o))}if(typeof i.maxItems=="number"){const s=ue(i.messages?.maxItems,t),o=i.maxItems;r=r.check(s?xe(d=>d.length<=o,{error:s}):Fi(o))}return r})}function Vp(e,t){return Bt(e,i=>{let a=Sa();return dt.filterTap(Object.keys(i),r=>r!=="type"&&r!=="required",r=>{const s=i[r],o=t[r];if(!o){const p=Object.keys(t).map(u=>`"${u}"`).join(", ");throw new Error(`Unknown custom validator rule "${r}". Registered rules: ${p||"(none)"}.`)}const d=o(s);a=a.check(ws((p,u)=>{const h=dt.standardValidate(d,p);if(!dt.isStandardValidateSuccess(h)){const m=h.issues[0];u.addIssue({code:"custom",path:[],message:m?.message||`Validation failed for ${r}`})}}))}),a})}function Bt(e,t){const i=t(e);return e.required?i:Ip(i)}const Up=e=>e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"label")&&Object.prototype.hasOwnProperty.call(e,"value");function Zp(e,t){if(e!=null&&typeof e=="object"&&"__rid"in e)return e.__rid;const i=t();return Object.defineProperty(e,"__rid",{value:i,enumerable:!1,configurable:!1}),i}const ks={button:async()=>(await Promise.resolve().then(()=>Qp)).ButtonElement,calendar:async()=>(await Promise.resolve().then(()=>wu)).CalendarElement,dateTimeCalendar:async()=>(await Promise.resolve().then(()=>Hu)).DateTimeCalendarElement,rangeCalendar:async()=>(await Promise.resolve().then(()=>eh)).RangeCalendarElement,rangeDateInput:async()=>(await Promise.resolve().then(()=>nh)).RangeDateInputElement,rangeTimeInput:async()=>(await Promise.resolve().then(()=>uh)).RangeTimeInputElement,rangeDateTimeInput:async()=>(await Promise.resolve().then(()=>gh)).RangeDateTimeInputElement,rangeDateTimeCalendar:async()=>(await Promise.resolve().then(()=>wh)).RangeDateTimeCalendarElement,rangeDateTimePicker:async()=>(await Promise.resolve().then(()=>Th)).RangeDateTimePickerElement,rangeDatePicker:async()=>(await Promise.resolve().then(()=>xh)).RangeDatePickerElement,rangeTimePicker:async()=>(await Promise.resolve().then(()=>Rh)).RangeTimePickerElement,currency:async()=>(await Promise.resolve().then(()=>zh)).CurrencyElement,dateInput:async()=>(await Promise.resolve().then(()=>Yh)).DateElement,datePicker:async()=>(await Promise.resolve().then(()=>Xh)).DatePickerElement,dateTimePicker:async()=>(await Promise.resolve().then(()=>rm)).DateTimePickerElement,dropdown:async()=>(await Promise.resolve().then(()=>fm)).DropdownElement,list:async()=>(await Promise.resolve().then(()=>wm)).ListElement,markdown:async()=>(await Promise.resolve().then(()=>Cm)).MarkdownElement,password:async()=>(await Promise.resolve().then(()=>Om)).PasswordElement,textinput:async()=>(await Promise.resolve().then(()=>Bm)).TextinputElement,timeInput:async()=>(await Promise.resolve().then(()=>zm)).TimeElement,timePicker:async()=>(await Promise.resolve().then(()=>Um)).TimePickerElement,dateTimeInput:async()=>(await Promise.resolve().then(()=>Hm)).DateTimeElement,textarea:async()=>(await Promise.resolve().then(()=>Qm)).TextareaElement,toggle:async()=>(await Promise.resolve().then(()=>ac)).ToggleElement,checkbox:async()=>(await Promise.resolve().then(()=>lc)).CheckboxElement,number:async()=>(await Promise.resolve().then(()=>mc)).NumberElement,radiogroup:async()=>(await Promise.resolve().then(()=>wc)).RadiogroupElement,select:async()=>(await Promise.resolve().then(()=>Tc)).SelectElement,tags:async()=>(await Promise.resolve().then(()=>Pc)).TagsElement,repeater:async()=>(await Promise.resolve().then(()=>Fc)).RepeaterElement,flex:async()=>(await Promise.resolve().then(()=>qc)).FlexElement,grid:async()=>(await Promise.resolve().then(()=>Vc)).GridElement,tabs:async()=>(await Promise.resolve().then(()=>Yc)).TabsElement,accordion:async()=>(await Promise.resolve().then(()=>Kc)).AccordionElement,alert:async()=>(await Promise.resolve().then(()=>Qc)).AlertElement,markdownText:async()=>(await Promise.resolve().then(()=>ty)).MarkdownTextElement,renderer:async()=>(await Promise.resolve().then(()=>ry)).RendererElement};var Yp=Object.defineProperty,Hp=Object.getOwnPropertyDescriptor,Nt=(e,t,i,a)=>{for(var r=a>1?void 0:a?Hp(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Yp(t,i,r),r};te.FormElement=class extends l.LitElement{constructor(){super(...arguments),this.autocomplete=void 0}setData(t){this.coreForm?.setData(t)}setMeta(t){this.coreForm?.setMeta(t)}createRenderRoot(){return this}render(){const t=this.config,i=go(t.formDef,t.formSelectors,t.formConfig),a={formDef:i.formDef,widgetLoaders:{...ks,...i.widgetLoaders,...t.customWidgetLoaders??{}},dependencies:{...i.dependencies??{},...t.dependencies??{}},functions:{...i.functions??{},...t.functions??{}},validateOn:t.validateOn??i.validateOn??"eager",itemRenderers:{...i.itemRenderers??{},...t.itemRenderers??{}},localization:t.localization,middlewares:t.middlewares??[],data:t.data,meta:t.meta,formName:t.formName},r=Fp({...t.customValidators??{}}),s=i.formEvent,o=s?d=>s(d.detail):void 0;return l.html`
3
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const l=o[1];if(t===o[0]){s(o);continue}if(e.external){const p=e.external.registry.get(o[0])?.id;if(t!==o[0]&&p){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(l.cycle){s(o);continue}if(l.count>1&&e.reused==="ref"){s(o);continue}}}function en(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=o=>{const l=e.seen.get(o);if(l.ref===null)return;const u=l.def??l.schema,p={...u},h=l.ref;if(l.ref=null,h){a(h);const y=e.seen.get(h),g=y.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(g)):Object.assign(u,g),Object.assign(u,p),o._zod.parent===h)for(const L in u)L==="$ref"||L==="allOf"||L in p||delete u[L];if(g.$ref&&y.def)for(const L in u)L==="$ref"||L==="allOf"||L in y.def&&JSON.stringify(u[L])===JSON.stringify(y.def[L])&&delete u[L]}const c=o._zod.parent;if(c&&c!==h){a(c);const y=e.seen.get(c);if(y?.schema.$ref&&(u.$ref=y.schema.$ref,y.def))for(const g in u)g==="$ref"||g==="allOf"||g in y.def&&JSON.stringify(u[g])===JSON.stringify(y.def[g])&&delete u[g]}e.override({zodSchema:o,jsonSchema:u,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())a(o[0]);const r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(o)}Object.assign(r,i.def??i.schema);const s=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{const o=JSON.parse(JSON.stringify(r));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ui(t,"input",e.processors),output:Ui(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function Ue(e,t){const i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Ue(a.element,i);if(a.type==="set")return Ue(a.valueType,i);if(a.type==="lazy")return Ue(a.getter(),i);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return Ue(a.innerType,i);if(a.type==="intersection")return Ue(a.left,i)||Ue(a.right,i);if(a.type==="record"||a.type==="map")return Ue(a.keyType,i)||Ue(a.valueType,i);if(a.type==="pipe")return Ue(a.in,i)||Ue(a.out,i);if(a.type==="object"){for(const r in a.shape)if(Ue(a.shape[r],i))return!0;return!1}if(a.type==="union"){for(const r of a.options)if(Ue(r,i))return!0;return!1}if(a.type==="tuple"){for(const r of a.items)if(Ue(r,i))return!0;return!!(a.rest&&Ue(a.rest,i))}return!1}const uh=(e,t={})=>i=>{const a=Qs({...i,processors:t});return ze(e,a),js(a,e),en(a,e)},Ui=(e,t,i={})=>a=>{const{libraryOptions:r,target:s}=a??{},o=Qs({...r??{},target:s,io:t,processors:i});return ze(e,o),js(o,e),en(o,e)},ph={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hh=(e,t,i,a)=>{const r=i;r.type="string";const{minimum:s,maximum:o,format:l,patterns:u,contentEncoding:p}=e._zod.bag;if(typeof s=="number"&&(r.minLength=s),typeof o=="number"&&(r.maxLength=o),l&&(r.format=ph[l]??l,r.format===""&&delete r.format,l==="time"&&delete r.format),p&&(r.contentEncoding=p),u&&u.size>0){const h=[...u];h.length===1?r.pattern=h[0].source:h.length>1&&(r.allOf=[...h.map(c=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:c.source}))])}},ch=(e,t,i,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},mh=(e,t,i,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yh=(e,t,i,a)=>{const r=i,s=e._zod.def,{minimum:o,maximum:l}=e._zod.bag;typeof o=="number"&&(r.minItems=o),typeof l=="number"&&(r.maxItems=l),r.type="array",r.items=ze(s.element,t,{...a,path:[...a.path,"items"]})},gh=(e,t,i,a)=>{const r=e._zod.def,s=r.inclusive===!1,o=r.options.map((l,u)=>ze(l,t,{...a,path:[...a.path,s?"oneOf":"anyOf",u]}));s?i.oneOf=o:i.anyOf=o},bh=(e,t,i,a)=>{const r=e._zod.def,s=ze(r.left,t,{...a,path:[...a.path,"allOf",0]}),o=ze(r.right,t,{...a,path:[...a.path,"allOf",1]}),l=p=>"allOf"in p&&Object.keys(p).length===1,u=[...l(s)?s.allOf:[s],...l(o)?o.allOf:[o]];i.allOf=u},fh=(e,t,i,a)=>{const r=e._zod.def,s=ze(r.innerType,t,a),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=r.innerType,i.nullable=!0):i.anyOf=[s,{type:"null"}]},vh=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType},Dh=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType,i.default=JSON.parse(JSON.stringify(r.defaultValue))},wh=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType,t.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},$h=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType;let o;try{o=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=o},kh=(e,t,i,a)=>{const r=e._zod.def,s=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;ze(s,t,a);const o=t.seen.get(e);o.ref=s},Th=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType,i.readOnly=!0},tn=(e,t,i,a)=>{const r=e._zod.def;ze(r.innerType,t,a);const s=t.seen.get(e);s.ref=r.innerType},Sh=b("ZodISODateTime",(e,t)=>{hp.init(e,t),Gi.init(e,t)});function _h(e){return zp(Sh,e)}const Ah=b("ZodISODate",(e,t)=>{cp.init(e,t),Gi.init(e,t)});function Eh(e){return Up(Ah,e)}const Ch=b("ZodISOTime",(e,t)=>{mp.init(e,t),Gi.init(e,t)});function Lh(e){return Gp(Ch,e)}const Ih=b("ZodISODuration",(e,t)=>{yp.init(e,t),Gi.init(e,t)});function xh(e){return Vp(Ih,e)}const it=b("ZodError",(e,t)=>{Cs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>Tu(e,i)},flatten:{value:i=>ku(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,sr,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,sr,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ph=Oi(it),Mh=Ri(it),Oh=Fi(it),Rh=Bi(it),Fh=Au(it),Bh=Eu(it),Nh=Cu(it),qh=Lu(it),zh=Iu(it),Uh=xu(it),Gh=Pu(it),Vh=Mu(it),Ge=b("ZodType",(e,t)=>($e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ui(e,"input"),output:Ui(e,"output")}}),e.toJSONSchema=uh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...i)=>e.clone(vu(t,{checks:[...t.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(i,a)=>As(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.parse=(i,a)=>Ph(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>Oh(e,i,a),e.parseAsync=async(i,a)=>Mh(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>Rh(e,i,a),e.spa=e.safeParseAsync,e.encode=(i,a)=>Fh(e,i,a),e.decode=(i,a)=>Bh(e,i,a),e.encodeAsync=async(i,a)=>Nh(e,i,a),e.decodeAsync=async(i,a)=>qh(e,i,a),e.safeEncode=(i,a)=>zh(e,i,a),e.safeDecode=(i,a)=>Uh(e,i,a),e.safeEncodeAsync=async(i,a)=>Gh(e,i,a),e.safeDecodeAsync=async(i,a)=>Vh(e,i,a),e.refine=(i,a)=>e.check(gc(i,a)),e.superRefine=i=>e.check(bc(i)),e.overwrite=i=>e.check(Pt(i)),e.optional=()=>an(e),e.exactOptional=()=>ic(e),e.nullable=()=>rn(e),e.nullish=()=>an(rn(e)),e.nonoptional=i=>dc(e,i),e.array=()=>Hh(e),e.or=i=>Kh([e,i]),e.and=i=>Xh(e,i),e.transform=i=>sn(e,jh(i)),e.default=i=>sc(e,i),e.prefault=i=>oc(e,i),e.catch=i=>pc(e,i),e.pipe=i=>sn(e,i),e.readonly=()=>mc(e),e.describe=i=>{const a=e.clone();return zt.add(a,{description:i}),a},Object.defineProperty(e,"description",{get(){return zt.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return zt.get(e);const a=e.clone();return zt.add(a,i[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Zh=b("_ZodString",(e,t)=>{pr.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(a,r,s)=>hh(e,a,r);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...a)=>e.check(Ks(...a)),e.includes=(...a)=>e.check(jp(...a)),e.startsWith=(...a)=>e.check(eh(...a)),e.endsWith=(...a)=>e.check(th(...a)),e.min=(...a)=>e.check(xt(...a)),e.max=(...a)=>e.check(zi(...a)),e.length=(...a)=>e.check(Ws(...a)),e.nonempty=(...a)=>e.check(xt(1,...a)),e.lowercase=a=>e.check(Xp(a)),e.uppercase=a=>e.check(Qp(a)),e.trim=()=>e.check(ah()),e.normalize=(...a)=>e.check(ih(...a)),e.toLowerCase=()=>e.check(rh()),e.toUpperCase=()=>e.check(sh()),e.slugify=()=>e.check(nh())}),Gi=b("ZodStringFormat",(e,t)=>{tt.init(e,t),Zh.init(e,t)}),Yh=b("ZodArray",(e,t)=>{Bs.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>yh(e,i,a,r),e.element=t.element,e.min=(i,a)=>e.check(xt(i,a)),e.nonempty=i=>e.check(xt(1,i)),e.max=(i,a)=>e.check(zi(i,a)),e.length=(i,a)=>e.check(Ws(i,a)),e.unwrap=()=>e.element});function Hh(e,t){return oh(Yh,e,t)}const Wh=b("ZodUnion",(e,t)=>{$p.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>gh(e,i,a,r),e.options=t.options});function Kh(e,t){return new Wh({type:"union",options:e,...z(t)})}const Jh=b("ZodIntersection",(e,t)=>{kp.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>bh(e,i,a,r)});function Xh(e,t){return new Jh({type:"intersection",left:e,right:t})}const Qh=b("ZodTransform",(e,t)=>{Tp.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>mh(e,i),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new $s(e.constructor.name);i.addIssue=s=>{if(typeof s=="string")i.issues.push(qt(s,i.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=e),i.issues.push(qt(o))}};const r=t.transform(i.value,i);return r instanceof Promise?r.then(s=>(i.value=s,i)):(i.value=r,i)}});function jh(e){return new Qh({type:"transform",transform:e})}const ec=b("ZodOptional",(e,t)=>{cr.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>tn(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function an(e){return new ec({type:"optional",innerType:e})}const tc=b("ZodExactOptional",(e,t)=>{Sp.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>tn(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function ic(e){return new tc({type:"optional",innerType:e})}const ac=b("ZodNullable",(e,t)=>{_p.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>fh(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function rn(e){return new ac({type:"nullable",innerType:e})}const rc=b("ZodDefault",(e,t)=>{Ap.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>Dh(e,i,a,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sc(e,t){return new rc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_s(t)}})}const nc=b("ZodPrefault",(e,t)=>{Ep.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>wh(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function oc(e,t){return new nc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_s(t)}})}const lc=b("ZodNonOptional",(e,t)=>{Cp.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>vh(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function dc(e,t){return new lc({type:"nonoptional",innerType:e,...z(t)})}const uc=b("ZodCatch",(e,t)=>{Lp.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>$h(e,i,a,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pc(e,t){return new uc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const hc=b("ZodPipe",(e,t)=>{Ip.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>kh(e,i,a,r),e.in=t.in,e.out=t.out});function sn(e,t){return new hc({type:"pipe",in:e,out:t})}const cc=b("ZodReadonly",(e,t)=>{xp.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>Th(e,i,a,r),e.unwrap=()=>e._zod.def.innerType});function mc(e){return new cc({type:"readonly",innerType:e})}const yc=b("ZodCustom",(e,t)=>{Zs.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,a,r)=>ch(e,i)});function gc(e,t={}){return Js(yc,e,t)}function bc(e){return Xs(e)}const Tt=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");$e.init(e,t),e.def=t,e.type=t.type,e.parse=(i,a)=>Su(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>Ls(e,i,a),e.parseAsync=async(i,a)=>_u(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>Is(e,i,a),e.check=(...i)=>e.clone({...t,checks:[...t.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]},{parent:!0}),e.with=e.check,e.clone=(i,a)=>As(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.apply=i=>i(e)}),nn=b("ZodMiniString",(e,t)=>{pr.init(e,t),Tt.init(e,t)});function on(e){return Op(nn,e)}const Mt=b("ZodMiniStringFormat",(e,t)=>{tt.init(e,t),nn.init(e,t)}),fc=b("ZodMiniEmail",(e,t)=>{up.init(e,t),Mt.init(e,t)});function vc(e){return Rp(fc,e)}const Dc=b("ZodMiniUUID",(e,t)=>{dp.init(e,t),Mt.init(e,t)});function wc(e){return Fp(Dc,e)}const $c=b("ZodMiniURL",(e,t)=>{pp.init(e,t),Mt.init(e,t)});function kc(e){return Bp($c,e)}const Tc=b("ZodMiniIPv4",(e,t)=>{gp.init(e,t),Mt.init(e,t)});function Sc(e){return Np(Tc,e)}const _c=b("ZodMiniIPv6",(e,t)=>{bp.init(e,t),Mt.init(e,t)});function Ac(e){return qp(_c,e)}const Ec=b("ZodMiniCustomStringFormat",(e,t)=>{fp.init(e,t),Mt.init(e,t)});function Cc(e){return dh(Ec,"hostname",Nu,e)}const ln=b("ZodMiniNumber",(e,t)=>{Rs.init(e,t),Tt.init(e,t)});function dn(e){return Zp(ln,e)}const Lc=b("ZodMiniNumberFormat",(e,t)=>{vp.init(e,t),ln.init(e,t)});function Ic(e){return Yp(Lc,e)}const xc=b("ZodMiniBoolean",(e,t)=>{Dp.init(e,t),Tt.init(e,t)});function un(e){return Hp(xc,e)}const Pc=b("ZodMiniAny",(e,t)=>{wp.init(e,t),Tt.init(e,t)});function mr(){return Wp(Pc)}const Mc=b("ZodMiniArray",(e,t)=>{Bs.init(e,t),Tt.init(e,t)});function pn(e,t){return new Mc({type:"array",element:e,...z(t)})}const Oc=b("ZodMiniOptional",(e,t)=>{cr.init(e,t),Tt.init(e,t)});function Rc(e){return new Oc({type:"optional",innerType:e})}const Fc=b("ZodMiniCustom",(e,t)=>{Zs.init(e,t),Tt.init(e,t)});function xe(e,t={}){return Js(Fc,e,t)}function hn(e){return Xs(e)}const yr={email:{schema:vc()},hostname:{schema:Cc()},ipv4:{schema:Sc()},ipv6:{schema:Ac()},url:{schema:kc()},uuid:{schema:wc()},date:{schema:Eh()},time:{schema:Lh()},"date-time":{schema:_h({local:!0,offset:!0})},duration:{schema:xh()}},cn=Object.keys(yr),Bc=e=>(t,i)=>{switch(t.type){case"string":return Nc(t,i);case"integer":case"number":return zc(t,i);case"boolean":return Uc(t,i);case"array":return Gc(t,i);case"custom":{if(!e)throw new Error('Validator type "custom" requires a customValidators object, but it was not supplied.');return Vc(t,e)}default:{const a=t;throw new Error(`Unknown validator config: ${JSON.stringify(a)}. The "type" property must be one of: "string", "number", "integer", "boolean", "array", "custom".`)}}};function pe(e,t){if(e!==void 0)return typeof e=="string"?e:t?.translate(e.key,e.params,e.default)??e.default}function Nc(e,t){return Ut(e,i=>{const a=pe(i.messages?.invalid,t);let r=a?on(a):on();if(i.required===!0){const s=pe(i.messages?.required,t)??"This field is required";r=r.check(xe(o=>o.length>0,{error:s}))}if(typeof i.minLength=="number"){const s=pe(i.messages?.minLength,t),o=i.minLength;r=r.check(s?xe(l=>l.length>=o,{error:s}):xt(o))}if(typeof i.maxLength=="number"){const s=pe(i.messages?.maxLength,t),o=i.maxLength;r=r.check(s?xe(l=>l.length<=o,{error:s}):zi(o))}if(typeof i.pattern=="string"){const s=pe(i.messages?.pattern,t),o=new RegExp(i.pattern);r=r.check(s?xe(l=>o.test(l),{error:s}):Ks(o))}if(i.enum){const s=i.enum,o=pe(i.messages?.enum,t);r=r.check(xe(l=>s.includes(l),o?{error:o}:void 0))}if(i.const!==void 0){const s=pe(i.messages?.const,t);r=r.check(xe(o=>o===i.const,s?{error:s}:void 0))}if(i.format!==void 0)if(cn.includes(i.format)){const s=pe(i.messages?.format,t);r=r.check(s?hn((o,l)=>{const u=ut.standardValidate(yr[i.format].schema,o);ut.isStandardValidateSuccess(u)||l.addIssue({code:"custom",path:[],message:s})}):yr[i.format].schema)}else throw new Error(`Unknown string validation format: ${JSON.stringify(i.format)}. The "format" property must be one of: ${cn.map(s=>`"${s}"`).join(", ")}.`);return r})}const qc=(e,t)=>{if(t===0)return!1;const i=e/t;return Math.abs(i-Math.round(i))<1e-10};function zc(e,t){return Ut(e,i=>{const a=pe(i.messages?.invalid,t);let r=a?dn(a):dn();if(i.type==="integer"&&(r=r.check(Ic())),i.minimum!==void 0){const s=pe(i.messages?.minimum,t),o=i.minimum;r=r.check(s?xe(l=>l>=o,{error:s}):Jp(o))}if(i.maximum!==void 0){const s=pe(i.messages?.maximum,t),o=i.maximum;r=r.check(s?xe(l=>l<=o,{error:s}):Kp(o))}if(i.exclusiveMinimum!==void 0){const s=pe(i.messages?.exclusiveMinimum,t),o=i.exclusiveMinimum;r=r.check(xe(l=>l>o,s?{error:s}:void 0))}if(i.exclusiveMaximum!==void 0){const s=pe(i.messages?.exclusiveMaximum,t),o=i.exclusiveMaximum;r=r.check(xe(l=>l<o,s?{error:s}:void 0))}if(i.multipleOf!==void 0){const s=pe(i.messages?.multipleOf,t),o=i.multipleOf;r=r.check(xe(l=>qc(l,o),s?{error:s}:void 0))}if(i.enum){const s=i.enum,o=pe(i.messages?.enum,t);r=r.check(xe(l=>s.includes(l),o?{error:o}:void 0))}if(i.const!==void 0){const s=pe(i.messages?.const,t);r=r.check(xe(o=>o===i.const,s?{error:s}:void 0))}return r})}function Uc(e,t){return Ut(e,i=>{const a=pe(i.messages?.invalid,t);let r=a?un(a):un();if(i.const!==void 0){const s=pe(i.messages?.const,t);r=r.check(xe(o=>o===i.const,s?{error:s}:void 0))}return r})}function Gc(e,t){return Ut(e,i=>{const a=pe(i.messages?.invalid,t);let r=a?pn(mr(),a):pn(mr());if(i.required===!0){const s=pe(i.messages?.required,t)??"This field is required";r=r.check(xe(o=>o.length>0,{error:s}))}if(typeof i.minItems=="number"){const s=pe(i.messages?.minItems,t),o=i.minItems;r=r.check(s?xe(l=>l.length>=o,{error:s}):xt(o))}if(typeof i.maxItems=="number"){const s=pe(i.messages?.maxItems,t),o=i.maxItems;r=r.check(s?xe(l=>l.length<=o,{error:s}):zi(o))}return r})}function Vc(e,t){return Ut(e,i=>{let a=mr();return ut.filterTap(Object.keys(i),r=>r!=="type"&&r!=="required",r=>{const s=i[r],o=t[r];if(!o){const u=Object.keys(t).map(p=>`"${p}"`).join(", ");throw new Error(`Unknown custom validator rule "${r}". Registered rules: ${u||"(none)"}.`)}const l=o(s);a=a.check(hn((u,p)=>{const h=ut.standardValidate(l,u);if(!ut.isStandardValidateSuccess(h)){const c=h.issues[0];p.addIssue({code:"custom",path:[],message:c?.message||`Validation failed for ${r}`})}}))}),a})}function Ut(e,t){const i=t(e);return e.required?i:Rc(i)}const Zc=e=>e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"label")&&Object.prototype.hasOwnProperty.call(e,"value");function Yc(e,t){if(e!=null&&typeof e=="object"&&"__rid"in e)return e.__rid;const i=t();return Object.defineProperty(e,"__rid",{value:i,enumerable:!1,configurable:!1}),i}const mn={button:async()=>(await Promise.resolve().then(()=>jc)).ButtonElement,calendar:async()=>(await Promise.resolve().then(()=>$m)).CalendarElement,dateTimeCalendar:async()=>(await Promise.resolve().then(()=>Wm)).DateTimeCalendarElement,rangeCalendar:async()=>(await Promise.resolve().then(()=>ty)).RangeCalendarElement,rangeDateInput:async()=>(await Promise.resolve().then(()=>oy)).RangeDateInputElement,rangeTimeInput:async()=>(await Promise.resolve().then(()=>hy)).RangeTimeInputElement,rangeDateTimeInput:async()=>(await Promise.resolve().then(()=>by)).RangeDateTimeInputElement,rangeDateTimeCalendar:async()=>(await Promise.resolve().then(()=>$y)).RangeDateTimeCalendarElement,rangeDateTimePicker:async()=>(await Promise.resolve().then(()=>Ay)).RangeDateTimePickerElement,rangeDatePicker:async()=>(await Promise.resolve().then(()=>xy)).RangeDatePickerElement,rangeTimePicker:async()=>(await Promise.resolve().then(()=>Fy)).RangeTimePickerElement,currency:async()=>(await Promise.resolve().then(()=>Uy)).CurrencyElement,dateInput:async()=>(await Promise.resolve().then(()=>Hy)).DateElement,datePicker:async()=>(await Promise.resolve().then(()=>Qy)).DatePickerElement,dateTimePicker:async()=>(await Promise.resolve().then(()=>sg)).DateTimePickerElement,dropdown:async()=>(await Promise.resolve().then(()=>vg)).DropdownElement,list:async()=>(await Promise.resolve().then(()=>$g)).ListElement,markdown:async()=>(await Promise.resolve().then(()=>Cg)).MarkdownElement,password:async()=>(await Promise.resolve().then(()=>Mg)).PasswordElement,textinput:async()=>(await Promise.resolve().then(()=>Ng)).TextinputElement,timeInput:async()=>(await Promise.resolve().then(()=>Ug)).TimeElement,timePicker:async()=>(await Promise.resolve().then(()=>Zg)).TimePickerElement,dateTimeInput:async()=>(await Promise.resolve().then(()=>Wg)).DateTimeElement,textarea:async()=>(await Promise.resolve().then(()=>jg)).TextareaElement,toggle:async()=>(await Promise.resolve().then(()=>rb)).ToggleElement,checkbox:async()=>(await Promise.resolve().then(()=>db)).CheckboxElement,number:async()=>(await Promise.resolve().then(()=>mb)).NumberElement,radiogroup:async()=>(await Promise.resolve().then(()=>$b)).RadiogroupElement,select:async()=>(await Promise.resolve().then(()=>Ab)).SelectElement,tags:async()=>(await Promise.resolve().then(()=>Pb)).TagsElement,repeater:async()=>(await Promise.resolve().then(()=>Bb)).RepeaterElement,flex:async()=>(await Promise.resolve().then(()=>zb)).FlexElement,grid:async()=>(await Promise.resolve().then(()=>Vb)).GridElement,tabs:async()=>(await Promise.resolve().then(()=>Hb)).TabsElement,accordion:async()=>(await Promise.resolve().then(()=>Jb)).AccordionElement,alert:async()=>(await Promise.resolve().then(()=>jb)).AlertElement,markdownText:async()=>(await Promise.resolve().then(()=>af)).MarkdownTextElement,renderer:async()=>(await Promise.resolve().then(()=>nf)).RendererElement};var Hc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,Gt=(e,t,i,a)=>{for(var r=a>1?void 0:a?Wc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Hc(t,i,r),r};te.FormElement=class extends d.LitElement{constructor(){super(...arguments),this.autocomplete=void 0}setData(t){this.coreForm?.setData(t)}setMeta(t){this.coreForm?.setMeta(t)}createRenderRoot(){return this}render(){const t=this.config,i=bu(t.formDef,t.formSelectors,t.formConfig),a={formDef:i.formDef,widgetLoaders:{...mn,...i.widgetLoaders,...t.customWidgetLoaders??{}},dependencies:{...i.dependencies??{},...t.dependencies??{}},functions:{...i.functions??{},...t.functions??{}},validateOn:t.validateOn??i.validateOn??"eager",itemRenderers:{...i.itemRenderers??{},...t.itemRenderers??{}},localization:t.localization,middlewares:t.middlewares??[],data:t.data,meta:t.meta,formName:t.formName},r=Bc({...t.customValidators??{}}),s=i.formEvent,o=s?l=>s(l.detail):void 0;return d.html`
4
4
  <gui-core-form
5
5
  .config=${a}
6
6
  .validators=${r}
@@ -8,25 +8,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8
8
  .formHealthBoundary=${this.formHealthBoundary}
9
9
  @formEvent=${o}
10
10
  ></gui-core-form>
11
- `}},Nt([n.property({attribute:!1})],te.FormElement.prototype,"config",2),Nt([n.property({type:String})],te.FormElement.prototype,"autocomplete",2),Nt([n.property({attribute:!1})],te.FormElement.prototype,"formHealthBoundary",2),Nt([n.query("gui-core-form")],te.FormElement.prototype,"coreForm",2),te.FormElement=Nt([n.customElement("gui-form")],te.FormElement);var Wp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,ht=(e,t,i,a)=>{for(var r=a>1?void 0:a?Kp(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Wp(t,i,r),r};let nt=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.disabled=!1,this.icon=void 0,this.variant="filled",this.iconPosition="left",this.actionType="button",this.invalid=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){const e=this.icon,t=this.iconPosition||"left",i={"gui-button-with-icon":!!e,[`gui-button-icon-${t}`]:!0,"gui-button--outlined":this.variant==="outlined","gui-button--link":this.variant==="link","gui-button--invalid":this.invalid&&this.actionType==="submit"},a=e?l.html`<span
11
+ `}},Gt([n.property({attribute:!1})],te.FormElement.prototype,"config",2),Gt([n.property({type:String})],te.FormElement.prototype,"autocomplete",2),Gt([n.property({attribute:!1})],te.FormElement.prototype,"formHealthBoundary",2),Gt([n.query("gui-core-form")],te.FormElement.prototype,"coreForm",2),te.FormElement=Gt([n.customElement("gui-form")],te.FormElement);var Kc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,mt=(e,t,i,a)=>{for(var r=a>1?void 0:a?Jc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Kc(t,i,r),r};let ot=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.disabled=!1,this.icon=void 0,this.variant="filled",this.iconPosition="left",this.actionType="button",this.invalid=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){const e=this.icon,t=this.iconPosition||"left",i={"gui-button-with-icon":!!e,[`gui-button-icon-${t}`]:!0,"gui-button--outlined":this.variant==="outlined","gui-button--link":this.variant==="link","gui-button--invalid":this.invalid&&this.actionType==="submit"},a=e?d.html`<span
12
12
  class="gui-widget-icon gui-button-icon ${e}"
13
13
  data-icon=${e}
14
14
  aria-hidden="true"
15
- ></span>`:l.nothing;return l.html`
15
+ ></span>`:d.nothing;return d.html`
16
16
  <div class="gui-widget">
17
17
  <button
18
18
  type=${this.actionType??"button"}
19
19
  id=${this.uid}
20
- class=${_.classMap(i)}
20
+ class=${S.classMap(i)}
21
21
  data-cy=${`${this.uid}_button`}
22
22
  ?disabled=${this.disabled}
23
23
  >
24
- ${t==="left"?a:l.nothing}
25
- ${this.label?l.html`<span>${this.label}</span>`:l.nothing}
26
- ${t==="right"?a:l.nothing}
24
+ ${t==="left"?a:d.nothing}
25
+ ${this.label?d.html`<span>${this.label}</span>`:d.nothing}
26
+ ${t==="right"?a:d.nothing}
27
27
  </button>
28
28
  </div>
29
- `}};ht([n.property({type:String})],nt.prototype,"uid",2),ht([n.property({type:String})],nt.prototype,"label",2),ht([n.property({type:Boolean})],nt.prototype,"disabled",2),ht([n.property({type:String})],nt.prototype,"icon",2),ht([n.property({type:String})],nt.prototype,"variant",2),ht([n.property({type:String})],nt.prototype,"iconPosition",2),ht([n.property({type:String})],nt.prototype,"actionType",2),ht([n.property({type:Boolean})],nt.prototype,"invalid",2),nt=ht([n.customElement("gui-button")],nt),typeof customElements<"u"&&!customElements.get("gui-button")&&customElements.define("gui-button",nt);var Jp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,Ta=(e,t,i,a)=>{for(var r=a>1?void 0:a?Xp(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Jp(t,i,r),r};let qt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.ActionWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-button","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return l.html`
29
+ `}};mt([n.property({type:String})],ot.prototype,"uid",2),mt([n.property({type:String})],ot.prototype,"label",2),mt([n.property({type:Boolean})],ot.prototype,"disabled",2),mt([n.property({type:String})],ot.prototype,"icon",2),mt([n.property({type:String})],ot.prototype,"variant",2),mt([n.property({type:String})],ot.prototype,"iconPosition",2),mt([n.property({type:String})],ot.prototype,"actionType",2),mt([n.property({type:Boolean})],ot.prototype,"invalid",2),ot=mt([n.customElement("gui-button")],ot),typeof customElements<"u"&&!customElements.get("gui-button")&&customElements.define("gui-button",ot);var Xc=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,gr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Qc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Xc(t,i,r),r};let Vt=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.ActionWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-button","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return d.html`
30
30
  <gui-button
31
31
  .uid=${this.widget.uid}
32
32
  .actionType=${this.adapter.templateData.actionType??"button"}
@@ -38,61 +38,61 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
38
38
  .iconPosition=${this.adapter.templateData.iconPosition}
39
39
  @click=${()=>this.adapter.click()}
40
40
  ></gui-button>
41
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ta([f.consume({context:c.formContext}),n.property({attribute:!1})],qt.prototype,"formContext",2),Ta([f.provide({context:c.actionContext})],qt.prototype,"adapter",2),qt=Ta([n.customElement("gui-button-interactive")],qt);const Qp=Object.freeze(Object.defineProperty({__proto__:null,get ButtonElement(){return qt}},Symbol.toStringTag,{value:"Module"}));class he{constructor(t,i){t.addController(this),this.getTargets=i.getTargets,this.getState=i.getState}hostConnected(){}hostUpdated(){const t=this.getTargets();if(!t)return;let i=[];t instanceof NodeList?i=Array.from(t):Array.isArray(t)?i=t:i=[t];const{uid:a,templateData:r}=this.getState(),{touched:s,errors:o,readonly:d,disabled:p,hint:u,required:h}=r,m=s&&o&&o.length>0;dt.filterTap(i,y=>!!y,y=>{const g=(A,q)=>{q?y.setAttribute(A,q):y.removeAttribute(A)};g("aria-describedby",u?`${a}_hint`:null),g("aria-invalid",m?"true":null),g("aria-errormessage",m?`${a}_errors`:null),g("aria-readonly",d?"true":null),g("aria-disabled",p?"true":null),g("aria-required",h?"true":null)})}}function qi(e,t,i,a,r={}){const{includeStart:s=!1,outOfBounds:o="index"}=r;let d=s?e:e+t;for(;d>=0&&d<i;){if(!a(d))return d;d+=t}return o==="index"?d:-1}function Aa(e,t){const{columns:i,isRTL:a,pageSize:r}=t;switch(e){case"ArrowUp":return{kind:"delta",delta:-i};case"ArrowDown":return{kind:"delta",delta:i};case"ArrowLeft":return i===1?{kind:"none"}:{kind:"delta",delta:a?1:-1};case"ArrowRight":return i===1?{kind:"none"}:{kind:"delta",delta:a?-1:1};case"PageUp":return r===void 0?{kind:"none"}:{kind:"delta",delta:-r};case"PageDown":return r===void 0?{kind:"none"}:{kind:"delta",delta:r};case"Home":return{kind:"edge",edge:"first"};case"End":return{kind:"edge",edge:"last"};default:return{kind:"none"}}}function jp(e,t,i){return Math.max(1,Math.floor((e??300)/(t||40)))*(i||1)}function Ca(e,t){const i=[];for(let a=0;a<e.length;a+=t)i.push(e.slice(a,a+t));return i}const zi=".gui-calendar__day-button:not(.other-month)",eu=".gui-calendar__panel",tu="gui-calendar__year-button",iu=".gui-calendar__year-button",Ss=".gui-calendar__year-button.current",au=".gui-calendar__year-grid",_s=".gui-calendar__year-selector",ru='.gui-calendar__day-button[tabindex="0"]';class Gi{constructor(t,i){this.handleDayKeydown=async a=>{if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(a.key)&&a.key!==" "&&a.key!=="Enter")return;const s=a.target,o=Array.from(this.host.querySelectorAll(zi)),d=o.indexOf(s),p=window.getComputedStyle(this.host).direction==="rtl";if(a.key===" "||a.key==="Enter"){a.preventDefault(),this.options.onActivateDay(s.dataset.date??"",a);return}const u=Aa(a.key,{columns:7,isRTL:p});if(u.kind!=="delta")return;const h=u.delta;a.preventDefault();const m=qi(d,h,o.length,g=>this.isButtonDisabled(o[g]));let y=!1;if(m<0)if(this.options.canGoPrev())this.options.goPrev(),y=!0;else{o.find(A=>!this.isButtonDisabled(A))?.focus();return}else if(m>=o.length)if(this.options.canGoNext())this.options.goNext(),y=!0;else{[...o].reverse().find(q=>!this.isButtonDisabled(q))?.focus();return}if(y){await this.host.updateComplete;const g=Array.from(this.host.querySelectorAll(zi)),A=Array.from(this.host.querySelectorAll(eu));let q;if(m<0)q=A[0].querySelectorAll(zi).length+m;else{const st=A[A.length-1].querySelectorAll(zi).length;q=g.length-st+(m-o.length)}if(this.isButtonDisabled(g[q])){const Ne=qi(q,h,g.length,st=>this.isButtonDisabled(g[st]));if(Ne<0||Ne>=g.length){const st=g.findIndex(ft=>!this.isButtonDisabled(ft));st>-1&&g[st].focus()}else g[Ne]?.focus()}else{const Ne=Math.max(0,Math.min(q,g.length-1));g[Ne]?.focus()}}else o[m]?.focus()},this.handleYearKeydown=a=>{const r=a.target;if(!r.classList.contains(tu))return;const s=Array.from(this.host.querySelectorAll(iu)),o=s.indexOf(r),d=window.getComputedStyle(this.host).direction==="rtl";if(a.key==="Enter"||a.key===" "){a.preventDefault();const h=parseInt(r.dataset.year??"",10);isNaN(h)||this.selectYear(h);return}if(a.key==="Escape"){a.preventDefault(),a.stopPropagation(),this.host.querySelector(_s)?.focus(),this.options.onCloseYearGrid();return}const p=Aa(a.key,{columns:4,isRTL:d});if(p.kind!=="delta")return;a.preventDefault();const u=o+p.delta;u>=0&&u<s.length&&s[u].focus()},this.onPrevMonthClick=()=>{this.options.goPrev(),this.keepNavFocusInside("prev","next")},this.onNextMonthClick=()=>{this.options.goNext(),this.keepNavFocusInside("next","prev")},this.host=t,this.options=i,t.addController(this)}hostConnected(){}selectYear(t){this.host.querySelector(_s)?.focus(),this.options.onSelectYear(t),this.host.updateComplete.then(()=>{this.host.querySelector(ru)?.focus()})}onYearGridToggled(){this.options.isYearGridOpen()&&this.host.updateComplete.then(()=>{this.scrollToCurrentYear(),this.focusCurrentYearButton()})}scrollToCurrentYear(){const t=this.host.querySelector(au),i=this.host.querySelector(Ss);if(t&&i){const a=t.getBoundingClientRect(),r=i.getBoundingClientRect(),s=t.scrollTop+(r.top-a.top)-a.height/2+r.height/2;t.scrollTop=Math.max(0,s)}}focusCurrentYearButton(){this.host.querySelector(Ss)?.focus()}async keepNavFocusInside(t,i){await this.host.updateComplete;const a=this.host.querySelector(`.gui-calendar__month-button--${t}`);if(!a||!a.disabled)return;(this.host.querySelector(`.gui-calendar__month-button--${i}:not([disabled])`)??this.host.querySelector('.gui-calendar__day-button:not([disabled]):not([aria-disabled="true"])'))?.focus()}isButtonDisabled(t){return t?t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true":!0}}class zt{constructor(t,i){this.onFocusOut=a=>{this.handleFocusOut(a)},t.addController(this),this.host=t,this.options=i}handleFocusOut(t){this.isInside(t.relatedTarget)||(this._rafId!==void 0&&cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>{this._rafId=void 0,this.isInside(document.activeElement)||this.options.onLeave()}))}cancelPendingLeave(){this._rafId!==void 0&&(cancelAnimationFrame(this._rafId),this._rafId=void 0)}isInside(t){return!!t&&this.host.contains(t)}hostDisconnected(){this.cancelPendingLeave()}}const Ts={aa:{firstDay:7,weekend:[6,7],minimalDays:1},"aa-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"aa-ER":{firstDay:1,weekend:[6,7],minimalDays:1},ab:{firstDay:1,weekend:[6,7],minimalDays:1},af:{firstDay:7,weekend:[6,7],minimalDays:1},"af-NA":{firstDay:1,weekend:[6,7],minimalDays:1},agq:{firstDay:1,weekend:[6,7],minimalDays:1},ak:{firstDay:1,weekend:[6,7],minimalDays:1},am:{firstDay:7,weekend:[6,7],minimalDays:1},an:{firstDay:1,weekend:[6,7],minimalDays:4},ann:{firstDay:1,weekend:[6,7],minimalDays:1},apc:{firstDay:6,weekend:[5,6],minimalDays:1},ar:{firstDay:6,weekend:[5,6],minimalDays:1},"ar-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-BH":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EG":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EH":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-JO":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-KW":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-LB":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-LY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-OM":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-PS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-QA":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SA":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SO":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-YE":{firstDay:7,weekend:[5,6],minimalDays:1},arn:{firstDay:1,weekend:[6,7],minimalDays:1},as:{firstDay:7,weekend:[7],minimalDays:1},asa:{firstDay:1,weekend:[6,7],minimalDays:1},ast:{firstDay:1,weekend:[6,7],minimalDays:4},az:{firstDay:1,weekend:[6,7],minimalDays:1},"az-Arab":{firstDay:6,weekend:[5],minimalDays:1},"az-Arab-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"az-Arab-TR":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},ba:{firstDay:1,weekend:[6,7],minimalDays:4},bal:{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},bas:{firstDay:1,weekend:[6,7],minimalDays:1},be:{firstDay:1,weekend:[6,7],minimalDays:1},"be-tarask":{firstDay:1,weekend:[6,7],minimalDays:1},bem:{firstDay:1,weekend:[6,7],minimalDays:1},bew:{firstDay:7,weekend:[6,7],minimalDays:1},bez:{firstDay:1,weekend:[6,7],minimalDays:1},bg:{firstDay:1,weekend:[6,7],minimalDays:4},bgc:{firstDay:7,weekend:[7],minimalDays:1},bgn:{firstDay:7,weekend:[6,7],minimalDays:1},"bgn-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"bgn-AF":{firstDay:6,weekend:[4,5],minimalDays:1},"bgn-IR":{firstDay:6,weekend:[5],minimalDays:1},"bgn-OM":{firstDay:6,weekend:[5,6],minimalDays:1},bho:{firstDay:7,weekend:[7],minimalDays:1},blo:{firstDay:1,weekend:[6,7],minimalDays:1},blt:{firstDay:1,weekend:[6,7],minimalDays:1},bm:{firstDay:1,weekend:[6,7],minimalDays:1},"bm-Nkoo":{firstDay:1,weekend:[6,7],minimalDays:1},bn:{firstDay:7,weekend:[6,7],minimalDays:1},"bn-IN":{firstDay:7,weekend:[7],minimalDays:1},bo:{firstDay:1,weekend:[6,7],minimalDays:1},"bo-IN":{firstDay:7,weekend:[7],minimalDays:1},br:{firstDay:1,weekend:[6,7],minimalDays:4},brx:{firstDay:7,weekend:[7],minimalDays:1},bs:{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},bss:{firstDay:1,weekend:[6,7],minimalDays:1},byn:{firstDay:1,weekend:[6,7],minimalDays:1},ca:{firstDay:1,weekend:[6,7],minimalDays:4},"ca-AD":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-ES-valencia":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-IT":{firstDay:1,weekend:[6,7],minimalDays:4},cad:{firstDay:7,weekend:[6,7],minimalDays:1},cch:{firstDay:1,weekend:[6,7],minimalDays:1},ccp:{firstDay:7,weekend:[6,7],minimalDays:1},"ccp-IN":{firstDay:7,weekend:[7],minimalDays:1},ce:{firstDay:1,weekend:[6,7],minimalDays:4},ceb:{firstDay:7,weekend:[6,7],minimalDays:1},cgg:{firstDay:1,weekend:[7],minimalDays:1},cho:{firstDay:7,weekend:[6,7],minimalDays:1},chr:{firstDay:7,weekend:[6,7],minimalDays:1},cic:{firstDay:7,weekend:[6,7],minimalDays:1},ckb:{firstDay:6,weekend:[5,6],minimalDays:1},"ckb-IR":{firstDay:6,weekend:[5],minimalDays:1},co:{firstDay:1,weekend:[6,7],minimalDays:4},cs:{firstDay:1,weekend:[6,7],minimalDays:4},csw:{firstDay:7,weekend:[6,7],minimalDays:1},cu:{firstDay:1,weekend:[6,7],minimalDays:4},cv:{firstDay:1,weekend:[6,7],minimalDays:4},cy:{firstDay:1,weekend:[6,7],minimalDays:4},da:{firstDay:1,weekend:[6,7],minimalDays:4},"da-GL":{firstDay:1,weekend:[6,7],minimalDays:1},dav:{firstDay:7,weekend:[6,7],minimalDays:1},de:{firstDay:1,weekend:[6,7],minimalDays:4},"de-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"de-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"de-IT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LI":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LU":{firstDay:1,weekend:[6,7],minimalDays:4},dje:{firstDay:1,weekend:[6,7],minimalDays:1},doi:{firstDay:7,weekend:[7],minimalDays:1},dsb:{firstDay:1,weekend:[6,7],minimalDays:4},dua:{firstDay:1,weekend:[6,7],minimalDays:1},dv:{firstDay:5,weekend:[6,7],minimalDays:1},dyo:{firstDay:1,weekend:[6,7],minimalDays:1},dz:{firstDay:7,weekend:[6,7],minimalDays:1},ebu:{firstDay:7,weekend:[6,7],minimalDays:1},ee:{firstDay:1,weekend:[6,7],minimalDays:1},"ee-TG":{firstDay:1,weekend:[6,7],minimalDays:1},el:{firstDay:1,weekend:[6,7],minimalDays:4},"el-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"el-polyton":{firstDay:1,weekend:[6,7],minimalDays:4},en:{firstDay:7,weekend:[6,7],minimalDays:1},"en-001":{firstDay:1,weekend:[6,7],minimalDays:1},"en-150":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"en-AG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"en-AU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BW":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"en-CK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DK":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-Dsrt":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FJ":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GB":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GD":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GG":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GU":{firstDay:7,weekend:[6,7],minimalDays:1},"en-GY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"en-IE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"en-IM":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IN":{firstDay:7,weekend:[7],minimalDays:1},"en-IO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-JE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-JM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MP":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MV":{firstDay:5,weekend:[6,7],minimalDays:1},"en-MW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NA":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NF":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NL":{firstDay:1,weekend:[6,7],minimalDays:4},"en-NR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"en-SE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-SH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-Shaw":{firstDay:1,weekend:[6,7],minimalDays:4},"en-TC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-TV":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-UG":{firstDay:1,weekend:[7],minimalDays:1},"en-UM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VI":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-WS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-ZW":{firstDay:7,weekend:[6,7],minimalDays:1},eo:{firstDay:1,weekend:[6,7],minimalDays:1},es:{firstDay:1,weekend:[6,7],minimalDays:4},"es-419":{firstDay:1,weekend:[6,7],minimalDays:1},"es-AR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CL":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CU":{firstDay:1,weekend:[6,7],minimalDays:1},"es-DO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-EA":{firstDay:1,weekend:[6,7],minimalDays:1},"es-EC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GT":{firstDay:7,weekend:[6,7],minimalDays:1},"es-HN":{firstDay:7,weekend:[6,7],minimalDays:1},"es-IC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-MX":{firstDay:7,weekend:[6,7],minimalDays:1},"es-NI":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PA":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PE":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PY":{firstDay:7,weekend:[6,7],minimalDays:1},"es-SV":{firstDay:7,weekend:[6,7],minimalDays:1},"es-US":{firstDay:7,weekend:[6,7],minimalDays:1},"es-UY":{firstDay:1,weekend:[6,7],minimalDays:1},"es-VE":{firstDay:7,weekend:[6,7],minimalDays:1},et:{firstDay:1,weekend:[6,7],minimalDays:4},eu:{firstDay:1,weekend:[6,7],minimalDays:4},ewo:{firstDay:1,weekend:[6,7],minimalDays:1},fa:{firstDay:6,weekend:[5],minimalDays:1},"fa-AF":{firstDay:6,weekend:[4,5],minimalDays:1},ff:{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-SL":{firstDay:1,weekend:[6,7],minimalDays:1},fi:{firstDay:1,weekend:[6,7],minimalDays:4},fil:{firstDay:7,weekend:[6,7],minimalDays:1},fo:{firstDay:1,weekend:[6,7],minimalDays:4},"fo-DK":{firstDay:1,weekend:[6,7],minimalDays:4},fr:{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BL":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"fr-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-CI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"fr-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-GA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GF":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GP":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-HT":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MC":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-ML":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MQ":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-RE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-WF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-YT":{firstDay:1,weekend:[6,7],minimalDays:1},frr:{firstDay:1,weekend:[6,7],minimalDays:4},fur:{firstDay:1,weekend:[6,7],minimalDays:4},fy:{firstDay:1,weekend:[6,7],minimalDays:4},ga:{firstDay:1,weekend:[6,7],minimalDays:4},"ga-GB":{firstDay:1,weekend:[6,7],minimalDays:4},gaa:{firstDay:1,weekend:[6,7],minimalDays:1},gd:{firstDay:1,weekend:[6,7],minimalDays:4},gez:{firstDay:7,weekend:[6,7],minimalDays:1},"gez-ER":{firstDay:1,weekend:[6,7],minimalDays:1},gl:{firstDay:1,weekend:[6,7],minimalDays:4},gn:{firstDay:7,weekend:[6,7],minimalDays:1},gsw:{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-LI":{firstDay:1,weekend:[6,7],minimalDays:4},gu:{firstDay:7,weekend:[7],minimalDays:1},guz:{firstDay:7,weekend:[6,7],minimalDays:1},gv:{firstDay:1,weekend:[6,7],minimalDays:4},ha:{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ha-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-NE":{firstDay:1,weekend:[6,7],minimalDays:1},haw:{firstDay:7,weekend:[6,7],minimalDays:1},he:{firstDay:7,weekend:[5,6],minimalDays:1},hi:{firstDay:7,weekend:[7],minimalDays:1},"hi-Latn":{firstDay:7,weekend:[7],minimalDays:1},hnj:{firstDay:7,weekend:[6,7],minimalDays:1},"hnj-Hmnp":{firstDay:7,weekend:[6,7],minimalDays:1},hr:{firstDay:1,weekend:[6,7],minimalDays:1},"hr-BA":{firstDay:1,weekend:[6,7],minimalDays:1},hsb:{firstDay:1,weekend:[6,7],minimalDays:4},hu:{firstDay:1,weekend:[6,7],minimalDays:4},hy:{firstDay:1,weekend:[6,7],minimalDays:1},ia:{firstDay:1,weekend:[6,7],minimalDays:1},id:{firstDay:7,weekend:[6,7],minimalDays:1},ie:{firstDay:1,weekend:[6,7],minimalDays:4},ig:{firstDay:1,weekend:[6,7],minimalDays:1},ii:{firstDay:1,weekend:[6,7],minimalDays:1},io:{firstDay:1,weekend:[6,7],minimalDays:1},is:{firstDay:1,weekend:[6,7],minimalDays:4},it:{firstDay:1,weekend:[6,7],minimalDays:4},"it-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"it-SM":{firstDay:1,weekend:[6,7],minimalDays:4},"it-VA":{firstDay:1,weekend:[6,7],minimalDays:4},iu:{firstDay:7,weekend:[6,7],minimalDays:1},"iu-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},ja:{firstDay:7,weekend:[6,7],minimalDays:1},jbo:{firstDay:1,weekend:[6,7],minimalDays:1},jgo:{firstDay:1,weekend:[6,7],minimalDays:1},jmc:{firstDay:1,weekend:[6,7],minimalDays:1},jv:{firstDay:7,weekend:[6,7],minimalDays:1},ka:{firstDay:1,weekend:[6,7],minimalDays:1},kab:{firstDay:6,weekend:[5,6],minimalDays:1},kaj:{firstDay:1,weekend:[6,7],minimalDays:1},kam:{firstDay:7,weekend:[6,7],minimalDays:1},kcg:{firstDay:1,weekend:[6,7],minimalDays:1},kde:{firstDay:1,weekend:[6,7],minimalDays:1},kea:{firstDay:1,weekend:[6,7],minimalDays:1},ken:{firstDay:1,weekend:[6,7],minimalDays:1},kgp:{firstDay:7,weekend:[6,7],minimalDays:1},khq:{firstDay:1,weekend:[6,7],minimalDays:1},ki:{firstDay:7,weekend:[6,7],minimalDays:1},kk:{firstDay:1,weekend:[6,7],minimalDays:1},kkj:{firstDay:1,weekend:[6,7],minimalDays:1},kl:{firstDay:1,weekend:[6,7],minimalDays:1},kln:{firstDay:7,weekend:[6,7],minimalDays:1},km:{firstDay:7,weekend:[6,7],minimalDays:1},kn:{firstDay:7,weekend:[7],minimalDays:1},ko:{firstDay:7,weekend:[6,7],minimalDays:1},"ko-CN":{firstDay:1,weekend:[6,7],minimalDays:1},"ko-KP":{firstDay:1,weekend:[6,7],minimalDays:1},kok:{firstDay:7,weekend:[7],minimalDays:1},kpe:{firstDay:1,weekend:[6,7],minimalDays:1},"kpe-GN":{firstDay:1,weekend:[6,7],minimalDays:1},ks:{firstDay:7,weekend:[7],minimalDays:1},"ks-Arab":{firstDay:7,weekend:[7],minimalDays:1},"ks-Deva":{firstDay:7,weekend:[7],minimalDays:1},ksb:{firstDay:1,weekend:[6,7],minimalDays:1},ksf:{firstDay:1,weekend:[6,7],minimalDays:1},ksh:{firstDay:1,weekend:[6,7],minimalDays:4},ku:{firstDay:1,weekend:[6,7],minimalDays:1},kw:{firstDay:1,weekend:[6,7],minimalDays:4},kxv:{firstDay:7,weekend:[7],minimalDays:1},"kxv-Deva":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Latn":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Orya":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Telu":{firstDay:7,weekend:[7],minimalDays:1},ky:{firstDay:1,weekend:[6,7],minimalDays:1},la:{firstDay:1,weekend:[6,7],minimalDays:4},lag:{firstDay:1,weekend:[6,7],minimalDays:1},lb:{firstDay:1,weekend:[6,7],minimalDays:4},lg:{firstDay:1,weekend:[7],minimalDays:1},lij:{firstDay:1,weekend:[6,7],minimalDays:4},lkt:{firstDay:7,weekend:[6,7],minimalDays:1},lmo:{firstDay:1,weekend:[6,7],minimalDays:4},ln:{firstDay:1,weekend:[6,7],minimalDays:1},"ln-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CG":{firstDay:1,weekend:[6,7],minimalDays:1},lo:{firstDay:7,weekend:[6,7],minimalDays:1},lrc:{firstDay:6,weekend:[5],minimalDays:1},"lrc-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},lt:{firstDay:1,weekend:[6,7],minimalDays:4},lu:{firstDay:1,weekend:[6,7],minimalDays:1},luo:{firstDay:7,weekend:[6,7],minimalDays:1},luy:{firstDay:7,weekend:[6,7],minimalDays:1},lv:{firstDay:1,weekend:[6,7],minimalDays:1},mai:{firstDay:7,weekend:[7],minimalDays:1},mas:{firstDay:7,weekend:[6,7],minimalDays:1},"mas-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},mdf:{firstDay:1,weekend:[6,7],minimalDays:4},mer:{firstDay:7,weekend:[6,7],minimalDays:1},mfe:{firstDay:1,weekend:[6,7],minimalDays:1},mg:{firstDay:1,weekend:[6,7],minimalDays:1},mgh:{firstDay:7,weekend:[6,7],minimalDays:1},mgo:{firstDay:1,weekend:[6,7],minimalDays:1},mi:{firstDay:1,weekend:[6,7],minimalDays:1},mic:{firstDay:7,weekend:[6,7],minimalDays:1},mk:{firstDay:1,weekend:[6,7],minimalDays:1},ml:{firstDay:7,weekend:[7],minimalDays:1},mn:{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong":{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong-MN":{firstDay:1,weekend:[6,7],minimalDays:1},mni:{firstDay:7,weekend:[7],minimalDays:1},"mni-Beng":{firstDay:7,weekend:[7],minimalDays:1},"mni-Mtei":{firstDay:7,weekend:[7],minimalDays:1},moh:{firstDay:7,weekend:[6,7],minimalDays:1},mr:{firstDay:7,weekend:[7],minimalDays:1},ms:{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"ms-SG":{firstDay:7,weekend:[6,7],minimalDays:1},mt:{firstDay:7,weekend:[6,7],minimalDays:1},mua:{firstDay:1,weekend:[6,7],minimalDays:1},mus:{firstDay:7,weekend:[6,7],minimalDays:1},my:{firstDay:7,weekend:[6,7],minimalDays:1},myv:{firstDay:1,weekend:[6,7],minimalDays:4},mzn:{firstDay:6,weekend:[5],minimalDays:1},naq:{firstDay:1,weekend:[6,7],minimalDays:1},nb:{firstDay:1,weekend:[6,7],minimalDays:4},"nb-SJ":{firstDay:1,weekend:[6,7],minimalDays:4},nd:{firstDay:7,weekend:[6,7],minimalDays:1},nds:{firstDay:1,weekend:[6,7],minimalDays:4},"nds-NL":{firstDay:1,weekend:[6,7],minimalDays:4},ne:{firstDay:7,weekend:[6,7],minimalDays:1},"ne-IN":{firstDay:7,weekend:[7],minimalDays:1},nl:{firstDay:1,weekend:[6,7],minimalDays:4},"nl-AW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"nl-BQ":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-CW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SR":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SX":{firstDay:1,weekend:[6,7],minimalDays:1},nmg:{firstDay:1,weekend:[6,7],minimalDays:1},nn:{firstDay:1,weekend:[6,7],minimalDays:4},nnh:{firstDay:1,weekend:[6,7],minimalDays:1},no:{firstDay:1,weekend:[6,7],minimalDays:4},nqo:{firstDay:1,weekend:[6,7],minimalDays:1},nr:{firstDay:7,weekend:[6,7],minimalDays:1},nso:{firstDay:7,weekend:[6,7],minimalDays:1},nus:{firstDay:1,weekend:[6,7],minimalDays:1},nv:{firstDay:7,weekend:[6,7],minimalDays:1},ny:{firstDay:1,weekend:[6,7],minimalDays:1},nyn:{firstDay:1,weekend:[7],minimalDays:1},oc:{firstDay:1,weekend:[6,7],minimalDays:4},"oc-ES":{firstDay:1,weekend:[6,7],minimalDays:4},om:{firstDay:7,weekend:[6,7],minimalDays:1},"om-KE":{firstDay:7,weekend:[6,7],minimalDays:1},or:{firstDay:7,weekend:[7],minimalDays:1},os:{firstDay:1,weekend:[6,7],minimalDays:1},"os-RU":{firstDay:1,weekend:[6,7],minimalDays:4},osa:{firstDay:7,weekend:[6,7],minimalDays:1},pa:{firstDay:7,weekend:[7],minimalDays:1},"pa-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"pa-Guru":{firstDay:7,weekend:[7],minimalDays:1},pap:{firstDay:1,weekend:[6,7],minimalDays:1},"pap-AW":{firstDay:1,weekend:[6,7],minimalDays:1},pcm:{firstDay:1,weekend:[6,7],minimalDays:1},pis:{firstDay:1,weekend:[6,7],minimalDays:1},pl:{firstDay:1,weekend:[6,7],minimalDays:4},prg:{firstDay:1,weekend:[6,7],minimalDays:4},ps:{firstDay:6,weekend:[4,5],minimalDays:1},"ps-PK":{firstDay:7,weekend:[6,7],minimalDays:1},pt:{firstDay:7,weekend:[6,7],minimalDays:1},"pt-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-CV":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-MZ":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-PT":{firstDay:7,weekend:[6,7],minimalDays:4},"pt-ST":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-TL":{firstDay:1,weekend:[6,7],minimalDays:1},qu:{firstDay:7,weekend:[6,7],minimalDays:1},"qu-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"qu-EC":{firstDay:1,weekend:[6,7],minimalDays:1},quc:{firstDay:7,weekend:[6,7],minimalDays:1},raj:{firstDay:7,weekend:[7],minimalDays:1},rhg:{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg":{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg-BD":{firstDay:7,weekend:[6,7],minimalDays:1},rif:{firstDay:1,weekend:[6,7],minimalDays:1},rm:{firstDay:1,weekend:[6,7],minimalDays:4},rn:{firstDay:1,weekend:[6,7],minimalDays:1},ro:{firstDay:1,weekend:[6,7],minimalDays:1},"ro-MD":{firstDay:1,weekend:[6,7],minimalDays:1},rof:{firstDay:1,weekend:[6,7],minimalDays:1},ru:{firstDay:1,weekend:[6,7],minimalDays:4},"ru-BY":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KG":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KZ":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-MD":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-UA":{firstDay:1,weekend:[6,7],minimalDays:1},rw:{firstDay:1,weekend:[6,7],minimalDays:1},rwk:{firstDay:1,weekend:[6,7],minimalDays:1},sa:{firstDay:7,weekend:[7],minimalDays:1},sah:{firstDay:1,weekend:[6,7],minimalDays:4},saq:{firstDay:7,weekend:[6,7],minimalDays:1},sat:{firstDay:7,weekend:[7],minimalDays:1},"sat-Deva":{firstDay:7,weekend:[7],minimalDays:1},"sat-Olck":{firstDay:7,weekend:[7],minimalDays:1},sbp:{firstDay:1,weekend:[6,7],minimalDays:1},sc:{firstDay:1,weekend:[6,7],minimalDays:4},scn:{firstDay:1,weekend:[6,7],minimalDays:4},sd:{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Deva":{firstDay:7,weekend:[7],minimalDays:1},sdh:{firstDay:6,weekend:[5],minimalDays:1},"sdh-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},se:{firstDay:1,weekend:[6,7],minimalDays:4},"se-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"se-SE":{firstDay:1,weekend:[6,7],minimalDays:4},seh:{firstDay:7,weekend:[6,7],minimalDays:1},ses:{firstDay:1,weekend:[6,7],minimalDays:1},sg:{firstDay:1,weekend:[6,7],minimalDays:1},shi:{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Tfng":{firstDay:1,weekend:[6,7],minimalDays:1},shn:{firstDay:7,weekend:[6,7],minimalDays:1},"shn-TH":{firstDay:7,weekend:[6,7],minimalDays:1},si:{firstDay:1,weekend:[6,7],minimalDays:1},sid:{firstDay:7,weekend:[6,7],minimalDays:1},sk:{firstDay:1,weekend:[6,7],minimalDays:4},skr:{firstDay:7,weekend:[6,7],minimalDays:1},sl:{firstDay:1,weekend:[6,7],minimalDays:1},sma:{firstDay:1,weekend:[6,7],minimalDays:4},"sma-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smj:{firstDay:1,weekend:[6,7],minimalDays:4},"smj-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smn:{firstDay:1,weekend:[6,7],minimalDays:4},sms:{firstDay:1,weekend:[6,7],minimalDays:4},sn:{firstDay:7,weekend:[6,7],minimalDays:1},so:{firstDay:1,weekend:[6,7],minimalDays:1},"so-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"so-ET":{firstDay:7,weekend:[6,7],minimalDays:1},"so-KE":{firstDay:7,weekend:[6,7],minimalDays:1},sq:{firstDay:1,weekend:[6,7],minimalDays:1},"sq-MK":{firstDay:1,weekend:[6,7],minimalDays:1},"sq-XK":{firstDay:1,weekend:[6,7],minimalDays:1},sr:{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-XK":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-XK":{firstDay:1,weekend:[6,7],minimalDays:1},ss:{firstDay:7,weekend:[6,7],minimalDays:1},"ss-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},ssy:{firstDay:1,weekend:[6,7],minimalDays:1},st:{firstDay:7,weekend:[6,7],minimalDays:1},"st-LS":{firstDay:1,weekend:[6,7],minimalDays:1},su:{firstDay:7,weekend:[6,7],minimalDays:1},"su-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},sv:{firstDay:1,weekend:[6,7],minimalDays:4},"sv-AX":{firstDay:1,weekend:[6,7],minimalDays:4},"sv-FI":{firstDay:1,weekend:[6,7],minimalDays:4},sw:{firstDay:1,weekend:[6,7],minimalDays:1},"sw-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"sw-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"sw-UG":{firstDay:1,weekend:[7],minimalDays:1},syr:{firstDay:6,weekend:[5,6],minimalDays:1},"syr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},szl:{firstDay:1,weekend:[6,7],minimalDays:4},ta:{firstDay:7,weekend:[7],minimalDays:1},"ta-LK":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-SG":{firstDay:7,weekend:[6,7],minimalDays:1},te:{firstDay:7,weekend:[7],minimalDays:1},teo:{firstDay:1,weekend:[7],minimalDays:1},"teo-KE":{firstDay:7,weekend:[6,7],minimalDays:1},tg:{firstDay:1,weekend:[6,7],minimalDays:1},th:{firstDay:7,weekend:[6,7],minimalDays:1},ti:{firstDay:7,weekend:[6,7],minimalDays:1},"ti-ER":{firstDay:1,weekend:[6,7],minimalDays:1},tig:{firstDay:1,weekend:[6,7],minimalDays:1},tk:{firstDay:1,weekend:[6,7],minimalDays:1},tn:{firstDay:7,weekend:[6,7],minimalDays:1},"tn-BW":{firstDay:7,weekend:[6,7],minimalDays:1},to:{firstDay:1,weekend:[6,7],minimalDays:1},tok:{firstDay:1,weekend:[6,7],minimalDays:1},tpi:{firstDay:1,weekend:[6,7],minimalDays:1},tr:{firstDay:1,weekend:[6,7],minimalDays:1},"tr-CY":{firstDay:1,weekend:[6,7],minimalDays:1},trv:{firstDay:7,weekend:[6,7],minimalDays:1},trw:{firstDay:7,weekend:[6,7],minimalDays:1},ts:{firstDay:7,weekend:[6,7],minimalDays:1},tt:{firstDay:1,weekend:[6,7],minimalDays:4},twq:{firstDay:1,weekend:[6,7],minimalDays:1},tyv:{firstDay:1,weekend:[6,7],minimalDays:4},tzm:{firstDay:1,weekend:[6,7],minimalDays:1},ug:{firstDay:1,weekend:[6,7],minimalDays:1},uk:{firstDay:1,weekend:[6,7],minimalDays:1},und:{firstDay:7,weekend:[6,7],minimalDays:1},ur:{firstDay:7,weekend:[6,7],minimalDays:1},"ur-IN":{firstDay:7,weekend:[7],minimalDays:1},uz:{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Arab":{firstDay:6,weekend:[4,5],minimalDays:1},"uz-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},vai:{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Vaii":{firstDay:1,weekend:[6,7],minimalDays:1},ve:{firstDay:7,weekend:[6,7],minimalDays:1},vec:{firstDay:1,weekend:[6,7],minimalDays:4},vi:{firstDay:1,weekend:[6,7],minimalDays:1},vmw:{firstDay:7,weekend:[6,7],minimalDays:1},vo:{firstDay:1,weekend:[6,7],minimalDays:1},vun:{firstDay:1,weekend:[6,7],minimalDays:1},wa:{firstDay:1,weekend:[6,7],minimalDays:4},wae:{firstDay:1,weekend:[6,7],minimalDays:4},wal:{firstDay:7,weekend:[6,7],minimalDays:1},wbp:{firstDay:1,weekend:[6,7],minimalDays:1},wo:{firstDay:1,weekend:[6,7],minimalDays:1},xh:{firstDay:7,weekend:[6,7],minimalDays:1},xnr:{firstDay:7,weekend:[7],minimalDays:1},xog:{firstDay:1,weekend:[7],minimalDays:1},yav:{firstDay:1,weekend:[6,7],minimalDays:1},yi:{firstDay:1,weekend:[6,7],minimalDays:1},yo:{firstDay:1,weekend:[6,7],minimalDays:1},"yo-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},yrl:{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-VE":{firstDay:7,weekend:[6,7],minimalDays:1},yue:{firstDay:7,weekend:[6,7],minimalDays:1},"yue-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"yue-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},za:{firstDay:1,weekend:[6,7],minimalDays:1},zgh:{firstDay:1,weekend:[6,7],minimalDays:1},zh:{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-MO":{firstDay:7,weekend:[6,7],minimalDays:1},zu:{firstDay:7,weekend:[6,7],minimalDays:1}},As="Invalid date: day is greater than the maximum valid day for the month and year.",su="Invalid date: date is before the minimum allowed date.",nu="Invalid date: date is after the maximum allowed date.",kt="Invalid date: date is within a disabled range.",Cs="Invalid time: time is before the minimum allowed time.",Ls="Invalid time: time is after the maximum allowed time.",ou="Invalid range: end time must be after start time.",Vi="Invalid time: time is within a disabled range.",lu="Invalid date-time: date-time is before the minimum allowed date-time.",du="Invalid date-time: date-time is after the maximum allowed date-time.";function ae(e){const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${a}`}function re(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e)}function Ui(e,t,i,a){const r=e.split("T")[0];if(t&&r<t.split("T")[0]||i&&r>i.split("T")[0])return!0;if(a&&a.length>0)for(const s of a){const o=s.start.split("T")[0],d=s.end?s.end.split("T")[0]:o;if(r>=o&&r<=d)return!0}return!1}function Gt(e,t,i,a,r){const s=e.split("T")[0];return t&&s<t.split("T")[0]?r?.minDateMessage??su:i&&s>i.split("T")[0]?r?.maxDateMessage??nu:Ui(s,void 0,void 0,a)?r?.disabledDateRangeMessage??kt:null}function Es(e,t,i,a,r){const s=re(e),o=re(t);if(isNaN(s.getTime())||isNaN(o.getTime()))return!1;const d=new Date(s);d.setHours(0,0,0,0);const p=new Date(o);for(p.setHours(0,0,0,0);d<=p;){if(Ui(ae(d),a,r,i))return!0;d.setDate(d.getDate()+1)}return!1}function xs(e){return new Intl.DateTimeFormat(e??"en",{year:"numeric",month:"numeric",day:"numeric"}).formatToParts(new Date)}function Ps(e,t){return e===2?new Date(t,1,29).getDate()===29||!t?29:28:e===4||e===6||e===9||e===11?30:31}function La(e){return mt(e,new Date)}function mt(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function pu(e){const t=[0,1,2,3,4,5,6],i=e%7;return[...t.slice(i),...t.slice(0,i)]}function Os(e){const t=e??"en",i=Ts[t]||Ts[t.split("-")[0]]||{firstDay:0};return pu(i.firstDay)}function uu(e){const t=new Intl.DateTimeFormat(e,{weekday:"narrow"}),i=new Date(2025,10,30);return Os(e).map(a=>{const r=new Date(i);return r.setDate(i.getDate()+a),t.format(r)})}function Ms(e,t){return new Intl.DateTimeFormat(e,{month:"long",year:"numeric"}).format(t)}function Zi(e,t){return new Intl.DateTimeFormat(e,{dateStyle:"full"}).format(t)}function Ea(e,t,i){for(let a=0;a<i;a++){const r=new Date(t.getFullYear(),t.getMonth()+a,1);if(e.getMonth()===r.getMonth()&&e.getFullYear()===r.getFullYear())return!0}return!1}function hu(e,t,i="long"){return new Intl.DateTimeFormat(e,{month:i,year:"numeric"}).formatToParts(t).filter(r=>r.type==="month"||r.type==="year")}function xa(e,t){const i=e||"en-US",s=new Intl.DateTimeFormat(i,{day:"numeric"}).formatToParts(t).find(o=>o.type==="day");return s?s.value:t.getDate().toString()}function Is(e,t){const i=ae(e),a=ae(t);return i===a?{start:i}:{start:i,end:a}}function Rs(e){return e.length?e.map(a=>({start:re(a.start).getTime(),end:re(a.end??a.start).getTime()})).sort((a,r)=>a.start-r.start).reduce((a,r)=>{const s=a[a.length-1];if(s){const o=new Date(s.end);if(o.setDate(o.getDate()+1),r.start<=o.getTime())return s.end=Math.max(s.end,r.end),a}return[...a,r]},[]).map(a=>Is(new Date(a.start),new Date(a.end))):[]}class Yi{constructor(t,i){this._currentDate=new Date,this._yearSelectorOpen=!1,this.host=t,this.options=i,t.addController(this)}hostConnected(){}get currentDate(){return this._currentDate}set currentDate(t){Object.is(t,this._currentDate)||(this._currentDate=t,this.host.requestUpdate())}get yearSelectorOpen(){return this._yearSelectorOpen}set yearSelectorOpen(t){Object.is(t,this._yearSelectorOpen)||(this._yearSelectorOpen=t,this.host.requestUpdate())}prevMonth(){const t=this._currentDate;this.currentDate=new Date(t.getFullYear(),t.getMonth()-1,1)}nextMonth(){const t=this._currentDate;this.currentDate=new Date(t.getFullYear(),t.getMonth()+1,1)}canGoPrev(){const t=this.options.getMinDate();if(!t)return!0;const i=new Date(this._currentDate.getFullYear(),this._currentDate.getMonth(),0);return ae(i)>=t}canGoNext(){const t=this.options.getMaxDate();if(!t)return!0;const i=(this.options.getNumberOfMonths()??1)-1,a=new Date(this._currentDate.getFullYear(),this._currentDate.getMonth()+i+1,1);return ae(a)<=t}get effectiveMinYear(){const t=this.options.getMinDate();return t?re(t).getFullYear():1900}get effectiveMaxYear(){const t=this.options.getMaxDate();return t?re(t).getFullYear():2099}get yearList(){const t=[];for(let i=this.effectiveMinYear;i<=this.effectiveMaxYear;i++)t.push(i);return t}toggleYearSelector(){this.yearSelectorOpen=!this._yearSelectorOpen,this.options.onYearSelectorToggled?.()}selectYear(t){this.currentDate=new Date(t,this._currentDate.getMonth(),1),this.yearSelectorOpen=!1}closeYearSelector(){this.yearSelectorOpen=!1}navigateToDate(t){!isNaN(t.getTime())&&!Ea(t,this._currentDate,this.options.getNumberOfMonths()??1)&&(this.currentDate=t)}isDisabled(t){return Ui(ae(t),this.options.getMinDate(),this.options.getMaxDate(),this.options.getDisabledRanges())}}const Hi=e=>e?l.html`<span aria-hidden="true"> *</span>`:l.nothing,le=(e,t,i=!1,a=void 0,r=!0)=>r?t.label?l.html`<label
41
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};gr([f.consume({context:m.formContext}),n.property({attribute:!1})],Vt.prototype,"formContext",2),gr([f.provide({context:m.actionContext})],Vt.prototype,"adapter",2),Vt=gr([n.customElement("gui-button-interactive")],Vt);const jc=Object.freeze(Object.defineProperty({__proto__:null,get ButtonElement(){return Vt}},Symbol.toStringTag,{value:"Module"}));class he{constructor(t,i){t.addController(this),this.getTargets=i.getTargets,this.getState=i.getState}hostConnected(){}hostUpdated(){const t=this.getTargets();if(!t)return;let i=[];t instanceof NodeList?i=Array.from(t):Array.isArray(t)?i=t:i=[t];const{uid:a,templateData:r}=this.getState(),{touched:s,errors:o,readonly:l,disabled:u,hint:p,required:h}=r,c=s&&o&&o.length>0;ut.filterTap(i,y=>!!y,y=>{const g=(_,L)=>{L?y.setAttribute(_,L):y.removeAttribute(_)};g("aria-describedby",p?`${a}_hint`:null),g("aria-invalid",c?"true":null),g("aria-errormessage",c?`${a}_errors`:null),g("aria-readonly",l?"true":null),g("aria-disabled",u?"true":null),g("aria-required",h?"true":null)})}}function Vi(e,t,i,a,r={}){const{includeStart:s=!1,outOfBounds:o="index"}=r;let l=s?e:e+t;for(;l>=0&&l<i;){if(!a(l))return l;l+=t}return o==="index"?l:-1}function br(e,t){const{columns:i,isRTL:a,pageSize:r}=t;switch(e){case"ArrowUp":return{kind:"delta",delta:-i};case"ArrowDown":return{kind:"delta",delta:i};case"ArrowLeft":return i===1?{kind:"none"}:{kind:"delta",delta:a?1:-1};case"ArrowRight":return i===1?{kind:"none"}:{kind:"delta",delta:a?-1:1};case"PageUp":return r===void 0?{kind:"none"}:{kind:"delta",delta:-r};case"PageDown":return r===void 0?{kind:"none"}:{kind:"delta",delta:r};case"Home":return{kind:"edge",edge:"first"};case"End":return{kind:"edge",edge:"last"};default:return{kind:"none"}}}function em(e,t,i){return Math.max(1,Math.floor((e??300)/(t||40)))*(i||1)}function fr(e,t){const i=[];for(let a=0;a<e.length;a+=t)i.push(e.slice(a,a+t));return i}const Zi=".gui-calendar__day-button:not(.other-month)",tm=".gui-calendar__panel",im="gui-calendar__year-button",am=".gui-calendar__year-button",yn=".gui-calendar__year-button.current",rm=".gui-calendar__year-grid",gn=".gui-calendar__year-selector",sm='.gui-calendar__day-button[tabindex="0"]';class Yi{constructor(t,i){this.handleDayKeydown=async a=>{if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(a.key)&&a.key!==" "&&a.key!=="Enter")return;const s=a.target,o=Array.from(this.host.querySelectorAll(Zi)),l=o.indexOf(s),u=window.getComputedStyle(this.host).direction==="rtl";if(a.key===" "||a.key==="Enter"){a.preventDefault(),this.options.onActivateDay(s.dataset.date??"",a);return}const p=br(a.key,{columns:7,isRTL:u});if(p.kind!=="delta")return;const h=p.delta;a.preventDefault();const c=Vi(l,h,o.length,g=>this.isButtonDisabled(o[g]));let y=!1;if(c<0)if(this.options.canGoPrev())this.options.goPrev(),y=!0;else{o.find(_=>!this.isButtonDisabled(_))?.focus();return}else if(c>=o.length)if(this.options.canGoNext())this.options.goNext(),y=!0;else{[...o].reverse().find(L=>!this.isButtonDisabled(L))?.focus();return}if(y){await this.host.updateComplete;const g=Array.from(this.host.querySelectorAll(Zi)),_=Array.from(this.host.querySelectorAll(tm));let L;if(c<0)L=_[0].querySelectorAll(Zi).length+c;else{const nt=_[_.length-1].querySelectorAll(Zi).length;L=g.length-nt+(c-o.length)}if(this.isButtonDisabled(g[L])){const Ae=Vi(L,h,g.length,nt=>this.isButtonDisabled(g[nt]));if(Ae<0||Ae>=g.length){const nt=g.findIndex(Dt=>!this.isButtonDisabled(Dt));nt>-1&&g[nt].focus()}else g[Ae]?.focus()}else{const Ae=Math.max(0,Math.min(L,g.length-1));g[Ae]?.focus()}}else o[c]?.focus()},this.handleYearKeydown=a=>{const r=a.target;if(!r.classList.contains(im))return;const s=Array.from(this.host.querySelectorAll(am)),o=s.indexOf(r),l=window.getComputedStyle(this.host).direction==="rtl";if(a.key==="Enter"||a.key===" "){a.preventDefault();const h=parseInt(r.dataset.year??"",10);isNaN(h)||this.selectYear(h);return}if(a.key==="Escape"){a.preventDefault(),a.stopPropagation(),this.host.querySelector(gn)?.focus(),this.options.onCloseYearGrid();return}const u=br(a.key,{columns:4,isRTL:l});if(u.kind!=="delta")return;a.preventDefault();const p=o+u.delta;p>=0&&p<s.length&&s[p].focus()},this.onPrevMonthClick=()=>{this.options.goPrev(),this.keepNavFocusInside("prev","next")},this.onNextMonthClick=()=>{this.options.goNext(),this.keepNavFocusInside("next","prev")},this.host=t,this.options=i,t.addController(this)}hostConnected(){}selectYear(t){this.host.querySelector(gn)?.focus(),this.options.onSelectYear(t),this.host.updateComplete.then(()=>{this.host.querySelector(sm)?.focus()})}onYearGridToggled(){this.options.isYearGridOpen()&&this.host.updateComplete.then(()=>{this.scrollToCurrentYear(),this.focusCurrentYearButton()})}scrollToCurrentYear(){const t=this.host.querySelector(rm),i=this.host.querySelector(yn);if(t&&i){const a=t.getBoundingClientRect(),r=i.getBoundingClientRect(),s=t.scrollTop+(r.top-a.top)-a.height/2+r.height/2;t.scrollTop=Math.max(0,s)}}focusCurrentYearButton(){this.host.querySelector(yn)?.focus()}async keepNavFocusInside(t,i){await this.host.updateComplete;const a=this.host.querySelector(`.gui-calendar__month-button--${t}`);if(!a||!a.disabled)return;(this.host.querySelector(`.gui-calendar__month-button--${i}:not([disabled])`)??this.host.querySelector('.gui-calendar__day-button:not([disabled]):not([aria-disabled="true"])'))?.focus()}isButtonDisabled(t){return t?t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true":!0}}class Zt{constructor(t,i){this.onFocusOut=a=>{this.handleFocusOut(a)},t.addController(this),this.host=t,this.options=i}handleFocusOut(t){this.isInside(t.relatedTarget)||(this._rafId!==void 0&&cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>{this._rafId=void 0,this.isInside(document.activeElement)||this.options.onLeave()}))}cancelPendingLeave(){this._rafId!==void 0&&(cancelAnimationFrame(this._rafId),this._rafId=void 0)}isInside(t){return!!t&&this.host.contains(t)}hostDisconnected(){this.cancelPendingLeave()}}const bn={aa:{firstDay:7,weekend:[6,7],minimalDays:1},"aa-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"aa-ER":{firstDay:1,weekend:[6,7],minimalDays:1},ab:{firstDay:1,weekend:[6,7],minimalDays:1},af:{firstDay:7,weekend:[6,7],minimalDays:1},"af-NA":{firstDay:1,weekend:[6,7],minimalDays:1},agq:{firstDay:1,weekend:[6,7],minimalDays:1},ak:{firstDay:1,weekend:[6,7],minimalDays:1},am:{firstDay:7,weekend:[6,7],minimalDays:1},an:{firstDay:1,weekend:[6,7],minimalDays:4},ann:{firstDay:1,weekend:[6,7],minimalDays:1},apc:{firstDay:6,weekend:[5,6],minimalDays:1},ar:{firstDay:6,weekend:[5,6],minimalDays:1},"ar-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-BH":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EG":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EH":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-JO":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-KW":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-LB":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-LY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-OM":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-PS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-QA":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SA":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SO":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-YE":{firstDay:7,weekend:[5,6],minimalDays:1},arn:{firstDay:1,weekend:[6,7],minimalDays:1},as:{firstDay:7,weekend:[7],minimalDays:1},asa:{firstDay:1,weekend:[6,7],minimalDays:1},ast:{firstDay:1,weekend:[6,7],minimalDays:4},az:{firstDay:1,weekend:[6,7],minimalDays:1},"az-Arab":{firstDay:6,weekend:[5],minimalDays:1},"az-Arab-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"az-Arab-TR":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},ba:{firstDay:1,weekend:[6,7],minimalDays:4},bal:{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},bas:{firstDay:1,weekend:[6,7],minimalDays:1},be:{firstDay:1,weekend:[6,7],minimalDays:1},"be-tarask":{firstDay:1,weekend:[6,7],minimalDays:1},bem:{firstDay:1,weekend:[6,7],minimalDays:1},bew:{firstDay:7,weekend:[6,7],minimalDays:1},bez:{firstDay:1,weekend:[6,7],minimalDays:1},bg:{firstDay:1,weekend:[6,7],minimalDays:4},bgc:{firstDay:7,weekend:[7],minimalDays:1},bgn:{firstDay:7,weekend:[6,7],minimalDays:1},"bgn-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"bgn-AF":{firstDay:6,weekend:[4,5],minimalDays:1},"bgn-IR":{firstDay:6,weekend:[5],minimalDays:1},"bgn-OM":{firstDay:6,weekend:[5,6],minimalDays:1},bho:{firstDay:7,weekend:[7],minimalDays:1},blo:{firstDay:1,weekend:[6,7],minimalDays:1},blt:{firstDay:1,weekend:[6,7],minimalDays:1},bm:{firstDay:1,weekend:[6,7],minimalDays:1},"bm-Nkoo":{firstDay:1,weekend:[6,7],minimalDays:1},bn:{firstDay:7,weekend:[6,7],minimalDays:1},"bn-IN":{firstDay:7,weekend:[7],minimalDays:1},bo:{firstDay:1,weekend:[6,7],minimalDays:1},"bo-IN":{firstDay:7,weekend:[7],minimalDays:1},br:{firstDay:1,weekend:[6,7],minimalDays:4},brx:{firstDay:7,weekend:[7],minimalDays:1},bs:{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},bss:{firstDay:1,weekend:[6,7],minimalDays:1},byn:{firstDay:1,weekend:[6,7],minimalDays:1},ca:{firstDay:1,weekend:[6,7],minimalDays:4},"ca-AD":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-ES-valencia":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-IT":{firstDay:1,weekend:[6,7],minimalDays:4},cad:{firstDay:7,weekend:[6,7],minimalDays:1},cch:{firstDay:1,weekend:[6,7],minimalDays:1},ccp:{firstDay:7,weekend:[6,7],minimalDays:1},"ccp-IN":{firstDay:7,weekend:[7],minimalDays:1},ce:{firstDay:1,weekend:[6,7],minimalDays:4},ceb:{firstDay:7,weekend:[6,7],minimalDays:1},cgg:{firstDay:1,weekend:[7],minimalDays:1},cho:{firstDay:7,weekend:[6,7],minimalDays:1},chr:{firstDay:7,weekend:[6,7],minimalDays:1},cic:{firstDay:7,weekend:[6,7],minimalDays:1},ckb:{firstDay:6,weekend:[5,6],minimalDays:1},"ckb-IR":{firstDay:6,weekend:[5],minimalDays:1},co:{firstDay:1,weekend:[6,7],minimalDays:4},cs:{firstDay:1,weekend:[6,7],minimalDays:4},csw:{firstDay:7,weekend:[6,7],minimalDays:1},cu:{firstDay:1,weekend:[6,7],minimalDays:4},cv:{firstDay:1,weekend:[6,7],minimalDays:4},cy:{firstDay:1,weekend:[6,7],minimalDays:4},da:{firstDay:1,weekend:[6,7],minimalDays:4},"da-GL":{firstDay:1,weekend:[6,7],minimalDays:1},dav:{firstDay:7,weekend:[6,7],minimalDays:1},de:{firstDay:1,weekend:[6,7],minimalDays:4},"de-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"de-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"de-IT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LI":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LU":{firstDay:1,weekend:[6,7],minimalDays:4},dje:{firstDay:1,weekend:[6,7],minimalDays:1},doi:{firstDay:7,weekend:[7],minimalDays:1},dsb:{firstDay:1,weekend:[6,7],minimalDays:4},dua:{firstDay:1,weekend:[6,7],minimalDays:1},dv:{firstDay:5,weekend:[6,7],minimalDays:1},dyo:{firstDay:1,weekend:[6,7],minimalDays:1},dz:{firstDay:7,weekend:[6,7],minimalDays:1},ebu:{firstDay:7,weekend:[6,7],minimalDays:1},ee:{firstDay:1,weekend:[6,7],minimalDays:1},"ee-TG":{firstDay:1,weekend:[6,7],minimalDays:1},el:{firstDay:1,weekend:[6,7],minimalDays:4},"el-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"el-polyton":{firstDay:1,weekend:[6,7],minimalDays:4},en:{firstDay:7,weekend:[6,7],minimalDays:1},"en-001":{firstDay:1,weekend:[6,7],minimalDays:1},"en-150":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"en-AG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"en-AU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BW":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"en-CK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DK":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-Dsrt":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FJ":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GB":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GD":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GG":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GU":{firstDay:7,weekend:[6,7],minimalDays:1},"en-GY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"en-IE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"en-IM":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IN":{firstDay:7,weekend:[7],minimalDays:1},"en-IO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-JE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-JM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MP":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MV":{firstDay:5,weekend:[6,7],minimalDays:1},"en-MW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NA":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NF":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NL":{firstDay:1,weekend:[6,7],minimalDays:4},"en-NR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"en-SE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-SH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-Shaw":{firstDay:1,weekend:[6,7],minimalDays:4},"en-TC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-TV":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-UG":{firstDay:1,weekend:[7],minimalDays:1},"en-UM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VI":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-WS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-ZW":{firstDay:7,weekend:[6,7],minimalDays:1},eo:{firstDay:1,weekend:[6,7],minimalDays:1},es:{firstDay:1,weekend:[6,7],minimalDays:4},"es-419":{firstDay:1,weekend:[6,7],minimalDays:1},"es-AR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CL":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CU":{firstDay:1,weekend:[6,7],minimalDays:1},"es-DO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-EA":{firstDay:1,weekend:[6,7],minimalDays:1},"es-EC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GT":{firstDay:7,weekend:[6,7],minimalDays:1},"es-HN":{firstDay:7,weekend:[6,7],minimalDays:1},"es-IC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-MX":{firstDay:7,weekend:[6,7],minimalDays:1},"es-NI":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PA":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PE":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PY":{firstDay:7,weekend:[6,7],minimalDays:1},"es-SV":{firstDay:7,weekend:[6,7],minimalDays:1},"es-US":{firstDay:7,weekend:[6,7],minimalDays:1},"es-UY":{firstDay:1,weekend:[6,7],minimalDays:1},"es-VE":{firstDay:7,weekend:[6,7],minimalDays:1},et:{firstDay:1,weekend:[6,7],minimalDays:4},eu:{firstDay:1,weekend:[6,7],minimalDays:4},ewo:{firstDay:1,weekend:[6,7],minimalDays:1},fa:{firstDay:6,weekend:[5],minimalDays:1},"fa-AF":{firstDay:6,weekend:[4,5],minimalDays:1},ff:{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-SL":{firstDay:1,weekend:[6,7],minimalDays:1},fi:{firstDay:1,weekend:[6,7],minimalDays:4},fil:{firstDay:7,weekend:[6,7],minimalDays:1},fo:{firstDay:1,weekend:[6,7],minimalDays:4},"fo-DK":{firstDay:1,weekend:[6,7],minimalDays:4},fr:{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BL":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"fr-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-CI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"fr-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-GA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GF":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GP":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-HT":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MC":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-ML":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MQ":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-RE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-WF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-YT":{firstDay:1,weekend:[6,7],minimalDays:1},frr:{firstDay:1,weekend:[6,7],minimalDays:4},fur:{firstDay:1,weekend:[6,7],minimalDays:4},fy:{firstDay:1,weekend:[6,7],minimalDays:4},ga:{firstDay:1,weekend:[6,7],minimalDays:4},"ga-GB":{firstDay:1,weekend:[6,7],minimalDays:4},gaa:{firstDay:1,weekend:[6,7],minimalDays:1},gd:{firstDay:1,weekend:[6,7],minimalDays:4},gez:{firstDay:7,weekend:[6,7],minimalDays:1},"gez-ER":{firstDay:1,weekend:[6,7],minimalDays:1},gl:{firstDay:1,weekend:[6,7],minimalDays:4},gn:{firstDay:7,weekend:[6,7],minimalDays:1},gsw:{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-LI":{firstDay:1,weekend:[6,7],minimalDays:4},gu:{firstDay:7,weekend:[7],minimalDays:1},guz:{firstDay:7,weekend:[6,7],minimalDays:1},gv:{firstDay:1,weekend:[6,7],minimalDays:4},ha:{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ha-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-NE":{firstDay:1,weekend:[6,7],minimalDays:1},haw:{firstDay:7,weekend:[6,7],minimalDays:1},he:{firstDay:7,weekend:[5,6],minimalDays:1},hi:{firstDay:7,weekend:[7],minimalDays:1},"hi-Latn":{firstDay:7,weekend:[7],minimalDays:1},hnj:{firstDay:7,weekend:[6,7],minimalDays:1},"hnj-Hmnp":{firstDay:7,weekend:[6,7],minimalDays:1},hr:{firstDay:1,weekend:[6,7],minimalDays:1},"hr-BA":{firstDay:1,weekend:[6,7],minimalDays:1},hsb:{firstDay:1,weekend:[6,7],minimalDays:4},hu:{firstDay:1,weekend:[6,7],minimalDays:4},hy:{firstDay:1,weekend:[6,7],minimalDays:1},ia:{firstDay:1,weekend:[6,7],minimalDays:1},id:{firstDay:7,weekend:[6,7],minimalDays:1},ie:{firstDay:1,weekend:[6,7],minimalDays:4},ig:{firstDay:1,weekend:[6,7],minimalDays:1},ii:{firstDay:1,weekend:[6,7],minimalDays:1},io:{firstDay:1,weekend:[6,7],minimalDays:1},is:{firstDay:1,weekend:[6,7],minimalDays:4},it:{firstDay:1,weekend:[6,7],minimalDays:4},"it-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"it-SM":{firstDay:1,weekend:[6,7],minimalDays:4},"it-VA":{firstDay:1,weekend:[6,7],minimalDays:4},iu:{firstDay:7,weekend:[6,7],minimalDays:1},"iu-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},ja:{firstDay:7,weekend:[6,7],minimalDays:1},jbo:{firstDay:1,weekend:[6,7],minimalDays:1},jgo:{firstDay:1,weekend:[6,7],minimalDays:1},jmc:{firstDay:1,weekend:[6,7],minimalDays:1},jv:{firstDay:7,weekend:[6,7],minimalDays:1},ka:{firstDay:1,weekend:[6,7],minimalDays:1},kab:{firstDay:6,weekend:[5,6],minimalDays:1},kaj:{firstDay:1,weekend:[6,7],minimalDays:1},kam:{firstDay:7,weekend:[6,7],minimalDays:1},kcg:{firstDay:1,weekend:[6,7],minimalDays:1},kde:{firstDay:1,weekend:[6,7],minimalDays:1},kea:{firstDay:1,weekend:[6,7],minimalDays:1},ken:{firstDay:1,weekend:[6,7],minimalDays:1},kgp:{firstDay:7,weekend:[6,7],minimalDays:1},khq:{firstDay:1,weekend:[6,7],minimalDays:1},ki:{firstDay:7,weekend:[6,7],minimalDays:1},kk:{firstDay:1,weekend:[6,7],minimalDays:1},kkj:{firstDay:1,weekend:[6,7],minimalDays:1},kl:{firstDay:1,weekend:[6,7],minimalDays:1},kln:{firstDay:7,weekend:[6,7],minimalDays:1},km:{firstDay:7,weekend:[6,7],minimalDays:1},kn:{firstDay:7,weekend:[7],minimalDays:1},ko:{firstDay:7,weekend:[6,7],minimalDays:1},"ko-CN":{firstDay:1,weekend:[6,7],minimalDays:1},"ko-KP":{firstDay:1,weekend:[6,7],minimalDays:1},kok:{firstDay:7,weekend:[7],minimalDays:1},kpe:{firstDay:1,weekend:[6,7],minimalDays:1},"kpe-GN":{firstDay:1,weekend:[6,7],minimalDays:1},ks:{firstDay:7,weekend:[7],minimalDays:1},"ks-Arab":{firstDay:7,weekend:[7],minimalDays:1},"ks-Deva":{firstDay:7,weekend:[7],minimalDays:1},ksb:{firstDay:1,weekend:[6,7],minimalDays:1},ksf:{firstDay:1,weekend:[6,7],minimalDays:1},ksh:{firstDay:1,weekend:[6,7],minimalDays:4},ku:{firstDay:1,weekend:[6,7],minimalDays:1},kw:{firstDay:1,weekend:[6,7],minimalDays:4},kxv:{firstDay:7,weekend:[7],minimalDays:1},"kxv-Deva":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Latn":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Orya":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Telu":{firstDay:7,weekend:[7],minimalDays:1},ky:{firstDay:1,weekend:[6,7],minimalDays:1},la:{firstDay:1,weekend:[6,7],minimalDays:4},lag:{firstDay:1,weekend:[6,7],minimalDays:1},lb:{firstDay:1,weekend:[6,7],minimalDays:4},lg:{firstDay:1,weekend:[7],minimalDays:1},lij:{firstDay:1,weekend:[6,7],minimalDays:4},lkt:{firstDay:7,weekend:[6,7],minimalDays:1},lmo:{firstDay:1,weekend:[6,7],minimalDays:4},ln:{firstDay:1,weekend:[6,7],minimalDays:1},"ln-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CG":{firstDay:1,weekend:[6,7],minimalDays:1},lo:{firstDay:7,weekend:[6,7],minimalDays:1},lrc:{firstDay:6,weekend:[5],minimalDays:1},"lrc-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},lt:{firstDay:1,weekend:[6,7],minimalDays:4},lu:{firstDay:1,weekend:[6,7],minimalDays:1},luo:{firstDay:7,weekend:[6,7],minimalDays:1},luy:{firstDay:7,weekend:[6,7],minimalDays:1},lv:{firstDay:1,weekend:[6,7],minimalDays:1},mai:{firstDay:7,weekend:[7],minimalDays:1},mas:{firstDay:7,weekend:[6,7],minimalDays:1},"mas-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},mdf:{firstDay:1,weekend:[6,7],minimalDays:4},mer:{firstDay:7,weekend:[6,7],minimalDays:1},mfe:{firstDay:1,weekend:[6,7],minimalDays:1},mg:{firstDay:1,weekend:[6,7],minimalDays:1},mgh:{firstDay:7,weekend:[6,7],minimalDays:1},mgo:{firstDay:1,weekend:[6,7],minimalDays:1},mi:{firstDay:1,weekend:[6,7],minimalDays:1},mic:{firstDay:7,weekend:[6,7],minimalDays:1},mk:{firstDay:1,weekend:[6,7],minimalDays:1},ml:{firstDay:7,weekend:[7],minimalDays:1},mn:{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong":{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong-MN":{firstDay:1,weekend:[6,7],minimalDays:1},mni:{firstDay:7,weekend:[7],minimalDays:1},"mni-Beng":{firstDay:7,weekend:[7],minimalDays:1},"mni-Mtei":{firstDay:7,weekend:[7],minimalDays:1},moh:{firstDay:7,weekend:[6,7],minimalDays:1},mr:{firstDay:7,weekend:[7],minimalDays:1},ms:{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"ms-SG":{firstDay:7,weekend:[6,7],minimalDays:1},mt:{firstDay:7,weekend:[6,7],minimalDays:1},mua:{firstDay:1,weekend:[6,7],minimalDays:1},mus:{firstDay:7,weekend:[6,7],minimalDays:1},my:{firstDay:7,weekend:[6,7],minimalDays:1},myv:{firstDay:1,weekend:[6,7],minimalDays:4},mzn:{firstDay:6,weekend:[5],minimalDays:1},naq:{firstDay:1,weekend:[6,7],minimalDays:1},nb:{firstDay:1,weekend:[6,7],minimalDays:4},"nb-SJ":{firstDay:1,weekend:[6,7],minimalDays:4},nd:{firstDay:7,weekend:[6,7],minimalDays:1},nds:{firstDay:1,weekend:[6,7],minimalDays:4},"nds-NL":{firstDay:1,weekend:[6,7],minimalDays:4},ne:{firstDay:7,weekend:[6,7],minimalDays:1},"ne-IN":{firstDay:7,weekend:[7],minimalDays:1},nl:{firstDay:1,weekend:[6,7],minimalDays:4},"nl-AW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"nl-BQ":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-CW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SR":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SX":{firstDay:1,weekend:[6,7],minimalDays:1},nmg:{firstDay:1,weekend:[6,7],minimalDays:1},nn:{firstDay:1,weekend:[6,7],minimalDays:4},nnh:{firstDay:1,weekend:[6,7],minimalDays:1},no:{firstDay:1,weekend:[6,7],minimalDays:4},nqo:{firstDay:1,weekend:[6,7],minimalDays:1},nr:{firstDay:7,weekend:[6,7],minimalDays:1},nso:{firstDay:7,weekend:[6,7],minimalDays:1},nus:{firstDay:1,weekend:[6,7],minimalDays:1},nv:{firstDay:7,weekend:[6,7],minimalDays:1},ny:{firstDay:1,weekend:[6,7],minimalDays:1},nyn:{firstDay:1,weekend:[7],minimalDays:1},oc:{firstDay:1,weekend:[6,7],minimalDays:4},"oc-ES":{firstDay:1,weekend:[6,7],minimalDays:4},om:{firstDay:7,weekend:[6,7],minimalDays:1},"om-KE":{firstDay:7,weekend:[6,7],minimalDays:1},or:{firstDay:7,weekend:[7],minimalDays:1},os:{firstDay:1,weekend:[6,7],minimalDays:1},"os-RU":{firstDay:1,weekend:[6,7],minimalDays:4},osa:{firstDay:7,weekend:[6,7],minimalDays:1},pa:{firstDay:7,weekend:[7],minimalDays:1},"pa-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"pa-Guru":{firstDay:7,weekend:[7],minimalDays:1},pap:{firstDay:1,weekend:[6,7],minimalDays:1},"pap-AW":{firstDay:1,weekend:[6,7],minimalDays:1},pcm:{firstDay:1,weekend:[6,7],minimalDays:1},pis:{firstDay:1,weekend:[6,7],minimalDays:1},pl:{firstDay:1,weekend:[6,7],minimalDays:4},prg:{firstDay:1,weekend:[6,7],minimalDays:4},ps:{firstDay:6,weekend:[4,5],minimalDays:1},"ps-PK":{firstDay:7,weekend:[6,7],minimalDays:1},pt:{firstDay:7,weekend:[6,7],minimalDays:1},"pt-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-CV":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-MZ":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-PT":{firstDay:7,weekend:[6,7],minimalDays:4},"pt-ST":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-TL":{firstDay:1,weekend:[6,7],minimalDays:1},qu:{firstDay:7,weekend:[6,7],minimalDays:1},"qu-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"qu-EC":{firstDay:1,weekend:[6,7],minimalDays:1},quc:{firstDay:7,weekend:[6,7],minimalDays:1},raj:{firstDay:7,weekend:[7],minimalDays:1},rhg:{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg":{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg-BD":{firstDay:7,weekend:[6,7],minimalDays:1},rif:{firstDay:1,weekend:[6,7],minimalDays:1},rm:{firstDay:1,weekend:[6,7],minimalDays:4},rn:{firstDay:1,weekend:[6,7],minimalDays:1},ro:{firstDay:1,weekend:[6,7],minimalDays:1},"ro-MD":{firstDay:1,weekend:[6,7],minimalDays:1},rof:{firstDay:1,weekend:[6,7],minimalDays:1},ru:{firstDay:1,weekend:[6,7],minimalDays:4},"ru-BY":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KG":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KZ":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-MD":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-UA":{firstDay:1,weekend:[6,7],minimalDays:1},rw:{firstDay:1,weekend:[6,7],minimalDays:1},rwk:{firstDay:1,weekend:[6,7],minimalDays:1},sa:{firstDay:7,weekend:[7],minimalDays:1},sah:{firstDay:1,weekend:[6,7],minimalDays:4},saq:{firstDay:7,weekend:[6,7],minimalDays:1},sat:{firstDay:7,weekend:[7],minimalDays:1},"sat-Deva":{firstDay:7,weekend:[7],minimalDays:1},"sat-Olck":{firstDay:7,weekend:[7],minimalDays:1},sbp:{firstDay:1,weekend:[6,7],minimalDays:1},sc:{firstDay:1,weekend:[6,7],minimalDays:4},scn:{firstDay:1,weekend:[6,7],minimalDays:4},sd:{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Deva":{firstDay:7,weekend:[7],minimalDays:1},sdh:{firstDay:6,weekend:[5],minimalDays:1},"sdh-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},se:{firstDay:1,weekend:[6,7],minimalDays:4},"se-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"se-SE":{firstDay:1,weekend:[6,7],minimalDays:4},seh:{firstDay:7,weekend:[6,7],minimalDays:1},ses:{firstDay:1,weekend:[6,7],minimalDays:1},sg:{firstDay:1,weekend:[6,7],minimalDays:1},shi:{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Tfng":{firstDay:1,weekend:[6,7],minimalDays:1},shn:{firstDay:7,weekend:[6,7],minimalDays:1},"shn-TH":{firstDay:7,weekend:[6,7],minimalDays:1},si:{firstDay:1,weekend:[6,7],minimalDays:1},sid:{firstDay:7,weekend:[6,7],minimalDays:1},sk:{firstDay:1,weekend:[6,7],minimalDays:4},skr:{firstDay:7,weekend:[6,7],minimalDays:1},sl:{firstDay:1,weekend:[6,7],minimalDays:1},sma:{firstDay:1,weekend:[6,7],minimalDays:4},"sma-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smj:{firstDay:1,weekend:[6,7],minimalDays:4},"smj-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smn:{firstDay:1,weekend:[6,7],minimalDays:4},sms:{firstDay:1,weekend:[6,7],minimalDays:4},sn:{firstDay:7,weekend:[6,7],minimalDays:1},so:{firstDay:1,weekend:[6,7],minimalDays:1},"so-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"so-ET":{firstDay:7,weekend:[6,7],minimalDays:1},"so-KE":{firstDay:7,weekend:[6,7],minimalDays:1},sq:{firstDay:1,weekend:[6,7],minimalDays:1},"sq-MK":{firstDay:1,weekend:[6,7],minimalDays:1},"sq-XK":{firstDay:1,weekend:[6,7],minimalDays:1},sr:{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-XK":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-XK":{firstDay:1,weekend:[6,7],minimalDays:1},ss:{firstDay:7,weekend:[6,7],minimalDays:1},"ss-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},ssy:{firstDay:1,weekend:[6,7],minimalDays:1},st:{firstDay:7,weekend:[6,7],minimalDays:1},"st-LS":{firstDay:1,weekend:[6,7],minimalDays:1},su:{firstDay:7,weekend:[6,7],minimalDays:1},"su-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},sv:{firstDay:1,weekend:[6,7],minimalDays:4},"sv-AX":{firstDay:1,weekend:[6,7],minimalDays:4},"sv-FI":{firstDay:1,weekend:[6,7],minimalDays:4},sw:{firstDay:1,weekend:[6,7],minimalDays:1},"sw-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"sw-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"sw-UG":{firstDay:1,weekend:[7],minimalDays:1},syr:{firstDay:6,weekend:[5,6],minimalDays:1},"syr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},szl:{firstDay:1,weekend:[6,7],minimalDays:4},ta:{firstDay:7,weekend:[7],minimalDays:1},"ta-LK":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-SG":{firstDay:7,weekend:[6,7],minimalDays:1},te:{firstDay:7,weekend:[7],minimalDays:1},teo:{firstDay:1,weekend:[7],minimalDays:1},"teo-KE":{firstDay:7,weekend:[6,7],minimalDays:1},tg:{firstDay:1,weekend:[6,7],minimalDays:1},th:{firstDay:7,weekend:[6,7],minimalDays:1},ti:{firstDay:7,weekend:[6,7],minimalDays:1},"ti-ER":{firstDay:1,weekend:[6,7],minimalDays:1},tig:{firstDay:1,weekend:[6,7],minimalDays:1},tk:{firstDay:1,weekend:[6,7],minimalDays:1},tn:{firstDay:7,weekend:[6,7],minimalDays:1},"tn-BW":{firstDay:7,weekend:[6,7],minimalDays:1},to:{firstDay:1,weekend:[6,7],minimalDays:1},tok:{firstDay:1,weekend:[6,7],minimalDays:1},tpi:{firstDay:1,weekend:[6,7],minimalDays:1},tr:{firstDay:1,weekend:[6,7],minimalDays:1},"tr-CY":{firstDay:1,weekend:[6,7],minimalDays:1},trv:{firstDay:7,weekend:[6,7],minimalDays:1},trw:{firstDay:7,weekend:[6,7],minimalDays:1},ts:{firstDay:7,weekend:[6,7],minimalDays:1},tt:{firstDay:1,weekend:[6,7],minimalDays:4},twq:{firstDay:1,weekend:[6,7],minimalDays:1},tyv:{firstDay:1,weekend:[6,7],minimalDays:4},tzm:{firstDay:1,weekend:[6,7],minimalDays:1},ug:{firstDay:1,weekend:[6,7],minimalDays:1},uk:{firstDay:1,weekend:[6,7],minimalDays:1},und:{firstDay:7,weekend:[6,7],minimalDays:1},ur:{firstDay:7,weekend:[6,7],minimalDays:1},"ur-IN":{firstDay:7,weekend:[7],minimalDays:1},uz:{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Arab":{firstDay:6,weekend:[4,5],minimalDays:1},"uz-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},vai:{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Vaii":{firstDay:1,weekend:[6,7],minimalDays:1},ve:{firstDay:7,weekend:[6,7],minimalDays:1},vec:{firstDay:1,weekend:[6,7],minimalDays:4},vi:{firstDay:1,weekend:[6,7],minimalDays:1},vmw:{firstDay:7,weekend:[6,7],minimalDays:1},vo:{firstDay:1,weekend:[6,7],minimalDays:1},vun:{firstDay:1,weekend:[6,7],minimalDays:1},wa:{firstDay:1,weekend:[6,7],minimalDays:4},wae:{firstDay:1,weekend:[6,7],minimalDays:4},wal:{firstDay:7,weekend:[6,7],minimalDays:1},wbp:{firstDay:1,weekend:[6,7],minimalDays:1},wo:{firstDay:1,weekend:[6,7],minimalDays:1},xh:{firstDay:7,weekend:[6,7],minimalDays:1},xnr:{firstDay:7,weekend:[7],minimalDays:1},xog:{firstDay:1,weekend:[7],minimalDays:1},yav:{firstDay:1,weekend:[6,7],minimalDays:1},yi:{firstDay:1,weekend:[6,7],minimalDays:1},yo:{firstDay:1,weekend:[6,7],minimalDays:1},"yo-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},yrl:{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-VE":{firstDay:7,weekend:[6,7],minimalDays:1},yue:{firstDay:7,weekend:[6,7],minimalDays:1},"yue-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"yue-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},za:{firstDay:1,weekend:[6,7],minimalDays:1},zgh:{firstDay:1,weekend:[6,7],minimalDays:1},zh:{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-MO":{firstDay:7,weekend:[6,7],minimalDays:1},zu:{firstDay:7,weekend:[6,7],minimalDays:1}},fn="Invalid date: day is greater than the maximum valid day for the month and year.",nm="Invalid date: date is before the minimum allowed date.",om="Invalid date: date is after the maximum allowed date.",St="Invalid date: date is within a disabled range.",vn="Invalid time: time is before the minimum allowed time.",Dn="Invalid time: time is after the maximum allowed time.",lm="Invalid range: end time must be after start time.",Hi="Invalid time: time is within a disabled range.",dm="Invalid date-time: date-time is before the minimum allowed date-time.",um="Invalid date-time: date-time is after the maximum allowed date-time.";function ae(e){const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${a}`}function re(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e)}function Wi(e,t,i,a){const r=e.split("T")[0];if(t&&r<t.split("T")[0]||i&&r>i.split("T")[0])return!0;if(a&&a.length>0)for(const s of a){const o=s.start.split("T")[0],l=s.end?s.end.split("T")[0]:o;if(r>=o&&r<=l)return!0}return!1}function Yt(e,t,i,a,r){const s=e.split("T")[0];return t&&s<t.split("T")[0]?r?.minDateMessage??nm:i&&s>i.split("T")[0]?r?.maxDateMessage??om:Wi(s,void 0,void 0,a)?r?.disabledDateRangeMessage??St:null}function wn(e,t,i,a,r){const s=re(e),o=re(t);if(isNaN(s.getTime())||isNaN(o.getTime()))return!1;const l=new Date(s);l.setHours(0,0,0,0);const u=new Date(o);for(u.setHours(0,0,0,0);l<=u;){if(Wi(ae(l),a,r,i))return!0;l.setDate(l.getDate()+1)}return!1}function $n(e){return new Intl.DateTimeFormat(e??"en",{year:"numeric",month:"numeric",day:"numeric"}).formatToParts(new Date)}function kn(e,t){return e===2?new Date(t,1,29).getDate()===29||!t?29:28:e===4||e===6||e===9||e===11?30:31}function vr(e){return yt(e,new Date)}function yt(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function pm(e){const t=[0,1,2,3,4,5,6],i=e%7;return[...t.slice(i),...t.slice(0,i)]}function Tn(e){const t=e??"en",i=bn[t]||bn[t.split("-")[0]]||{firstDay:0};return pm(i.firstDay)}function hm(e){const t=new Intl.DateTimeFormat(e,{weekday:"narrow"}),i=new Date(2025,10,30);return Tn(e).map(a=>{const r=new Date(i);return r.setDate(i.getDate()+a),t.format(r)})}function Sn(e,t){return new Intl.DateTimeFormat(e,{month:"long",year:"numeric"}).format(t)}function Ki(e,t){return new Intl.DateTimeFormat(e,{dateStyle:"full"}).format(t)}function Dr(e,t,i){for(let a=0;a<i;a++){const r=new Date(t.getFullYear(),t.getMonth()+a,1);if(e.getMonth()===r.getMonth()&&e.getFullYear()===r.getFullYear())return!0}return!1}function cm(e,t,i="long"){return new Intl.DateTimeFormat(e,{month:i,year:"numeric"}).formatToParts(t).filter(r=>r.type==="month"||r.type==="year")}function wr(e,t){const i=e||"en-US",s=new Intl.DateTimeFormat(i,{day:"numeric"}).formatToParts(t).find(o=>o.type==="day");return s?s.value:t.getDate().toString()}function _n(e,t){const i=ae(e),a=ae(t);return i===a?{start:i}:{start:i,end:a}}function An(e){return e.length?e.map(a=>({start:re(a.start).getTime(),end:re(a.end??a.start).getTime()})).sort((a,r)=>a.start-r.start).reduce((a,r)=>{const s=a[a.length-1];if(s){const o=new Date(s.end);if(o.setDate(o.getDate()+1),r.start<=o.getTime())return s.end=Math.max(s.end,r.end),a}return[...a,r]},[]).map(a=>_n(new Date(a.start),new Date(a.end))):[]}class Ji{constructor(t,i){this._currentDate=new Date,this._yearSelectorOpen=!1,this.host=t,this.options=i,t.addController(this)}hostConnected(){}get currentDate(){return this._currentDate}set currentDate(t){Object.is(t,this._currentDate)||(this._currentDate=t,this.host.requestUpdate())}get yearSelectorOpen(){return this._yearSelectorOpen}set yearSelectorOpen(t){Object.is(t,this._yearSelectorOpen)||(this._yearSelectorOpen=t,this.host.requestUpdate())}prevMonth(){const t=this._currentDate;this.currentDate=new Date(t.getFullYear(),t.getMonth()-1,1)}nextMonth(){const t=this._currentDate;this.currentDate=new Date(t.getFullYear(),t.getMonth()+1,1)}canGoPrev(){const t=this.options.getMinDate();if(!t)return!0;const i=new Date(this._currentDate.getFullYear(),this._currentDate.getMonth(),0);return ae(i)>=t}canGoNext(){const t=this.options.getMaxDate();if(!t)return!0;const i=(this.options.getNumberOfMonths()??1)-1,a=new Date(this._currentDate.getFullYear(),this._currentDate.getMonth()+i+1,1);return ae(a)<=t}get effectiveMinYear(){const t=this.options.getMinDate();return t?re(t).getFullYear():1900}get effectiveMaxYear(){const t=this.options.getMaxDate();return t?re(t).getFullYear():2099}get yearList(){const t=[];for(let i=this.effectiveMinYear;i<=this.effectiveMaxYear;i++)t.push(i);return t}toggleYearSelector(){this.yearSelectorOpen=!this._yearSelectorOpen,this.options.onYearSelectorToggled?.()}selectYear(t){this.currentDate=new Date(t,this._currentDate.getMonth(),1),this.yearSelectorOpen=!1}closeYearSelector(){this.yearSelectorOpen=!1}navigateToDate(t){!isNaN(t.getTime())&&!Dr(t,this._currentDate,this.options.getNumberOfMonths()??1)&&(this.currentDate=t)}isDisabled(t){return Wi(ae(t),this.options.getMinDate(),this.options.getMaxDate(),this.options.getDisabledRanges())}}const Xi=e=>e?d.html`<span aria-hidden="true"> *</span>`:d.nothing,le=(e,t,i=!1,a=void 0,r=!0)=>r?t.label?d.html`<label
42
42
  class="gui-label"
43
43
  for=${e}
44
44
  data-cy=${`${e}_label`}
45
45
  id=${a?`${e}_${a}_label`:`${e}_label`}
46
46
  >
47
- ${t.label}${Hi(t.required)}
48
- ${Fs(e,t)} ${i?j(e,t):l.nothing}
49
- </label>`:l.nothing:t.label?l.html`<span
47
+ ${t.label}${Xi(t.required)}
48
+ ${En(e,t)} ${i?j(e,t):d.nothing}
49
+ </label>`:d.nothing:t.label?d.html`<span
50
50
  class="gui-label"
51
51
  data-cy=${`${e}_label`}
52
52
  id=${a?`${e}_${a}_label`:`${e}_label`}
53
53
  >
54
- ${t.label}${Hi(t.required)}
55
- ${Fs(e,t)} ${i?j(e,t):l.nothing}
56
- </span>`:l.nothing,Fs=(e,t)=>t.hint?l.html`<div class="gui-widget-hint" id=${`${e}_hint`}>${t.hint}</div>`:l.html``,Xe=(e,t)=>{const i={[`gui-${e}--icon`]:!1,[`gui-${e}--icon-right`]:!1};if(t.icon){i[`gui-${e}--icon`]=!0;const a={"gui-widget-icon":!0,[t.icon]:!0};return{widgetClasses:i,html:l.html`<span
57
- class=${_.classMap(a)}
54
+ ${t.label}${Xi(t.required)}
55
+ ${En(e,t)} ${i?j(e,t):d.nothing}
56
+ </span>`:d.nothing,En=(e,t)=>t.hint?d.html`<div class="gui-widget-hint" id=${`${e}_hint`}>${t.hint}</div>`:d.html``,Qe=(e,t)=>{const i={[`gui-${e}--icon`]:!1,[`gui-${e}--icon-right`]:!1};if(t.icon){i[`gui-${e}--icon`]=!0;const a={"gui-widget-icon":!0,[t.icon]:!0};return{widgetClasses:i,html:d.html`<span
57
+ class=${S.classMap(a)}
58
58
  data-icon=${t.icon}
59
59
  aria-hidden="true"
60
- ></span>`}}else return{widgetClasses:i,html:l.html``}},j=(e,t)=>{const i=t.touched&&t.errors&&t.errors.length>0,a={"gui-validator":!0,"gui-validator--empty":!i};return l.html`<ul
61
- class=${_.classMap(a)}
60
+ ></span>`}}else return{widgetClasses:i,html:d.html``}},j=(e,t)=>{const i=t.touched&&t.errors&&t.errors.length>0,a={"gui-validator":!0,"gui-validator--empty":!i};return d.html`<ul
61
+ class=${S.classMap(a)}
62
62
  id=${`${e}_errors`}
63
63
  role="alert"
64
- data-cy=${i?`${e}_validator-errors`:l.nothing}
64
+ data-cy=${i?`${e}_validator-errors`:d.nothing}
65
65
  >
66
- ${i?t.errors?.map(r=>l.html`<li class="gui-validator__error" data-cy=${`${e}_validator-error`}>
66
+ ${i?t.errors?.map(r=>d.html`<li class="gui-validator__error" data-cy=${`${e}_validator-error`}>
67
67
  ${r}
68
- </li>`):l.nothing}
69
- </ul>`};function Pa(e,t){const i=new Date(e);return i.setDate(1),i.setMonth(i.getMonth()+t),i}function Wi(e){const t={uid:e.uid,label:e.label,hint:e.hint,errors:e.errors,touched:e.touched,required:e.required},i=Array.from({length:e.numberOfMonths??1},(r,s)=>s),a=i.map(r=>Ms(e.localeId,Pa(e.currentDate,r))).join(", ");return l.html`
70
- ${e.label?le(e.uid,t,!1,"calendar"):l.nothing}
68
+ </li>`):d.nothing}
69
+ </ul>`};function $r(e,t){const i=new Date(e);return i.setDate(1),i.setMonth(i.getMonth()+t),i}function Qi(e){const t={uid:e.uid,label:e.label,hint:e.hint,errors:e.errors,touched:e.touched,required:e.required},i=Array.from({length:e.numberOfMonths??1},(r,s)=>s),a=i.map(r=>Sn(e.localeId,$r(e.currentDate,r))).join(", ");return d.html`
70
+ ${e.label?le(e.uid,t,!1,"calendar"):d.nothing}
71
71
 
72
72
  <div class="gui-widget" @focusout=${e.onFocusOut}>
73
73
  <div
74
74
  id=${`${e.uid}_calendar`}
75
75
  class="gui-calendar-input"
76
76
  role="group"
77
- aria-labelledby=${e.label?`${e.uid}_calendar_label`:l.nothing}
78
- aria-disabled=${e.disabled?"true":l.nothing}
77
+ aria-labelledby=${e.label?`${e.uid}_calendar_label`:d.nothing}
78
+ aria-disabled=${e.disabled?"true":d.nothing}
79
79
  >
80
80
  <div class="gui-visually-hidden" aria-live="polite">${a}</div>
81
81
  ${e.renderAboveCalendar()}
82
82
  <div class="gui-calendar__container">
83
- ${Bs("prev",{icon:e.prevMonthIcon,ariaLabel:e.prevMonthAriaLabel,disabled:!e.canGoPrev,onClick:e.onPrevMonthClick})}
83
+ ${Cn("prev",{icon:e.prevMonthIcon,ariaLabel:e.prevMonthAriaLabel,disabled:!e.canGoPrev,onClick:e.onPrevMonthClick})}
84
84
 
85
85
  <div class="gui-calendar__months-grid">
86
86
  ${i.map(r=>e.renderMonthPanel(r))}
87
87
  </div>
88
88
 
89
- ${Bs("next",{icon:e.nextMonthIcon,ariaLabel:e.nextMonthAriaLabel,disabled:!e.canGoNext,onClick:e.onNextMonthClick})}
89
+ ${Cn("next",{icon:e.nextMonthIcon,ariaLabel:e.nextMonthAriaLabel,disabled:!e.canGoNext,onClick:e.onNextMonthClick})}
90
90
  </div>
91
91
  </div>
92
92
  </div>
93
93
 
94
- ${e.errors?.length?j(e.uid,t):l.nothing}
95
- `}function Bs(e,t){return e==="prev"?l.html`
94
+ ${e.errors?.length?j(e.uid,t):d.nothing}
95
+ `}function Cn(e,t){return e==="prev"?d.html`
96
96
  <button
97
97
  type="button"
98
98
  class="gui-button gui-calendar__month-button gui-calendar__month-button--prev"
@@ -100,11 +100,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
100
100
  @click=${t.onClick}
101
101
  aria-label=${t.ariaLabel??"Previous month"}
102
102
  >
103
- ${t.icon?l.html`<span
103
+ ${t.icon?d.html`<span
104
104
  class=${`gui-widget-icon ${t.icon}`}
105
105
  data-icon=${t.icon}
106
106
  aria-hidden="true"
107
- ></span>`:l.html`<svg
107
+ ></span>`:d.html`<svg
108
108
  xmlns="http://www.w3.org/2000/svg"
109
109
  width="16"
110
110
  height="16"
@@ -116,7 +116,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
116
116
  ></path>
117
117
  </svg>`}
118
118
  </button>
119
- `:l.html`
119
+ `:d.html`
120
120
  <button
121
121
  type="button"
122
122
  class="gui-button gui-calendar__month-button gui-calendar__month-button--next"
@@ -124,11 +124,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
124
124
  @click=${t.onClick}
125
125
  aria-label=${t.ariaLabel??"Next month"}
126
126
  >
127
- ${t.icon?l.html`<span
127
+ ${t.icon?d.html`<span
128
128
  class=${`gui-widget-icon ${t.icon}`}
129
129
  data-icon=${t.icon}
130
130
  aria-hidden="true"
131
- ></span>`:l.html`<svg
131
+ ></span>`:d.html`<svg
132
132
  xmlns="http://www.w3.org/2000/svg"
133
133
  width="16"
134
134
  height="16"
@@ -140,15 +140,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
140
140
  ></path>
141
141
  </svg>`}
142
142
  </button>
143
- `}function mu(e){const t=Pa(e.currentDate,e.offset);return l.html`
143
+ `}function mm(e){const t=$r(e.currentDate,e.offset);return d.html`
144
144
  <div class="gui-calendar__panel">
145
145
  ${e.renderHeader(t)} ${e.renderBelowHeader(e.offset)}
146
146
  ${e.renderPanelBody(e.offset)}
147
147
  </div>
148
- `}function Ki(e){return mu({currentDate:e.currentDate,offset:e.offset,renderHeader:t=>cu(t,{localeId:e.localeId,monthFormat:e.monthFormat,yearSelectorOpen:e.yearSelectorOpen,selectYearAriaLabel:e.selectYearAriaLabel,onToggleYearSelector:e.onToggleYearSelector}),renderBelowHeader:e.renderBelowHeader??(()=>l.nothing),renderPanelBody:e.renderPanelBody})}function Ji(e){return e.yearSelectorOpen&&e.offset===0?gu({years:e.years,currentYear:e.currentYear,onSelectYear:e.onSelectYear,onKeydown:e.onYearKeydown,ariaLabel:e.yearGridAriaLabel}):yu(Ca(e.getDays(e.offset),7),uu(e.localeId),t=>e.renderDay(t),Ms(e.localeId,Pa(e.currentDate,e.offset)))}function cu(e,t){const i=hu(t.localeId,e,t.monthFormat);return l.html`
148
+ `}function ji(e){return mm({currentDate:e.currentDate,offset:e.offset,renderHeader:t=>ym(t,{localeId:e.localeId,monthFormat:e.monthFormat,yearSelectorOpen:e.yearSelectorOpen,selectYearAriaLabel:e.selectYearAriaLabel,onToggleYearSelector:e.onToggleYearSelector}),renderBelowHeader:e.renderBelowHeader??(()=>d.nothing),renderPanelBody:e.renderPanelBody})}function ea(e){return e.yearSelectorOpen&&e.offset===0?bm({years:e.years,currentYear:e.currentYear,onSelectYear:e.onSelectYear,onKeydown:e.onYearKeydown,ariaLabel:e.yearGridAriaLabel}):gm(fr(e.getDays(e.offset),7),hm(e.localeId),t=>e.renderDay(t),Sn(e.localeId,$r(e.currentDate,e.offset)))}function ym(e,t){const i=cm(t.localeId,e,t.monthFormat);return d.html`
149
149
  <header class="gui-calendar__header">
150
150
  <h2>
151
- ${i.map(a=>a.type==="year"?l.html`<button
151
+ ${i.map(a=>a.type==="year"?d.html`<button
152
152
  type="button"
153
153
  class="gui-calendar__year-selector"
154
154
  @click=${t.onToggleYearSelector}
@@ -168,31 +168,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
168
168
  ></path>
169
169
  </svg>
170
170
  </span>
171
- </button>`:l.html`<span class="gui-calendar__month-name">${a.value}</span>`)}
171
+ </button>`:d.html`<span class="gui-calendar__month-name">${a.value}</span>`)}
172
172
  </h2>
173
173
  </header>
174
- `}function yu(e,t,i,a){return l.html`
175
- <div class="gui-calendar__days-grid" role="grid" aria-label=${a??l.nothing}>
174
+ `}function gm(e,t,i,a){return d.html`
175
+ <div class="gui-calendar__days-grid" role="grid" aria-label=${a??d.nothing}>
176
176
  <div role="row" class="gui-calendar__rows">
177
- ${qe.repeat(t,(r,s)=>s,r=>l.html`<span class="gui-calendar__weekday" role="columnheader">${r}</span>`)}
177
+ ${qe.repeat(t,(r,s)=>s,r=>d.html`<span class="gui-calendar__weekday" role="columnheader">${r}</span>`)}
178
178
  </div>
179
179
 
180
- ${qe.repeat(e,r=>l.html`
180
+ ${qe.repeat(e,r=>d.html`
181
181
  <div role="row" class="gui-calendar__rows">
182
182
  ${qe.repeat(r,s=>s.date.toISOString(),s=>i(s))}
183
183
  </div>
184
184
  `)}
185
185
  </div>
186
- `}function gu(e){const t=e.currentYear;return l.html`
186
+ `}function bm(e){const t=e.currentYear;return d.html`
187
187
  <div
188
188
  class="gui-calendar__year-grid"
189
189
  role="grid"
190
190
  aria-label=${e.ariaLabel??"Year selection"}
191
191
  @keydown=${e.onKeydown}
192
192
  >
193
- ${Ca(e.years,4).map(i=>l.html`
193
+ ${fr(e.years,4).map(i=>d.html`
194
194
  <div role="row" class="gui-calendar__year-row">
195
- ${i.map(a=>l.html`
195
+ ${i.map(a=>d.html`
196
196
  <button
197
197
  type="button"
198
198
  role="gridcell"
@@ -208,16 +208,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
208
208
  </div>
209
209
  `)}
210
210
  </div>
211
- `}function Xi(e,t){const i=e.getTime();let a=!1,r=!1,s=!1,o=!1,d=!1,p=!1,u=!1,h=!1;if(t.selectedISO&&(a=mt(e,re(t.selectedISO))),t.invalidRange){const m=t.invalidRange.start,y=t.invalidRange.end;p=mt(e,m),u=mt(e,y),i>m.getTime()&&i<y.getTime()&&(h=!0)}if(t.selectingSpan&&(d=i>=t.selectingSpan.start.getTime()&&i<=t.selectingSpan.end.getTime()),t.ranges)for(const m of t.ranges)mt(e,m.start)&&(r=!0,s=!m.end),m.end&&(mt(e,m.end)&&(s=!0),i>m.start.getTime()&&i<m.end.getTime()&&(o=!0));if(t.workingRange){const{start:m,end:y}=t.workingRange;mt(e,m)&&(r=!0),mt(e,y)&&(s=!0),i>m.getTime()&&i<y.getTime()&&(o=!0)}return{isSelected:a,isRangeStart:r,isRangeEnd:s,isInRange:o,isOneDayRange:r&&s,isAnchor:t.anchor?mt(e,t.anchor):!1,isSelecting:d,isInvalidStart:p,isInvalidEnd:u,isInvalidInRange:h}}function Qi(e){const{currentDate:t,offset:i=0,localeId:a,numberOfMonths:r=1}=e,s=new Date(t.getFullYear(),t.getMonth()+i,1),o=s.getMonth(),d=s.getDay(),p=Os(a)[0],u=(d-p+7)%7,h=new Date(s);h.setDate(s.getDate()-u);let m=[];for(let y=0;y<42;y++){const g=new Date(h);g.setDate(h.getDate()+y),m.push(e.toDay({date:g,dayLabel:xa(a,g),isCurrentMonth:g.getMonth()===o,isToday:La(g),isDisabled:e.isDisabled(g)}))}for(let y=0;y<2;y++)m.slice(-7).every(A=>!A.isCurrentMonth)&&(m=m.slice(0,-7));if(i===0&&!m.some(y=>y.isFocusable)&&!(e.focusFallbackDates??[]).some(g=>Ea(g,t,r))){const g=m.find(A=>A.isCurrentMonth&&!A.isDisabled);g&&(g.isFocusable=!0)}return m}var bu=Object.defineProperty,fu=Object.getOwnPropertyDescriptor,ne=(e,t,i,a)=>{for(var r=a>1?void 0:a?fu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&bu(t,i,r),r};let se=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=void 0,this._nav=new Yi(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Gi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:e=>{const t=re(e);this.selectDate({date:t,dayLabel:xa(this.localeId,t),isCurrentMonth:!0,isToday:La(t),isSelected:!1,isFocusable:!0,isDisabled:this.isDisabled(t)})},onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new zt(this,{onLeave:()=>{this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}})}get _currentDate(){return this._nav.currentDate}set _currentDate(e){this._nav.currentDate=e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){e.has("value")&&this.value&&this._nav.navigateToDate(re(this.value))}render(){return Wi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>l.nothing,renderMonthPanel:e=>Ki({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this._nav.toggleYearSelector(),renderPanelBody:t=>this.renderPanelBody(t)})})}renderPanelBody(e){return Ji({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}renderDay(e){const t={"gui-calendar__day-button":!0,today:e.isToday,selected:e.isSelected,disabled:e.isDisabled,"other-month":!e.isCurrentMonth};return l.html`
211
+ `}function ta(e,t){const i=e.getTime();let a=!1,r=!1,s=!1,o=!1,l=!1,u=!1,p=!1,h=!1;if(t.selectedISO&&(a=yt(e,re(t.selectedISO))),t.invalidRange){const c=t.invalidRange.start,y=t.invalidRange.end;u=yt(e,c),p=yt(e,y),i>c.getTime()&&i<y.getTime()&&(h=!0)}if(t.selectingSpan&&(l=i>=t.selectingSpan.start.getTime()&&i<=t.selectingSpan.end.getTime()),t.ranges)for(const c of t.ranges)yt(e,c.start)&&(r=!0,s=!c.end),c.end&&(yt(e,c.end)&&(s=!0),i>c.start.getTime()&&i<c.end.getTime()&&(o=!0));if(t.workingRange){const{start:c,end:y}=t.workingRange;yt(e,c)&&(r=!0),yt(e,y)&&(s=!0),i>c.getTime()&&i<y.getTime()&&(o=!0)}return{isSelected:a,isRangeStart:r,isRangeEnd:s,isInRange:o,isOneDayRange:r&&s,isAnchor:t.anchor?yt(e,t.anchor):!1,isSelecting:l,isInvalidStart:u,isInvalidEnd:p,isInvalidInRange:h}}function ia(e){const{currentDate:t,offset:i=0,localeId:a,numberOfMonths:r=1}=e,s=new Date(t.getFullYear(),t.getMonth()+i,1),o=s.getMonth(),l=s.getDay(),u=Tn(a)[0],p=(l-u+7)%7,h=new Date(s);h.setDate(s.getDate()-p);let c=[];for(let y=0;y<42;y++){const g=new Date(h);g.setDate(h.getDate()+y),c.push(e.toDay({date:g,dayLabel:wr(a,g),isCurrentMonth:g.getMonth()===o,isToday:vr(g),isDisabled:e.isDisabled(g)}))}for(let y=0;y<2;y++)c.slice(-7).every(_=>!_.isCurrentMonth)&&(c=c.slice(0,-7));if(i===0&&!c.some(y=>y.isFocusable)&&!(e.focusFallbackDates??[]).some(g=>Dr(g,t,r))){const g=c.find(_=>_.isCurrentMonth&&!_.isDisabled);g&&(g.isFocusable=!0)}return c}var fm=Object.defineProperty,vm=Object.getOwnPropertyDescriptor,ne=(e,t,i,a)=>{for(var r=a>1?void 0:a?vm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&fm(t,i,r),r};let se=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=void 0,this._nav=new Ji(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Yi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:e=>{const t=re(e);this.selectDate({date:t,dayLabel:wr(this.localeId,t),isCurrentMonth:!0,isToday:vr(t),isSelected:!1,isFocusable:!0,isDisabled:this.isDisabled(t)})},onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new Zt(this,{onLeave:()=>{this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}})}get _currentDate(){return this._nav.currentDate}set _currentDate(e){this._nav.currentDate=e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){e.has("value")&&this.value&&this._nav.navigateToDate(re(this.value))}render(){return Qi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>d.nothing,renderMonthPanel:e=>ji({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this._nav.toggleYearSelector(),renderPanelBody:t=>this.renderPanelBody(t)})})}renderPanelBody(e){return ea({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}renderDay(e){const t={"gui-calendar__day-button":!0,today:e.isToday,selected:e.isSelected,disabled:e.isDisabled,"other-month":!e.isCurrentMonth};return d.html`
212
212
  <button
213
213
  type="button"
214
214
  role="gridcell"
215
- class=${_.classMap(t)}
215
+ class=${S.classMap(t)}
216
216
  tabindex=${e.isFocusable?0:-1}
217
217
  ?disabled=${!e.isCurrentMonth}
218
- aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":l.nothing}
219
- aria-label=${Zi(this.localeId,e.date)}
220
- aria-current=${e.isToday?"date":l.nothing}
218
+ aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":d.nothing}
219
+ aria-label=${Ki(this.localeId,e.date)}
220
+ aria-current=${e.isToday?"date":d.nothing}
221
221
  data-date=${ae(e.date)}
222
222
  @click=${()=>this.selectDate(e)}
223
223
  @keydown=${i=>this._keyboard.handleDayKeydown(i)}
@@ -225,7 +225,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
225
225
  >
226
226
  ${e.dayLabel}
227
227
  </button>
228
- `}getDaysInMonth(e){const t=this.value;return Qi({currentDate:this._currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:i=>this.isDisabled(i),toDay:i=>{const a=Xi(i.date,{selectedISO:t}).isSelected;return{date:i.date,dayLabel:i.dayLabel,isCurrentMonth:i.isCurrentMonth,isToday:i.isToday,isDisabled:i.isDisabled,isSelected:a,isFocusable:(a||i.isToday)&&i.isCurrentMonth}},focusFallbackDates:[t?re(t):new Date]})}selectDate(e){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const t=ae(e.date);this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}isDisabled(e){return this._nav.isDisabled(e)}};ne([n.property({type:String})],se.prototype,"uid",2),ne([n.property({type:String})],se.prototype,"label",2),ne([n.property({type:String})],se.prototype,"hint",2),ne([n.property({type:String,attribute:"locale-id"})],se.prototype,"localeId",2),ne([n.property({type:Array})],se.prototype,"errors",2),ne([n.property({type:Boolean})],se.prototype,"touched",2),ne([n.property({type:Boolean})],se.prototype,"required",2),ne([n.property({type:Boolean})],se.prototype,"disabled",2),ne([n.property({type:Boolean,attribute:"readonly"})],se.prototype,"readOnly",2),ne([n.property({type:String,attribute:"prev-month-icon"})],se.prototype,"prevMonthIcon",2),ne([n.property({type:String,attribute:"next-month-icon"})],se.prototype,"nextMonthIcon",2),ne([n.property({type:String,attribute:"prev-month-aria-label"})],se.prototype,"prevMonthAriaLabel",2),ne([n.property({type:String,attribute:"next-month-aria-label"})],se.prototype,"nextMonthAriaLabel",2),ne([n.property({type:String,attribute:"select-year-aria-label"})],se.prototype,"selectYearAriaLabel",2),ne([n.property({type:String,attribute:"year-grid-aria-label"})],se.prototype,"yearGridAriaLabel",2),ne([n.property({type:String})],se.prototype,"dayFormat",2),ne([n.property({type:String})],se.prototype,"weekdayFormat",2),ne([n.property({type:String})],se.prototype,"monthFormat",2),ne([n.property({type:String})],se.prototype,"minDate",2),ne([n.property({type:String})],se.prototype,"maxDate",2),ne([n.property({type:Array})],se.prototype,"disabledRanges",2),ne([n.property({type:Number})],se.prototype,"numberOfMonths",2),ne([n.property({type:String})],se.prototype,"value",2),se=ne([n.customElement("gui-calendar")],se),typeof customElements<"u"&&!customElements.get("gui-calendar")&&customElements.define("gui-calendar",se);var vu=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,Oa=(e,t,i,a)=>{for(var r=a>1?void 0:a?Du(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&vu(t,i,r),r};let Vt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
228
+ `}getDaysInMonth(e){const t=this.value;return ia({currentDate:this._currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:i=>this.isDisabled(i),toDay:i=>{const a=ta(i.date,{selectedISO:t}).isSelected;return{date:i.date,dayLabel:i.dayLabel,isCurrentMonth:i.isCurrentMonth,isToday:i.isToday,isDisabled:i.isDisabled,isSelected:a,isFocusable:(a||i.isToday)&&i.isCurrentMonth}},focusFallbackDates:[t?re(t):new Date]})}selectDate(e){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const t=ae(e.date);this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}isDisabled(e){return this._nav.isDisabled(e)}};ne([n.property({type:String})],se.prototype,"uid",2),ne([n.property({type:String})],se.prototype,"label",2),ne([n.property({type:String})],se.prototype,"hint",2),ne([n.property({type:String,attribute:"locale-id"})],se.prototype,"localeId",2),ne([n.property({type:Array})],se.prototype,"errors",2),ne([n.property({type:Boolean})],se.prototype,"touched",2),ne([n.property({type:Boolean})],se.prototype,"required",2),ne([n.property({type:Boolean})],se.prototype,"disabled",2),ne([n.property({type:Boolean,attribute:"readonly"})],se.prototype,"readOnly",2),ne([n.property({type:String,attribute:"prev-month-icon"})],se.prototype,"prevMonthIcon",2),ne([n.property({type:String,attribute:"next-month-icon"})],se.prototype,"nextMonthIcon",2),ne([n.property({type:String,attribute:"prev-month-aria-label"})],se.prototype,"prevMonthAriaLabel",2),ne([n.property({type:String,attribute:"next-month-aria-label"})],se.prototype,"nextMonthAriaLabel",2),ne([n.property({type:String,attribute:"select-year-aria-label"})],se.prototype,"selectYearAriaLabel",2),ne([n.property({type:String,attribute:"year-grid-aria-label"})],se.prototype,"yearGridAriaLabel",2),ne([n.property({type:String})],se.prototype,"dayFormat",2),ne([n.property({type:String})],se.prototype,"weekdayFormat",2),ne([n.property({type:String})],se.prototype,"monthFormat",2),ne([n.property({type:String})],se.prototype,"minDate",2),ne([n.property({type:String})],se.prototype,"maxDate",2),ne([n.property({type:Array})],se.prototype,"disabledRanges",2),ne([n.property({type:Number})],se.prototype,"numberOfMonths",2),ne([n.property({type:String})],se.prototype,"value",2),se=ne([n.customElement("gui-calendar")],se),typeof customElements<"u"&&!customElements.get("gui-calendar")&&customElements.define("gui-calendar",se);var Dm=Object.defineProperty,wm=Object.getOwnPropertyDescriptor,kr=(e,t,i,a)=>{for(var r=a>1?void 0:a?wm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Dm(t,i,r),r};let Ht=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
229
229
  <gui-calendar
230
230
  .uid=${this.widget.uid}
231
231
  .label=${this.adapter.templateData.label}
@@ -253,32 +253,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
253
253
  @change=${this.valueChanged}
254
254
  @blur=${()=>this.adapter.onBlur()}
255
255
  ></gui-calendar>
256
- `}valueChanged(e){const t=e?.target;this.adapter.valueChanged(t.value)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Oa([f.consume({context:c.formContext}),n.property({attribute:!1})],Vt.prototype,"formContext",2),Oa([f.provide({context:c.inputContext})],Vt.prototype,"adapter",2),Vt=Oa([n.customElement("gui-calendar-input")],Vt);const wu=Object.freeze(Object.defineProperty({__proto__:null,get CalendarElement(){return Vt}},Symbol.toStringTag,{value:"Module"})),Ns=new Date(2025,0,15,9,5,0);function ji(e,t){if(t==="12"||t==="24")return t;const{hourCycle:i}=new Intl.DateTimeFormat(e??"en",{hour:"numeric"}).resolvedOptions();return i==="h11"||i==="h12"?"12":"24"}function qs(e,t){return new Intl.DateTimeFormat(e??"en",{hour:"numeric",minute:"numeric",hourCycle:t==="12"?"h12":"h23"}).formatToParts(Ns)}function zs(e,t){return new Intl.DateTimeFormat(e??"en",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",hourCycle:t==="12"?"h12":"h23"}).formatToParts(Ns)}function $u(e){const t=new Intl.DateTimeFormat(e??"en",{hour:"numeric",hourCycle:"h12"}),i=a=>t.formatToParts(new Date(2025,0,15,a,0,0)).find(r=>r.type==="dayPeriod")?.value??"";return{am:i(9)||"AM",pm:i(21)||"PM"}}function Ma(e){const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),r=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return`${t}-${i}-${a}T${r}:${s}:${o}`}function ct(e){const t=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0");return`${t}:${i}:${a}`}function ea(e){const t=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?$/.exec(e);return t?{hours:Number(t[1]),minutes:Number(t[2]),seconds:Number(t[3]??0)}:null}function ee(e){const t=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]??0),Number(t[5]??0),Number(t[6]??0)):new Date(e)}const ku="No available times";function Ie(e,t){const i=s=>s.length===5?`${s}:00`:s,a=i(e),r=i(t);return a<r?-1:a>r?1:0}function Gs(e,t){const i=ea(e);if(!i)return;const a=i.hours*60+i.minutes+(t||30);if(!(a>=1440))return ct(new Date(1970,0,1,Math.floor(a/60),a%60,0))}function Vs(e,t){if(!e?.length)return[];const i=re(t).getDay();return e.filter(a=>(a.date==null||a.date===t)&&(a.weekdays==null||a.weekdays.includes(i))).map(({start:a,end:r})=>({start:a,end:r}))}function ta(e,t){return t?.length?t.some(i=>Ie(e,i.start)>=0&&Ie(e,i.end??i.start)<=0):!1}function Us(e,t,i){if(!i?.length)return!1;const a=t??e;return i.some(r=>{const s=r.end??r.start;return Ie(e,s)<=0&&Ie(r.start,a)<=0})}function Zs(e){return e.length===5?`${e}:00`:e}function Su(e){if(!e.length)return[];const t=e.map(a=>({start:Zs(a.start),end:Zs(a.end??a.start)})).sort((a,r)=>Ie(a.start,r.start)),i=[];for(const a of t){const r=i[i.length-1];r&&Ie(a.start,r.end)<=0?Ie(a.end,r.end)>0&&(r.end=a.end):i.push({...a})}return i}function Ys(e,t){return ee(e).getTime()<=ee(t).getTime()?{start:e,end:t}:{start:t,end:e}}function Hs(e){if(!e.length)return[];const t=e.map(a=>({start:ee(a.start).getTime(),end:ee(a.end??a.start).getTime()})).sort((a,r)=>a.start-r.start),i=[];for(const a of t){const r=i[i.length-1];r&&a.start<=r.end?a.end>r.end&&(r.end=a.end):i.push({start:a.start,end:a.end})}return i.map(a=>({start:Ma(new Date(a.start)),end:Ma(new Date(a.end))}))}function Ws(e,t){if(!t?.length)return!1;const i=ee(e.start).getTime(),a=ee(e.end??e.start).getTime();return t.some(r=>{const s=ee(r.start).getTime(),o=ee(r.end??r.start).getTime();return i<o&&s<a})}function _u(e,t){if(!t?.length)return!1;const i=ee(`${e}T00:00:00`).getTime(),a=ee(`${e}T23:59:59`).getTime();return t.some(r=>{const s=ee(r.start).getTime(),o=ee(r.end??r.start).getTime();return s<=i&&o>=a})}function Ia(e,t){if(!e?.length)return[];const i=ee(`${t}T00:00:00`).getTime(),a=ee(`${t}T23:59:59`).getTime(),r=[];for(const s of e){const o=ee(s.start).getTime(),d=ee(s.end??s.start).getTime();if(d<i||o>a)continue;const p=o<=i?"00:00:00":ct(new Date(o)),u=d>=a?"23:59:59":ct(new Date(d));r.push({start:p,end:u})}return r}function Ks(e){const t=e.minuteStep||30,i=ea(e.minTime??"")??{hours:0,minutes:0,seconds:0},a=ct(new Date(1970,0,1,i.hours,i.minutes,i.seconds)),r=e.maxTime??"23:59:59",s=[];for(let o=i.hours*60+i.minutes;o<1440;o+=t){const d=ct(new Date(1970,0,1,Math.floor(o/60),o%60,0));if(Ie(d,r)>0)break;Ie(d,a)<0||s.push({value:d,disabled:ta(d,e.disabledRanges)})}return s}function ia(e,t,i){const a=ea(e);return a?new Intl.DateTimeFormat(t??"en",{hour:"numeric",minute:"numeric",hourCycle:i==="12"?"h12":"h23"}).format(new Date(2025,0,15,a.hours,a.minutes,a.seconds)):e}function Ra(e,t,i){const a=ee(e);return isNaN(a.getTime())?e:new Intl.DateTimeFormat(t??"en",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:i==="12"}).format(a)}function Js(e,t,i,a){const r=ee(e).getTime();if(isNaN(r))return null;if(t){const s=ee(t);if(!isNaN(s.getTime())&&r<s.getTime())return a?.minDateTimeMessage??lu}if(i){const s=ee(i);if(!isNaN(s.getTime())&&r>s.getTime())return a?.maxDateTimeMessage??du}return null}function Xs(e,t){const i=e%12;return t==="pm"?i+12:i}function Tu(e){const t=e>=12?"pm":"am";return{hour12:e%12===0?12:e%12,period:t}}const St={day:"Day",month:"Month",year:"Year",hour:"Hour",minute:"Minute",second:"Second",dayPeriod:"AM/PM"};function Fa(){return{day:{type:"day",kind:"numeric",maxLength:2,min:1,max:31,placeholder:"dd"},month:{type:"month",kind:"numeric",maxLength:2,min:1,max:12,placeholder:"mm"},year:{type:"year",kind:"numeric",maxLength:4,min:1e3,max:9999,placeholder:"yyyy"}}}function Au(e,t,i){return{hour:e==="12"?{type:"hour",kind:"numeric",maxLength:2,min:1,max:12,placeholder:"hh"}:{type:"hour",kind:"numeric",maxLength:2,min:0,max:23,placeholder:"hh",incrementFallback:0},minute:{type:"minute",kind:"numeric",maxLength:2,min:0,max:59,placeholder:"mm",step:t,incrementFallback:0,wrap:!0},dayPeriod:{type:"dayPeriod",kind:"dayPeriod",maxLength:8,min:0,max:0,placeholder:i}}}function Qs(e,t,i){return e[t]?.[i]??""}function js(e,t,i,a){return{...e,[t]:{...e[t],[i]:a}}}function Cu(e,t){return{...e,[t]:{}}}function Lu(e,t,i){if(i!=="12")return e;let a=e;for(const r of t)Qs(a,r,"dayPeriod")||(a=js(a,r,"dayPeriod","am"));return a}function Eu(e,t){if(isNaN(t))return{value:t};if(!e)return{value:t};const i=Math.max(e.min,Math.min(e.max,t));return i===t?{value:t}:{value:i,writeBack:i.toString().padStart(e.maxLength??2,"0")}}function pt(e,t,i,a){const r=parseInt(e[i]??"",10),{value:s,writeBack:o}=Eu(t[i],r);return o!==void 0&&(a[i]=o),s}function en(e,t){const i={},a=pt(e,t.descriptors,"year",i),r=pt(e,t.descriptors,"month",i),s=pt(e,t.descriptors,"day",i),o=!isNaN(a)&&String(a).length===4,d=!isNaN(r)&&r>0,p=!isNaN(s)&&s>0;if(!(o&&d&&p))return{result:{kind:"incomplete"},writeBacks:i};if(s>Ps(r,a))return{result:{kind:"invalid",message:t.invalidDateMessage??As},writeBacks:i};const u=new Date(a,r-1,s);return{result:{kind:"valid",iso:ae(u),instant:u},writeBacks:i}}function tn(e,t){const i=t.hourFormat==="12",a={},r=pt(e,t.descriptors,"hour",a),s=pt(e,t.descriptors,"minute",a),o=e.dayPeriod??"";if(isNaN(r)||isNaN(s))return{result:{kind:"incomplete"},writeBacks:a};if(i&&o!=="am"&&o!=="pm")return{result:{kind:"incomplete"},writeBacks:a};const d=i?Xs(r,o):r,p=new Date(1970,0,1,d,s,0);return{result:{kind:"valid",iso:ct(p),instant:p},writeBacks:a}}function an(e,t){const i=t.hourFormat==="12",a={},r=pt(e,t.descriptors,"year",a),s=pt(e,t.descriptors,"month",a),o=pt(e,t.descriptors,"day",a),d=pt(e,t.descriptors,"hour",a),p=pt(e,t.descriptors,"minute",a),u=e.dayPeriod??"",h=!isNaN(r)&&String(r).length===4,m=!isNaN(s)&&s>0,y=!isNaN(o)&&o>0,g=!isNaN(d),A=!isNaN(p);if(!(h&&m&&y&&g&&A&&(!i||u==="am"||u==="pm")))return{result:{kind:"incomplete"},writeBacks:a};if(o>Ps(s,r))return{result:{kind:"invalid",message:t.invalidDateMessage??As},writeBacks:a};const Ne=i?Xs(d,u):d,st=new Date(r,s-1,o,Ne,p,0);return{result:{kind:"valid",iso:Ma(st),instant:st},writeBacks:a}}function aa(e,t){return t.minTime&&Ie(e,t.minTime)<0?t.minTimeMessage??Cs:t.maxTime&&Ie(e,t.maxTime)>0?t.maxTimeMessage??Ls:null}const xu=["Backspace","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Delete","Enter"];function rn(e){return/^[0-9]$/.test(e)}function Pu(e,t){return xu.includes(e.key)||e.ctrlKey||e.metaKey||t?!1:!rn(e.key)}function Ou(e,t,i){const a=e?.step??1,r=e?.incrementFallback??1,s=i==="up"?a:-a,o=parseInt(t,10);let d;if(isNaN(o))d=r;else if(d=o+s,e?.wrap){const p=e.max-e.min+1;d=((d-e.min)%p+p)%p+e.min}else e&&(d=Math.max(e.min,Math.min(e.max,d)));return d.toString().padStart(e?.maxLength??2,"0")}const sn=new Map;function ra(e,t,i,a=!1){const r=i||1,s=`${e??""}|${t??""}|${r}|${a?"dt":"t"}`,o=sn.get(s);if(o)return o;const d=ji(e,t),p=$u(e),u=Au(d,r,p.am),h=a?{...Fa(),...u}:u,m={effectiveHourFormat:d,dayPeriodLabels:p,descriptors:h};return sn.set(s,m),m}class Pt{constructor(t,i){this._values={},this._hasSurfacedInputError=!1,this.getPartDisplay=(a,r)=>{const s=this.getPart(a,r);if(r==="dayPeriod"&&(s==="am"||s==="pm")){const o=this.options.getDayPeriodLabels?.();if(o)return o[s]}return s},this.handleKeyDown=(a,r,s)=>{a.key==="Enter"&&this.options.onEnter&&(a.preventDefault(),a.target instanceof HTMLInputElement&&this.setPart(r,s,a.target.value.replace(/[^0-9]/g,""))),Pu(a,this.options.isReadonly())&&a.preventDefault()},this.handleDayPeriodKeyDown=a=>{(a.key==="ArrowUp"||a.key==="ArrowDown")&&a.preventDefault(),a.key==="Enter"&&a.preventDefault()},this.handleFocus=a=>{this.host.dispatchEvent(new CustomEvent("focus",{detail:a}))},this.handleKeyUp=(a,r,s)=>{if(this.options.isReadonly())return;const o=window.getComputedStyle(this.host).direction==="rtl",d=a.target,p=d,u=this.getGroupInputs(r),h=u.indexOf(d),m=this.options.getDescriptor(s);switch(d instanceof HTMLInputElement&&p.value.length===p.maxLength&&rn(a.key)&&(h===u.length-1?this.autoAdvanceFromGroupEnd(r):u[h+1].focus()),a.key){case"Enter":{this.options.onEnter?.(a,r);break}case"ArrowUp":case"ArrowDown":{if(m?.kind==="dayPeriod"){this.toggleDayPeriod(r,s);break}const y=Ou(m,p.value,a.key==="ArrowUp"?"up":"down");this.setPart(r,s,y),this.selectPart(d),this.options.commitGroup(r);break}case"ArrowLeft":case"ArrowRight":{const y=[...u].sort((q,Ne)=>q.getBoundingClientRect().left-Ne.getBoundingClientRect().left),g=y.indexOf(d),A=a.key==="ArrowRight"?g+1:g-1;A>=0&&A<y.length?(y[A].focus(),this.selectPart(y[A])):this.navigatePastGroupEdge(a.key,r,o);break}}},this.handleChange=(a,r,s)=>{if(a.stopImmediatePropagation(),this.options.isReadonly()||this.options.getDescriptor(s)?.kind==="dayPeriod")return;const p=a.target.value.replace(/[^0-9]/g,"");this.setPart(r,s,p),this.options.commitGroup(r)},this.handleBlur=(a,r,s)=>{const o=this.options.getDescriptor(s);if(o?.kind!=="dayPeriod"){const d=a.target,p=parseInt(d.value,10);!isNaN(p)&&(p>0||o?.min===0)?d.value=p.toString().padStart(o?.maxLength??2,"0"):this.options.onEmptyPartBlur()}this.host.dispatchEvent(new CustomEvent("blur"))},this.toggleDayPeriod=(a,r)=>{if(this.options.isReadonly()||this.options.isDisabled())return;const s=this.getPart(a,r);this.setPart(a,r,s==="am"?"pm":"am"),this.options.commitGroup(a)},this.host=t,this.options=i,t.addController(this)}hostConnected(){}get values(){return this._values}getPart(t,i){return Qs(this._values,t,i)}setPart(t,i,a){this._values=js(this._values,t,i,a),this.host.requestUpdate()}clearGroup(t){this._values=Cu(this._values,t),this.host.requestUpdate()}applyWriteBacks(t,i){for(const[a,r]of Object.entries(i))r!==void 0&&this.setPart(t,a,r)}seedDayPeriods(t=this.options.groups){this.seedWith(t,this.options.getHourFormat?.()??"24")}seedWith(t,i){const a=Lu(this._values,t,i);a!==this._values&&(this._values=a,this.host.requestUpdate())}setGroupFromISO(t,i,a,r){const s=r??this.options.getHourFormat?.()??"24";if(!i){this.clearGroup(t),a!=="date"&&this.seedWith([t],s);return}if(a==="date"){const d=re(i);if(isNaN(d.getTime()))return;this.setPart(t,"year",String(d.getFullYear()).padStart(4,"0")),this.setPart(t,"month",String(d.getMonth()+1).padStart(2,"0")),this.setPart(t,"day",String(d.getDate()).padStart(2,"0"));return}if(a==="time"){let d=ea(i);if(!d){const p=ee(i);if(isNaN(p.getTime()))return;d={hours:p.getHours(),minutes:p.getMinutes(),seconds:p.getSeconds()}}this.writeTimeParts(t,d.hours,d.minutes,s);return}const o=ee(i);isNaN(o.getTime())||(this.setPart(t,"day",String(o.getDate()).padStart(2,"0")),this.setPart(t,"month",String(o.getMonth()+1).padStart(2,"0")),this.setPart(t,"year",String(o.getFullYear()).padStart(4,"0")),this.writeTimeParts(t,o.getHours(),o.getMinutes(),s))}writeTimeParts(t,i,a,r){if(r==="12"){const{hour12:s,period:o}=Tu(i);this.setPart(t,"hour",s.toString().padStart(2,"0")),this.setPart(t,"dayPeriod",o)}else this.setPart(t,"hour",i.toString().padStart(2,"0"));this.setPart(t,"minute",a.toString().padStart(2,"0"))}getGroupInputs(t){return this.options.groups.length>1?Array.from(this.host.querySelectorAll(`[data-group="${t}"]`)):Array.from(this.host.querySelectorAll(`.${this.options.blockClass}__part`))}selectPart(t){t instanceof HTMLInputElement&&t.select()}focusFirst(t){requestAnimationFrame(()=>{this.getGroupInputs(t)[0]?.focus()})}autoAdvanceFromGroupEnd(t){const i=this.options.groups;if(i.length>1){const a=i[i.indexOf(t)+1];a!==void 0&&this.getGroupInputs(a)[0]?.focus();return}this.getGroupInputs(t)[0]?.focus()}navigatePastGroupEdge(t,i,a){const r=this.options.groups;if(r.length<=1)return;const s=r[0],o=r[r.length-1];if(t==="ArrowLeft"){const d=a?o:s;if(i!==d){const p=this.getGroupInputs(d),u=p[p.length-1];u&&(u.focus(),this.selectPart(u))}}else{const d=a?s:o;if(i!==d){const p=this.getGroupInputs(d);p[0]&&(p[0].focus(),this.selectPart(p[0]))}}}get hasSurfacedInputError(){return this._hasSurfacedInputError}surfaceInputError(t){this._hasSurfacedInputError=!0,this.options.onInputErrorSurfaced?.(t)}clearSurfacedInputError(t){this._hasSurfacedInputError&&(this._hasSurfacedInputError=!1,this.options.onSurfacedErrorCleared?.(t))}resetSurfacedInputError(){this._hasSurfacedInputError=!1}}const Mu=(e,t)=>l.html`<span class="${t}__separator">${e.value}</span>`;function yt(e,t,i){const a=t.formatParts,r=t.groups.length>1,s=h=>r?`${e}-${h.type}`:h.type,o=(h,m)=>{if(h.type==="literal")return Mu(h,t.blockClass);const y=t.getDescriptor(h.type);if(!y)return"";const g=e===t.groups[0]&&m===0?0:-1;return Iu(e,y,g,t,i)},d=h=>h.type==="hour"||h.type==="minute"||h.type==="second",p=a.findIndex(d);if(p===-1)return qe.repeat(a,s,o);let u=a.length-1;for(;!d(a[u]);)u--;return l.html`
257
- ${qe.repeat(a.slice(0,p),s,o)}
256
+ `}valueChanged(e){const t=e?.target;this.adapter.valueChanged(t.value)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};kr([f.consume({context:m.formContext}),n.property({attribute:!1})],Ht.prototype,"formContext",2),kr([f.provide({context:m.inputContext})],Ht.prototype,"adapter",2),Ht=kr([n.customElement("gui-calendar-input")],Ht);const $m=Object.freeze(Object.defineProperty({__proto__:null,get CalendarElement(){return Ht}},Symbol.toStringTag,{value:"Module"})),Ln=new Date(2025,0,15,9,5,0);function aa(e,t){if(t==="12"||t==="24")return t;const{hourCycle:i}=new Intl.DateTimeFormat(e??"en",{hour:"numeric"}).resolvedOptions();return i==="h11"||i==="h12"?"12":"24"}function In(e,t){return new Intl.DateTimeFormat(e??"en",{hour:"numeric",minute:"numeric",hourCycle:t==="12"?"h12":"h23"}).formatToParts(Ln)}function xn(e,t){return new Intl.DateTimeFormat(e??"en",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",hourCycle:t==="12"?"h12":"h23"}).formatToParts(Ln)}function km(e){const t=new Intl.DateTimeFormat(e??"en",{hour:"numeric",hourCycle:"h12"}),i=a=>t.formatToParts(new Date(2025,0,15,a,0,0)).find(r=>r.type==="dayPeriod")?.value??"";return{am:i(9)||"AM",pm:i(21)||"PM"}}function Tr(e){const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),r=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return`${t}-${i}-${a}T${r}:${s}:${o}`}function gt(e){const t=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0");return`${t}:${i}:${a}`}function ra(e){const t=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?$/.exec(e);return t?{hours:Number(t[1]),minutes:Number(t[2]),seconds:Number(t[3]??0)}:null}function ee(e){const t=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]??0),Number(t[5]??0),Number(t[6]??0)):new Date(e)}const Tm="No available times";function Re(e,t){const i=s=>s.length===5?`${s}:00`:s,a=i(e),r=i(t);return a<r?-1:a>r?1:0}function Pn(e,t){const i=ra(e);if(!i)return;const a=i.hours*60+i.minutes+(t||30);if(!(a>=1440))return gt(new Date(1970,0,1,Math.floor(a/60),a%60,0))}function Mn(e,t){if(!e?.length)return[];const i=re(t).getDay();return e.filter(a=>(a.date==null||a.date===t)&&(a.weekdays==null||a.weekdays.includes(i))).map(({start:a,end:r})=>({start:a,end:r}))}function sa(e,t){return t?.length?t.some(i=>Re(e,i.start)>=0&&Re(e,i.end??i.start)<=0):!1}function On(e,t,i){if(!i?.length)return!1;const a=t??e;return i.some(r=>{const s=r.end??r.start;return Re(e,s)<=0&&Re(r.start,a)<=0})}function Rn(e){return e.length===5?`${e}:00`:e}function Sm(e){if(!e.length)return[];const t=e.map(a=>({start:Rn(a.start),end:Rn(a.end??a.start)})).sort((a,r)=>Re(a.start,r.start)),i=[];for(const a of t){const r=i[i.length-1];r&&Re(a.start,r.end)<=0?Re(a.end,r.end)>0&&(r.end=a.end):i.push({...a})}return i}function Fn(e,t){return ee(e).getTime()<=ee(t).getTime()?{start:e,end:t}:{start:t,end:e}}function Bn(e){if(!e.length)return[];const t=e.map(a=>({start:ee(a.start).getTime(),end:ee(a.end??a.start).getTime()})).sort((a,r)=>a.start-r.start),i=[];for(const a of t){const r=i[i.length-1];r&&a.start<=r.end?a.end>r.end&&(r.end=a.end):i.push({start:a.start,end:a.end})}return i.map(a=>({start:Tr(new Date(a.start)),end:Tr(new Date(a.end))}))}function Nn(e,t){if(!t?.length)return!1;const i=ee(e.start).getTime(),a=ee(e.end??e.start).getTime();return t.some(r=>{const s=ee(r.start).getTime(),o=ee(r.end??r.start).getTime();return i<o&&s<a})}function _m(e,t){if(!t?.length)return!1;const i=ee(`${e}T00:00:00`).getTime(),a=ee(`${e}T23:59:59`).getTime();return t.some(r=>{const s=ee(r.start).getTime(),o=ee(r.end??r.start).getTime();return s<=i&&o>=a})}function Sr(e,t){if(!e?.length)return[];const i=ee(`${t}T00:00:00`).getTime(),a=ee(`${t}T23:59:59`).getTime(),r=[];for(const s of e){const o=ee(s.start).getTime(),l=ee(s.end??s.start).getTime();if(l<i||o>a)continue;const u=o<=i?"00:00:00":gt(new Date(o)),p=l>=a?"23:59:59":gt(new Date(l));r.push({start:u,end:p})}return r}function qn(e){const t=e.minuteStep||30,i=ra(e.minTime??"")??{hours:0,minutes:0,seconds:0},a=gt(new Date(1970,0,1,i.hours,i.minutes,i.seconds)),r=e.maxTime??"23:59:59",s=[];for(let o=i.hours*60+i.minutes;o<1440;o+=t){const l=gt(new Date(1970,0,1,Math.floor(o/60),o%60,0));if(Re(l,r)>0)break;Re(l,a)<0||s.push({value:l,disabled:sa(l,e.disabledRanges)})}return s}function na(e,t,i){const a=ra(e);return a?new Intl.DateTimeFormat(t??"en",{hour:"numeric",minute:"numeric",hourCycle:i==="12"?"h12":"h23"}).format(new Date(2025,0,15,a.hours,a.minutes,a.seconds)):e}function _r(e,t,i){const a=ee(e);return isNaN(a.getTime())?e:new Intl.DateTimeFormat(t??"en",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:i==="12"}).format(a)}function zn(e,t,i,a){const r=ee(e).getTime();if(isNaN(r))return null;if(t){const s=ee(t);if(!isNaN(s.getTime())&&r<s.getTime())return a?.minDateTimeMessage??dm}if(i){const s=ee(i);if(!isNaN(s.getTime())&&r>s.getTime())return a?.maxDateTimeMessage??um}return null}function Un(e,t){const i=e%12;return t==="pm"?i+12:i}function Am(e){const t=e>=12?"pm":"am";return{hour12:e%12===0?12:e%12,period:t}}const _t={day:"Day",month:"Month",year:"Year",hour:"Hour",minute:"Minute",second:"Second",dayPeriod:"AM/PM"};function Ar(){return{day:{type:"day",kind:"numeric",maxLength:2,min:1,max:31,placeholder:"dd"},month:{type:"month",kind:"numeric",maxLength:2,min:1,max:12,placeholder:"mm"},year:{type:"year",kind:"numeric",maxLength:4,min:1e3,max:9999,placeholder:"yyyy"}}}function Em(e,t,i){return{hour:e==="12"?{type:"hour",kind:"numeric",maxLength:2,min:1,max:12,placeholder:"hh"}:{type:"hour",kind:"numeric",maxLength:2,min:0,max:23,placeholder:"hh",incrementFallback:0},minute:{type:"minute",kind:"numeric",maxLength:2,min:0,max:59,placeholder:"mm",step:t,incrementFallback:0,wrap:!0},dayPeriod:{type:"dayPeriod",kind:"dayPeriod",maxLength:8,min:0,max:0,placeholder:i}}}function Gn(e,t,i){return e[t]?.[i]??""}function Vn(e,t,i,a){return{...e,[t]:{...e[t],[i]:a}}}function Cm(e,t){return{...e,[t]:{}}}function Lm(e,t,i){if(i!=="12")return e;let a=e;for(const r of t)Gn(a,r,"dayPeriod")||(a=Vn(a,r,"dayPeriod","am"));return a}function Im(e,t){if(isNaN(t))return{value:t};if(!e)return{value:t};const i=Math.max(e.min,Math.min(e.max,t));return i===t?{value:t}:{value:i,writeBack:i.toString().padStart(e.maxLength??2,"0")}}function pt(e,t,i,a){const r=parseInt(e[i]??"",10),{value:s,writeBack:o}=Im(t[i],r);return o!==void 0&&(a[i]=o),s}function Zn(e,t){const i={},a=pt(e,t.descriptors,"year",i),r=pt(e,t.descriptors,"month",i),s=pt(e,t.descriptors,"day",i),o=!isNaN(a)&&String(a).length===4,l=!isNaN(r)&&r>0,u=!isNaN(s)&&s>0;if(!(o&&l&&u))return{result:{kind:"incomplete"},writeBacks:i};if(s>kn(r,a))return{result:{kind:"invalid",message:t.invalidDateMessage??fn},writeBacks:i};const p=new Date(a,r-1,s);return{result:{kind:"valid",iso:ae(p),instant:p},writeBacks:i}}function Yn(e,t){const i=t.hourFormat==="12",a={},r=pt(e,t.descriptors,"hour",a),s=pt(e,t.descriptors,"minute",a),o=e.dayPeriod??"";if(isNaN(r)||isNaN(s))return{result:{kind:"incomplete"},writeBacks:a};if(i&&o!=="am"&&o!=="pm")return{result:{kind:"incomplete"},writeBacks:a};const l=i?Un(r,o):r,u=new Date(1970,0,1,l,s,0);return{result:{kind:"valid",iso:gt(u),instant:u},writeBacks:a}}function Hn(e,t){const i=t.hourFormat==="12",a={},r=pt(e,t.descriptors,"year",a),s=pt(e,t.descriptors,"month",a),o=pt(e,t.descriptors,"day",a),l=pt(e,t.descriptors,"hour",a),u=pt(e,t.descriptors,"minute",a),p=e.dayPeriod??"",h=!isNaN(r)&&String(r).length===4,c=!isNaN(s)&&s>0,y=!isNaN(o)&&o>0,g=!isNaN(l),_=!isNaN(u);if(!(h&&c&&y&&g&&_&&(!i||p==="am"||p==="pm")))return{result:{kind:"incomplete"},writeBacks:a};if(o>kn(s,r))return{result:{kind:"invalid",message:t.invalidDateMessage??fn},writeBacks:a};const Ae=i?Un(l,p):l,nt=new Date(r,s-1,o,Ae,u,0);return{result:{kind:"valid",iso:Tr(nt),instant:nt},writeBacks:a}}function oa(e,t){return t.minTime&&Re(e,t.minTime)<0?t.minTimeMessage??vn:t.maxTime&&Re(e,t.maxTime)>0?t.maxTimeMessage??Dn:null}const xm=["Backspace","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Delete","Enter"];function Wn(e){return/^[0-9]$/.test(e)}function Pm(e,t){return xm.includes(e.key)||e.ctrlKey||e.metaKey||t?!1:!Wn(e.key)}function Mm(e,t,i){const a=e?.step??1,r=e?.incrementFallback??1,s=i==="up"?a:-a,o=parseInt(t,10);let l;if(isNaN(o))l=r;else if(l=o+s,e?.wrap){const u=e.max-e.min+1;l=((l-e.min)%u+u)%u+e.min}else e&&(l=Math.max(e.min,Math.min(e.max,l)));return l.toString().padStart(e?.maxLength??2,"0")}const Kn=new Map;function la(e,t,i,a=!1){const r=i||1,s=`${e??""}|${t??""}|${r}|${a?"dt":"t"}`,o=Kn.get(s);if(o)return o;const l=aa(e,t),u=km(e),p=Em(l,r,u.am),h=a?{...Ar(),...p}:p,c={effectiveHourFormat:l,dayPeriodLabels:u,descriptors:h};return Kn.set(s,c),c}class Ot{constructor(t,i){this._values={},this._hasSurfacedInputError=!1,this.getPartDisplay=(a,r)=>{const s=this.getPart(a,r);if(r==="dayPeriod"&&(s==="am"||s==="pm")){const o=this.options.getDayPeriodLabels?.();if(o)return o[s]}return s},this.handleKeyDown=(a,r,s)=>{a.key==="Enter"&&this.options.onEnter&&(a.preventDefault(),a.target instanceof HTMLInputElement&&this.setPart(r,s,a.target.value.replace(/[^0-9]/g,""))),Pm(a,this.options.isReadonly())&&a.preventDefault()},this.handleDayPeriodKeyDown=a=>{(a.key==="ArrowUp"||a.key==="ArrowDown")&&a.preventDefault(),a.key==="Enter"&&a.preventDefault()},this.handleFocus=a=>{this.host.dispatchEvent(new CustomEvent("focus",{detail:a}))},this.handleKeyUp=(a,r,s)=>{if(this.options.isReadonly())return;const o=window.getComputedStyle(this.host).direction==="rtl",l=a.target,u=l,p=this.getGroupInputs(r),h=p.indexOf(l),c=this.options.getDescriptor(s);switch(l instanceof HTMLInputElement&&u.value.length===u.maxLength&&Wn(a.key)&&(h===p.length-1?this.autoAdvanceFromGroupEnd(r):p[h+1].focus()),a.key){case"Enter":{this.options.onEnter?.(a,r);break}case"ArrowUp":case"ArrowDown":{if(c?.kind==="dayPeriod"){this.toggleDayPeriod(r,s);break}const y=Mm(c,u.value,a.key==="ArrowUp"?"up":"down");this.setPart(r,s,y),this.selectPart(l),this.options.commitGroup(r);break}case"ArrowLeft":case"ArrowRight":{const y=[...p].sort((L,Ae)=>L.getBoundingClientRect().left-Ae.getBoundingClientRect().left),g=y.indexOf(l),_=a.key==="ArrowRight"?g+1:g-1;_>=0&&_<y.length?(y[_].focus(),this.selectPart(y[_])):this.navigatePastGroupEdge(a.key,r,o);break}}},this.handleChange=(a,r,s)=>{if(a.stopImmediatePropagation(),this.options.isReadonly()||this.options.getDescriptor(s)?.kind==="dayPeriod")return;const u=a.target.value.replace(/[^0-9]/g,"");this.setPart(r,s,u),this.options.commitGroup(r)},this.handleBlur=(a,r,s)=>{const o=this.options.getDescriptor(s);if(o?.kind!=="dayPeriod"){const l=a.target,u=parseInt(l.value,10);!isNaN(u)&&(u>0||o?.min===0)?l.value=u.toString().padStart(o?.maxLength??2,"0"):this.options.onEmptyPartBlur()}this.host.dispatchEvent(new CustomEvent("blur"))},this.toggleDayPeriod=(a,r)=>{if(this.options.isReadonly()||this.options.isDisabled())return;const s=this.getPart(a,r);this.setPart(a,r,s==="am"?"pm":"am"),this.options.commitGroup(a)},this.host=t,this.options=i,t.addController(this)}hostConnected(){}get values(){return this._values}getPart(t,i){return Gn(this._values,t,i)}setPart(t,i,a){this._values=Vn(this._values,t,i,a),this.host.requestUpdate()}clearGroup(t){this._values=Cm(this._values,t),this.host.requestUpdate()}applyWriteBacks(t,i){for(const[a,r]of Object.entries(i))r!==void 0&&this.setPart(t,a,r)}seedDayPeriods(t=this.options.groups){this.seedWith(t,this.options.getHourFormat?.()??"24")}seedWith(t,i){const a=Lm(this._values,t,i);a!==this._values&&(this._values=a,this.host.requestUpdate())}setGroupFromISO(t,i,a,r){const s=r??this.options.getHourFormat?.()??"24";if(!i){this.clearGroup(t),a!=="date"&&this.seedWith([t],s);return}if(a==="date"){const l=re(i);if(isNaN(l.getTime()))return;this.setPart(t,"year",String(l.getFullYear()).padStart(4,"0")),this.setPart(t,"month",String(l.getMonth()+1).padStart(2,"0")),this.setPart(t,"day",String(l.getDate()).padStart(2,"0"));return}if(a==="time"){let l=ra(i);if(!l){const u=ee(i);if(isNaN(u.getTime()))return;l={hours:u.getHours(),minutes:u.getMinutes(),seconds:u.getSeconds()}}this.writeTimeParts(t,l.hours,l.minutes,s);return}const o=ee(i);isNaN(o.getTime())||(this.setPart(t,"day",String(o.getDate()).padStart(2,"0")),this.setPart(t,"month",String(o.getMonth()+1).padStart(2,"0")),this.setPart(t,"year",String(o.getFullYear()).padStart(4,"0")),this.writeTimeParts(t,o.getHours(),o.getMinutes(),s))}writeTimeParts(t,i,a,r){if(r==="12"){const{hour12:s,period:o}=Am(i);this.setPart(t,"hour",s.toString().padStart(2,"0")),this.setPart(t,"dayPeriod",o)}else this.setPart(t,"hour",i.toString().padStart(2,"0"));this.setPart(t,"minute",a.toString().padStart(2,"0"))}getGroupInputs(t){return this.options.groups.length>1?Array.from(this.host.querySelectorAll(`[data-group="${t}"]`)):Array.from(this.host.querySelectorAll(`.${this.options.blockClass}__part`))}selectPart(t){t instanceof HTMLInputElement&&t.select()}focusFirst(t){requestAnimationFrame(()=>{this.getGroupInputs(t)[0]?.focus()})}autoAdvanceFromGroupEnd(t){const i=this.options.groups;if(i.length>1){const a=i[i.indexOf(t)+1];a!==void 0&&this.getGroupInputs(a)[0]?.focus();return}this.getGroupInputs(t)[0]?.focus()}navigatePastGroupEdge(t,i,a){const r=this.options.groups;if(r.length<=1)return;const s=r[0],o=r[r.length-1];if(t==="ArrowLeft"){const l=a?o:s;if(i!==l){const u=this.getGroupInputs(l),p=u[u.length-1];p&&(p.focus(),this.selectPart(p))}}else{const l=a?s:o;if(i!==l){const u=this.getGroupInputs(l);u[0]&&(u[0].focus(),this.selectPart(u[0]))}}}get hasSurfacedInputError(){return this._hasSurfacedInputError}surfaceInputError(t){this._hasSurfacedInputError=!0,this.options.onInputErrorSurfaced?.(t)}clearSurfacedInputError(t){this._hasSurfacedInputError&&(this._hasSurfacedInputError=!1,this.options.onSurfacedErrorCleared?.(t))}resetSurfacedInputError(){this._hasSurfacedInputError=!1}}const Om=(e,t)=>d.html`<span class="${t}__separator">${e.value}</span>`;function bt(e,t,i){const a=t.formatParts,r=t.groups.length>1,s=h=>r?`${e}-${h.type}`:h.type,o=(h,c)=>{if(h.type==="literal")return Om(h,t.blockClass);const y=t.getDescriptor(h.type);if(!y)return"";const g=e===t.groups[0]&&c===0?0:-1;return Rm(e,y,g,t,i)},l=h=>h.type==="hour"||h.type==="minute"||h.type==="second",u=a.findIndex(l);if(u===-1)return qe.repeat(a,s,o);let p=a.length-1;for(;!l(a[p]);)p--;return d.html`
257
+ ${qe.repeat(a.slice(0,u),s,o)}
258
258
  <div class="gui-parts__time-cluster ${t.blockClass}__time-cluster" dir="ltr">
259
- ${qe.repeat(a.slice(p,u+1),s,(h,m)=>o(h,p+m))}
259
+ ${qe.repeat(a.slice(u,p+1),s,(h,c)=>o(h,u+c))}
260
260
  </div>
261
- ${qe.repeat(a.slice(u+1),s,(h,m)=>o(h,u+1+m))}
262
- `}function Iu(e,t,i,a,r){const s=a.blockClass,o=t.type;if(t.kind==="dayPeriod")return Ru(e,t,i,a,r);const d=o==="year"?`gui-parts__year ${s}__year`:"",p=a.getDisplayValue(e,o),u=parseInt(p,10);return l.html`
261
+ ${qe.repeat(a.slice(p+1),s,(h,c)=>o(h,p+1+c))}
262
+ `}function Rm(e,t,i,a,r){const s=a.blockClass,o=t.type;if(t.kind==="dayPeriod")return Fm(e,t,i,a,r);const l=o==="year"?`gui-parts__year ${s}__year`:"",u=a.getDisplayValue(e,o),p=parseInt(u,10);return d.html`
263
263
  <div class="gui-parts__touch-target ${s}__touch-target">
264
264
  <input
265
265
  type="text"
266
266
  inputmode="numeric"
267
267
  role="spinbutton"
268
- class="gui-parts__part ${s}__part ${d}"
268
+ class="gui-parts__part ${s}__part ${l}"
269
269
  data-type=${o}
270
- data-group=${a.groups.length>1?e:l.nothing}
270
+ data-group=${a.groups.length>1?e:d.nothing}
271
271
  maxlength=${t.maxLength}
272
272
  placeholder=${t.placeholder}
273
273
  tabindex=${i}
274
- aria-label=${a.getPartAriaLabel?.(e,o)??St[o]}
274
+ aria-label=${a.getPartAriaLabel?.(e,o)??_t[o]}
275
275
  aria-valuemin=${t.min}
276
276
  aria-valuemax=${t.max}
277
- aria-valuenow=${isNaN(u)?l.nothing:u}
277
+ aria-valuenow=${isNaN(p)?d.nothing:p}
278
278
  ?disabled=${a.disabled}
279
279
  ?readonly=${a.partsReadonly}
280
280
  autocomplete="off"
281
- .value=${gn.live(a.getDisplayValue(e,o))}
281
+ .value=${no.live(a.getDisplayValue(e,o))}
282
282
  @keydown=${h=>r.handleKeyDown(h,e,o)}
283
283
  @keyup=${h=>r.handleKeyUp(h,e,o)}
284
284
  @focus=${r.handleFocus}
@@ -287,28 +287,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
287
287
  />
288
288
  <div class="gui-parts__visual-underline ${s}__visual-underline"></div>
289
289
  </div>
290
- `}function Ru(e,t,i,a,r){const s=a.blockClass,o=t.type;return l.html`
290
+ `}function Fm(e,t,i,a,r){const s=a.blockClass,o=t.type;return d.html`
291
291
  <div class="gui-parts__touch-target ${s}__touch-target">
292
292
  <button
293
293
  type="button"
294
294
  class="gui-parts__part gui-parts__dayperiod ${s}__part ${s}__dayperiod"
295
295
  data-type=${o}
296
- data-group=${a.groups.length>1?e:l.nothing}
296
+ data-group=${a.groups.length>1?e:d.nothing}
297
297
  tabindex=${i}
298
298
  ?disabled=${a.disabled}
299
299
  aria-label=${a.dayPeriodAriaLabel??"AM/PM"}
300
300
  @click=${()=>r.toggleDayPeriod(e,o)}
301
301
  @keydown=${r.handleDayPeriodKeyDown}
302
- @keyup=${d=>r.handleKeyUp(d,e,o)}
302
+ @keyup=${l=>r.handleKeyUp(l,e,o)}
303
303
  @focus=${r.handleFocus}
304
- @blur=${d=>r.handleBlur(d,e,o)}
304
+ @blur=${l=>r.handleBlur(l,e,o)}
305
305
  >
306
306
  ${a.getDisplayValue(e,o)}
307
307
  </button>
308
308
  <div class="gui-parts__visual-underline ${s}__visual-underline"></div>
309
309
  </div>
310
- `}var Fu=Object.defineProperty,Bu=Object.getOwnPropertyDescriptor,me=(e,t,i,a)=>{for(var r=a>1?void 0:a?Bu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Fu(t,i,r),r};let oe=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.value=void 0,this.hourFormat=void 0,this.minuteStep=1,this.minTime=void 0,this.maxTime=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.inputBlockClass="gui-time-input",this.groups=["default"],this._parts=new Pt(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:e=>this.validateAndEmit(e),isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>this.dispatchEvent(new CustomEvent("change",{detail:{value:null},bubbles:!0})),getHourFormat:()=>this.timeLocaleData.effectiveHourFormat,getDayPeriodLabels:()=>this.timeLocaleData.dayPeriodLabels}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get timeLocaleData(){return ra(this.localeId,this.hourFormat,this.minuteStep)}getPartDescriptor(e){return this.timeLocaleData.descriptors[e]}willUpdate(e){(!this.hasUpdated||e.has("value")||e.has("hourFormat")||e.has("localeId"))&&this._parts.setGroupFromISO("default",this.value??"","time",this.timeLocaleData.effectiveHourFormat)}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:qs(this.localeId,this.timeLocaleData.effectiveHourFormat),getDescriptor:a=>this.getPartDescriptor(a),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(a,r)=>({hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[r]??St[r],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly},i={"gui-widget-icon":!0,[this.icon]:!0};return l.html`
311
- ${this.label?le(this.uid,e,!1,void 0,!1):l.nothing}
310
+ `}var Bm=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,ce=(e,t,i,a)=>{for(var r=a>1?void 0:a?Nm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Bm(t,i,r),r};let oe=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.value=void 0,this.hourFormat=void 0,this.minuteStep=1,this.minTime=void 0,this.maxTime=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.inputBlockClass="gui-time-input",this.groups=["default"],this._parts=new Ot(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:e=>this.validateAndEmit(e),isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>this.dispatchEvent(new CustomEvent("change",{detail:{value:null},bubbles:!0})),getHourFormat:()=>this.timeLocaleData.effectiveHourFormat,getDayPeriodLabels:()=>this.timeLocaleData.dayPeriodLabels}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get timeLocaleData(){return la(this.localeId,this.hourFormat,this.minuteStep)}getPartDescriptor(e){return this.timeLocaleData.descriptors[e]}willUpdate(e){(!this.hasUpdated||e.has("value")||e.has("hourFormat")||e.has("localeId"))&&this._parts.setGroupFromISO("default",this.value??"","time",this.timeLocaleData.effectiveHourFormat)}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:In(this.localeId,this.timeLocaleData.effectiveHourFormat),getDescriptor:a=>this.getPartDescriptor(a),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(a,r)=>({hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[r]??_t[r],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly},i={"gui-widget-icon":!0,[this.icon]:!0};return d.html`
311
+ ${this.label?le(this.uid,e,!1,void 0,!1):d.nothing}
312
312
 
313
313
  <div class="gui-widget">
314
314
  <div
@@ -317,21 +317,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
317
317
  role="group"
318
318
  aria-labelledby=${`${this.uid}_label`}
319
319
  >
320
- ${yt("default",t,this._parts)}
320
+ ${bt("default",t,this._parts)}
321
321
  </div>
322
- ${this.icon?l.html`<span
323
- class=${_.classMap(i)}
322
+ ${this.icon?d.html`<span
323
+ class=${S.classMap(i)}
324
324
  data-icon=${this.icon}
325
325
  aria-hidden="true"
326
- ></span>`:l.nothing}
326
+ ></span>`:d.nothing}
327
327
  </div>
328
328
 
329
- ${this.showErrors&&this.errors?.length?j(this.uid,e):l.nothing}
330
- `}validateAndEmit(e){const{effectiveHourFormat:t,descriptors:i}=this.timeLocaleData,{result:a,writeBacks:r}=tn(this._parts.values[e]??{},{hourFormat:t,descriptors:i});if(this._parts.applyWriteBacks(e,r),a.kind!=="valid"){this.requestUpdate();return}const s=aa(a.iso,{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage});if(s){this.dispatchEvent(new CustomEvent("change",{detail:{value:a.iso},bubbles:!0})),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:s},bubbles:!0})),this.requestUpdate();return}this.value=a.iso,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0})),this.requestUpdate()}};me([n.property({type:String})],oe.prototype,"uid",2),me([n.property({type:String})],oe.prototype,"label",2),me([n.property({type:String,attribute:"locale-id"})],oe.prototype,"localeId",2),me([n.property({type:Array})],oe.prototype,"errors",2),me([n.property({type:Boolean})],oe.prototype,"showErrors",2),me([n.property({type:Boolean})],oe.prototype,"touched",2),me([n.property({type:Boolean})],oe.prototype,"required",2),me([n.property({type:Boolean})],oe.prototype,"disabled",2),me([n.property({type:Boolean,attribute:"readonly"})],oe.prototype,"readOnly",2),me([n.property({type:String})],oe.prototype,"icon",2),me([n.property({type:String})],oe.prototype,"hint",2),me([n.property({type:String})],oe.prototype,"hourAriaLabel",2),me([n.property({type:String})],oe.prototype,"minuteAriaLabel",2),me([n.property({type:String})],oe.prototype,"dayPeriodAriaLabel",2),me([n.property({type:String})],oe.prototype,"value",2),me([n.property({type:String,attribute:"hour-format"})],oe.prototype,"hourFormat",2),me([n.property({type:Number,attribute:"minute-step"})],oe.prototype,"minuteStep",2),me([n.property({type:String,attribute:"min-time"})],oe.prototype,"minTime",2),me([n.property({type:String,attribute:"max-time"})],oe.prototype,"maxTime",2),me([n.property({type:String,attribute:"min-time-message"})],oe.prototype,"minTimeMessage",2),me([n.property({type:String,attribute:"max-time-message"})],oe.prototype,"maxTimeMessage",2),oe=me([n.customElement("gui-time")],oe),typeof customElements<"u"&&!customElements.get("gui-time")&&customElements.define("gui-time",oe);var Nu=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,Re=(e,t,i,a)=>{for(var r=a>1?void 0:a?qu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Nu(t,i,r),r};let Ae=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.value=void 0,this.label=void 0,this.minTime=void 0,this.maxTime=void 0,this.minuteStep=void 0,this.disabledRanges=void 0,this.localeId=void 0,this.hourFormat=void 0,this.disabled=!1,this.readOnly=!1,this.height=void 0,this.itemHeight=void 0,this.columns=void 0,this.noAvailableTimesMessage=void 0}createRenderRoot(){return this}get effectiveColumns(){return this.columns||1}get timeOptions(){const e=ji(this.localeId,this.hourFormat),t=[this.localeId,e,this.minTime,this.maxTime,this.minuteStep,JSON.stringify(this.disabledRanges??null)].join("|");return this._optionsCache?.key!==t&&(this._optionsCache={key:t,options:Ks({minTime:this.minTime,maxTime:this.maxTime,minuteStep:this.minuteStep,disabledRanges:this.disabledRanges}).map(i=>({...i,template:ia(i.value,this.localeId,e)}))}),this._optionsCache.options}isSelected(e){return this.value!=null&&Ie(e.value,this.value)===0}get rovingIndex(){const e=this.timeOptions,t=e.findIndex(i=>this.isSelected(i)&&!i.disabled);return t!==-1?t:e.findIndex(i=>!i.disabled)}scrollToSelectedValue(){const e=this.querySelector(".gui-time-list__viewport"),t=this.querySelector(".gui-time-list__option--selected")??this.querySelector(".gui-time-list__option");if(e&&t){const i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),r=e.scrollTop+(a.top-i.top)-i.height/2+a.height/2;e.scrollTop=Math.max(0,r)}}focusSelectedOption(){this.querySelector('.gui-time-list__option[tabindex="0"]')?.focus()}selectOption(e,t){t.stopPropagation(),!(this.disabled||this.readOnly||e.disabled)&&(this.value=e.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0})))}onKeyDown(e){const t=e.target;if(!t.classList.contains("gui-time-list__option"))return;const i=Array.from(this.querySelectorAll(".gui-time-list__option")),a=i.indexOf(t),r=this.effectiveColumns,s=window.getComputedStyle(this).direction==="rtl",o=m=>this.timeOptions[m].disabled;if(e.key==="Enter"||e.key===" "){e.preventDefault();const m=this.timeOptions[a];m&&this.selectOption(m,e);return}const d=Aa(e.key,{columns:r,isRTL:s,pageSize:jp(this.height,this.itemHeight,r)});if(d.kind==="none")return;if(e.preventDefault(),d.kind==="edge"){const m=d.edge==="first"?0:i.length-1,y=qi(m,d.edge==="first"?1:-1,this.timeOptions.length,o,{includeStart:!0,outOfBounds:"none"});y!==-1&&i[y].focus();return}const p=d.delta,u=Math.min(Math.max(a+p,0),i.length-1);if(u===a)return;const h=qi(u,p>0?1:-1,this.timeOptions.length,o,{includeStart:!0,outOfBounds:"none"});h!==-1&&h!==a&&i[h].focus()}renderOption(e,t,i){const a=this.isSelected(e),r={"gui-time-list__option":!0,"gui-time-list__option--selected":a};return l.html`
329
+ ${this.showErrors&&this.errors?.length?j(this.uid,e):d.nothing}
330
+ `}validateAndEmit(e){const{effectiveHourFormat:t,descriptors:i}=this.timeLocaleData,{result:a,writeBacks:r}=Yn(this._parts.values[e]??{},{hourFormat:t,descriptors:i});if(this._parts.applyWriteBacks(e,r),a.kind!=="valid"){this.requestUpdate();return}const s=oa(a.iso,{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage});if(s){this.dispatchEvent(new CustomEvent("change",{detail:{value:a.iso},bubbles:!0})),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:s},bubbles:!0})),this.requestUpdate();return}this.value=a.iso,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0})),this.requestUpdate()}};ce([n.property({type:String})],oe.prototype,"uid",2),ce([n.property({type:String})],oe.prototype,"label",2),ce([n.property({type:String,attribute:"locale-id"})],oe.prototype,"localeId",2),ce([n.property({type:Array})],oe.prototype,"errors",2),ce([n.property({type:Boolean})],oe.prototype,"showErrors",2),ce([n.property({type:Boolean})],oe.prototype,"touched",2),ce([n.property({type:Boolean})],oe.prototype,"required",2),ce([n.property({type:Boolean})],oe.prototype,"disabled",2),ce([n.property({type:Boolean,attribute:"readonly"})],oe.prototype,"readOnly",2),ce([n.property({type:String})],oe.prototype,"icon",2),ce([n.property({type:String})],oe.prototype,"hint",2),ce([n.property({type:String})],oe.prototype,"hourAriaLabel",2),ce([n.property({type:String})],oe.prototype,"minuteAriaLabel",2),ce([n.property({type:String})],oe.prototype,"dayPeriodAriaLabel",2),ce([n.property({type:String})],oe.prototype,"value",2),ce([n.property({type:String,attribute:"hour-format"})],oe.prototype,"hourFormat",2),ce([n.property({type:Number,attribute:"minute-step"})],oe.prototype,"minuteStep",2),ce([n.property({type:String,attribute:"min-time"})],oe.prototype,"minTime",2),ce([n.property({type:String,attribute:"max-time"})],oe.prototype,"maxTime",2),ce([n.property({type:String,attribute:"min-time-message"})],oe.prototype,"minTimeMessage",2),ce([n.property({type:String,attribute:"max-time-message"})],oe.prototype,"maxTimeMessage",2),oe=ce([n.customElement("gui-time")],oe),typeof customElements<"u"&&!customElements.get("gui-time")&&customElements.define("gui-time",oe);var qm=Object.defineProperty,zm=Object.getOwnPropertyDescriptor,Fe=(e,t,i,a)=>{for(var r=a>1?void 0:a?zm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&qm(t,i,r),r};let Ee=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.value=void 0,this.label=void 0,this.minTime=void 0,this.maxTime=void 0,this.minuteStep=void 0,this.disabledRanges=void 0,this.localeId=void 0,this.hourFormat=void 0,this.disabled=!1,this.readOnly=!1,this.height=void 0,this.itemHeight=void 0,this.columns=void 0,this.noAvailableTimesMessage=void 0}createRenderRoot(){return this}get effectiveColumns(){return this.columns||1}get timeOptions(){const e=aa(this.localeId,this.hourFormat),t=[this.localeId,e,this.minTime,this.maxTime,this.minuteStep,JSON.stringify(this.disabledRanges??null)].join("|");return this._optionsCache?.key!==t&&(this._optionsCache={key:t,options:qn({minTime:this.minTime,maxTime:this.maxTime,minuteStep:this.minuteStep,disabledRanges:this.disabledRanges}).map(i=>({...i,template:na(i.value,this.localeId,e)}))}),this._optionsCache.options}isSelected(e){return this.value!=null&&Re(e.value,this.value)===0}get rovingIndex(){const e=this.timeOptions,t=e.findIndex(i=>this.isSelected(i)&&!i.disabled);return t!==-1?t:e.findIndex(i=>!i.disabled)}scrollToSelectedValue(){const e=this.querySelector(".gui-time-list__viewport"),t=this.querySelector(".gui-time-list__option--selected")??this.querySelector(".gui-time-list__option");if(e&&t){const i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),r=e.scrollTop+(a.top-i.top)-i.height/2+a.height/2;e.scrollTop=Math.max(0,r)}}focusSelectedOption(){this.querySelector('.gui-time-list__option[tabindex="0"]')?.focus()}selectOption(e,t){t.stopPropagation(),!(this.disabled||this.readOnly||e.disabled)&&(this.value=e.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0})))}onKeyDown(e){const t=e.target;if(!t.classList.contains("gui-time-list__option"))return;const i=Array.from(this.querySelectorAll(".gui-time-list__option")),a=i.indexOf(t),r=this.effectiveColumns,s=window.getComputedStyle(this).direction==="rtl",o=c=>this.timeOptions[c].disabled;if(e.key==="Enter"||e.key===" "){e.preventDefault();const c=this.timeOptions[a];c&&this.selectOption(c,e);return}const l=br(e.key,{columns:r,isRTL:s,pageSize:em(this.height,this.itemHeight,r)});if(l.kind==="none")return;if(e.preventDefault(),l.kind==="edge"){const c=l.edge==="first"?0:i.length-1,y=Vi(c,l.edge==="first"?1:-1,this.timeOptions.length,o,{includeStart:!0,outOfBounds:"none"});y!==-1&&i[y].focus();return}const u=l.delta,p=Math.min(Math.max(a+u,0),i.length-1);if(p===a)return;const h=Vi(p,u>0?1:-1,this.timeOptions.length,o,{includeStart:!0,outOfBounds:"none"});h!==-1&&h!==a&&i[h].focus()}renderOption(e,t,i){const a=this.isSelected(e),r={"gui-time-list__option":!0,"gui-time-list__option--selected":a};return d.html`
331
331
  <button
332
332
  type="button"
333
333
  role=${i}
334
- class=${_.classMap(r)}
334
+ class=${S.classMap(r)}
335
335
  tabindex=${t===this.rovingIndex?0:-1}
336
336
  ?disabled=${e.disabled||this.disabled}
337
337
  data-value=${e.value}
@@ -341,39 +341,39 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
341
341
  >
342
342
  ${e.template}
343
343
  </button>
344
- `}render(){const e=this.timeOptions;if(e.length===0)return l.html`<div class="gui-time-list__empty">
345
- ${this.noAvailableTimesMessage??ku}
346
- </div>`;const t=this.effectiveColumns,i=`--gui-time-list-height: ${this.height??300}px; --gui-time-list-item-height: ${this.itemHeight||40}px; --gui-time-list-columns: ${t};`;if(t===1)return l.html`
344
+ `}render(){const e=this.timeOptions;if(e.length===0)return d.html`<div class="gui-time-list__empty">
345
+ ${this.noAvailableTimesMessage??Tm}
346
+ </div>`;const t=this.effectiveColumns,i=`--gui-time-list-height: ${this.height??300}px; --gui-time-list-item-height: ${this.itemHeight||40}px; --gui-time-list-columns: ${t};`;if(t===1)return d.html`
347
347
  <div
348
348
  class="gui-time-list__viewport"
349
349
  role="listbox"
350
350
  style=${i}
351
- aria-label=${this.label??l.nothing}
351
+ aria-label=${this.label??d.nothing}
352
352
  @keydown=${this.onKeyDown}
353
353
  >
354
354
  ${e.map((r,s)=>this.renderOption(r,s,"option"))}
355
355
  </div>
356
- `;const a=Ca(e,t);return l.html`
356
+ `;const a=fr(e,t);return d.html`
357
357
  <div
358
358
  class="gui-time-list__viewport gui-time-list__viewport--grid"
359
359
  role="grid"
360
360
  style=${i}
361
- aria-label=${this.label??l.nothing}
361
+ aria-label=${this.label??d.nothing}
362
362
  @keydown=${this.onKeyDown}
363
363
  >
364
- ${a.map((r,s)=>l.html`
364
+ ${a.map((r,s)=>d.html`
365
365
  <div role="row" class="gui-time-list__row">
366
- ${r.map((o,d)=>this.renderOption(o,s*t+d,"gridcell"))}
366
+ ${r.map((o,l)=>this.renderOption(o,s*t+l,"gridcell"))}
367
367
  </div>
368
368
  `)}
369
369
  </div>
370
- `}};Re([n.property({type:String})],Ae.prototype,"uid",2),Re([n.property({type:String})],Ae.prototype,"value",2),Re([n.property({type:String})],Ae.prototype,"label",2),Re([n.property({type:String,attribute:"min-time"})],Ae.prototype,"minTime",2),Re([n.property({type:String,attribute:"max-time"})],Ae.prototype,"maxTime",2),Re([n.property({type:Number,attribute:"minute-step"})],Ae.prototype,"minuteStep",2),Re([n.property({type:Array,attribute:"disabled-ranges"})],Ae.prototype,"disabledRanges",2),Re([n.property({type:String,attribute:"locale-id"})],Ae.prototype,"localeId",2),Re([n.property({type:String,attribute:"hour-format"})],Ae.prototype,"hourFormat",2),Re([n.property({type:Boolean})],Ae.prototype,"disabled",2),Re([n.property({type:Boolean,attribute:"readonly"})],Ae.prototype,"readOnly",2),Re([n.property({type:Number})],Ae.prototype,"height",2),Re([n.property({type:Number,attribute:"item-height"})],Ae.prototype,"itemHeight",2),Re([n.property({type:Number})],Ae.prototype,"columns",2),Re([n.property({type:String,attribute:"no-available-times-message"})],Ae.prototype,"noAvailableTimesMessage",2),Ae=Re([n.customElement("gui-time-list")],Ae),typeof customElements<"u"&&!customElements.get("gui-time-list")&&customElements.define("gui-time-list",Ae);class Ot{constructor(t,i){this._open=!1,this._restoringFocus=!1,this._suppressNextFocusOut=!1,this._pointerDownInside=!1,this._pointerDownTarget=null,this.show=()=>{this.options.isDisabled()||this._restoringFocus||(this.options.beforeOpen?.(this),this.setOpen(!0))},this.close=()=>{this.setOpen(!1)},this.openAndFocus=()=>{this.show(),!(!this._open||!this.options.focusPopupSelector)&&Promise.resolve(this.host.updateComplete).then(()=>{this.host.querySelector(this.options.focusPopupSelector)?.focus()})},this.toggle=()=>{this.options.isDisabled()||(this.options.keyToggleMode==="toggle"?this.setOpen(!this._open):this._open?this.close():this.show())},this.onAnchorClick=a=>{if(this.options.isDisabled())return;const r=this._pointerDownTarget??a.target,s=this.options.clickIntent(r);if(s!=="ignore"){if(s==="open"){this.show();return}this.toggle()}},this.onAnchorKeyDown=a=>this.options.isDisabled()?!1:a.key==="Escape"&&this._open?(a.preventDefault(),a.stopPropagation(),this.restoreFocusToInput(),this.close(),!0):!1,this.onDocumentClick=a=>{if(!this._open)return;!a.composedPath().includes(this.host)&&!this._pointerDownInside&&this.close()},this.onDocumentPointerDown=a=>{const r=a.composedPath();this._pointerDownInside=r.includes(this.host),this._pointerDownTarget=r[0]??null},this.onDocumentKeyDown=a=>{a.key!=="Tab"&&a.key!=="Escape"||(this._pointerDownInside=!1,this._pointerDownTarget=null)},this.closeOnFocusLeave=()=>{this._pointerDownInside||this.close()},this.onHostFocusOut=a=>{if(this._suppressNextFocusOut){this._suppressNextFocusOut=!1;return}if(!this._open)return;const r=a.relatedTarget;this._pointerDownInside&&(!r||r.contains(this.host))||this.focusLeave.handleFocusOut(a)},this.host=t,this.options=i,this.focusLeave=new zt(t,{onLeave:()=>{this.close()}}),t.addController(this)}get open(){return this._open}suppressNextFocusOut(){this._suppressNextFocusOut=!0}setOpen(t){this._open!==t&&(this._open=t,this.host.requestUpdate(),this.options.onOpenChanged?.(t))}restoreFocusToInput(){const t=this.host.querySelector(this.options.focusRestoreSelector);t&&(this._restoringFocus=!0,t.focus(),setTimeout(()=>{this._restoringFocus=!1}))}hostUpdated(){this._open&&this.options.isDisabled()&&this.close()}hostConnected(){document.addEventListener("click",this.onDocumentClick),document.addEventListener("pointerdown",this.onDocumentPointerDown,!0),document.addEventListener("keydown",this.onDocumentKeyDown,!0),this.host.addEventListener("focusout",this.onHostFocusOut)}hostDisconnected(){document.removeEventListener("click",this.onDocumentClick),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),document.removeEventListener("keydown",this.onDocumentKeyDown,!0),this.host.removeEventListener("focusout",this.onHostFocusOut)}}var zu=Object.defineProperty,Gu=Object.getOwnPropertyDescriptor,Y=(e,t,i,a)=>{for(var r=a>1?void 0:a?Gu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&zu(t,i,r),r};let B=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledRanges=void 0,this.allowCustomTime=!1,this.height=void 0,this.itemHeight=void 0,this.columns=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this._popup=new Ot(this,{focusRestoreSelector:"gui-time input, gui-time button",focusPopupSelector:'.gui-time-list__option[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-time-list__option")?"ignore":e.closest("gui-time")||e.closest("gui-time-list")?"open":"toggle",keyToggleMode:"openClose",onOpenChanged:e=>{this.dispatchListToggle(e),e&&this.updateComplete.then(()=>this._listRef?.scrollToSelectedValue())}}),this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()},this.onKeyDown=e=>{if(this._popup.onAnchorKeyDown(e))return;if(e.key==="Enter"&&e.target.closest("gui-time")){this._popup.open&&this._popup.close(),this.commitValue(this.value,!0);return}this.allowCustomTime||this.readOnly||this.disabled||e.key!=="ArrowDown"&&e.key!=="ArrowUp"||!e.target.closest("gui-time")||(e.preventDefault(),this.selectAdjacentOption(e.key==="ArrowDown"?1:-1))}}createRenderRoot(){return this}updated(e){e.has("value")&&this._listRef&&this._listRef.value!==this.value&&(this._listRef.value=this.value)}render(){const e=Xe("timePicker",{icon:this.icon});return l.html`
370
+ `}};Fe([n.property({type:String})],Ee.prototype,"uid",2),Fe([n.property({type:String})],Ee.prototype,"value",2),Fe([n.property({type:String})],Ee.prototype,"label",2),Fe([n.property({type:String,attribute:"min-time"})],Ee.prototype,"minTime",2),Fe([n.property({type:String,attribute:"max-time"})],Ee.prototype,"maxTime",2),Fe([n.property({type:Number,attribute:"minute-step"})],Ee.prototype,"minuteStep",2),Fe([n.property({type:Array,attribute:"disabled-ranges"})],Ee.prototype,"disabledRanges",2),Fe([n.property({type:String,attribute:"locale-id"})],Ee.prototype,"localeId",2),Fe([n.property({type:String,attribute:"hour-format"})],Ee.prototype,"hourFormat",2),Fe([n.property({type:Boolean})],Ee.prototype,"disabled",2),Fe([n.property({type:Boolean,attribute:"readonly"})],Ee.prototype,"readOnly",2),Fe([n.property({type:Number})],Ee.prototype,"height",2),Fe([n.property({type:Number,attribute:"item-height"})],Ee.prototype,"itemHeight",2),Fe([n.property({type:Number})],Ee.prototype,"columns",2),Fe([n.property({type:String,attribute:"no-available-times-message"})],Ee.prototype,"noAvailableTimesMessage",2),Ee=Fe([n.customElement("gui-time-list")],Ee),typeof customElements<"u"&&!customElements.get("gui-time-list")&&customElements.define("gui-time-list",Ee);class Rt{constructor(t,i){this._open=!1,this._restoringFocus=!1,this._suppressNextFocusOut=!1,this._pointerDownInside=!1,this._pointerDownTarget=null,this.show=()=>{this.options.isDisabled()||this._restoringFocus||(this.options.beforeOpen?.(this),this.setOpen(!0))},this.close=()=>{this.setOpen(!1)},this.openAndFocus=()=>{this.show(),!(!this._open||!this.options.focusPopupSelector)&&Promise.resolve(this.host.updateComplete).then(()=>{this.host.querySelector(this.options.focusPopupSelector)?.focus()})},this.toggle=()=>{this.options.isDisabled()||(this.options.keyToggleMode==="toggle"?this.setOpen(!this._open):this._open?this.close():this.show())},this.onAnchorClick=a=>{if(this.options.isDisabled())return;const r=this._pointerDownTarget??a.target,s=this.options.clickIntent(r);if(s!=="ignore"){if(s==="open"){this.show();return}this.toggle()}},this.onAnchorKeyDown=a=>this.options.isDisabled()?!1:a.key==="Escape"&&this._open?(a.preventDefault(),a.stopPropagation(),this.restoreFocusToInput(),this.close(),!0):!1,this.onDocumentClick=a=>{if(!this._open)return;!a.composedPath().includes(this.host)&&!this._pointerDownInside&&this.close()},this.onDocumentPointerDown=a=>{const r=a.composedPath();this._pointerDownInside=r.includes(this.host),this._pointerDownTarget=r[0]??null},this.onDocumentKeyDown=a=>{a.key!=="Tab"&&a.key!=="Escape"||(this._pointerDownInside=!1,this._pointerDownTarget=null)},this.closeOnFocusLeave=()=>{this._pointerDownInside||this.close()},this.onHostFocusOut=a=>{if(this._suppressNextFocusOut){this._suppressNextFocusOut=!1;return}if(!this._open)return;const r=a.relatedTarget;this._pointerDownInside&&(!r||r.contains(this.host))||this.focusLeave.handleFocusOut(a)},this.host=t,this.options=i,this.focusLeave=new Zt(t,{onLeave:()=>{this.close()}}),t.addController(this)}get open(){return this._open}suppressNextFocusOut(){this._suppressNextFocusOut=!0}setOpen(t){this._open!==t&&(this._open=t,this.host.requestUpdate(),this.options.onOpenChanged?.(t))}restoreFocusToInput(){const t=this.host.querySelector(this.options.focusRestoreSelector);t&&(this._restoringFocus=!0,t.focus(),setTimeout(()=>{this._restoringFocus=!1}))}hostUpdated(){this._open&&this.options.isDisabled()&&this.close()}hostConnected(){document.addEventListener("click",this.onDocumentClick),document.addEventListener("pointerdown",this.onDocumentPointerDown,!0),document.addEventListener("keydown",this.onDocumentKeyDown,!0),this.host.addEventListener("focusout",this.onHostFocusOut)}hostDisconnected(){document.removeEventListener("click",this.onDocumentClick),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),document.removeEventListener("keydown",this.onDocumentKeyDown,!0),this.host.removeEventListener("focusout",this.onHostFocusOut)}}var Um=Object.defineProperty,Gm=Object.getOwnPropertyDescriptor,Y=(e,t,i,a)=>{for(var r=a>1?void 0:a?Gm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Um(t,i,r),r};let N=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledRanges=void 0,this.allowCustomTime=!1,this.height=void 0,this.itemHeight=void 0,this.columns=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this._popup=new Rt(this,{focusRestoreSelector:"gui-time input, gui-time button",focusPopupSelector:'.gui-time-list__option[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-time-list__option")?"ignore":e.closest("gui-time")||e.closest("gui-time-list")?"open":"toggle",keyToggleMode:"openClose",onOpenChanged:e=>{this.dispatchListToggle(e),e&&this.updateComplete.then(()=>this._listRef?.scrollToSelectedValue())}}),this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()},this.onKeyDown=e=>{if(this._popup.onAnchorKeyDown(e))return;if(e.key==="Enter"&&e.target.closest("gui-time")){this._popup.open&&this._popup.close(),this.commitValue(this.value,!0);return}this.allowCustomTime||this.readOnly||this.disabled||e.key!=="ArrowDown"&&e.key!=="ArrowUp"||!e.target.closest("gui-time")||(e.preventDefault(),this.selectAdjacentOption(e.key==="ArrowDown"?1:-1))}}createRenderRoot(){return this}updated(e){e.has("value")&&this._listRef&&this._listRef.value!==this.value&&(this._listRef.value=this.value)}render(){const e=Qe("timePicker",{icon:this.icon});return d.html`
371
371
  ${le(this.uid??"",{label:this.label,hint:this.hint,required:this.required},!1,void 0,!1)}
372
372
 
373
373
  <div class="gui-widget" @keydown=${this.onKeyDown} @click=${this._popup.onAnchorClick}>
374
374
  <gui-time
375
375
  id="time-input"
376
- class=${_.classMap(e.widgetClasses)}
376
+ class=${S.classMap(e.widgetClasses)}
377
377
  .uid=${this.uid}
378
378
  .hint=${this.hint}
379
379
  .showErrors=${!1}
@@ -445,7 +445,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
445
445
  </div>
446
446
 
447
447
  ${this.showErrors?j(this.uid??"",{errors:this.errors,touched:this.touched}):""}
448
- `}onTimeChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onTimeBlur(){this.dispatchEvent(new CustomEvent("blur"))}onListChange(e){e.stopPropagation(),this.commitValue(e.detail.value,!0),this._popup.restoreFocusToInput(),this._popup.close()}commitValue(e,t=!1){this.value=e??void 0;const i=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null,commit:t},bubbles:!0,composed:!0})),i&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:i},bubbles:!0,composed:!0}))}validateBounds(e){if(!e)return null;const t=aa(e,{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage});return t||(ta(e,this.disabledRanges)?this.disabledRangeMessage??Vi:null)}selectAdjacentOption(e){const t=Ks({minTime:this.minTime,maxTime:this.maxTime,minuteStep:this.minuteStep,disabledRanges:this.disabledRanges});if(!t.length)return;const i=t.findIndex(r=>r.value===this.value);let a=i===-1?e===1?0:t.length-1:i+e;for(;a>=0&&a<t.length&&t[a].disabled;)a+=e;a<0||a>=t.length||(this.commitValue(t[a].value),this._popup.show(),this.updateComplete.then(()=>this._listRef?.scrollToSelectedValue()))}closeList(){this._popup.close()}dispatchListToggle(e){this.dispatchEvent(new CustomEvent("listtoggle",{detail:{open:e},bubbles:!0,composed:!0}))}};Y([n.property({type:String})],B.prototype,"uid",2),Y([n.property({type:String})],B.prototype,"label",2),Y([n.property({type:String})],B.prototype,"hint",2),Y([n.property({type:String})],B.prototype,"icon",2),Y([n.property({type:String,attribute:"toggle-aria-label"})],B.prototype,"toggleAriaLabel",2),Y([n.property({type:String})],B.prototype,"hourAriaLabel",2),Y([n.property({type:String})],B.prototype,"minuteAriaLabel",2),Y([n.property({type:String})],B.prototype,"dayPeriodAriaLabel",2),Y([n.property({type:Array})],B.prototype,"errors",2),Y([n.property({type:Boolean})],B.prototype,"showErrors",2),Y([n.property({type:Boolean})],B.prototype,"touched",2),Y([n.property({type:Boolean})],B.prototype,"required",2),Y([n.property({type:Boolean})],B.prototype,"disabled",2),Y([n.property({type:Boolean,attribute:"readonly"})],B.prototype,"readOnly",2),Y([n.property({type:String,attribute:"locale-id"})],B.prototype,"localeId",2),Y([n.property({type:String})],B.prototype,"value",2),Y([n.property({type:String,attribute:"hour-format"})],B.prototype,"hourFormat",2),Y([n.property({type:Number,attribute:"minute-step"})],B.prototype,"minuteStep",2),Y([n.property({type:String,attribute:"min-time"})],B.prototype,"minTime",2),Y([n.property({type:String,attribute:"max-time"})],B.prototype,"maxTime",2),Y([n.property({type:Array,attribute:"disabled-ranges"})],B.prototype,"disabledRanges",2),Y([n.property({type:Boolean,attribute:"allow-custom-time"})],B.prototype,"allowCustomTime",2),Y([n.property({type:Number})],B.prototype,"height",2),Y([n.property({type:Number,attribute:"item-height"})],B.prototype,"itemHeight",2),Y([n.property({type:Number})],B.prototype,"columns",2),Y([n.property({type:String,attribute:"min-time-message"})],B.prototype,"minTimeMessage",2),Y([n.property({type:String,attribute:"max-time-message"})],B.prototype,"maxTimeMessage",2),Y([n.property({type:String,attribute:"disabled-range-message"})],B.prototype,"disabledRangeMessage",2),Y([n.property({type:String,attribute:"no-available-times-message"})],B.prototype,"noAvailableTimesMessage",2),Y([n.query("gui-time-list")],B.prototype,"_listRef",2),B=Y([n.customElement("gui-time-picker")],B),typeof customElements<"u"&&!customElements.get("gui-time-picker")&&customElements.define("gui-time-picker",B);var Vu=Object.defineProperty,Uu=Object.getOwnPropertyDescriptor,O=(e,t,i,a)=>{for(var r=a>1?void 0:a?Uu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Vu(t,i,r),r};let E=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledTimeRanges=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.disabledTimeRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this.allowCustomTime=!1,this._selectedDate=void 0,this._selectedTime=void 0,this._timeGridOpen=!1,this._internalValueChange=!1,this._nav=new Yi(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Gi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:e=>{const t=re(e);this.selectDate({date:t,dayLabel:xa(this.localeId,t),isCurrentMonth:!0,isToday:La(t),isSelected:!1,isFocusable:!0,isDisabled:this.isDisabled(t)})},onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new zt(this,{onLeave:()=>{this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}})}get resolvedTimeRanges(){return this._selectedDate?Vs(this.disabledTimeRanges,this._selectedDate):[]}get timePicker(){return this.querySelector("gui-time-picker")}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if(e.has("value")){if(this._internalValueChange){this._internalValueChange=!1;return}if(this.value){const t=ee(this.value);isNaN(t.getTime())||(this._selectedDate=ae(t),this._selectedTime=ct(t),Ea(t,this._nav.currentDate,this.numberOfMonths??1)||(this._nav.currentDate=t))}else this._selectedTime&&(this._selectedDate=void 0,this._selectedTime=void 0)}}setValueInternal(e){this._internalValueChange=!0,this.value=e}emitChange(e,t=!1){this.dispatchEvent(new CustomEvent("change",{detail:{value:e,commit:t},bubbles:!0,composed:!0}))}selectDate(e){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const t=ae(e.date);t!==this._selectedDate&&(this._selectedDate=t,this._selectedTime=void 0,this.value&&(this.setValueInternal(void 0),this.emitChange(null)))}commitTime(e,t=!1){this._selectedDate&&(this._selectedTime=e,this.setValueInternal(`${this._selectedDate}T${e}`),this.emitChange(this.value,t))}onTimePickerChange(e){e.stopPropagation();const t=e.detail.value,i=e.detail.commit===!0;if(!t){this._selectedTime=void 0,this.value&&(this.setValueInternal(void 0),this.emitChange(null));return}this.commitTime(t,i)}onListToggle(e){e.stopPropagation();const{open:t}=e.detail;if(t&&this.readOnly){this.timePicker?.closeList();return}this._timeGridOpen=t,t&&(this._nav.yearSelectorOpen=!1)}toggleYearSelector(){this.timePicker?.closeList(),this._nav.toggleYearSelector()}render(){return Wi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>l.nothing,renderMonthPanel:e=>Ki({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this.toggleYearSelector(),renderBelowHeader:t=>this.renderBelowHeader(t),renderPanelBody:t=>this.renderPanelBody(t)})})}renderBelowHeader(e){return e!==0?l.nothing:l.html`
448
+ `}onTimeChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onTimeBlur(){this.dispatchEvent(new CustomEvent("blur"))}onListChange(e){e.stopPropagation(),this.commitValue(e.detail.value,!0),this._popup.restoreFocusToInput(),this._popup.close()}commitValue(e,t=!1){this.value=e??void 0;const i=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null,commit:t},bubbles:!0,composed:!0})),i&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:i},bubbles:!0,composed:!0}))}validateBounds(e){if(!e)return null;const t=oa(e,{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage});return t||(sa(e,this.disabledRanges)?this.disabledRangeMessage??Hi:null)}selectAdjacentOption(e){const t=qn({minTime:this.minTime,maxTime:this.maxTime,minuteStep:this.minuteStep,disabledRanges:this.disabledRanges});if(!t.length)return;const i=t.findIndex(r=>r.value===this.value);let a=i===-1?e===1?0:t.length-1:i+e;for(;a>=0&&a<t.length&&t[a].disabled;)a+=e;a<0||a>=t.length||(this.commitValue(t[a].value),this._popup.show(),this.updateComplete.then(()=>this._listRef?.scrollToSelectedValue()))}closeList(){this._popup.close()}dispatchListToggle(e){this.dispatchEvent(new CustomEvent("listtoggle",{detail:{open:e},bubbles:!0,composed:!0}))}};Y([n.property({type:String})],N.prototype,"uid",2),Y([n.property({type:String})],N.prototype,"label",2),Y([n.property({type:String})],N.prototype,"hint",2),Y([n.property({type:String})],N.prototype,"icon",2),Y([n.property({type:String,attribute:"toggle-aria-label"})],N.prototype,"toggleAriaLabel",2),Y([n.property({type:String})],N.prototype,"hourAriaLabel",2),Y([n.property({type:String})],N.prototype,"minuteAriaLabel",2),Y([n.property({type:String})],N.prototype,"dayPeriodAriaLabel",2),Y([n.property({type:Array})],N.prototype,"errors",2),Y([n.property({type:Boolean})],N.prototype,"showErrors",2),Y([n.property({type:Boolean})],N.prototype,"touched",2),Y([n.property({type:Boolean})],N.prototype,"required",2),Y([n.property({type:Boolean})],N.prototype,"disabled",2),Y([n.property({type:Boolean,attribute:"readonly"})],N.prototype,"readOnly",2),Y([n.property({type:String,attribute:"locale-id"})],N.prototype,"localeId",2),Y([n.property({type:String})],N.prototype,"value",2),Y([n.property({type:String,attribute:"hour-format"})],N.prototype,"hourFormat",2),Y([n.property({type:Number,attribute:"minute-step"})],N.prototype,"minuteStep",2),Y([n.property({type:String,attribute:"min-time"})],N.prototype,"minTime",2),Y([n.property({type:String,attribute:"max-time"})],N.prototype,"maxTime",2),Y([n.property({type:Array,attribute:"disabled-ranges"})],N.prototype,"disabledRanges",2),Y([n.property({type:Boolean,attribute:"allow-custom-time"})],N.prototype,"allowCustomTime",2),Y([n.property({type:Number})],N.prototype,"height",2),Y([n.property({type:Number,attribute:"item-height"})],N.prototype,"itemHeight",2),Y([n.property({type:Number})],N.prototype,"columns",2),Y([n.property({type:String,attribute:"min-time-message"})],N.prototype,"minTimeMessage",2),Y([n.property({type:String,attribute:"max-time-message"})],N.prototype,"maxTimeMessage",2),Y([n.property({type:String,attribute:"disabled-range-message"})],N.prototype,"disabledRangeMessage",2),Y([n.property({type:String,attribute:"no-available-times-message"})],N.prototype,"noAvailableTimesMessage",2),Y([n.query("gui-time-list")],N.prototype,"_listRef",2),N=Y([n.customElement("gui-time-picker")],N),typeof customElements<"u"&&!customElements.get("gui-time-picker")&&customElements.define("gui-time-picker",N);var Vm=Object.defineProperty,Zm=Object.getOwnPropertyDescriptor,M=(e,t,i,a)=>{for(var r=a>1?void 0:a?Zm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Vm(t,i,r),r};let I=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledTimeRanges=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.disabledTimeRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this.allowCustomTime=!1,this._selectedDate=void 0,this._selectedTime=void 0,this._timeGridOpen=!1,this._internalValueChange=!1,this._nav=new Ji(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Yi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:e=>{const t=re(e);this.selectDate({date:t,dayLabel:wr(this.localeId,t),isCurrentMonth:!0,isToday:vr(t),isSelected:!1,isFocusable:!0,isDisabled:this.isDisabled(t)})},onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new Zt(this,{onLeave:()=>{this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}})}get resolvedTimeRanges(){return this._selectedDate?Mn(this.disabledTimeRanges,this._selectedDate):[]}get timePicker(){return this.querySelector("gui-time-picker")}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if(e.has("value")){if(this._internalValueChange){this._internalValueChange=!1;return}if(this.value){const t=ee(this.value);isNaN(t.getTime())||(this._selectedDate=ae(t),this._selectedTime=gt(t),Dr(t,this._nav.currentDate,this.numberOfMonths??1)||(this._nav.currentDate=t))}else this._selectedTime&&(this._selectedDate=void 0,this._selectedTime=void 0)}}setValueInternal(e){this._internalValueChange=!0,this.value=e}emitChange(e,t=!1){this.dispatchEvent(new CustomEvent("change",{detail:{value:e,commit:t},bubbles:!0,composed:!0}))}selectDate(e){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const t=ae(e.date);t!==this._selectedDate&&(this._selectedDate=t,this._selectedTime=void 0,this.value&&(this.setValueInternal(void 0),this.emitChange(null)))}commitTime(e,t=!1){this._selectedDate&&(this._selectedTime=e,this.setValueInternal(`${this._selectedDate}T${e}`),this.emitChange(this.value,t))}onTimePickerChange(e){e.stopPropagation();const t=e.detail.value,i=e.detail.commit===!0;if(!t){this._selectedTime=void 0,this.value&&(this.setValueInternal(void 0),this.emitChange(null));return}this.commitTime(t,i)}onListToggle(e){e.stopPropagation();const{open:t}=e.detail;if(t&&this.readOnly){this.timePicker?.closeList();return}this._timeGridOpen=t,t&&(this._nav.yearSelectorOpen=!1)}toggleYearSelector(){this.timePicker?.closeList(),this._nav.toggleYearSelector()}render(){return Qi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>d.nothing,renderMonthPanel:e=>ji({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this.toggleYearSelector(),renderBelowHeader:t=>this.renderBelowHeader(t),renderPanelBody:t=>this.renderPanelBody(t)})})}renderBelowHeader(e){return e!==0?d.nothing:d.html`
449
449
  <div class="gui-calendar__time-input-row">
450
450
  <gui-time-picker
451
451
  class="gui-time-picker gui-field"
@@ -471,16 +471,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
471
471
  @listtoggle=${this.onListToggle}
472
472
  ></gui-time-picker>
473
473
  </div>
474
- `}renderPanelBody(e){return this._timeGridOpen&&!this._nav.yearSelectorOpen&&e===0?l.html``:Ji({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}renderDay(e){const t={"gui-calendar__day-button":!0,today:e.isToday,selected:e.isSelected,disabled:e.isDisabled,"other-month":!e.isCurrentMonth};return l.html`
474
+ `}renderPanelBody(e){return this._timeGridOpen&&!this._nav.yearSelectorOpen&&e===0?d.html``:ea({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}renderDay(e){const t={"gui-calendar__day-button":!0,today:e.isToday,selected:e.isSelected,disabled:e.isDisabled,"other-month":!e.isCurrentMonth};return d.html`
475
475
  <button
476
476
  type="button"
477
477
  role="gridcell"
478
- class=${_.classMap(t)}
478
+ class=${S.classMap(t)}
479
479
  tabindex=${e.isFocusable?0:-1}
480
480
  ?disabled=${!e.isCurrentMonth}
481
- aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":l.nothing}
482
- aria-label=${Zi(this.localeId,e.date)}
483
- aria-current=${e.isToday?"date":l.nothing}
481
+ aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":d.nothing}
482
+ aria-label=${Ki(this.localeId,e.date)}
483
+ aria-current=${e.isToday?"date":d.nothing}
484
484
  data-date=${ae(e.date)}
485
485
  @click=${()=>this.selectDate(e)}
486
486
  @keydown=${i=>this._keyboard.handleDayKeydown(i)}
@@ -488,7 +488,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
488
488
  >
489
489
  ${e.dayLabel}
490
490
  </button>
491
- `}getDaysInMonth(e){const t=this._selectedDate;return Qi({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:i=>this.isDisabled(i),toDay:i=>{const a=Xi(i.date,{selectedISO:t}).isSelected;return{date:i.date,dayLabel:i.dayLabel,isCurrentMonth:i.isCurrentMonth,isToday:i.isToday,isDisabled:i.isDisabled,isSelected:a,isFocusable:(a||i.isToday)&&i.isCurrentMonth}},focusFallbackDates:[t?re(t):new Date]})}isDisabled(e){return this._nav.isDisabled(e)}};O([n.property({type:String})],E.prototype,"uid",2),O([n.property({type:String})],E.prototype,"label",2),O([n.property({type:String})],E.prototype,"hint",2),O([n.property({type:String,attribute:"locale-id"})],E.prototype,"localeId",2),O([n.property({type:Array})],E.prototype,"errors",2),O([n.property({type:Boolean})],E.prototype,"touched",2),O([n.property({type:Boolean})],E.prototype,"required",2),O([n.property({type:Boolean})],E.prototype,"disabled",2),O([n.property({type:Boolean,attribute:"readonly"})],E.prototype,"readOnly",2),O([n.property({type:String,attribute:"prev-month-icon"})],E.prototype,"prevMonthIcon",2),O([n.property({type:String,attribute:"next-month-icon"})],E.prototype,"nextMonthIcon",2),O([n.property({type:String,attribute:"prev-month-aria-label"})],E.prototype,"prevMonthAriaLabel",2),O([n.property({type:String,attribute:"next-month-aria-label"})],E.prototype,"nextMonthAriaLabel",2),O([n.property({type:String,attribute:"select-year-aria-label"})],E.prototype,"selectYearAriaLabel",2),O([n.property({type:String,attribute:"year-grid-aria-label"})],E.prototype,"yearGridAriaLabel",2),O([n.property({type:String})],E.prototype,"dayFormat",2),O([n.property({type:String})],E.prototype,"weekdayFormat",2),O([n.property({type:String})],E.prototype,"monthFormat",2),O([n.property({type:String})],E.prototype,"minDate",2),O([n.property({type:String})],E.prototype,"maxDate",2),O([n.property({type:Array})],E.prototype,"disabledRanges",2),O([n.property({type:Number})],E.prototype,"numberOfMonths",2),O([n.property({type:String})],E.prototype,"value",2),O([n.property({type:String,attribute:"hour-format"})],E.prototype,"hourFormat",2),O([n.property({type:Number,attribute:"minute-step"})],E.prototype,"minuteStep",2),O([n.property({type:String,attribute:"min-time"})],E.prototype,"minTime",2),O([n.property({type:String,attribute:"max-time"})],E.prototype,"maxTime",2),O([n.property({type:Array,attribute:"disabled-time-ranges"})],E.prototype,"disabledTimeRanges",2),O([n.property({type:String,attribute:"min-time-message"})],E.prototype,"minTimeMessage",2),O([n.property({type:String,attribute:"max-time-message"})],E.prototype,"maxTimeMessage",2),O([n.property({type:String,attribute:"disabled-time-range-message"})],E.prototype,"disabledTimeRangeMessage",2),O([n.property({type:String,attribute:"no-available-times-message"})],E.prototype,"noAvailableTimesMessage",2),O([n.property({type:Boolean,attribute:"allow-custom-time"})],E.prototype,"allowCustomTime",2),O([n.state()],E.prototype,"_selectedDate",2),O([n.state()],E.prototype,"_selectedTime",2),O([n.state()],E.prototype,"_timeGridOpen",2),E=O([n.customElement("gui-date-time-calendar")],E),typeof customElements<"u"&&!customElements.get("gui-date-time-calendar")&&customElements.define("gui-date-time-calendar",E);var Zu=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Ba=(e,t,i,a)=>{for(var r=a>1?void 0:a?Yu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Zu(t,i,r),r};let Ut=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-time-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
491
+ `}getDaysInMonth(e){const t=this._selectedDate;return ia({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:i=>this.isDisabled(i),toDay:i=>{const a=ta(i.date,{selectedISO:t}).isSelected;return{date:i.date,dayLabel:i.dayLabel,isCurrentMonth:i.isCurrentMonth,isToday:i.isToday,isDisabled:i.isDisabled,isSelected:a,isFocusable:(a||i.isToday)&&i.isCurrentMonth}},focusFallbackDates:[t?re(t):new Date]})}isDisabled(e){return this._nav.isDisabled(e)}};M([n.property({type:String})],I.prototype,"uid",2),M([n.property({type:String})],I.prototype,"label",2),M([n.property({type:String})],I.prototype,"hint",2),M([n.property({type:String,attribute:"locale-id"})],I.prototype,"localeId",2),M([n.property({type:Array})],I.prototype,"errors",2),M([n.property({type:Boolean})],I.prototype,"touched",2),M([n.property({type:Boolean})],I.prototype,"required",2),M([n.property({type:Boolean})],I.prototype,"disabled",2),M([n.property({type:Boolean,attribute:"readonly"})],I.prototype,"readOnly",2),M([n.property({type:String,attribute:"prev-month-icon"})],I.prototype,"prevMonthIcon",2),M([n.property({type:String,attribute:"next-month-icon"})],I.prototype,"nextMonthIcon",2),M([n.property({type:String,attribute:"prev-month-aria-label"})],I.prototype,"prevMonthAriaLabel",2),M([n.property({type:String,attribute:"next-month-aria-label"})],I.prototype,"nextMonthAriaLabel",2),M([n.property({type:String,attribute:"select-year-aria-label"})],I.prototype,"selectYearAriaLabel",2),M([n.property({type:String,attribute:"year-grid-aria-label"})],I.prototype,"yearGridAriaLabel",2),M([n.property({type:String})],I.prototype,"dayFormat",2),M([n.property({type:String})],I.prototype,"weekdayFormat",2),M([n.property({type:String})],I.prototype,"monthFormat",2),M([n.property({type:String})],I.prototype,"minDate",2),M([n.property({type:String})],I.prototype,"maxDate",2),M([n.property({type:Array})],I.prototype,"disabledRanges",2),M([n.property({type:Number})],I.prototype,"numberOfMonths",2),M([n.property({type:String})],I.prototype,"value",2),M([n.property({type:String,attribute:"hour-format"})],I.prototype,"hourFormat",2),M([n.property({type:Number,attribute:"minute-step"})],I.prototype,"minuteStep",2),M([n.property({type:String,attribute:"min-time"})],I.prototype,"minTime",2),M([n.property({type:String,attribute:"max-time"})],I.prototype,"maxTime",2),M([n.property({type:Array,attribute:"disabled-time-ranges"})],I.prototype,"disabledTimeRanges",2),M([n.property({type:String,attribute:"min-time-message"})],I.prototype,"minTimeMessage",2),M([n.property({type:String,attribute:"max-time-message"})],I.prototype,"maxTimeMessage",2),M([n.property({type:String,attribute:"disabled-time-range-message"})],I.prototype,"disabledTimeRangeMessage",2),M([n.property({type:String,attribute:"no-available-times-message"})],I.prototype,"noAvailableTimesMessage",2),M([n.property({type:Boolean,attribute:"allow-custom-time"})],I.prototype,"allowCustomTime",2),M([n.state()],I.prototype,"_selectedDate",2),M([n.state()],I.prototype,"_selectedTime",2),M([n.state()],I.prototype,"_timeGridOpen",2),I=M([n.customElement("gui-date-time-calendar")],I),typeof customElements<"u"&&!customElements.get("gui-date-time-calendar")&&customElements.define("gui-date-time-calendar",I);var Ym=Object.defineProperty,Hm=Object.getOwnPropertyDescriptor,Er=(e,t,i,a)=>{for(var r=a>1?void 0:a?Hm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ym(t,i,r),r};let Wt=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-time-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
492
492
  <gui-date-time-calendar
493
493
  .uid=${this.widget.uid}
494
494
  .label=${e.label}
@@ -527,12 +527,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
527
527
  @inputError=${this.onInputError}
528
528
  @blur=${()=>this.adapter.onBlur()}
529
529
  ></gui-date-time-calendar>
530
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ba([f.consume({context:c.formContext}),n.property({attribute:!1})],Ut.prototype,"formContext",2),Ba([f.provide({context:c.inputContext})],Ut.prototype,"adapter",2),Ut=Ba([n.customElement("gui-date-time-calendar-input")],Ut);const Hu=Object.freeze(Object.defineProperty({__proto__:null,get DateTimeCalendarElement(){return Ut}},Symbol.toStringTag,{value:"Module"}));function nn(e){return`${e.start}-${e.end??e.start}`}function Zt(e,t){return!e||!Array.isArray(e)?[]:[...e].sort((i,a)=>t(i.start,a.start))}function Mt(e,t){return e.find(i=>nn(i)===t)}function Yt(e,t){const i=e??[],a=Mt(i,t);if(!a)return null;const r=i.filter(s=>!(s.start===a.start&&(s.end??null)===(a.end??null)));return{removed:a,next:r}}function on(e,t){const i=re(e);return isNaN(i.getTime())?e:new Intl.DateTimeFormat(t??"en",{year:"numeric",month:"2-digit",day:"2-digit"}).format(i)}function sa(e,t){const i=t(e.start),a=e.end?t(e.end):i;return`${i} - ${a}`}function Ht(e,t){return e.map(i=>{const a=t(i);return{key:nn(i),label:a,ariaLabel:a}})}function na(){return{anchor:null,hover:null,selecting:!1}}function oa(e,t){switch(t.type){case"pick":{if(!e.anchor)return{state:{anchor:t.date,hover:e.hover,selecting:!0}};let i=e.anchor,a=t.date;return t.date<i&&(i=t.date,a=e.anchor),{state:na(),commit:{start:i,end:a}}}case"hover":return e.selecting?{state:{...e,hover:t.date}}:{state:e};case"reset":return{state:na()}}}function ln(e){return!e.selecting||!e.hover||!e.anchor?null:e.hover.getTime()>e.anchor.getTime()?{start:e.anchor,end:e.hover}:{start:e.hover,end:e.anchor}}function la(e,t,i){if(!e)throw new TypeError("The element provided to the IntersectionObserver must exist");const a=new IntersectionObserver(r=>{r.forEach(s=>{t(s.isIntersecting)})},i);return a.observe(e),a}var Wu=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,Fe=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ku(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Wu(t,i,r),r};let Ce=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.items=[],this.clickable=!1,this.removable=!0,this.bubble=!0,this.tabbable=!0,this.disabled=!1,this.readOnly=!1,this.removeAriaLabel="Remove",this.toolbarAriaLabel="Selected items",this._isStartVisible=!0,this._isEndVisible=!0,this._showDropdown=!1,this._pendingFocusIndex=null,this.handlePillFocus=e=>{e.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},this.toggleDropdown=()=>{this._showDropdown?this.closeDropdown():this.openDropdown()},this.handleOutsideInteraction=e=>{const t=this.querySelector(".gui-pills__compact"),i=this.querySelector(".gui-pills__dropdown"),a=e.composedPath()[0];!t?.contains(a)&&!i?.contains(a)&&this.closeDropdown()}}createRenderRoot(){return this}updated(e){if(super.updated(e),this.setupObservers(),this._pendingFocusIndex!==null&&e.has("items")){const t=this._pendingFocusIndex;this._pendingFocusIndex=null;const i=this.items.length;if(i===0){this._showDropdown&&this.closeDropdown();return}const a=Math.max(0,Math.min(t,i-1));this.focusPillAt(a)}}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObservers(),this.removeOutsideListeners()}render(){const e=this.items.length;return e===0?l.nothing:l.html`
531
- ${this.renderStrip()} ${this.bubble?this.renderCompact(e):l.nothing}
532
- ${this.bubble&&this._showDropdown?this.renderDropdown():l.nothing}
533
- `}renderStrip(){return l.html`
530
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Er([f.consume({context:m.formContext}),n.property({attribute:!1})],Wt.prototype,"formContext",2),Er([f.provide({context:m.inputContext})],Wt.prototype,"adapter",2),Wt=Er([n.customElement("gui-date-time-calendar-input")],Wt);const Wm=Object.freeze(Object.defineProperty({__proto__:null,get DateTimeCalendarElement(){return Wt}},Symbol.toStringTag,{value:"Module"}));function Jn(e){return`${e.start}-${e.end??e.start}`}function Kt(e,t){return!e||!Array.isArray(e)?[]:[...e].sort((i,a)=>t(i.start,a.start))}function Ft(e,t){return e.find(i=>Jn(i)===t)}function Jt(e,t){const i=e??[],a=Ft(i,t);if(!a)return null;const r=i.filter(s=>!(s.start===a.start&&(s.end??null)===(a.end??null)));return{removed:a,next:r}}function Xn(e,t){const i=re(e);return isNaN(i.getTime())?e:new Intl.DateTimeFormat(t??"en",{year:"numeric",month:"2-digit",day:"2-digit"}).format(i)}function da(e,t){const i=t(e.start),a=e.end?t(e.end):i;return`${i} - ${a}`}function Xt(e,t){return e.map(i=>{const a=t(i);return{key:Jn(i),label:a,ariaLabel:a}})}function ua(){return{anchor:null,hover:null,selecting:!1}}function pa(e,t){switch(t.type){case"pick":{if(!e.anchor)return{state:{anchor:t.date,hover:e.hover,selecting:!0}};let i=e.anchor,a=t.date;return t.date<i&&(i=t.date,a=e.anchor),{state:ua(),commit:{start:i,end:a}}}case"hover":return e.selecting?{state:{...e,hover:t.date}}:{state:e};case"reset":return{state:ua()}}}function Qn(e){return!e.selecting||!e.hover||!e.anchor?null:e.hover.getTime()>e.anchor.getTime()?{start:e.anchor,end:e.hover}:{start:e.hover,end:e.anchor}}function ha(e,t,i){if(!e)throw new TypeError("The element provided to the IntersectionObserver must exist");const a=new IntersectionObserver(r=>{r.forEach(s=>{t(s.isIntersecting)})},i);return a.observe(e),a}var Km=Object.defineProperty,Jm=Object.getOwnPropertyDescriptor,Be=(e,t,i,a)=>{for(var r=a>1?void 0:a?Jm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Km(t,i,r),r};let Ce=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.items=[],this.clickable=!1,this.removable=!0,this.bubble=!0,this.tabbable=!0,this.disabled=!1,this.readOnly=!1,this.removeAriaLabel="Remove",this.toolbarAriaLabel="Selected items",this._isStartVisible=!0,this._isEndVisible=!0,this._showDropdown=!1,this._pendingFocusIndex=null,this.handlePillFocus=e=>{e.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},this.toggleDropdown=()=>{this._showDropdown?this.closeDropdown():this.openDropdown()},this.handleOutsideInteraction=e=>{const t=this.querySelector(".gui-pills__compact"),i=this.querySelector(".gui-pills__dropdown"),a=e.composedPath()[0];!t?.contains(a)&&!i?.contains(a)&&this.closeDropdown()}}createRenderRoot(){return this}updated(e){if(super.updated(e),this.setupObservers(),this._pendingFocusIndex!==null&&e.has("items")){const t=this._pendingFocusIndex;this._pendingFocusIndex=null;const i=this.items.length;if(i===0){this._showDropdown&&this.closeDropdown();return}const a=Math.max(0,Math.min(t,i-1));this.focusPillAt(a)}}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObservers(),this.removeOutsideListeners()}render(){const e=this.items.length;return e===0?d.nothing:d.html`
531
+ ${this.renderStrip()} ${this.bubble?this.renderCompact(e):d.nothing}
532
+ ${this.bubble&&this._showDropdown?this.renderDropdown():d.nothing}
533
+ `}renderStrip(){return d.html`
534
534
  <div
535
- class=${_.classMap({"gui-pills__strip-wrapper":!0,"gui-pills--start-shadow":!this._isStartVisible,"gui-pills--end-shadow":!this._isEndVisible})}
535
+ class=${S.classMap({"gui-pills__strip-wrapper":!0,"gui-pills--start-shadow":!this._isStartVisible,"gui-pills--end-shadow":!this._isEndVisible})}
536
536
  >
537
537
  <div
538
538
  class="gui-pills__strip"
@@ -541,11 +541,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
541
541
  tabindex="-1"
542
542
  >
543
543
  <span class="gui-sentinel gui-sentinel__start"></span>
544
- ${Dr.repeat(this.items,e=>e.key,(e,t)=>this.renderPill(e,t,!1))}
544
+ ${us.repeat(this.items,e=>e.key,(e,t)=>this.renderPill(e,t,!1))}
545
545
  <span class="gui-sentinel gui-sentinel__end"></span>
546
546
  </div>
547
547
  </div>
548
- `}get dropdownId(){return this.uid?`${this.uid}_pills_dropdown`:void 0}renderCompact(e){return l.html`
548
+ `}get dropdownId(){return this.uid?`${this.uid}_pills_dropdown`:void 0}renderCompact(e){return d.html`
549
549
  <div class="gui-pills__compact">
550
550
  <button
551
551
  type="button"
@@ -553,53 +553,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
553
553
  aria-label=${this.compactAriaLabel??`${e} items`}
554
554
  aria-haspopup="true"
555
555
  aria-expanded=${this._showDropdown}
556
- aria-controls=${this.dropdownId??l.nothing}
556
+ aria-controls=${this.dropdownId??d.nothing}
557
557
  ?disabled=${this.disabled||this.readOnly}
558
558
  @click=${t=>{t.stopPropagation(),this.toggleDropdown()}}
559
559
  >
560
560
  ${e}
561
561
  </button>
562
562
  </div>
563
- `}renderDropdown(){return l.html`
563
+ `}renderDropdown(){return d.html`
564
564
  <div
565
- id=${this.dropdownId??l.nothing}
565
+ id=${this.dropdownId??d.nothing}
566
566
  class="gui-pills__dropdown"
567
567
  role="toolbar"
568
568
  aria-orientation="vertical"
569
569
  aria-label=${this.toolbarAriaLabel}
570
570
  >
571
- ${Dr.repeat(this.items,e=>`dd-${e.key}`,(e,t)=>this.renderPill(e,t,!0))}
571
+ ${us.repeat(this.items,e=>`dd-${e.key}`,(e,t)=>this.renderPill(e,t,!0))}
572
572
  </div>
573
- `}renderPill(e,t,i){const a=this.clickable&&!this.disabled&&!this.readOnly;return l.html`
573
+ `}renderPill(e,t,i){const a=this.clickable&&!this.disabled&&!this.readOnly;return d.html`
574
574
  <button
575
575
  type="button"
576
- class=${_.classMap({"gui-pills__pill":!0,"gui-pills__pill--clickable":a})}
576
+ class=${S.classMap({"gui-pills__pill":!0,"gui-pills__pill--clickable":a})}
577
577
  data-key=${e.key}
578
578
  data-index=${t}
579
579
  data-in-dropdown=${i}
580
580
  tabindex=${this.tabbable&&!this.disabled&&!this.readOnly?0:-1}
581
581
  ?disabled=${this.disabled||this.readOnly}
582
582
  aria-label=${e.ariaLabel??e.label}
583
- aria-description=${this.removable&&!this.disabled&&!this.readOnly?this.removeAriaLabel:l.nothing}
583
+ aria-description=${this.removable&&!this.disabled&&!this.readOnly?this.removeAriaLabel:d.nothing}
584
584
  @click=${r=>this.onPillClick(r,e)}
585
585
  @focus=${this.handlePillFocus}
586
586
  @keydown=${r=>this.onPillKeydown(r,e,t)}
587
587
  >
588
588
  <span class="gui-pills__pill-text">${e.label}</span>
589
- ${this.removable?this.renderRemoveButton(e):l.nothing}
589
+ ${this.removable?this.renderRemoveButton(e):d.nothing}
590
590
  </button>
591
- `}renderRemoveButton(e){return l.html`
591
+ `}renderRemoveButton(e){return d.html`
592
592
  <span
593
593
  class="gui-pills__pill-remove"
594
594
  aria-hidden="true"
595
595
  @mousedown=${t=>{t.stopPropagation(),t.preventDefault()}}
596
596
  @click=${t=>{t.stopPropagation(),this.emitRemove(e.key,this.items.indexOf(e))}}
597
597
  >
598
- ${this.removeIcon?l.html`<span
598
+ ${this.removeIcon?d.html`<span
599
599
  class=${`gui-widget-icon ${this.removeIcon}`}
600
600
  data-icon=${this.removeIcon}
601
601
  aria-hidden="true"
602
- ></span>`:l.html`<svg
602
+ ></span>`:d.html`<svg
603
603
  xmlns="http://www.w3.org/2000/svg"
604
604
  width="16"
605
605
  height="16"
@@ -612,16 +612,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
612
612
  ></path>
613
613
  </svg>`}
614
614
  </span>
615
- `}onPillClick(e,t){!this.clickable||this.disabled||this.readOnly||(e.stopPropagation(),this.dispatchEvent(new CustomEvent("pillclick",{detail:{key:t.key},bubbles:!0,composed:!0})))}onPillKeydown(e,t,i){if(this.disabled||this.readOnly){this.emitKeydown(t.key,e);return}if(this.removable&&(e.key==="Delete"||e.key==="Backspace")){e.preventDefault(),e.stopPropagation(),this.emitRemove(t.key,i);return}if((e.key==="Enter"||e.key===" ")&&this.clickable){e.preventDefault(),this.dispatchEvent(new CustomEvent("pillclick",{detail:{key:t.key},bubbles:!0,composed:!0}));return}const a=this._showDropdown,r=a?"ArrowUp":"ArrowLeft",s=a?"ArrowDown":"ArrowRight";if(e.key===r){i>0?(e.preventDefault(),this.focusPillAt(i-1)):this.emitKeydown(t.key,e);return}if(e.key===s){i<this.items.length-1?(e.preventDefault(),this.focusPillAt(i+1)):this.emitKeydown(t.key,e);return}if(e.key==="Home"){e.preventDefault(),this.focusPillAt(0);return}if(e.key==="End"){e.preventDefault(),this.focusPillAt(this.items.length-1);return}if(e.key==="Escape"&&a){e.preventDefault(),e.stopPropagation(),this.closeDropdown();return}this.emitKeydown(t.key,e)}emitRemove(e,t){this._pendingFocusIndex=t,this.dispatchEvent(new CustomEvent("pillremove",{detail:{key:e},bubbles:!0,composed:!0}))}emitKeydown(e,t){this.dispatchEvent(new CustomEvent("pillkeydown",{detail:{key:e,event:t},bubbles:!0,composed:!0}))}focusPillAt(e){requestAnimationFrame(()=>{const t=this._showDropdown?".gui-pills__dropdown .gui-pills__pill":".gui-pills__strip .gui-pills__pill",i=this.querySelectorAll(t);if(i.length===0)return;const a=Math.max(0,Math.min(e,i.length-1));i[a].focus()})}openDropdown(){!this.bubble||this.disabled||this.readOnly||this._showDropdown||(this._showDropdown=!0,this.dispatchEvent(new CustomEvent("dropdowntoggle",{detail:{open:!0},bubbles:!0,composed:!0})),requestAnimationFrame(()=>{this.addOutsideListeners(),this.querySelector(".gui-pills__dropdown .gui-pills__pill")?.focus()}))}closeDropdown(){this._showDropdown&&(this._showDropdown=!1,this.removeOutsideListeners(),this.dispatchEvent(new CustomEvent("dropdowntoggle",{detail:{open:!1},bubbles:!0,composed:!0})))}addOutsideListeners(){document.addEventListener("pointerdown",this.handleOutsideInteraction),document.addEventListener("focusin",this.handleOutsideInteraction)}removeOutsideListeners(){document.removeEventListener("pointerdown",this.handleOutsideInteraction),document.removeEventListener("focusin",this.handleOutsideInteraction)}setupObservers(){const e=this.querySelector(".gui-sentinel__start"),t=this.querySelector(".gui-sentinel__end");e&&!this.startObserver&&(this.startObserver=la(e,i=>this._isStartVisible=i)),t&&!this.endObserver&&(this.endObserver=la(t,i=>this._isEndVisible=i)),!e&&this.startObserver&&(this.startObserver.disconnect(),this.startObserver=void 0,this._isStartVisible=!0),!t&&this.endObserver&&(this.endObserver.disconnect(),this.endObserver=void 0,this._isEndVisible=!0)}disconnectObservers(){this.startObserver?.disconnect(),this.endObserver?.disconnect(),this.startObserver=void 0,this.endObserver=void 0}};Fe([n.property({type:String})],Ce.prototype,"uid",2),Fe([n.property({type:Array})],Ce.prototype,"items",2),Fe([n.property({type:Boolean})],Ce.prototype,"clickable",2),Fe([n.property({type:Boolean})],Ce.prototype,"removable",2),Fe([n.property({type:Boolean})],Ce.prototype,"bubble",2),Fe([n.property({type:Boolean})],Ce.prototype,"tabbable",2),Fe([n.property({type:Boolean})],Ce.prototype,"disabled",2),Fe([n.property({type:Boolean,attribute:"readonly"})],Ce.prototype,"readOnly",2),Fe([n.property({type:String,attribute:"remove-aria-label"})],Ce.prototype,"removeAriaLabel",2),Fe([n.property({type:String,attribute:"remove-icon"})],Ce.prototype,"removeIcon",2),Fe([n.property({type:String,attribute:"compact-aria-label"})],Ce.prototype,"compactAriaLabel",2),Fe([n.property({type:String,attribute:"toolbar-aria-label"})],Ce.prototype,"toolbarAriaLabel",2),Fe([n.state()],Ce.prototype,"_isStartVisible",2),Fe([n.state()],Ce.prototype,"_isEndVisible",2),Fe([n.state()],Ce.prototype,"_showDropdown",2),Ce=Fe([n.customElement("gui-pills")],Ce),typeof customElements<"u"&&!customElements.get("gui-pills")&&customElements.define("gui-pills",Ce);var Ju=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,H=(e,t,i,a)=>{for(var r=a>1?void 0:a?Xu(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ju(t,i,r),r};let N=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=[],this.focusDate=void 0,this.hidePills=!1,this.removePillAriaLabel=void 0,this.disabledDateRangeMessage=void 0,this.invalidRange=null,this._selection=na(),this._invalidRange=null,this._skipValueNavigation=!1,this._nav=new Yi(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Gi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:(e,t)=>this.selectDate(this.activationDay(e),t),onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new zt(this,{onLeave:()=>this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Yt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))},this.onPillClickEvent=e=>{const t=Mt(this.getSortedPills(),e.detail.key);t&&this.navigateToDate(t.start)}}get _currentDate(){return this._nav.currentDate}set _currentDate(e){this._nav.currentDate=e}parseEndpoint(e){return re(e)}endpointDay(e){return re(e)}formatPillLabel(e){return sa(e,t=>on(t,this.localeId))}renderDayContent(e){return l.html`${e.dayLabel}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if(e.has("invalidRange"))if(this.invalidRange){const t=this.endpointDay(this.invalidRange.start),i=this.endpointDay(this.invalidRange.end);this._invalidRange=isNaN(t.getTime())||isNaN(i.getTime())?null:{start:t,end:i}}else this._invalidRange=null;if(e.has("value")&&!e.has("focusDate")){if(this._skipValueNavigation)this._skipValueNavigation=!1;else if(this.value){const t=Array.isArray(this.value)?this.value:[{start:this.value}];t.length>0&&t[0].start&&this._nav.navigateToDate(this.endpointDay(t[0].start))}}if(e.has("focusDate")&&this.focusDate){const t=re(this.focusDate);isNaN(t.getTime())||(this._nav.navigateToDate(t),this.focusDate=void 0)}}render(){return Wi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>this.renderAboveCalendar(),renderMonthPanel:e=>Ki({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this.toggleYearSelector(),renderBelowHeader:t=>this.renderBelowHeader(t),renderPanelBody:t=>this.renderPanelBody(t)})})}renderBelowHeader(e){return l.nothing}renderPanelBody(e){return Ji({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}toggleYearSelector(){this._nav.toggleYearSelector()}isDisabled(e){return this._nav.isDisabled(e)}activationDay(e){const t=re(e);return{date:t,isCurrentMonth:!0,isDisabled:this.isDisabled(t),isFocusable:!0,dayLabel:"",isToday:!1,isRangeStart:!1,isRangeEnd:!1,isInRange:!1,isOneDayRange:!1,isAnchor:!1,isSelecting:!1,isInvalidStart:!1,isInvalidEnd:!1,isInvalidInRange:!1}}renderDay(e){const t=e.isInvalidStart&&e.isInvalidEnd,i={"gui-calendar__day-button":!0,today:e.isToday,"other-month":!e.isCurrentMonth,"range-start":e.isRangeStart&&!e.isOneDayRange,"range-end":e.isRangeEnd&&!e.isOneDayRange,selected:e.isOneDayRange,"in-range":e.isInRange,"invalid-range-start":e.isInvalidStart&&!t,"invalid-range-end":e.isInvalidEnd&&!t,"invalid-range-single":t,"invalid-in-range":e.isInvalidInRange,"is-anchor":e.isAnchor,"is-selecting":e.isSelecting,disabled:e.isDisabled};return l.html`
615
+ `}onPillClick(e,t){!this.clickable||this.disabled||this.readOnly||(e.stopPropagation(),this.dispatchEvent(new CustomEvent("pillclick",{detail:{key:t.key},bubbles:!0,composed:!0})))}onPillKeydown(e,t,i){if(this.disabled||this.readOnly){this.emitKeydown(t.key,e);return}if(this.removable&&(e.key==="Delete"||e.key==="Backspace")){e.preventDefault(),e.stopPropagation(),this.emitRemove(t.key,i);return}if((e.key==="Enter"||e.key===" ")&&this.clickable){e.preventDefault(),this.dispatchEvent(new CustomEvent("pillclick",{detail:{key:t.key},bubbles:!0,composed:!0}));return}const a=this._showDropdown,r=a?"ArrowUp":"ArrowLeft",s=a?"ArrowDown":"ArrowRight";if(e.key===r){i>0?(e.preventDefault(),this.focusPillAt(i-1)):this.emitKeydown(t.key,e);return}if(e.key===s){i<this.items.length-1?(e.preventDefault(),this.focusPillAt(i+1)):this.emitKeydown(t.key,e);return}if(e.key==="Home"){e.preventDefault(),this.focusPillAt(0);return}if(e.key==="End"){e.preventDefault(),this.focusPillAt(this.items.length-1);return}if(e.key==="Escape"&&a){e.preventDefault(),e.stopPropagation(),this.closeDropdown();return}this.emitKeydown(t.key,e)}emitRemove(e,t){this._pendingFocusIndex=t,this.dispatchEvent(new CustomEvent("pillremove",{detail:{key:e},bubbles:!0,composed:!0}))}emitKeydown(e,t){this.dispatchEvent(new CustomEvent("pillkeydown",{detail:{key:e,event:t},bubbles:!0,composed:!0}))}focusPillAt(e){requestAnimationFrame(()=>{const t=this._showDropdown?".gui-pills__dropdown .gui-pills__pill":".gui-pills__strip .gui-pills__pill",i=this.querySelectorAll(t);if(i.length===0)return;const a=Math.max(0,Math.min(e,i.length-1));i[a].focus()})}openDropdown(){!this.bubble||this.disabled||this.readOnly||this._showDropdown||(this._showDropdown=!0,this.dispatchEvent(new CustomEvent("dropdowntoggle",{detail:{open:!0},bubbles:!0,composed:!0})),requestAnimationFrame(()=>{this.addOutsideListeners(),this.querySelector(".gui-pills__dropdown .gui-pills__pill")?.focus()}))}closeDropdown(){this._showDropdown&&(this._showDropdown=!1,this.removeOutsideListeners(),this.dispatchEvent(new CustomEvent("dropdowntoggle",{detail:{open:!1},bubbles:!0,composed:!0})))}addOutsideListeners(){document.addEventListener("pointerdown",this.handleOutsideInteraction),document.addEventListener("focusin",this.handleOutsideInteraction)}removeOutsideListeners(){document.removeEventListener("pointerdown",this.handleOutsideInteraction),document.removeEventListener("focusin",this.handleOutsideInteraction)}setupObservers(){const e=this.querySelector(".gui-sentinel__start"),t=this.querySelector(".gui-sentinel__end");e&&!this.startObserver&&(this.startObserver=ha(e,i=>this._isStartVisible=i)),t&&!this.endObserver&&(this.endObserver=ha(t,i=>this._isEndVisible=i)),!e&&this.startObserver&&(this.startObserver.disconnect(),this.startObserver=void 0,this._isStartVisible=!0),!t&&this.endObserver&&(this.endObserver.disconnect(),this.endObserver=void 0,this._isEndVisible=!0)}disconnectObservers(){this.startObserver?.disconnect(),this.endObserver?.disconnect(),this.startObserver=void 0,this.endObserver=void 0}};Be([n.property({type:String})],Ce.prototype,"uid",2),Be([n.property({type:Array})],Ce.prototype,"items",2),Be([n.property({type:Boolean})],Ce.prototype,"clickable",2),Be([n.property({type:Boolean})],Ce.prototype,"removable",2),Be([n.property({type:Boolean})],Ce.prototype,"bubble",2),Be([n.property({type:Boolean})],Ce.prototype,"tabbable",2),Be([n.property({type:Boolean})],Ce.prototype,"disabled",2),Be([n.property({type:Boolean,attribute:"readonly"})],Ce.prototype,"readOnly",2),Be([n.property({type:String,attribute:"remove-aria-label"})],Ce.prototype,"removeAriaLabel",2),Be([n.property({type:String,attribute:"remove-icon"})],Ce.prototype,"removeIcon",2),Be([n.property({type:String,attribute:"compact-aria-label"})],Ce.prototype,"compactAriaLabel",2),Be([n.property({type:String,attribute:"toolbar-aria-label"})],Ce.prototype,"toolbarAriaLabel",2),Be([n.state()],Ce.prototype,"_isStartVisible",2),Be([n.state()],Ce.prototype,"_isEndVisible",2),Be([n.state()],Ce.prototype,"_showDropdown",2),Ce=Be([n.customElement("gui-pills")],Ce),typeof customElements<"u"&&!customElements.get("gui-pills")&&customElements.define("gui-pills",Ce);var Xm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,H=(e,t,i,a)=>{for(var r=a>1?void 0:a?Qm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Xm(t,i,r),r};let q=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=[],this.focusDate=void 0,this.hidePills=!1,this.removePillAriaLabel=void 0,this.disabledDateRangeMessage=void 0,this.invalidRange=null,this._selection=ua(),this._invalidRange=null,this._skipValueNavigation=!1,this._nav=new Ji(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Yi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:(e,t)=>this.selectDate(this.activationDay(e),t),onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new Zt(this,{onLeave:()=>this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Jt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))},this.onPillClickEvent=e=>{const t=Ft(this.getSortedPills(),e.detail.key);t&&this.navigateToDate(t.start)}}get _currentDate(){return this._nav.currentDate}set _currentDate(e){this._nav.currentDate=e}parseEndpoint(e){return re(e)}endpointDay(e){return re(e)}formatPillLabel(e){return da(e,t=>Xn(t,this.localeId))}renderDayContent(e){return d.html`${e.dayLabel}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if(e.has("invalidRange"))if(this.invalidRange){const t=this.endpointDay(this.invalidRange.start),i=this.endpointDay(this.invalidRange.end);this._invalidRange=isNaN(t.getTime())||isNaN(i.getTime())?null:{start:t,end:i}}else this._invalidRange=null;if(e.has("value")&&!e.has("focusDate")){if(this._skipValueNavigation)this._skipValueNavigation=!1;else if(this.value){const t=Array.isArray(this.value)?this.value:[{start:this.value}];t.length>0&&t[0].start&&this._nav.navigateToDate(this.endpointDay(t[0].start))}}if(e.has("focusDate")&&this.focusDate){const t=re(this.focusDate);isNaN(t.getTime())||(this._nav.navigateToDate(t),this.focusDate=void 0)}}render(){return Qi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>this.renderAboveCalendar(),renderMonthPanel:e=>ji({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this.toggleYearSelector(),renderBelowHeader:t=>this.renderBelowHeader(t),renderPanelBody:t=>this.renderPanelBody(t)})})}renderBelowHeader(e){return d.nothing}renderPanelBody(e){return ea({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}toggleYearSelector(){this._nav.toggleYearSelector()}isDisabled(e){return this._nav.isDisabled(e)}activationDay(e){const t=re(e);return{date:t,isCurrentMonth:!0,isDisabled:this.isDisabled(t),isFocusable:!0,dayLabel:"",isToday:!1,isRangeStart:!1,isRangeEnd:!1,isInRange:!1,isOneDayRange:!1,isAnchor:!1,isSelecting:!1,isInvalidStart:!1,isInvalidEnd:!1,isInvalidInRange:!1}}renderDay(e){const t=e.isInvalidStart&&e.isInvalidEnd,i={"gui-calendar__day-button":!0,today:e.isToday,"other-month":!e.isCurrentMonth,"range-start":e.isRangeStart&&!e.isOneDayRange,"range-end":e.isRangeEnd&&!e.isOneDayRange,selected:e.isOneDayRange,"in-range":e.isInRange,"invalid-range-start":e.isInvalidStart&&!t,"invalid-range-end":e.isInvalidEnd&&!t,"invalid-range-single":t,"invalid-in-range":e.isInvalidInRange,"is-anchor":e.isAnchor,"is-selecting":e.isSelecting,disabled:e.isDisabled};return d.html`
616
616
  <button
617
617
  type="button"
618
618
  role="gridcell"
619
- class=${_.classMap(i)}
619
+ class=${S.classMap(i)}
620
620
  tabindex=${e.isFocusable?0:-1}
621
621
  ?disabled=${!e.isCurrentMonth}
622
- aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":l.nothing}
623
- aria-label=${Zi(this.localeId,e.date)}
624
- aria-current=${e.isToday?"date":l.nothing}
622
+ aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":d.nothing}
623
+ aria-label=${Ki(this.localeId,e.date)}
624
+ aria-current=${e.isToday?"date":d.nothing}
625
625
  data-date=${ae(e.date)}
626
626
  @click=${a=>this.selectDate(e,a)}
627
627
  @mouseover=${()=>this.onMouseOver(e)}
@@ -631,7 +631,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
631
631
  >
632
632
  ${this.renderDayContent(e)}
633
633
  </button>
634
- `}getDaysInMonth(e){const t=(this.value??[]).map(a=>({start:this.endpointDay(a.start),end:a.end?this.endpointDay(a.end):void 0})),i=ln(this._selection);return Qi({currentDate:this._currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:a=>this.isDisabled(a),toDay:a=>{const r=Xi(a.date,{ranges:t,anchor:this._selection.anchor,selectingSpan:i,invalidRange:this._invalidRange});return{date:a.date,dayLabel:a.dayLabel,isCurrentMonth:a.isCurrentMonth,isToday:a.isToday,isRangeStart:r.isRangeStart,isRangeEnd:r.isRangeEnd,isInRange:r.isInRange,isInvalidStart:r.isInvalidStart&&a.isCurrentMonth,isInvalidEnd:r.isInvalidEnd&&a.isCurrentMonth,isInvalidInRange:r.isInvalidInRange&&a.isCurrentMonth,isDisabled:a.isDisabled,isOneDayRange:r.isOneDayRange,isAnchor:r.isAnchor,isFocusable:a.isToday||r.isRangeStart,isSelecting:r.isSelecting&&a.isCurrentMonth}},focusFallbackDates:[new Date,...(this.value??[]).map(a=>this.endpointDay(a.start))]})}selectDate(e,t=null){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const{state:i,commit:a}=oa(this._selection,{type:"pick",date:e.date});if(this._selection=i,!a){this._invalidRange=null;return}if(Es(ae(a.start),ae(a.end),this.disabledRanges,this.minDate,this.maxDate)){this._invalidRange={start:a.start,end:a.end},this.dispatchEvent(new CustomEvent("inputError",{detail:{message:this.disabledDateRangeMessage??kt,range:{start:ae(a.start),end:ae(a.end)}},bubbles:!0,composed:!0})),this.requestUpdate();return}this._invalidRange=null,this._skipValueNavigation=!0,this.value=Rs([...this.value||[],Is(a.start,a.end)]),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}onMouseOver(e){e.isDisabled||(this._selection=oa(this._selection,{type:"hover",date:e.date}).state)}renderAboveCalendar(){if(this.hidePills)return l.nothing;const e=this.getSortedPills();if(e.length===0)return l.nothing;const t=Ht(e,i=>this.formatPillLabel(i));return l.html`
634
+ `}getDaysInMonth(e){const t=(this.value??[]).map(a=>({start:this.endpointDay(a.start),end:a.end?this.endpointDay(a.end):void 0})),i=Qn(this._selection);return ia({currentDate:this._currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:a=>this.isDisabled(a),toDay:a=>{const r=ta(a.date,{ranges:t,anchor:this._selection.anchor,selectingSpan:i,invalidRange:this._invalidRange});return{date:a.date,dayLabel:a.dayLabel,isCurrentMonth:a.isCurrentMonth,isToday:a.isToday,isRangeStart:r.isRangeStart,isRangeEnd:r.isRangeEnd,isInRange:r.isInRange,isInvalidStart:r.isInvalidStart&&a.isCurrentMonth,isInvalidEnd:r.isInvalidEnd&&a.isCurrentMonth,isInvalidInRange:r.isInvalidInRange&&a.isCurrentMonth,isDisabled:a.isDisabled,isOneDayRange:r.isOneDayRange,isAnchor:r.isAnchor,isFocusable:a.isToday||r.isRangeStart,isSelecting:r.isSelecting&&a.isCurrentMonth}},focusFallbackDates:[new Date,...(this.value??[]).map(a=>this.endpointDay(a.start))]})}selectDate(e,t=null){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const{state:i,commit:a}=pa(this._selection,{type:"pick",date:e.date});if(this._selection=i,!a){this._invalidRange=null;return}if(wn(ae(a.start),ae(a.end),this.disabledRanges,this.minDate,this.maxDate)){this._invalidRange={start:a.start,end:a.end},this.dispatchEvent(new CustomEvent("inputError",{detail:{message:this.disabledDateRangeMessage??St,range:{start:ae(a.start),end:ae(a.end)}},bubbles:!0,composed:!0})),this.requestUpdate();return}this._invalidRange=null,this._skipValueNavigation=!0,this.value=An([...this.value||[],_n(a.start,a.end)]),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}onMouseOver(e){e.isDisabled||(this._selection=pa(this._selection,{type:"hover",date:e.date}).state)}renderAboveCalendar(){if(this.hidePills)return d.nothing;const e=this.getSortedPills();if(e.length===0)return d.nothing;const t=Xt(e,i=>this.formatPillLabel(i));return d.html`
635
635
  <gui-pills
636
636
  class="gui-range-calendar__pills"
637
637
  .uid=${this.uid}
@@ -646,7 +646,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
646
646
  @pillremove=${this.onPillRemoveEvent}
647
647
  @pillclick=${this.onPillClickEvent}
648
648
  ></gui-pills>
649
- `}getSortedPills(){return Zt(this.value,(e,t)=>this.parseEndpoint(e).getTime()-this.parseEndpoint(t).getTime())}navigateToDate(e){this._nav.navigateToDate(this.endpointDay(e))}};H([n.property({type:String})],N.prototype,"uid",2),H([n.property({type:String})],N.prototype,"label",2),H([n.property({type:String})],N.prototype,"hint",2),H([n.property({type:String,attribute:"locale-id"})],N.prototype,"localeId",2),H([n.property({type:Array})],N.prototype,"errors",2),H([n.property({type:Boolean})],N.prototype,"touched",2),H([n.property({type:Boolean})],N.prototype,"required",2),H([n.property({type:Boolean})],N.prototype,"disabled",2),H([n.property({type:Boolean,attribute:"readonly"})],N.prototype,"readOnly",2),H([n.property({type:String,attribute:"prev-month-icon"})],N.prototype,"prevMonthIcon",2),H([n.property({type:String,attribute:"next-month-icon"})],N.prototype,"nextMonthIcon",2),H([n.property({type:String,attribute:"prev-month-aria-label"})],N.prototype,"prevMonthAriaLabel",2),H([n.property({type:String,attribute:"next-month-aria-label"})],N.prototype,"nextMonthAriaLabel",2),H([n.property({type:String,attribute:"select-year-aria-label"})],N.prototype,"selectYearAriaLabel",2),H([n.property({type:String,attribute:"year-grid-aria-label"})],N.prototype,"yearGridAriaLabel",2),H([n.property({type:String})],N.prototype,"dayFormat",2),H([n.property({type:String})],N.prototype,"weekdayFormat",2),H([n.property({type:String})],N.prototype,"monthFormat",2),H([n.property({type:String})],N.prototype,"minDate",2),H([n.property({type:String})],N.prototype,"maxDate",2),H([n.property({type:Array})],N.prototype,"disabledRanges",2),H([n.property({type:Number})],N.prototype,"numberOfMonths",2),H([n.property({type:Array})],N.prototype,"value",2),H([n.property({type:String})],N.prototype,"focusDate",2),H([n.property({type:Boolean})],N.prototype,"hidePills",2),H([n.property({type:String})],N.prototype,"removePillAriaLabel",2),H([n.property({type:String,attribute:"disabled-date-range-message"})],N.prototype,"disabledDateRangeMessage",2),H([n.property({attribute:!1})],N.prototype,"invalidRange",2),H([n.state()],N.prototype,"_selection",2),H([n.state()],N.prototype,"_invalidRange",2),N=H([n.customElement("gui-range-calendar")],N),typeof customElements<"u"&&!customElements.get("gui-range-calendar")&&customElements.define("gui-range-calendar",N);var Qu=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,Na=(e,t,i,a)=>{for(var r=a>1?void 0:a?ju(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Qu(t,i,r),r};let Wt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
649
+ `}getSortedPills(){return Kt(this.value,(e,t)=>this.parseEndpoint(e).getTime()-this.parseEndpoint(t).getTime())}navigateToDate(e){this._nav.navigateToDate(this.endpointDay(e))}};H([n.property({type:String})],q.prototype,"uid",2),H([n.property({type:String})],q.prototype,"label",2),H([n.property({type:String})],q.prototype,"hint",2),H([n.property({type:String,attribute:"locale-id"})],q.prototype,"localeId",2),H([n.property({type:Array})],q.prototype,"errors",2),H([n.property({type:Boolean})],q.prototype,"touched",2),H([n.property({type:Boolean})],q.prototype,"required",2),H([n.property({type:Boolean})],q.prototype,"disabled",2),H([n.property({type:Boolean,attribute:"readonly"})],q.prototype,"readOnly",2),H([n.property({type:String,attribute:"prev-month-icon"})],q.prototype,"prevMonthIcon",2),H([n.property({type:String,attribute:"next-month-icon"})],q.prototype,"nextMonthIcon",2),H([n.property({type:String,attribute:"prev-month-aria-label"})],q.prototype,"prevMonthAriaLabel",2),H([n.property({type:String,attribute:"next-month-aria-label"})],q.prototype,"nextMonthAriaLabel",2),H([n.property({type:String,attribute:"select-year-aria-label"})],q.prototype,"selectYearAriaLabel",2),H([n.property({type:String,attribute:"year-grid-aria-label"})],q.prototype,"yearGridAriaLabel",2),H([n.property({type:String})],q.prototype,"dayFormat",2),H([n.property({type:String})],q.prototype,"weekdayFormat",2),H([n.property({type:String})],q.prototype,"monthFormat",2),H([n.property({type:String})],q.prototype,"minDate",2),H([n.property({type:String})],q.prototype,"maxDate",2),H([n.property({type:Array})],q.prototype,"disabledRanges",2),H([n.property({type:Number})],q.prototype,"numberOfMonths",2),H([n.property({type:Array})],q.prototype,"value",2),H([n.property({type:String})],q.prototype,"focusDate",2),H([n.property({type:Boolean})],q.prototype,"hidePills",2),H([n.property({type:String})],q.prototype,"removePillAriaLabel",2),H([n.property({type:String,attribute:"disabled-date-range-message"})],q.prototype,"disabledDateRangeMessage",2),H([n.property({attribute:!1})],q.prototype,"invalidRange",2),H([n.state()],q.prototype,"_selection",2),H([n.state()],q.prototype,"_invalidRange",2),q=H([n.customElement("gui-range-calendar")],q),typeof customElements<"u"&&!customElements.get("gui-range-calendar")&&customElements.define("gui-range-calendar",q);var jm=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,Cr=(e,t,i,a)=>{for(var r=a>1?void 0:a?ey(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&jm(t,i,r),r};let Qt=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
650
650
  <gui-range-calendar
651
651
  .uid=${this.widget.uid}
652
652
  .label=${this.adapter.templateData.label}
@@ -678,8 +678,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
678
678
  @inputError=${this.onInputError}
679
679
  @blur=${()=>this.adapter.onBlur()}
680
680
  ></gui-range-calendar>
681
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Na([f.consume({context:c.formContext}),n.property({attribute:!1})],Wt.prototype,"formContext",2),Na([f.provide({context:c.inputContext})],Wt.prototype,"adapter",2),Wt=Na([n.customElement("gui-range-calendar-input")],Wt);const eh=Object.freeze(Object.defineProperty({__proto__:null,get RangeCalendarElement(){return Wt}},Symbol.toStringTag,{value:"Module"}));function th(e,t,i){return i(t,e)<0?{start:t,end:e}:{start:e,end:t}}function qa(e,t,i,a){if(e.kind==="invalid")return{kind:"invalid",message:e.message};if(t.kind==="invalid")return{kind:"invalid",message:t.message};if(e.kind!=="valid"||t.kind!=="valid")return{kind:"incomplete"};const r=a.order?a.order(e.value,t.value):{start:e.value,end:t.value},s=a.validate?.(r)??null;return s!==null?{kind:"invalid",message:s}:{kind:"commit",value:a.merge([...i??[],a.toRange(r)])}}var ih=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,ye=(e,t,i,a)=>{for(var r=a>1?void 0:a?ah(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ih(t,i,r),r};let de=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.value=[],this.invalidDateMessage=void 0,this.removePillAriaLabel=void 0,this.startDateAriaLabel=void 0,this.endDateAriaLabel=void 0,this.separator=void 0,this.inputBlockClass="gui-range-date-input",this.groups=["start","end"],this.partDescriptors=Fa(),this._validationTriggered=!1,this._parts=new Pt(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:()=>{this._validationTriggered?this.revalidate():this.syncParts()},isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>{},onEnter:()=>{if(this.tryCreatePill(),this.value&&this.value.length>0){const e=this.value[this.value.length-1];this.onPillClick(e)}},onInputErrorSurfaced:e=>this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0})),onSurfacedErrorCleared:e=>this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Yt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),t.next.length===0&&requestAnimationFrame(()=>{this.querySelector(".gui-range-date-input__field input")?.focus()}))},this.onPillClickEvent=e=>{const t=Mt(this.getSortedPills(),e.detail.key);t&&this.onPillClick(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}getPartDescriptor(e){return this.partDescriptors[e]}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:xs(this.localeId),getDescriptor:r=>this.getPartDescriptor(r),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(r,s)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel})[s]??St[s],disabled:this.disabled,partsReadonly:!!this.readOnly},i=Ht(this.getSortedPills(),r=>sa(r,s=>on(s,this.localeId))),a={"gui-widget-icon":!0,[this.icon]:!!this.icon};return l.html`
682
- ${this.label?le(this.uid,e,!1,void 0,!1):l.nothing}
681
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Cr([f.consume({context:m.formContext}),n.property({attribute:!1})],Qt.prototype,"formContext",2),Cr([f.provide({context:m.inputContext})],Qt.prototype,"adapter",2),Qt=Cr([n.customElement("gui-range-calendar-input")],Qt);const ty=Object.freeze(Object.defineProperty({__proto__:null,get RangeCalendarElement(){return Qt}},Symbol.toStringTag,{value:"Module"}));function iy(e,t,i){return i(t,e)<0?{start:t,end:e}:{start:e,end:t}}function Lr(e,t,i,a){if(e.kind==="invalid")return{kind:"invalid",message:e.message};if(t.kind==="invalid")return{kind:"invalid",message:t.message};if(e.kind!=="valid"||t.kind!=="valid")return{kind:"incomplete"};const r=a.order?a.order(e.value,t.value):{start:e.value,end:t.value},s=a.validate?.(r)??null;return s!==null?{kind:"invalid",message:s}:{kind:"commit",value:a.merge([...i??[],a.toRange(r)])}}var ay=Object.defineProperty,ry=Object.getOwnPropertyDescriptor,ye=(e,t,i,a)=>{for(var r=a>1?void 0:a?ry(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ay(t,i,r),r};let de=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.value=[],this.invalidDateMessage=void 0,this.removePillAriaLabel=void 0,this.startDateAriaLabel=void 0,this.endDateAriaLabel=void 0,this.separator=void 0,this.inputBlockClass="gui-range-date-input",this.groups=["start","end"],this.partDescriptors=Ar(),this._validationTriggered=!1,this._parts=new Ot(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:()=>{this._validationTriggered?this.revalidate():this.syncParts()},isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>{},onEnter:()=>{if(this.tryCreatePill(),this.value&&this.value.length>0){const e=this.value[this.value.length-1];this.onPillClick(e)}},onInputErrorSurfaced:e=>this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0})),onSurfacedErrorCleared:e=>this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Jt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),t.next.length===0&&requestAnimationFrame(()=>{this.querySelector(".gui-range-date-input__field input")?.focus()}))},this.onPillClickEvent=e=>{const t=Ft(this.getSortedPills(),e.detail.key);t&&this.onPillClick(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}getPartDescriptor(e){return this.partDescriptors[e]}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:$n(this.localeId),getDescriptor:r=>this.getPartDescriptor(r),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(r,s)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel})[s]??_t[s],disabled:this.disabled,partsReadonly:!!this.readOnly},i=Xt(this.getSortedPills(),r=>da(r,s=>Xn(s,this.localeId))),a={"gui-widget-icon":!0,[this.icon]:!!this.icon};return d.html`
682
+ ${this.label?le(this.uid,e,!1,void 0,!1):d.nothing}
683
683
 
684
684
  <div class="gui-widget">
685
685
  <div
@@ -687,15 +687,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
687
687
  role="group"
688
688
  aria-label=${this.label??"Date range input"}
689
689
  >
690
- ${this.icon?l.html`<span
691
- class=${_.classMap(a)}
690
+ ${this.icon?d.html`<span
691
+ class=${S.classMap(a)}
692
692
  data-icon=${this.icon}
693
693
  aria-hidden="true"
694
- ></span>`:l.nothing}
694
+ ></span>`:d.nothing}
695
695
 
696
696
  <gui-pills
697
697
  class="gui-range-date-input__pills"
698
- style=${vt.styleMap(i.length?{}:{"min-width":0})}
698
+ style=${wt.styleMap(i.length?{}:{"min-width":0})}
699
699
  .uid=${this.uid}
700
700
  .toolbarAriaLabel=${"Selected date ranges"}
701
701
  .items=${i}
@@ -716,7 +716,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
716
716
  role="group"
717
717
  aria-label=${this.startDateAriaLabel??"Start date"}
718
718
  >
719
- ${yt("start",t,this._parts)}
719
+ ${bt("start",t,this._parts)}
720
720
  </div>
721
721
 
722
722
  <span class="gui-range-date-input__separator">${this.separator??"-"}</span>
@@ -726,14 +726,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
726
726
  role="group"
727
727
  aria-label=${this.endDateAriaLabel??"End date"}
728
728
  >
729
- ${yt("end",t,this._parts)}
729
+ ${bt("end",t,this._parts)}
730
730
  </div>
731
731
  </div>
732
732
  </div>
733
733
 
734
- ${this.showErrors&&this.errors?.length?j(this.uid,e):l.nothing}
734
+ ${this.showErrors&&this.errors?.length?j(this.uid,e):d.nothing}
735
735
  </div>
736
- `}getSortedPills(){return Zt(this.value,(e,t)=>re(e).getTime()-re(t).getTime())}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}validateDateParts(e){const{result:t,writeBacks:i}=en(this._parts.values[e]??{},{descriptors:this.partDescriptors,invalidDateMessage:this.invalidDateMessage});return this._parts.applyWriteBacks(e,i),t.kind==="invalid"?{kind:"invalid",message:t.message}:t.kind==="valid"&&t.instant?{kind:"valid",value:t.instant}:{kind:"incomplete"}}syncParts(){return{start:this.validateDateParts("start"),end:this.validateDateParts("end")}}evaluateRange(){const{start:e,end:t}=this.syncParts(),i=qa(e,t,this.value,{order:(a,r)=>th(a,r,(s,o)=>s.getTime()-o.getTime()),toRange:({start:a,end:r})=>{const s=ae(a),o=ae(r);return s===o?{start:s}:{start:s,end:o}},merge:Rs});return i.kind==="invalid"&&this._parts.surfaceInputError(i.message),i.kind==="incomplete"&&this._parts.clearSurfacedInputError(this.value??[]),i}revalidate(){this.evaluateRange().kind==="commit"&&this._parts.clearSurfacedInputError(this.value??[])}tryCreatePill(){this._validationTriggered=!0;const e=this.evaluateRange();e.kind==="commit"&&(this.value=e.value,this._validationTriggered=!1,this._parts.clearGroup("start"),this._parts.clearGroup("end"),this._parts.resetSurfacedInputError(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._parts.focusFirst("start"),this.requestUpdate())}showRange(e,t){this._parts.setGroupFromISO("start",e,"date"),this._parts.setGroupFromISO("end",t,"date")}clearRangeInputs(){this._parts.clearGroup("start"),this._parts.clearGroup("end")}};ye([n.property({type:String})],de.prototype,"uid",2),ye([n.property({type:String})],de.prototype,"label",2),ye([n.property({type:String,attribute:"locale-id"})],de.prototype,"localeId",2),ye([n.property({type:Array})],de.prototype,"errors",2),ye([n.property({type:Boolean})],de.prototype,"showErrors",2),ye([n.property({type:Boolean})],de.prototype,"touched",2),ye([n.property({type:Boolean})],de.prototype,"required",2),ye([n.property({type:Boolean})],de.prototype,"disabled",2),ye([n.property({type:Boolean,attribute:"readonly"})],de.prototype,"readOnly",2),ye([n.property({type:String})],de.prototype,"icon",2),ye([n.property({type:String})],de.prototype,"hint",2),ye([n.property({type:String})],de.prototype,"dayAriaLabel",2),ye([n.property({type:String})],de.prototype,"monthAriaLabel",2),ye([n.property({type:String})],de.prototype,"yearAriaLabel",2),ye([n.property({type:Array})],de.prototype,"value",2),ye([n.property({type:String,attribute:"invalid-date-message"})],de.prototype,"invalidDateMessage",2),ye([n.property({type:String})],de.prototype,"removePillAriaLabel",2),ye([n.property({type:String})],de.prototype,"startDateAriaLabel",2),ye([n.property({type:String})],de.prototype,"endDateAriaLabel",2),ye([n.property({type:String})],de.prototype,"separator",2),de=ye([n.customElement("gui-range-date")],de),typeof customElements<"u"&&!customElements.get("gui-range-date")&&customElements.define("gui-range-date",de);var rh=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,za=(e,t,i,a)=>{for(var r=a>1?void 0:a?sh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&rh(t,i,r),r};let Kt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
736
+ `}getSortedPills(){return Kt(this.value,(e,t)=>re(e).getTime()-re(t).getTime())}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}validateDateParts(e){const{result:t,writeBacks:i}=Zn(this._parts.values[e]??{},{descriptors:this.partDescriptors,invalidDateMessage:this.invalidDateMessage});return this._parts.applyWriteBacks(e,i),t.kind==="invalid"?{kind:"invalid",message:t.message}:t.kind==="valid"&&t.instant?{kind:"valid",value:t.instant}:{kind:"incomplete"}}syncParts(){return{start:this.validateDateParts("start"),end:this.validateDateParts("end")}}evaluateRange(){const{start:e,end:t}=this.syncParts(),i=Lr(e,t,this.value,{order:(a,r)=>iy(a,r,(s,o)=>s.getTime()-o.getTime()),toRange:({start:a,end:r})=>{const s=ae(a),o=ae(r);return s===o?{start:s}:{start:s,end:o}},merge:An});return i.kind==="invalid"&&this._parts.surfaceInputError(i.message),i.kind==="incomplete"&&this._parts.clearSurfacedInputError(this.value??[]),i}revalidate(){this.evaluateRange().kind==="commit"&&this._parts.clearSurfacedInputError(this.value??[])}tryCreatePill(){this._validationTriggered=!0;const e=this.evaluateRange();e.kind==="commit"&&(this.value=e.value,this._validationTriggered=!1,this._parts.clearGroup("start"),this._parts.clearGroup("end"),this._parts.resetSurfacedInputError(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._parts.focusFirst("start"),this.requestUpdate())}showRange(e,t){this._parts.setGroupFromISO("start",e,"date"),this._parts.setGroupFromISO("end",t,"date")}clearRangeInputs(){this._parts.clearGroup("start"),this._parts.clearGroup("end")}};ye([n.property({type:String})],de.prototype,"uid",2),ye([n.property({type:String})],de.prototype,"label",2),ye([n.property({type:String,attribute:"locale-id"})],de.prototype,"localeId",2),ye([n.property({type:Array})],de.prototype,"errors",2),ye([n.property({type:Boolean})],de.prototype,"showErrors",2),ye([n.property({type:Boolean})],de.prototype,"touched",2),ye([n.property({type:Boolean})],de.prototype,"required",2),ye([n.property({type:Boolean})],de.prototype,"disabled",2),ye([n.property({type:Boolean,attribute:"readonly"})],de.prototype,"readOnly",2),ye([n.property({type:String})],de.prototype,"icon",2),ye([n.property({type:String})],de.prototype,"hint",2),ye([n.property({type:String})],de.prototype,"dayAriaLabel",2),ye([n.property({type:String})],de.prototype,"monthAriaLabel",2),ye([n.property({type:String})],de.prototype,"yearAriaLabel",2),ye([n.property({type:Array})],de.prototype,"value",2),ye([n.property({type:String,attribute:"invalid-date-message"})],de.prototype,"invalidDateMessage",2),ye([n.property({type:String})],de.prototype,"removePillAriaLabel",2),ye([n.property({type:String})],de.prototype,"startDateAriaLabel",2),ye([n.property({type:String})],de.prototype,"endDateAriaLabel",2),ye([n.property({type:String})],de.prototype,"separator",2),de=ye([n.customElement("gui-range-date")],de),typeof customElements<"u"&&!customElements.get("gui-range-date")&&customElements.define("gui-range-date",de);var sy=Object.defineProperty,ny=Object.getOwnPropertyDescriptor,Ir=(e,t,i,a)=>{for(var r=a>1?void 0:a?ny(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&sy(t,i,r),r};let jt=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
737
737
  <gui-range-date
738
738
  .uid=${this.widget.uid}
739
739
  .label=${this.adapter.templateData.label}
@@ -757,8 +757,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
757
757
  @change=${this.valueChanged}
758
758
  @inputError=${this.onInputError}
759
759
  ></gui-range-date>
760
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};za([f.consume({context:c.formContext}),n.property({attribute:!1})],Kt.prototype,"formContext",2),za([f.provide({context:c.inputContext})],Kt.prototype,"adapter",2),Kt=za([n.customElement("gui-range-date-input")],Kt);const nh=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateInputElement(){return Kt}},Symbol.toStringTag,{value:"Module"}));var oh=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,W=(e,t,i,a)=>{for(var r=a>1?void 0:a?lh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&oh(t,i,r),r};let G=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.hourFormat=void 0,this.minuteStep=1,this.minTime=void 0,this.maxTime=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.value=[],this.rangeOrderMessage=void 0,this.removePillAriaLabel=void 0,this.startTimeAriaLabel=void 0,this.endTimeAriaLabel=void 0,this.separator=void 0,this.allowCustomTime=void 0,this.disabledRanges=void 0,this.disabledRangeMessage=void 0,this.inputBlockClass="gui-range-time-input",this.groups=["start","end"],this._validationTriggered=!1,this._parts=new Pt(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:()=>{this._validationTriggered?this.revalidate():this.syncParts()},onInputErrorSurfaced:e=>this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0})),onSurfacedErrorCleared:e=>this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})),isReadonly:()=>!!this.readOnly||this.allowCustomTime===!1,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>{},onEnter:()=>{this.tryCreatePill(),this.value&&this.value.length>0&&this.onPillClick(this.value[this.value.length-1])},getHourFormat:()=>this.timeLocaleData.effectiveHourFormat,getDayPeriodLabels:()=>this.timeLocaleData.dayPeriodLabels}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Yt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),t.next.length===0&&requestAnimationFrame(()=>{this.querySelector(".gui-range-time-input__field input")?.focus()}))},this.onPillClickEvent=e=>{const t=Mt(this.getSortedPills(),e.detail.key);t&&this.onPillClick(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get timeLocaleData(){return ra(this.localeId,this.hourFormat,this.minuteStep)}getPartDescriptor(e){return this.timeLocaleData.descriptors[e]}willUpdate(e){(!this.hasUpdated||e.has("hourFormat")||e.has("localeId"))&&this._parts.seedDayPeriods()}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:qs(this.localeId,this.timeLocaleData.effectiveHourFormat),getDescriptor:r=>this.getPartDescriptor(r),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(r,s)=>({hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[s]??St[s],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly||this.allowCustomTime===!1},i=Ht(this.getSortedPills(),r=>sa(r,s=>this.formatTimeForDisplay(s))),a={"gui-widget-icon":!0,[this.icon]:!!this.icon};return l.html`
761
- ${this.label?le(this.uid,e,!1,void 0,!1):l.nothing}
760
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ir([f.consume({context:m.formContext}),n.property({attribute:!1})],jt.prototype,"formContext",2),Ir([f.provide({context:m.inputContext})],jt.prototype,"adapter",2),jt=Ir([n.customElement("gui-range-date-input")],jt);const oy=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateInputElement(){return jt}},Symbol.toStringTag,{value:"Module"}));var ly=Object.defineProperty,dy=Object.getOwnPropertyDescriptor,W=(e,t,i,a)=>{for(var r=a>1?void 0:a?dy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ly(t,i,r),r};let U=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.hourFormat=void 0,this.minuteStep=1,this.minTime=void 0,this.maxTime=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.value=[],this.rangeOrderMessage=void 0,this.removePillAriaLabel=void 0,this.startTimeAriaLabel=void 0,this.endTimeAriaLabel=void 0,this.separator=void 0,this.allowCustomTime=void 0,this.disabledRanges=void 0,this.disabledRangeMessage=void 0,this.inputBlockClass="gui-range-time-input",this.groups=["start","end"],this._validationTriggered=!1,this._parts=new Ot(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:()=>{this._validationTriggered?this.revalidate():this.syncParts()},onInputErrorSurfaced:e=>this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0})),onSurfacedErrorCleared:e=>this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})),isReadonly:()=>!!this.readOnly||this.allowCustomTime===!1,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>{},onEnter:()=>{this.tryCreatePill(),this.value&&this.value.length>0&&this.onPillClick(this.value[this.value.length-1])},getHourFormat:()=>this.timeLocaleData.effectiveHourFormat,getDayPeriodLabels:()=>this.timeLocaleData.dayPeriodLabels}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Jt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),t.next.length===0&&requestAnimationFrame(()=>{this.querySelector(".gui-range-time-input__field input")?.focus()}))},this.onPillClickEvent=e=>{const t=Ft(this.getSortedPills(),e.detail.key);t&&this.onPillClick(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get timeLocaleData(){return la(this.localeId,this.hourFormat,this.minuteStep)}getPartDescriptor(e){return this.timeLocaleData.descriptors[e]}willUpdate(e){(!this.hasUpdated||e.has("hourFormat")||e.has("localeId"))&&this._parts.seedDayPeriods()}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:In(this.localeId,this.timeLocaleData.effectiveHourFormat),getDescriptor:r=>this.getPartDescriptor(r),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(r,s)=>({hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[s]??_t[s],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly||this.allowCustomTime===!1},i=Xt(this.getSortedPills(),r=>da(r,s=>this.formatTimeForDisplay(s))),a={"gui-widget-icon":!0,[this.icon]:!!this.icon};return d.html`
761
+ ${this.label?le(this.uid,e,!1,void 0,!1):d.nothing}
762
762
 
763
763
  <div class="gui-widget">
764
764
  <div
@@ -766,15 +766,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
766
766
  role="group"
767
767
  aria-label=${this.label??"Time range input"}
768
768
  >
769
- ${this.icon?l.html`<span
770
- class=${_.classMap(a)}
769
+ ${this.icon?d.html`<span
770
+ class=${S.classMap(a)}
771
771
  data-icon=${this.icon}
772
772
  aria-hidden="true"
773
- ></span>`:l.nothing}
773
+ ></span>`:d.nothing}
774
774
 
775
775
  <gui-pills
776
776
  class="gui-range-time-input__pills"
777
- style=${vt.styleMap(i.length?{}:{"min-width":0})}
777
+ style=${wt.styleMap(i.length?{}:{"min-width":0})}
778
778
  .uid=${this.uid}
779
779
  .toolbarAriaLabel=${"Selected time ranges"}
780
780
  .items=${i}
@@ -795,7 +795,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
795
795
  role="group"
796
796
  aria-label=${this.startTimeAriaLabel??"Start time"}
797
797
  >
798
- ${yt("start",t,this._parts)}
798
+ ${bt("start",t,this._parts)}
799
799
  </div>
800
800
 
801
801
  <span class="gui-range-time-input__separator">${this.separator??"-"}</span>
@@ -805,14 +805,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
805
805
  role="group"
806
806
  aria-label=${this.endTimeAriaLabel??"End time"}
807
807
  >
808
- ${yt("end",t,this._parts)}
808
+ ${bt("end",t,this._parts)}
809
809
  </div>
810
810
  </div>
811
811
  </div>
812
812
 
813
- ${this.showErrors&&this.errors?.length?j(this.uid,e):l.nothing}
813
+ ${this.showErrors&&this.errors?.length?j(this.uid,e):d.nothing}
814
814
  </div>
815
- `}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}formatTimeForDisplay(e){return ia(e,this.localeId,this.timeLocaleData.effectiveHourFormat)}getSortedPills(){return Zt(this.value,Ie)}validateTimeParts(e){const{effectiveHourFormat:t,descriptors:i}=this.timeLocaleData,{result:a,writeBacks:r}=tn(this._parts.values[e]??{},{hourFormat:t,descriptors:i});if(this._parts.applyWriteBacks(e,r),a.kind!=="valid")return{kind:"incomplete"};const s=aa(a.iso,{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage});return s?{kind:"invalid",message:s}:{kind:"valid",value:a.iso}}fillGroup(e,t){this._parts.setGroupFromISO(e,t,"time",this.timeLocaleData.effectiveHourFormat),this.requestUpdate()}commitFromParts(){return this.tryCreatePill()}syncParts(){const e=this.validateTimeParts("start"),t=this.validateTimeParts("end"),i=a=>a.kind==="valid"?a.value:null;return this.dispatchEvent(new CustomEvent("partsChange",{detail:{start:i(e),end:i(t)},bubbles:!0,composed:!0})),{start:e,end:t}}evaluateRange(){const{start:e,end:t}=this.syncParts(),i=qa(e,t,this.value,{validate:a=>Ie(a.end,a.start)<=0?this.rangeOrderMessage??ou:Us(a.start,a.end,this.disabledRanges)?this.disabledRangeMessage??Vi:null,toRange:a=>({start:a.start,end:a.end}),merge:Su});return i.kind==="incomplete"&&this._parts.clearSurfacedInputError(this.value??[]),i.kind==="invalid"&&this._parts.surfaceInputError(i.message),i}revalidate(){this.evaluateRange().kind==="commit"&&this._parts.clearSurfacedInputError(this.value??[])}tryCreatePill(){this._validationTriggered=!0;const e=this.evaluateRange();return e.kind!=="commit"?!1:(this.value=e.value,this._validationTriggered=!1,this._parts.clearGroup("start"),this._parts.clearGroup("end"),this._parts.seedDayPeriods(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._parts.focusFirst("start"),this.requestUpdate(),!0)}};W([n.property({type:String})],G.prototype,"uid",2),W([n.property({type:String})],G.prototype,"label",2),W([n.property({type:String,attribute:"locale-id"})],G.prototype,"localeId",2),W([n.property({type:Array})],G.prototype,"errors",2),W([n.property({type:Boolean})],G.prototype,"showErrors",2),W([n.property({type:Boolean})],G.prototype,"touched",2),W([n.property({type:Boolean})],G.prototype,"required",2),W([n.property({type:Boolean})],G.prototype,"disabled",2),W([n.property({type:Boolean,attribute:"readonly"})],G.prototype,"readOnly",2),W([n.property({type:String})],G.prototype,"icon",2),W([n.property({type:String})],G.prototype,"hint",2),W([n.property({type:String})],G.prototype,"hourAriaLabel",2),W([n.property({type:String})],G.prototype,"minuteAriaLabel",2),W([n.property({type:String})],G.prototype,"dayPeriodAriaLabel",2),W([n.property({type:String,attribute:"hour-format"})],G.prototype,"hourFormat",2),W([n.property({type:Number,attribute:"minute-step"})],G.prototype,"minuteStep",2),W([n.property({type:String,attribute:"min-time"})],G.prototype,"minTime",2),W([n.property({type:String,attribute:"max-time"})],G.prototype,"maxTime",2),W([n.property({type:String,attribute:"min-time-message"})],G.prototype,"minTimeMessage",2),W([n.property({type:String,attribute:"max-time-message"})],G.prototype,"maxTimeMessage",2),W([n.property({type:Array})],G.prototype,"value",2),W([n.property({type:String,attribute:"range-order-message"})],G.prototype,"rangeOrderMessage",2),W([n.property({type:String})],G.prototype,"removePillAriaLabel",2),W([n.property({type:String})],G.prototype,"startTimeAriaLabel",2),W([n.property({type:String})],G.prototype,"endTimeAriaLabel",2),W([n.property({type:String})],G.prototype,"separator",2),W([n.property({type:Boolean,attribute:"allow-custom-time"})],G.prototype,"allowCustomTime",2),W([n.property({type:Array,attribute:"disabled-ranges"})],G.prototype,"disabledRanges",2),W([n.property({type:String,attribute:"disabled-range-message"})],G.prototype,"disabledRangeMessage",2),G=W([n.customElement("gui-range-time")],G),typeof customElements<"u"&&!customElements.get("gui-range-time")&&customElements.define("gui-range-time",G);var dh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Ga=(e,t,i,a)=>{for(var r=a>1?void 0:a?ph(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&dh(t,i,r),r};let Jt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
815
+ `}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}formatTimeForDisplay(e){return na(e,this.localeId,this.timeLocaleData.effectiveHourFormat)}getSortedPills(){return Kt(this.value,Re)}validateTimeParts(e){const{effectiveHourFormat:t,descriptors:i}=this.timeLocaleData,{result:a,writeBacks:r}=Yn(this._parts.values[e]??{},{hourFormat:t,descriptors:i});if(this._parts.applyWriteBacks(e,r),a.kind!=="valid")return{kind:"incomplete"};const s=oa(a.iso,{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage});return s?{kind:"invalid",message:s}:{kind:"valid",value:a.iso}}fillGroup(e,t){this._parts.setGroupFromISO(e,t,"time",this.timeLocaleData.effectiveHourFormat),this.requestUpdate()}commitFromParts(){return this.tryCreatePill()}syncParts(){const e=this.validateTimeParts("start"),t=this.validateTimeParts("end"),i=a=>a.kind==="valid"?a.value:null;return this.dispatchEvent(new CustomEvent("partsChange",{detail:{start:i(e),end:i(t)},bubbles:!0,composed:!0})),{start:e,end:t}}evaluateRange(){const{start:e,end:t}=this.syncParts(),i=Lr(e,t,this.value,{validate:a=>Re(a.end,a.start)<=0?this.rangeOrderMessage??lm:On(a.start,a.end,this.disabledRanges)?this.disabledRangeMessage??Hi:null,toRange:a=>({start:a.start,end:a.end}),merge:Sm});return i.kind==="incomplete"&&this._parts.clearSurfacedInputError(this.value??[]),i.kind==="invalid"&&this._parts.surfaceInputError(i.message),i}revalidate(){this.evaluateRange().kind==="commit"&&this._parts.clearSurfacedInputError(this.value??[])}tryCreatePill(){this._validationTriggered=!0;const e=this.evaluateRange();return e.kind!=="commit"?!1:(this.value=e.value,this._validationTriggered=!1,this._parts.clearGroup("start"),this._parts.clearGroup("end"),this._parts.seedDayPeriods(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._parts.focusFirst("start"),this.requestUpdate(),!0)}};W([n.property({type:String})],U.prototype,"uid",2),W([n.property({type:String})],U.prototype,"label",2),W([n.property({type:String,attribute:"locale-id"})],U.prototype,"localeId",2),W([n.property({type:Array})],U.prototype,"errors",2),W([n.property({type:Boolean})],U.prototype,"showErrors",2),W([n.property({type:Boolean})],U.prototype,"touched",2),W([n.property({type:Boolean})],U.prototype,"required",2),W([n.property({type:Boolean})],U.prototype,"disabled",2),W([n.property({type:Boolean,attribute:"readonly"})],U.prototype,"readOnly",2),W([n.property({type:String})],U.prototype,"icon",2),W([n.property({type:String})],U.prototype,"hint",2),W([n.property({type:String})],U.prototype,"hourAriaLabel",2),W([n.property({type:String})],U.prototype,"minuteAriaLabel",2),W([n.property({type:String})],U.prototype,"dayPeriodAriaLabel",2),W([n.property({type:String,attribute:"hour-format"})],U.prototype,"hourFormat",2),W([n.property({type:Number,attribute:"minute-step"})],U.prototype,"minuteStep",2),W([n.property({type:String,attribute:"min-time"})],U.prototype,"minTime",2),W([n.property({type:String,attribute:"max-time"})],U.prototype,"maxTime",2),W([n.property({type:String,attribute:"min-time-message"})],U.prototype,"minTimeMessage",2),W([n.property({type:String,attribute:"max-time-message"})],U.prototype,"maxTimeMessage",2),W([n.property({type:Array})],U.prototype,"value",2),W([n.property({type:String,attribute:"range-order-message"})],U.prototype,"rangeOrderMessage",2),W([n.property({type:String})],U.prototype,"removePillAriaLabel",2),W([n.property({type:String})],U.prototype,"startTimeAriaLabel",2),W([n.property({type:String})],U.prototype,"endTimeAriaLabel",2),W([n.property({type:String})],U.prototype,"separator",2),W([n.property({type:Boolean,attribute:"allow-custom-time"})],U.prototype,"allowCustomTime",2),W([n.property({type:Array,attribute:"disabled-ranges"})],U.prototype,"disabledRanges",2),W([n.property({type:String,attribute:"disabled-range-message"})],U.prototype,"disabledRangeMessage",2),U=W([n.customElement("gui-range-time")],U),typeof customElements<"u"&&!customElements.get("gui-range-time")&&customElements.define("gui-range-time",U);var uy=Object.defineProperty,py=Object.getOwnPropertyDescriptor,xr=(e,t,i,a)=>{for(var r=a>1?void 0:a?py(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&uy(t,i,r),r};let ei=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
816
816
  <gui-range-time
817
817
  .uid=${this.widget.uid}
818
818
  .label=${this.adapter.templateData.label}
@@ -842,8 +842,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
842
842
  @change=${this.valueChanged}
843
843
  @inputError=${this.onInputError}
844
844
  ></gui-range-time>
845
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ga([f.consume({context:c.formContext}),n.property({attribute:!1})],Jt.prototype,"formContext",2),Ga([f.provide({context:c.inputContext})],Jt.prototype,"adapter",2),Jt=Ga([n.customElement("gui-range-time-input")],Jt);const uh=Object.freeze(Object.defineProperty({__proto__:null,get RangeTimeInputElement(){return Jt}},Symbol.toStringTag,{value:"Module"}));var hh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,V=(e,t,i,a)=>{for(var r=a>1?void 0:a?mh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&hh(t,i,r),r};let I=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.hourFormat=void 0,this.minuteStep=1,this.invalidDateMessage=void 0,this.value=[],this.removePillAriaLabel=void 0,this.startDateTimeAriaLabel=void 0,this.endDateTimeAriaLabel=void 0,this.separator=void 0,this.minDateTime=void 0,this.maxDateTime=void 0,this.minDateTimeMessage=void 0,this.maxDateTimeMessage=void 0,this.disabledRanges=void 0,this.disabledRangeMessage=void 0,this.inputBlockClass="gui-range-date-time-input",this.groups=["start","end"],this._validationTriggered=!1,this._parts=new Pt(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:()=>{this._validationTriggered?this.revalidate():this.syncParts()},isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>{},onEnter:()=>{this.tryCreatePill(),this.value&&this.value.length>0&&this.onPillClick(this.value[this.value.length-1])},getHourFormat:()=>this.localeData.effectiveHourFormat,getDayPeriodLabels:()=>this.localeData.dayPeriodLabels,onInputErrorSurfaced:e=>this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0})),onSurfacedErrorCleared:e=>this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Yt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),t.next.length===0&&requestAnimationFrame(()=>{this.querySelector(".gui-range-date-time-input__field input")?.focus()}))},this.onPillClickEvent=e=>{const t=Mt(this.getSortedPills(),e.detail.key);t&&this.onPillClick(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get localeData(){return ra(this.localeId,this.hourFormat,this.minuteStep,!0)}getPartDescriptor(e){return this.localeData.descriptors[e]}willUpdate(e){(!this.hasUpdated||e.has("hourFormat")||e.has("localeId"))&&this._parts.seedDayPeriods()}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:zs(this.localeId,this.localeData.effectiveHourFormat),getDescriptor:r=>this.getPartDescriptor(r),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(r,s)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel,hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[s]??St[s],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly},i=Ht(this.getSortedPills(),r=>sa(r,s=>this.formatDateTimeForDisplay(s))),a={"gui-widget-icon":!0,[this.icon]:!!this.icon};return l.html`
846
- ${this.label?le(this.uid,e,!1,void 0,!1):l.nothing}
845
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};xr([f.consume({context:m.formContext}),n.property({attribute:!1})],ei.prototype,"formContext",2),xr([f.provide({context:m.inputContext})],ei.prototype,"adapter",2),ei=xr([n.customElement("gui-range-time-input")],ei);const hy=Object.freeze(Object.defineProperty({__proto__:null,get RangeTimeInputElement(){return ei}},Symbol.toStringTag,{value:"Module"}));var cy=Object.defineProperty,my=Object.getOwnPropertyDescriptor,G=(e,t,i,a)=>{for(var r=a>1?void 0:a?my(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&cy(t,i,r),r};let R=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.hourFormat=void 0,this.minuteStep=1,this.invalidDateMessage=void 0,this.value=[],this.removePillAriaLabel=void 0,this.startDateTimeAriaLabel=void 0,this.endDateTimeAriaLabel=void 0,this.separator=void 0,this.minDateTime=void 0,this.maxDateTime=void 0,this.minDateTimeMessage=void 0,this.maxDateTimeMessage=void 0,this.disabledRanges=void 0,this.disabledRangeMessage=void 0,this.inputBlockClass="gui-range-date-time-input",this.groups=["start","end"],this._validationTriggered=!1,this._parts=new Ot(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:()=>{this._validationTriggered?this.revalidate():this.syncParts()},isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>{},onEnter:()=>{this.tryCreatePill(),this.value&&this.value.length>0&&this.onPillClick(this.value[this.value.length-1])},getHourFormat:()=>this.localeData.effectiveHourFormat,getDayPeriodLabels:()=>this.localeData.dayPeriodLabels,onInputErrorSurfaced:e=>this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0})),onSurfacedErrorCleared:e=>this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Jt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),t.next.length===0&&requestAnimationFrame(()=>{this.querySelector(".gui-range-date-time-input__field input")?.focus()}))},this.onPillClickEvent=e=>{const t=Ft(this.getSortedPills(),e.detail.key);t&&this.onPillClick(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get localeData(){return la(this.localeId,this.hourFormat,this.minuteStep,!0)}getPartDescriptor(e){return this.localeData.descriptors[e]}willUpdate(e){(!this.hasUpdated||e.has("hourFormat")||e.has("localeId"))&&this._parts.seedDayPeriods()}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:xn(this.localeId,this.localeData.effectiveHourFormat),getDescriptor:r=>this.getPartDescriptor(r),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(r,s)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel,hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[s]??_t[s],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly},i=Xt(this.getSortedPills(),r=>da(r,s=>this.formatDateTimeForDisplay(s))),a={"gui-widget-icon":!0,[this.icon]:!!this.icon};return d.html`
846
+ ${this.label?le(this.uid,e,!1,void 0,!1):d.nothing}
847
847
 
848
848
  <div class="gui-widget">
849
849
  <div
@@ -851,15 +851,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
851
851
  role="group"
852
852
  aria-label=${this.label??"Date-time range input"}
853
853
  >
854
- ${this.icon?l.html`<span
855
- class=${_.classMap(a)}
854
+ ${this.icon?d.html`<span
855
+ class=${S.classMap(a)}
856
856
  data-icon=${this.icon}
857
857
  aria-hidden="true"
858
- ></span>`:l.nothing}
858
+ ></span>`:d.nothing}
859
859
 
860
860
  <gui-pills
861
861
  class="gui-range-date-time-input__pills"
862
- style=${vt.styleMap(i.length?{}:{"min-width":0})}
862
+ style=${wt.styleMap(i.length?{}:{"min-width":0})}
863
863
  .uid=${this.uid}
864
864
  .toolbarAriaLabel=${"Selected date-time ranges"}
865
865
  .items=${i}
@@ -880,7 +880,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
880
880
  role="group"
881
881
  aria-label=${this.startDateTimeAriaLabel??"Start date-time"}
882
882
  >
883
- ${yt("start",t,this._parts)}
883
+ ${bt("start",t,this._parts)}
884
884
  </div>
885
885
 
886
886
  <span class="gui-range-date-time-input__separator">${this.separator??"-"}</span>
@@ -890,14 +890,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
890
890
  role="group"
891
891
  aria-label=${this.endDateTimeAriaLabel??"End date-time"}
892
892
  >
893
- ${yt("end",t,this._parts)}
893
+ ${bt("end",t,this._parts)}
894
894
  </div>
895
895
  </div>
896
896
  </div>
897
897
 
898
- ${this.showErrors&&this.errors?.length?j(this.uid,e):l.nothing}
898
+ ${this.showErrors&&this.errors?.length?j(this.uid,e):d.nothing}
899
899
  </div>
900
- `}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}formatDateTimeForDisplay(e){return Ra(e,this.localeId,this.localeData.effectiveHourFormat)}getSortedPills(){return Zt(this.value,(e,t)=>ee(e).getTime()-ee(t).getTime())}validateDateTimeParts(e){const{effectiveHourFormat:t,descriptors:i}=this.localeData,{result:a,writeBacks:r}=an(this._parts.values[e]??{},{hourFormat:t,descriptors:i,invalidDateMessage:this.invalidDateMessage});if(this._parts.applyWriteBacks(e,r),a.kind==="incomplete")return{kind:"incomplete"};if(a.kind==="invalid")return{kind:"invalid",message:a.message};const s=Js(a.iso,this.minDateTime,this.maxDateTime,{minDateTimeMessage:this.minDateTimeMessage,maxDateTimeMessage:this.maxDateTimeMessage});return s?{kind:"invalid",message:s}:{kind:"valid",value:a.iso}}syncParts(){return{start:this.validateDateTimeParts("start"),end:this.validateDateTimeParts("end")}}evaluateRange(){const{start:e,end:t}=this.syncParts(),i=qa(e,t,this.value,{order:(a,r)=>{const s=Ys(a,r);return{start:s.start,end:s.end}},validate:a=>Ws({start:a.start,end:a.end},this.disabledRanges)?this.disabledRangeMessage??kt:null,toRange:a=>({start:a.start,end:a.end}),merge:Hs});return i.kind==="invalid"&&this._parts.surfaceInputError(i.message),i.kind==="incomplete"&&this._parts.clearSurfacedInputError(this.value??[]),i}revalidate(){this.evaluateRange().kind==="commit"&&this._parts.clearSurfacedInputError(this.value??[])}tryCreatePill(){this._validationTriggered=!0;const e=this.evaluateRange();e.kind==="commit"&&(this.value=e.value,this._validationTriggered=!1,this._parts.clearGroup("start"),this._parts.clearGroup("end"),this._parts.seedDayPeriods(),this._parts.resetSurfacedInputError(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._parts.focusFirst("start"),this.requestUpdate())}};V([n.property({type:String})],I.prototype,"uid",2),V([n.property({type:String})],I.prototype,"label",2),V([n.property({type:String,attribute:"locale-id"})],I.prototype,"localeId",2),V([n.property({type:Array})],I.prototype,"errors",2),V([n.property({type:Boolean})],I.prototype,"showErrors",2),V([n.property({type:Boolean})],I.prototype,"touched",2),V([n.property({type:Boolean})],I.prototype,"required",2),V([n.property({type:Boolean})],I.prototype,"disabled",2),V([n.property({type:Boolean,attribute:"readonly"})],I.prototype,"readOnly",2),V([n.property({type:String})],I.prototype,"icon",2),V([n.property({type:String})],I.prototype,"hint",2),V([n.property({type:String})],I.prototype,"dayAriaLabel",2),V([n.property({type:String})],I.prototype,"monthAriaLabel",2),V([n.property({type:String})],I.prototype,"yearAriaLabel",2),V([n.property({type:String})],I.prototype,"hourAriaLabel",2),V([n.property({type:String})],I.prototype,"minuteAriaLabel",2),V([n.property({type:String})],I.prototype,"dayPeriodAriaLabel",2),V([n.property({type:String,attribute:"hour-format"})],I.prototype,"hourFormat",2),V([n.property({type:Number,attribute:"minute-step"})],I.prototype,"minuteStep",2),V([n.property({type:String,attribute:"invalid-date-message"})],I.prototype,"invalidDateMessage",2),V([n.property({type:Array})],I.prototype,"value",2),V([n.property({type:String})],I.prototype,"removePillAriaLabel",2),V([n.property({type:String})],I.prototype,"startDateTimeAriaLabel",2),V([n.property({type:String})],I.prototype,"endDateTimeAriaLabel",2),V([n.property({type:String})],I.prototype,"separator",2),V([n.property({type:String,attribute:"min-date-time"})],I.prototype,"minDateTime",2),V([n.property({type:String,attribute:"max-date-time"})],I.prototype,"maxDateTime",2),V([n.property({type:String,attribute:"min-date-time-message"})],I.prototype,"minDateTimeMessage",2),V([n.property({type:String,attribute:"max-date-time-message"})],I.prototype,"maxDateTimeMessage",2),V([n.property({type:Array,attribute:"disabled-ranges"})],I.prototype,"disabledRanges",2),V([n.property({type:String,attribute:"disabled-range-message"})],I.prototype,"disabledRangeMessage",2),I=V([n.customElement("gui-range-date-time")],I),typeof customElements<"u"&&!customElements.get("gui-range-date-time")&&customElements.define("gui-range-date-time",I);var ch=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,Va=(e,t,i,a)=>{for(var r=a>1?void 0:a?yh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ch(t,i,r),r};let Xt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
900
+ `}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}formatDateTimeForDisplay(e){return _r(e,this.localeId,this.localeData.effectiveHourFormat)}getSortedPills(){return Kt(this.value,(e,t)=>ee(e).getTime()-ee(t).getTime())}validateDateTimeParts(e){const{effectiveHourFormat:t,descriptors:i}=this.localeData,{result:a,writeBacks:r}=Hn(this._parts.values[e]??{},{hourFormat:t,descriptors:i,invalidDateMessage:this.invalidDateMessage});if(this._parts.applyWriteBacks(e,r),a.kind==="incomplete")return{kind:"incomplete"};if(a.kind==="invalid")return{kind:"invalid",message:a.message};const s=zn(a.iso,this.minDateTime,this.maxDateTime,{minDateTimeMessage:this.minDateTimeMessage,maxDateTimeMessage:this.maxDateTimeMessage});return s?{kind:"invalid",message:s}:{kind:"valid",value:a.iso}}syncParts(){return{start:this.validateDateTimeParts("start"),end:this.validateDateTimeParts("end")}}evaluateRange(){const{start:e,end:t}=this.syncParts(),i=Lr(e,t,this.value,{order:(a,r)=>{const s=Fn(a,r);return{start:s.start,end:s.end}},validate:a=>Nn({start:a.start,end:a.end},this.disabledRanges)?this.disabledRangeMessage??St:null,toRange:a=>({start:a.start,end:a.end}),merge:Bn});return i.kind==="invalid"&&this._parts.surfaceInputError(i.message),i.kind==="incomplete"&&this._parts.clearSurfacedInputError(this.value??[]),i}revalidate(){this.evaluateRange().kind==="commit"&&this._parts.clearSurfacedInputError(this.value??[])}tryCreatePill(){this._validationTriggered=!0;const e=this.evaluateRange();e.kind==="commit"&&(this.value=e.value,this._validationTriggered=!1,this._parts.clearGroup("start"),this._parts.clearGroup("end"),this._parts.seedDayPeriods(),this._parts.resetSurfacedInputError(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._parts.focusFirst("start"),this.requestUpdate())}};G([n.property({type:String})],R.prototype,"uid",2),G([n.property({type:String})],R.prototype,"label",2),G([n.property({type:String,attribute:"locale-id"})],R.prototype,"localeId",2),G([n.property({type:Array})],R.prototype,"errors",2),G([n.property({type:Boolean})],R.prototype,"showErrors",2),G([n.property({type:Boolean})],R.prototype,"touched",2),G([n.property({type:Boolean})],R.prototype,"required",2),G([n.property({type:Boolean})],R.prototype,"disabled",2),G([n.property({type:Boolean,attribute:"readonly"})],R.prototype,"readOnly",2),G([n.property({type:String})],R.prototype,"icon",2),G([n.property({type:String})],R.prototype,"hint",2),G([n.property({type:String})],R.prototype,"dayAriaLabel",2),G([n.property({type:String})],R.prototype,"monthAriaLabel",2),G([n.property({type:String})],R.prototype,"yearAriaLabel",2),G([n.property({type:String})],R.prototype,"hourAriaLabel",2),G([n.property({type:String})],R.prototype,"minuteAriaLabel",2),G([n.property({type:String})],R.prototype,"dayPeriodAriaLabel",2),G([n.property({type:String,attribute:"hour-format"})],R.prototype,"hourFormat",2),G([n.property({type:Number,attribute:"minute-step"})],R.prototype,"minuteStep",2),G([n.property({type:String,attribute:"invalid-date-message"})],R.prototype,"invalidDateMessage",2),G([n.property({type:Array})],R.prototype,"value",2),G([n.property({type:String})],R.prototype,"removePillAriaLabel",2),G([n.property({type:String})],R.prototype,"startDateTimeAriaLabel",2),G([n.property({type:String})],R.prototype,"endDateTimeAriaLabel",2),G([n.property({type:String})],R.prototype,"separator",2),G([n.property({type:String,attribute:"min-date-time"})],R.prototype,"minDateTime",2),G([n.property({type:String,attribute:"max-date-time"})],R.prototype,"maxDateTime",2),G([n.property({type:String,attribute:"min-date-time-message"})],R.prototype,"minDateTimeMessage",2),G([n.property({type:String,attribute:"max-date-time-message"})],R.prototype,"maxDateTimeMessage",2),G([n.property({type:Array,attribute:"disabled-ranges"})],R.prototype,"disabledRanges",2),G([n.property({type:String,attribute:"disabled-range-message"})],R.prototype,"disabledRangeMessage",2),R=G([n.customElement("gui-range-date-time")],R),typeof customElements<"u"&&!customElements.get("gui-range-date-time")&&customElements.define("gui-range-date-time",R);var yy=Object.defineProperty,gy=Object.getOwnPropertyDescriptor,Pr=(e,t,i,a)=>{for(var r=a>1?void 0:a?gy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&yy(t,i,r),r};let ti=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
901
901
  <gui-range-date-time
902
902
  .uid=${this.widget.uid}
903
903
  .label=${this.adapter.templateData.label}
@@ -930,10 +930,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
930
930
  @change=${this.valueChanged}
931
931
  @inputError=${this.onInputError}
932
932
  ></gui-range-date-time>
933
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Va([f.consume({context:c.formContext}),n.property({attribute:!1})],Xt.prototype,"formContext",2),Va([f.provide({context:c.inputContext})],Xt.prototype,"adapter",2),Xt=Va([n.customElement("gui-range-date-time-input")],Xt);const gh=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateTimeInputElement(){return Xt}},Symbol.toStringTag,{value:"Module"}));var bh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,$=(e,t,i,a)=>{for(var r=a>1?void 0:a?fh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&bh(t,i,r),r};let D=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=[],this.focusDate=void 0,this.hidePills=!1,this.removePillAriaLabel=void 0,this.disabledDateRangeMessage=void 0,this.invalidRange=null,this.hourFormat=void 0,this.minuteStep=void 0,this.allowCustomTime=!1,this.startTimeLabel=void 0,this.endTimeLabel=void 0,this.minDateTime=void 0,this.maxDateTime=void 0,this.minDateTimeMessage=void 0,this.maxDateTimeMessage=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this.dayCountAriaLabel=void 0,this.disabledDayCountAriaLabel=void 0,this._selection=na(),this._invalidRange=null,this._workingDateStart=void 0,this._workingDateEnd=void 0,this._workingTimeIn=void 0,this._workingTimeOut=void 0,this._openList=null,this._skipValueNavigation=!1,this._nav=new Yi(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Gi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:(e,t)=>this.selectDate(this.activationDay(e),t),onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new zt(this,{onLeave:()=>this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Yt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))},this.onPillClickEvent=e=>{const t=Mt(this.getSortedPills(),e.detail.key);t&&this.navigateToDate(t.start)}}get _currentDate(){return this._nav.currentDate}set _currentDate(e){this._nav.currentDate=e}get _yearSelectorOpen(){return this._nav.yearSelectorOpen}set _yearSelectorOpen(e){this._nav.yearSelectorOpen=e}parseEndpoint(e){return ee(e)}endpointDay(e){return re(e.split("T")[0])}formatPillLabel(e){const t=ji(this.localeId,this.hourFormat),i=Ra(e.start,this.localeId,t),a=e.end?Ra(e.end,this.localeId,t):i;return`${i} - ${a}`}get workingRange(){if(!(!this._workingDateStart||!this._workingDateEnd))return{start:re(this._workingDateStart),end:re(this._workingDateEnd)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if((!this.hasUpdated||e.has("minDateTime")||e.has("maxDateTime"))&&(this.minDate=this.minDateTime?this.minDateTime.split("T")[0]:void 0,this.maxDate=this.maxDateTime?this.maxDateTime.split("T")[0]:void 0),e.has("invalidRange"))if(this.invalidRange){const t=this.endpointDay(this.invalidRange.start),i=this.endpointDay(this.invalidRange.end);this._invalidRange=isNaN(t.getTime())||isNaN(i.getTime())?null:{start:t,end:i}}else this._invalidRange=null;if(e.has("value")&&!e.has("focusDate")){if(this._skipValueNavigation)this._skipValueNavigation=!1;else if(this.value){const t=Array.isArray(this.value)?this.value:[{start:this.value}];t.length>0&&t[0].start&&this._nav.navigateToDate(this.endpointDay(t[0].start))}}if(e.has("focusDate")&&this.focusDate){const t=re(this.focusDate);isNaN(t.getTime())||(this._nav.navigateToDate(t),this.focusDate=void 0)}}render(){return Wi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>this.renderAboveCalendar(),renderMonthPanel:e=>Ki({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this.toggleYearSelector(),renderBelowHeader:t=>this.renderBelowHeader(t),renderPanelBody:t=>this.renderPanelBody(t)})})}renderBelowHeader(e){if(e!==0)return l.nothing;const t=!this.disabled&&!!this._workingDateStart,i=!this.disabled&&!!this._workingTimeIn,a=this.startListBounds,r=this.endListBounds,s={"gui-range-date-time-calendar__time-row":!0,"is-list-open":this._openList!==null};return l.html`
934
- <div class=${_.classMap(s)}>
933
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Pr([f.consume({context:m.formContext}),n.property({attribute:!1})],ti.prototype,"formContext",2),Pr([f.provide({context:m.inputContext})],ti.prototype,"adapter",2),ti=Pr([n.customElement("gui-range-date-time-input")],ti);const by=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateTimeInputElement(){return ti}},Symbol.toStringTag,{value:"Module"}));var fy=Object.defineProperty,vy=Object.getOwnPropertyDescriptor,$=(e,t,i,a)=>{for(var r=a>1?void 0:a?vy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&fy(t,i,r),r};let D=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId=void 0,this.errors=[],this.touched=void 0,this.required=!1,this.disabled=!1,this.readOnly=!1,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel="",this.nextMonthAriaLabel="",this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat="numeric",this.weekdayFormat="narrow",this.monthFormat="long",this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=1,this.value=[],this.focusDate=void 0,this.hidePills=!1,this.removePillAriaLabel=void 0,this.disabledDateRangeMessage=void 0,this.invalidRange=null,this.hourFormat=void 0,this.minuteStep=void 0,this.allowCustomTime=!1,this.startTimeLabel=void 0,this.endTimeLabel=void 0,this.minDateTime=void 0,this.maxDateTime=void 0,this.minDateTimeMessage=void 0,this.maxDateTimeMessage=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this.dayCountAriaLabel=void 0,this.disabledDayCountAriaLabel=void 0,this._selection=ua(),this._invalidRange=null,this._workingDateStart=void 0,this._workingDateEnd=void 0,this._workingTimeIn=void 0,this._workingTimeOut=void 0,this._openList=null,this._skipValueNavigation=!1,this._nav=new Ji(this,{getMinDate:()=>this.minDate,getMaxDate:()=>this.maxDate,getNumberOfMonths:()=>this.numberOfMonths,getDisabledRanges:()=>this.disabledRanges,onYearSelectorToggled:()=>this._keyboard.onYearGridToggled()}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-calendar-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this._keyboard=new Yi(this,{canGoPrev:()=>this._nav.canGoPrev(),canGoNext:()=>this._nav.canGoNext(),goPrev:()=>this._nav.prevMonth(),goNext:()=>this._nav.nextMonth(),onActivateDay:(e,t)=>this.selectDate(this.activationDay(e),t),onSelectYear:e=>this._nav.selectYear(e),onCloseYearGrid:()=>this._nav.closeYearSelector(),isYearGridOpen:()=>this._nav.yearSelectorOpen}),this._focusLeave=new Zt(this,{onLeave:()=>this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}),this.onPillRemoveEvent=e=>{if(this.disabled||this.readOnly)return;const t=Jt(this.value,e.detail.key);t&&(this.value=t.next,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))},this.onPillClickEvent=e=>{const t=Ft(this.getSortedPills(),e.detail.key);t&&this.navigateToDate(t.start)}}get _currentDate(){return this._nav.currentDate}set _currentDate(e){this._nav.currentDate=e}get _yearSelectorOpen(){return this._nav.yearSelectorOpen}set _yearSelectorOpen(e){this._nav.yearSelectorOpen=e}parseEndpoint(e){return ee(e)}endpointDay(e){return re(e.split("T")[0])}formatPillLabel(e){const t=aa(this.localeId,this.hourFormat),i=_r(e.start,this.localeId,t),a=e.end?_r(e.end,this.localeId,t):i;return`${i} - ${a}`}get workingRange(){if(!(!this._workingDateStart||!this._workingDateEnd))return{start:re(this._workingDateStart),end:re(this._workingDateEnd)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if((!this.hasUpdated||e.has("minDateTime")||e.has("maxDateTime"))&&(this.minDate=this.minDateTime?this.minDateTime.split("T")[0]:void 0,this.maxDate=this.maxDateTime?this.maxDateTime.split("T")[0]:void 0),e.has("invalidRange"))if(this.invalidRange){const t=this.endpointDay(this.invalidRange.start),i=this.endpointDay(this.invalidRange.end);this._invalidRange=isNaN(t.getTime())||isNaN(i.getTime())?null:{start:t,end:i}}else this._invalidRange=null;if(e.has("value")&&!e.has("focusDate")){if(this._skipValueNavigation)this._skipValueNavigation=!1;else if(this.value){const t=Array.isArray(this.value)?this.value:[{start:this.value}];t.length>0&&t[0].start&&this._nav.navigateToDate(this.endpointDay(t[0].start))}}if(e.has("focusDate")&&this.focusDate){const t=re(this.focusDate);isNaN(t.getTime())||(this._nav.navigateToDate(t),this.focusDate=void 0)}}render(){return Qi({uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,numberOfMonths:this.numberOfMonths,localeId:this.localeId,currentDate:this._nav.currentDate,prevMonthIcon:this.prevMonthIcon,nextMonthIcon:this.nextMonthIcon,prevMonthAriaLabel:this.prevMonthAriaLabel,nextMonthAriaLabel:this.nextMonthAriaLabel,canGoPrev:this._nav.canGoPrev(),canGoNext:this._nav.canGoNext(),onPrevMonthClick:this._keyboard.onPrevMonthClick,onNextMonthClick:this._keyboard.onNextMonthClick,onFocusOut:this._focusLeave.onFocusOut,renderAboveCalendar:()=>this.renderAboveCalendar(),renderMonthPanel:e=>ji({currentDate:this._nav.currentDate,offset:e,localeId:this.localeId,monthFormat:this.monthFormat,yearSelectorOpen:this._nav.yearSelectorOpen,selectYearAriaLabel:this.selectYearAriaLabel,onToggleYearSelector:()=>this.toggleYearSelector(),renderBelowHeader:t=>this.renderBelowHeader(t),renderPanelBody:t=>this.renderPanelBody(t)})})}renderBelowHeader(e){if(e!==0)return d.nothing;const t=!this.disabled&&!!this._workingDateStart,i=!this.disabled&&!!this._workingTimeIn,a=this.startListBounds,r=this.endListBounds,s={"gui-range-date-time-calendar__time-row":!0,"is-list-open":this._openList!==null};return d.html`
934
+ <div class=${S.classMap(s)}>
935
935
  <div
936
- class=${_.classMap({"gui-range-date-time-calendar__time-column":!0,"is-open":this._openList==="start"})}
936
+ class=${S.classMap({"gui-range-date-time-calendar__time-column":!0,"is-open":this._openList==="start"})}
937
937
  >
938
938
  <gui-time-picker
939
939
  class="gui-time-picker gui-field gui-range-date-time-calendar__start"
@@ -960,7 +960,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
960
960
  </div>
961
961
 
962
962
  <div
963
- class=${_.classMap({"gui-range-date-time-calendar__time-column":!0,"is-open":this._openList==="end"})}
963
+ class=${S.classMap({"gui-range-date-time-calendar__time-column":!0,"is-open":this._openList==="end"})}
964
964
  >
965
965
  <gui-time-picker
966
966
  class="gui-time-picker gui-field gui-range-date-time-calendar__end"
@@ -986,16 +986,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
986
986
  ></gui-time-picker>
987
987
  </div>
988
988
  </div>
989
- `}renderPanelBody(e){return this._openList&&!this._yearSelectorOpen&&e===0?l.html``:Ji({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}toggleYearSelector(){this.startPicker?.closeList(),this.endPicker?.closeList(),this._nav.toggleYearSelector()}isDisabled(e){const t=ae(e);return Ui(t,this.minDate,this.maxDate)?!0:_u(t,this.disabledRanges)}activationDay(e){const t=re(e);return{date:t,isCurrentMonth:!0,isDisabled:this.isDisabled(t),isFocusable:!0,dayLabel:"",isToday:!1,isRangeStart:!1,isRangeEnd:!1,isInRange:!1,isOneDayRange:!1,isAnchor:!1,isSelecting:!1,isInvalidStart:!1,isInvalidEnd:!1,isInvalidInRange:!1}}renderDay(e){const t=e.isInvalidStart&&e.isInvalidEnd,i={"gui-calendar__day-button":!0,today:e.isToday,"other-month":!e.isCurrentMonth,"range-start":e.isRangeStart&&!e.isOneDayRange,"range-end":e.isRangeEnd&&!e.isOneDayRange,selected:e.isOneDayRange,"in-range":e.isInRange,"invalid-range-start":e.isInvalidStart&&!t,"invalid-range-end":e.isInvalidEnd&&!t,"invalid-range-single":t,"invalid-in-range":e.isInvalidInRange,"is-anchor":e.isAnchor,"is-selecting":e.isSelecting,disabled:e.isDisabled};return l.html`
989
+ `}renderPanelBody(e){return this._openList&&!this._yearSelectorOpen&&e===0?d.html``:ea({offset:e,yearSelectorOpen:this._nav.yearSelectorOpen,years:this._nav.yearList,currentYear:this._nav.currentDate.getFullYear(),onSelectYear:t=>this._keyboard.selectYear(t),onYearKeydown:this._keyboard.handleYearKeydown,localeId:this.localeId,currentDate:this._nav.currentDate,yearGridAriaLabel:this.yearGridAriaLabel,getDays:t=>this.getDaysInMonth(t),renderDay:t=>this.renderDay(t)})}toggleYearSelector(){this.startPicker?.closeList(),this.endPicker?.closeList(),this._nav.toggleYearSelector()}isDisabled(e){const t=ae(e);return Wi(t,this.minDate,this.maxDate)?!0:_m(t,this.disabledRanges)}activationDay(e){const t=re(e);return{date:t,isCurrentMonth:!0,isDisabled:this.isDisabled(t),isFocusable:!0,dayLabel:"",isToday:!1,isRangeStart:!1,isRangeEnd:!1,isInRange:!1,isOneDayRange:!1,isAnchor:!1,isSelecting:!1,isInvalidStart:!1,isInvalidEnd:!1,isInvalidInRange:!1}}renderDay(e){const t=e.isInvalidStart&&e.isInvalidEnd,i={"gui-calendar__day-button":!0,today:e.isToday,"other-month":!e.isCurrentMonth,"range-start":e.isRangeStart&&!e.isOneDayRange,"range-end":e.isRangeEnd&&!e.isOneDayRange,selected:e.isOneDayRange,"in-range":e.isInRange,"invalid-range-start":e.isInvalidStart&&!t,"invalid-range-end":e.isInvalidEnd&&!t,"invalid-range-single":t,"invalid-in-range":e.isInvalidInRange,"is-anchor":e.isAnchor,"is-selecting":e.isSelecting,disabled:e.isDisabled};return d.html`
990
990
  <button
991
991
  type="button"
992
992
  role="gridcell"
993
- class=${_.classMap(i)}
993
+ class=${S.classMap(i)}
994
994
  tabindex=${e.isFocusable?0:-1}
995
995
  ?disabled=${!e.isCurrentMonth}
996
- aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":l.nothing}
997
- aria-label=${Zi(this.localeId,e.date)}
998
- aria-current=${e.isToday?"date":l.nothing}
996
+ aria-disabled=${e.isCurrentMonth&&e.isDisabled?"true":d.nothing}
997
+ aria-label=${Ki(this.localeId,e.date)}
998
+ aria-current=${e.isToday?"date":d.nothing}
999
999
  data-date=${ae(e.date)}
1000
1000
  @click=${a=>this.selectDate(e,a)}
1001
1001
  @mouseover=${()=>this.onMouseOver(e)}
@@ -1005,13 +1005,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1005
1005
  >
1006
1006
  ${this.renderDayContent(e)}
1007
1007
  </button>
1008
- `}getDaysInMonth(e){const t=(this.value??[]).map(a=>({start:this.endpointDay(a.start),end:a.end?this.endpointDay(a.end):void 0})),i=ln(this._selection);return Qi({currentDate:this._currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:a=>this.isDisabled(a),toDay:a=>{const r=Xi(a.date,{ranges:t,workingRange:this.workingRange,anchor:this._selection.anchor,selectingSpan:i,invalidRange:this._invalidRange});return{date:a.date,dayLabel:a.dayLabel,isCurrentMonth:a.isCurrentMonth,isToday:a.isToday,isRangeStart:r.isRangeStart,isRangeEnd:r.isRangeEnd,isInRange:r.isInRange,isInvalidStart:r.isInvalidStart&&a.isCurrentMonth,isInvalidEnd:r.isInvalidEnd&&a.isCurrentMonth,isInvalidInRange:r.isInvalidInRange&&a.isCurrentMonth,isDisabled:a.isDisabled,isOneDayRange:r.isOneDayRange,isAnchor:r.isAnchor,isFocusable:a.isToday||r.isRangeStart,isSelecting:r.isSelecting&&a.isCurrentMonth}},focusFallbackDates:[new Date,...(this.value??[]).map(a=>this.endpointDay(a.start))]})}selectDate(e,t=null){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const{state:i,commit:a}=oa(this._selection,{type:"pick",date:e.date});if(this._selection=i,!a){this.resetWorking(),this._invalidRange=null;return}if(this.spanCoversBlockedDay(a.start,a.end)){this._invalidRange={start:a.start,end:a.end},this.emitInputError(this.disabledRangeMessage??kt),this.requestUpdate();return}this._invalidRange=null,this._workingDateStart=ae(a.start),this._workingDateEnd=ae(a.end),this._workingTimeIn=void 0,this._workingTimeOut=void 0}spanCoversBlockedDay(e,t){const i=new Date(e);i.setHours(0,0,0,0);const a=new Date(t);for(a.setHours(0,0,0,0);i<=a;){if(this.isDisabled(i))return!0;i.setDate(i.getDate()+1)}return!1}onMouseOver(e){e.isDisabled||(this._selection=oa(this._selection,{type:"hover",date:e.date}).state)}onStartTimeChange(e){if(e.stopPropagation(),e.detail.commit!==!0)return;const t=e.detail.value;if(!t||!this._workingDateStart){this._workingTimeIn=void 0,this._workingTimeOut=void 0;return}const i=this.timeError(t,this._workingDateStart,this.resolvedStartTimeRanges);if(i){this._workingTimeIn=void 0,this._workingTimeOut=void 0,this.emitInputError(i);return}this._workingTimeIn=t,this._workingTimeOut=void 0}onEndTimeChange(e){if(e.stopPropagation(),e.detail.commit!==!0)return;const t=e.detail.value;if(!t){this._workingTimeOut=void 0;return}if(!this._workingTimeIn||!this._workingDateStart||!this._workingDateEnd)return;const i=this.timeError(t,this._workingDateEnd,this.resolvedEndTimeRanges);if(i){this._workingTimeOut=t,this.emitInputError(i);return}const a=Ys(`${this._workingDateStart}T${this._workingTimeIn}`,`${this._workingDateEnd}T${t}`);if(Ws(a,this.disabledRanges)){this._workingTimeOut=t,this.emitInputError(this.disabledRangeMessage??kt);return}this._skipValueNavigation=!0,this.value=Hs([...this.value??[],a]),this.resetWorking(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}timeError(e,t,i){const a=Js(`${t}T${e}`,this.minDateTime,this.maxDateTime,{minDateTimeMessage:this.minDateTimeMessage,maxDateTimeMessage:this.maxDateTimeMessage});return a||(ta(e,i)?this.disabledRangeMessage??kt:null)}resetWorking(){this._workingDateStart=void 0,this._workingDateEnd=void 0,this._workingTimeIn=void 0,this._workingTimeOut=void 0,this._openList=null,this.resetPicker(this.startPicker),this.resetPicker(this.endPicker)}resetPicker(e){e&&(e.value=void 0,e.closeList())}emitInputError(e){this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0,composed:!0}))}get startPicker(){return this.querySelector("gui-time-picker.gui-range-date-time-calendar__start")}get endPicker(){return this.querySelector("gui-time-picker.gui-range-date-time-calendar__end")}pickerFor(e){return e==="start"?this.startPicker:this.endPicker}onListToggle(e,t){e.stopPropagation();const{open:i}=e.detail;if(i&&this.readOnly){this.pickerFor(t)?.closeList();return}i?(this.pickerFor(t==="start"?"end":"start")?.closeList(),this._openList=t,this._yearSelectorOpen=!1):this._openList===t&&(this._openList=null)}get resolvedStartTimeRanges(){return this._workingDateStart?Ia(this.disabledRanges,this._workingDateStart):[]}get resolvedEndTimeRanges(){return this._workingDateEnd?Ia(this.disabledRanges,this._workingDateEnd):[]}dayClampedBounds(e){const t={};return this.minDateTime&&e===this.minDateTime.split("T")[0]&&(t.minTime=this.minDateTime.split("T")[1]),this.maxDateTime&&e===this.maxDateTime.split("T")[0]&&(t.maxTime=this.maxDateTime.split("T")[1]),t}get startListBounds(){return this._workingDateStart?this.dayClampedBounds(this._workingDateStart):{}}get endListBounds(){if(!this._workingDateEnd)return{};const e=this.dayClampedBounds(this._workingDateEnd);if(this._workingDateEnd!==this._workingDateStart||!this._workingTimeIn)return e;const t=Gs(this._workingTimeIn,this.minuteStep);return t?{minTime:t,maxTime:e.maxTime}:{minTime:"23:59:59",maxTime:"00:00:00"}}renderDayContent(e){const t=this.renderRangeCountBadge(e),i=this.renderDisabledSlotsBadge(e);return t===l.nothing&&i===l.nothing?l.html`${e.dayLabel}`:l.html`${e.dayLabel}<span class="gui-range-date-time-calendar__badges"
1008
+ `}getDaysInMonth(e){const t=(this.value??[]).map(a=>({start:this.endpointDay(a.start),end:a.end?this.endpointDay(a.end):void 0})),i=Qn(this._selection);return ia({currentDate:this._currentDate,offset:e,localeId:this.localeId,numberOfMonths:this.numberOfMonths??1,isDisabled:a=>this.isDisabled(a),toDay:a=>{const r=ta(a.date,{ranges:t,workingRange:this.workingRange,anchor:this._selection.anchor,selectingSpan:i,invalidRange:this._invalidRange});return{date:a.date,dayLabel:a.dayLabel,isCurrentMonth:a.isCurrentMonth,isToday:a.isToday,isRangeStart:r.isRangeStart,isRangeEnd:r.isRangeEnd,isInRange:r.isInRange,isInvalidStart:r.isInvalidStart&&a.isCurrentMonth,isInvalidEnd:r.isInvalidEnd&&a.isCurrentMonth,isInvalidInRange:r.isInvalidInRange&&a.isCurrentMonth,isDisabled:a.isDisabled,isOneDayRange:r.isOneDayRange,isAnchor:r.isAnchor,isFocusable:a.isToday||r.isRangeStart,isSelecting:r.isSelecting&&a.isCurrentMonth}},focusFallbackDates:[new Date,...(this.value??[]).map(a=>this.endpointDay(a.start))]})}selectDate(e,t=null){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const{state:i,commit:a}=pa(this._selection,{type:"pick",date:e.date});if(this._selection=i,!a){this.resetWorking(),this._invalidRange=null;return}if(this.spanCoversBlockedDay(a.start,a.end)){this._invalidRange={start:a.start,end:a.end},this.emitInputError(this.disabledRangeMessage??St),this.requestUpdate();return}this._invalidRange=null,this._workingDateStart=ae(a.start),this._workingDateEnd=ae(a.end),this._workingTimeIn=void 0,this._workingTimeOut=void 0}spanCoversBlockedDay(e,t){const i=new Date(e);i.setHours(0,0,0,0);const a=new Date(t);for(a.setHours(0,0,0,0);i<=a;){if(this.isDisabled(i))return!0;i.setDate(i.getDate()+1)}return!1}onMouseOver(e){e.isDisabled||(this._selection=pa(this._selection,{type:"hover",date:e.date}).state)}onStartTimeChange(e){if(e.stopPropagation(),e.detail.commit!==!0)return;const t=e.detail.value;if(!t||!this._workingDateStart){this._workingTimeIn=void 0,this._workingTimeOut=void 0;return}const i=this.timeError(t,this._workingDateStart,this.resolvedStartTimeRanges);if(i){this._workingTimeIn=void 0,this._workingTimeOut=void 0,this.emitInputError(i);return}this._workingTimeIn=t,this._workingTimeOut=void 0}onEndTimeChange(e){if(e.stopPropagation(),e.detail.commit!==!0)return;const t=e.detail.value;if(!t){this._workingTimeOut=void 0;return}if(!this._workingTimeIn||!this._workingDateStart||!this._workingDateEnd)return;const i=this.timeError(t,this._workingDateEnd,this.resolvedEndTimeRanges);if(i){this._workingTimeOut=t,this.emitInputError(i);return}const a=Fn(`${this._workingDateStart}T${this._workingTimeIn}`,`${this._workingDateEnd}T${t}`);if(Nn(a,this.disabledRanges)){this._workingTimeOut=t,this.emitInputError(this.disabledRangeMessage??St);return}this._skipValueNavigation=!0,this.value=Bn([...this.value??[],a]),this.resetWorking(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}timeError(e,t,i){const a=zn(`${t}T${e}`,this.minDateTime,this.maxDateTime,{minDateTimeMessage:this.minDateTimeMessage,maxDateTimeMessage:this.maxDateTimeMessage});return a||(sa(e,i)?this.disabledRangeMessage??St:null)}resetWorking(){this._workingDateStart=void 0,this._workingDateEnd=void 0,this._workingTimeIn=void 0,this._workingTimeOut=void 0,this._openList=null,this.resetPicker(this.startPicker),this.resetPicker(this.endPicker)}resetPicker(e){e&&(e.value=void 0,e.closeList())}emitInputError(e){this.dispatchEvent(new CustomEvent("inputError",{detail:{message:e},bubbles:!0,composed:!0}))}get startPicker(){return this.querySelector("gui-time-picker.gui-range-date-time-calendar__start")}get endPicker(){return this.querySelector("gui-time-picker.gui-range-date-time-calendar__end")}pickerFor(e){return e==="start"?this.startPicker:this.endPicker}onListToggle(e,t){e.stopPropagation();const{open:i}=e.detail;if(i&&this.readOnly){this.pickerFor(t)?.closeList();return}i?(this.pickerFor(t==="start"?"end":"start")?.closeList(),this._openList=t,this._yearSelectorOpen=!1):this._openList===t&&(this._openList=null)}get resolvedStartTimeRanges(){return this._workingDateStart?Sr(this.disabledRanges,this._workingDateStart):[]}get resolvedEndTimeRanges(){return this._workingDateEnd?Sr(this.disabledRanges,this._workingDateEnd):[]}dayClampedBounds(e){const t={};return this.minDateTime&&e===this.minDateTime.split("T")[0]&&(t.minTime=this.minDateTime.split("T")[1]),this.maxDateTime&&e===this.maxDateTime.split("T")[0]&&(t.maxTime=this.maxDateTime.split("T")[1]),t}get startListBounds(){return this._workingDateStart?this.dayClampedBounds(this._workingDateStart):{}}get endListBounds(){if(!this._workingDateEnd)return{};const e=this.dayClampedBounds(this._workingDateEnd);if(this._workingDateEnd!==this._workingDateStart||!this._workingTimeIn)return e;const t=Pn(this._workingTimeIn,this.minuteStep);return t?{minTime:t,maxTime:e.maxTime}:{minTime:"23:59:59",maxTime:"00:00:00"}}renderDayContent(e){const t=this.renderRangeCountBadge(e),i=this.renderDisabledSlotsBadge(e);return t===d.nothing&&i===d.nothing?d.html`${e.dayLabel}`:d.html`${e.dayLabel}<span class="gui-range-date-time-calendar__badges"
1009
1009
  >${t}${i}</span
1010
- >`}renderBadge(e,t,i,a){return l.html`<span class="gui-range-date-time-calendar__${e}" aria-label=${i}
1010
+ >`}renderBadge(e,t,i,a){return d.html`<span class="gui-range-date-time-calendar__${e}" aria-label=${i}
1011
1011
  >${t}</span
1012
1012
  ><span class="gui-range-date-time-calendar__badge-tooltip" aria-hidden="true"
1013
- >${a.map(r=>l.html`<span>${r}</span>`)}</span
1014
- >`}renderRangeCountBadge(e){if(!e.isCurrentMonth)return l.nothing;const t=this.rangesOnDay(e.date);if(t.length<=1)return l.nothing;const i=t.map(r=>this.formatPillLabel(r)),a=`${(this.dayCountAriaLabel??"{count} ranges").replace("{count}",String(t.length))}: ${i.join(", ")}`;return this.renderBadge("day-count",t.length,a,i)}renderDisabledSlotsBadge(e){if(!e.isCurrentMonth||e.isDisabled)return l.nothing;const t=Ia(this.disabledRanges,ae(e.date));if(!t.length)return l.nothing;const i=ji(this.localeId,this.hourFormat),a=t.map(s=>`${ia(s.start,this.localeId,i)} – ${ia(s.end,this.localeId,i)}`),r=`${(this.disabledDayCountAriaLabel??"{count} disabled ranges").replace("{count}",String(t.length))}: ${a.join(", ")}`;return this.renderBadge("disabled-count",t.length,r,a)}rangesOnDay(e){if(!this.value?.length)return[];const t=ae(e);return this.value.filter(i=>{const a=i.start.split("T")[0],r=(i.end??i.start).split("T")[0];return t>=a&&t<=r})}renderAboveCalendar(){if(this.hidePills)return l.nothing;const e=this.getSortedPills();if(e.length===0)return l.nothing;const t=Ht(e,i=>this.formatPillLabel(i));return l.html`
1013
+ >${a.map(r=>d.html`<span>${r}</span>`)}</span
1014
+ >`}renderRangeCountBadge(e){if(!e.isCurrentMonth)return d.nothing;const t=this.rangesOnDay(e.date);if(t.length<=1)return d.nothing;const i=t.map(r=>this.formatPillLabel(r)),a=`${(this.dayCountAriaLabel??"{count} ranges").replace("{count}",String(t.length))}: ${i.join(", ")}`;return this.renderBadge("day-count",t.length,a,i)}renderDisabledSlotsBadge(e){if(!e.isCurrentMonth||e.isDisabled)return d.nothing;const t=Sr(this.disabledRanges,ae(e.date));if(!t.length)return d.nothing;const i=aa(this.localeId,this.hourFormat),a=t.map(s=>`${na(s.start,this.localeId,i)} – ${na(s.end,this.localeId,i)}`),r=`${(this.disabledDayCountAriaLabel??"{count} disabled ranges").replace("{count}",String(t.length))}: ${a.join(", ")}`;return this.renderBadge("disabled-count",t.length,r,a)}rangesOnDay(e){if(!this.value?.length)return[];const t=ae(e);return this.value.filter(i=>{const a=i.start.split("T")[0],r=(i.end??i.start).split("T")[0];return t>=a&&t<=r})}renderAboveCalendar(){if(this.hidePills)return d.nothing;const e=this.getSortedPills();if(e.length===0)return d.nothing;const t=Xt(e,i=>this.formatPillLabel(i));return d.html`
1015
1015
  <gui-pills
1016
1016
  class="gui-range-calendar__pills"
1017
1017
  .uid=${this.uid}
@@ -1026,7 +1026,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1026
1026
  @pillremove=${this.onPillRemoveEvent}
1027
1027
  @pillclick=${this.onPillClickEvent}
1028
1028
  ></gui-pills>
1029
- `}getSortedPills(){return Zt(this.value,(e,t)=>this.parseEndpoint(e).getTime()-this.parseEndpoint(t).getTime())}navigateToDate(e){this._nav.navigateToDate(this.endpointDay(e))}};$([n.property({type:String})],D.prototype,"uid",2),$([n.property({type:String})],D.prototype,"label",2),$([n.property({type:String})],D.prototype,"hint",2),$([n.property({type:String,attribute:"locale-id"})],D.prototype,"localeId",2),$([n.property({type:Array})],D.prototype,"errors",2),$([n.property({type:Boolean})],D.prototype,"touched",2),$([n.property({type:Boolean})],D.prototype,"required",2),$([n.property({type:Boolean})],D.prototype,"disabled",2),$([n.property({type:Boolean,attribute:"readonly"})],D.prototype,"readOnly",2),$([n.property({type:String,attribute:"prev-month-icon"})],D.prototype,"prevMonthIcon",2),$([n.property({type:String,attribute:"next-month-icon"})],D.prototype,"nextMonthIcon",2),$([n.property({type:String,attribute:"prev-month-aria-label"})],D.prototype,"prevMonthAriaLabel",2),$([n.property({type:String,attribute:"next-month-aria-label"})],D.prototype,"nextMonthAriaLabel",2),$([n.property({type:String,attribute:"select-year-aria-label"})],D.prototype,"selectYearAriaLabel",2),$([n.property({type:String,attribute:"year-grid-aria-label"})],D.prototype,"yearGridAriaLabel",2),$([n.property({type:String})],D.prototype,"dayFormat",2),$([n.property({type:String})],D.prototype,"weekdayFormat",2),$([n.property({type:String})],D.prototype,"monthFormat",2),$([n.property({type:String})],D.prototype,"minDate",2),$([n.property({type:String})],D.prototype,"maxDate",2),$([n.property({type:Array,attribute:"disabled-ranges"})],D.prototype,"disabledRanges",2),$([n.property({type:Number})],D.prototype,"numberOfMonths",2),$([n.property({type:Array})],D.prototype,"value",2),$([n.property({type:String})],D.prototype,"focusDate",2),$([n.property({type:Boolean})],D.prototype,"hidePills",2),$([n.property({type:String})],D.prototype,"removePillAriaLabel",2),$([n.property({type:String,attribute:"disabled-date-range-message"})],D.prototype,"disabledDateRangeMessage",2),$([n.property({attribute:!1})],D.prototype,"invalidRange",2),$([n.property({type:String,attribute:"hour-format"})],D.prototype,"hourFormat",2),$([n.property({type:Number,attribute:"minute-step"})],D.prototype,"minuteStep",2),$([n.property({type:Boolean,attribute:"allow-custom-time"})],D.prototype,"allowCustomTime",2),$([n.property({type:String,attribute:"start-time-label"})],D.prototype,"startTimeLabel",2),$([n.property({type:String,attribute:"end-time-label"})],D.prototype,"endTimeLabel",2),$([n.property({type:String,attribute:"min-date-time"})],D.prototype,"minDateTime",2),$([n.property({type:String,attribute:"max-date-time"})],D.prototype,"maxDateTime",2),$([n.property({type:String,attribute:"min-date-time-message"})],D.prototype,"minDateTimeMessage",2),$([n.property({type:String,attribute:"max-date-time-message"})],D.prototype,"maxDateTimeMessage",2),$([n.property({type:String,attribute:"disabled-range-message"})],D.prototype,"disabledRangeMessage",2),$([n.property({type:String,attribute:"no-available-times-message"})],D.prototype,"noAvailableTimesMessage",2),$([n.property({type:String,attribute:"day-count-aria-label"})],D.prototype,"dayCountAriaLabel",2),$([n.property({type:String,attribute:"disabled-day-count-aria-label"})],D.prototype,"disabledDayCountAriaLabel",2),$([n.state()],D.prototype,"_selection",2),$([n.state()],D.prototype,"_invalidRange",2),$([n.state()],D.prototype,"_workingDateStart",2),$([n.state()],D.prototype,"_workingDateEnd",2),$([n.state()],D.prototype,"_workingTimeIn",2),$([n.state()],D.prototype,"_workingTimeOut",2),$([n.state()],D.prototype,"_openList",2),D=$([n.customElement("gui-range-date-time-calendar")],D),typeof customElements<"u"&&!customElements.get("gui-range-date-time-calendar")&&customElements.define("gui-range-date-time-calendar",D);var vh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Ua=(e,t,i,a)=>{for(var r=a>1?void 0:a?Dh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&vh(t,i,r),r};let Qt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-time-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
1029
+ `}getSortedPills(){return Kt(this.value,(e,t)=>this.parseEndpoint(e).getTime()-this.parseEndpoint(t).getTime())}navigateToDate(e){this._nav.navigateToDate(this.endpointDay(e))}};$([n.property({type:String})],D.prototype,"uid",2),$([n.property({type:String})],D.prototype,"label",2),$([n.property({type:String})],D.prototype,"hint",2),$([n.property({type:String,attribute:"locale-id"})],D.prototype,"localeId",2),$([n.property({type:Array})],D.prototype,"errors",2),$([n.property({type:Boolean})],D.prototype,"touched",2),$([n.property({type:Boolean})],D.prototype,"required",2),$([n.property({type:Boolean})],D.prototype,"disabled",2),$([n.property({type:Boolean,attribute:"readonly"})],D.prototype,"readOnly",2),$([n.property({type:String,attribute:"prev-month-icon"})],D.prototype,"prevMonthIcon",2),$([n.property({type:String,attribute:"next-month-icon"})],D.prototype,"nextMonthIcon",2),$([n.property({type:String,attribute:"prev-month-aria-label"})],D.prototype,"prevMonthAriaLabel",2),$([n.property({type:String,attribute:"next-month-aria-label"})],D.prototype,"nextMonthAriaLabel",2),$([n.property({type:String,attribute:"select-year-aria-label"})],D.prototype,"selectYearAriaLabel",2),$([n.property({type:String,attribute:"year-grid-aria-label"})],D.prototype,"yearGridAriaLabel",2),$([n.property({type:String})],D.prototype,"dayFormat",2),$([n.property({type:String})],D.prototype,"weekdayFormat",2),$([n.property({type:String})],D.prototype,"monthFormat",2),$([n.property({type:String})],D.prototype,"minDate",2),$([n.property({type:String})],D.prototype,"maxDate",2),$([n.property({type:Array,attribute:"disabled-ranges"})],D.prototype,"disabledRanges",2),$([n.property({type:Number})],D.prototype,"numberOfMonths",2),$([n.property({type:Array})],D.prototype,"value",2),$([n.property({type:String})],D.prototype,"focusDate",2),$([n.property({type:Boolean})],D.prototype,"hidePills",2),$([n.property({type:String})],D.prototype,"removePillAriaLabel",2),$([n.property({type:String,attribute:"disabled-date-range-message"})],D.prototype,"disabledDateRangeMessage",2),$([n.property({attribute:!1})],D.prototype,"invalidRange",2),$([n.property({type:String,attribute:"hour-format"})],D.prototype,"hourFormat",2),$([n.property({type:Number,attribute:"minute-step"})],D.prototype,"minuteStep",2),$([n.property({type:Boolean,attribute:"allow-custom-time"})],D.prototype,"allowCustomTime",2),$([n.property({type:String,attribute:"start-time-label"})],D.prototype,"startTimeLabel",2),$([n.property({type:String,attribute:"end-time-label"})],D.prototype,"endTimeLabel",2),$([n.property({type:String,attribute:"min-date-time"})],D.prototype,"minDateTime",2),$([n.property({type:String,attribute:"max-date-time"})],D.prototype,"maxDateTime",2),$([n.property({type:String,attribute:"min-date-time-message"})],D.prototype,"minDateTimeMessage",2),$([n.property({type:String,attribute:"max-date-time-message"})],D.prototype,"maxDateTimeMessage",2),$([n.property({type:String,attribute:"disabled-range-message"})],D.prototype,"disabledRangeMessage",2),$([n.property({type:String,attribute:"no-available-times-message"})],D.prototype,"noAvailableTimesMessage",2),$([n.property({type:String,attribute:"day-count-aria-label"})],D.prototype,"dayCountAriaLabel",2),$([n.property({type:String,attribute:"disabled-day-count-aria-label"})],D.prototype,"disabledDayCountAriaLabel",2),$([n.state()],D.prototype,"_selection",2),$([n.state()],D.prototype,"_invalidRange",2),$([n.state()],D.prototype,"_workingDateStart",2),$([n.state()],D.prototype,"_workingDateEnd",2),$([n.state()],D.prototype,"_workingTimeIn",2),$([n.state()],D.prototype,"_workingTimeOut",2),$([n.state()],D.prototype,"_openList",2),D=$([n.customElement("gui-range-date-time-calendar")],D),typeof customElements<"u"&&!customElements.get("gui-range-date-time-calendar")&&customElements.define("gui-range-date-time-calendar",D);var Dy=Object.defineProperty,wy=Object.getOwnPropertyDescriptor,Mr=(e,t,i,a)=>{for(var r=a>1?void 0:a?wy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Dy(t,i,r),r};let ii=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-time-calendar","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
1030
1030
  <gui-range-date-time-calendar
1031
1031
  .uid=${this.widget.uid}
1032
1032
  .label=${e.label}
@@ -1067,7 +1067,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1067
1067
  @inputError=${this.onInputError}
1068
1068
  @blur=${()=>this.adapter.onBlur()}
1069
1069
  ></gui-range-date-time-calendar>
1070
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ua([f.consume({context:c.formContext}),n.property({attribute:!1})],Qt.prototype,"formContext",2),Ua([f.provide({context:c.inputContext})],Qt.prototype,"adapter",2),Qt=Ua([n.customElement("gui-range-date-time-calendar-input")],Qt);const wh=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateTimeCalendarElement(){return Qt}},Symbol.toStringTag,{value:"Module"}));var $h=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,w=(e,t,i,a)=>{for(var r=a>1?void 0:a?kh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&$h(t,i,r),r};let v=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=[],this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.separator=void 0,this.removePillAriaLabel=void 0,this.startDateTimeAriaLabel=void 0,this.endDateTimeAriaLabel=void 0,this.invalidDateMessage=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.numberOfMonths=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.allowCustomTime=!1,this.startTimeLabel=void 0,this.endTimeLabel=void 0,this.minDateTime=void 0,this.maxDateTime=void 0,this.minDateTimeMessage=void 0,this.maxDateTimeMessage=void 0,this.disabledRanges=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this.dayCountAriaLabel=void 0,this.disabledDayCountAriaLabel=void 0,this._focusDate=void 0,this._popup=new Ot(this,{focusRestoreSelector:"gui-range-date-time input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-calendar__day-button")||e.closest(".gui-time-list__option")||e.closest("gui-time-picker")?"ignore":e.closest(".gui-range-date-time-input__field")||e.closest("gui-range-date-time-calendar")?"open":"toggle",keyToggleMode:"openClose",beforeOpen:e=>{this.querySelector(".gui-pills__dropdown")&&e.suppressNextFocusOut(),this.closePillsDropdown()},onOpenChanged:e=>{e||(this._focusDate=void 0)}}),this.onDropdownToggle=e=>{e.detail?.open&&this._popup.open&&this._popup.close()},this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("dropdowntoggle",this.onDropdownToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dropdowntoggle",this.onDropdownToggle)}render(){const e=Xe("datePicker",{icon:this.icon}),t=this._popup.open?l.html`<gui-range-date-time-calendar
1070
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Mr([f.consume({context:m.formContext}),n.property({attribute:!1})],ii.prototype,"formContext",2),Mr([f.provide({context:m.inputContext})],ii.prototype,"adapter",2),ii=Mr([n.customElement("gui-range-date-time-calendar-input")],ii);const $y=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateTimeCalendarElement(){return ii}},Symbol.toStringTag,{value:"Module"}));var ky=Object.defineProperty,Ty=Object.getOwnPropertyDescriptor,w=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ty(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ky(t,i,r),r};let v=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=[],this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.separator=void 0,this.removePillAriaLabel=void 0,this.startDateTimeAriaLabel=void 0,this.endDateTimeAriaLabel=void 0,this.invalidDateMessage=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.numberOfMonths=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.allowCustomTime=!1,this.startTimeLabel=void 0,this.endTimeLabel=void 0,this.minDateTime=void 0,this.maxDateTime=void 0,this.minDateTimeMessage=void 0,this.maxDateTimeMessage=void 0,this.disabledRanges=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this.dayCountAriaLabel=void 0,this.disabledDayCountAriaLabel=void 0,this._focusDate=void 0,this._popup=new Rt(this,{focusRestoreSelector:"gui-range-date-time input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-calendar__day-button")||e.closest(".gui-time-list__option")||e.closest("gui-time-picker")?"ignore":e.closest(".gui-range-date-time-input__field")||e.closest("gui-range-date-time-calendar")?"open":"toggle",keyToggleMode:"openClose",beforeOpen:e=>{this.querySelector(".gui-pills__dropdown")&&e.suppressNextFocusOut(),this.closePillsDropdown()},onOpenChanged:e=>{e||(this._focusDate=void 0)}}),this.onDropdownToggle=e=>{e.detail?.open&&this._popup.open&&this._popup.close()},this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("dropdowntoggle",this.onDropdownToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dropdowntoggle",this.onDropdownToggle)}render(){const e=Qe("datePicker",{icon:this.icon}),t=this._popup.open?d.html`<gui-range-date-time-calendar
1071
1071
  id=${`${this.uid}_popup`}
1072
1072
  role="dialog"
1073
1073
  aria-label=${this.label??"Calendar"}
@@ -1108,7 +1108,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1108
1108
  @blur=${this.onCalendarBlur}
1109
1109
  @change=${this.onCalendarChange}
1110
1110
  @inputError=${this.onCalendarInputError}
1111
- ></gui-range-date-time-calendar>`:l.nothing;return l.html`
1111
+ ></gui-range-date-time-calendar>`:d.nothing;return d.html`
1112
1112
  ${le(this.uid??"",{label:this.label,hint:this.hint,required:this.required},!1,void 0,!1)}
1113
1113
 
1114
1114
  <div
@@ -1118,7 +1118,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1118
1118
  >
1119
1119
  <gui-range-date-time
1120
1120
  id="date-input"
1121
- class=${_.classMap(e.widgetClasses)}
1121
+ class=${S.classMap(e.widgetClasses)}
1122
1122
  .uid=${this.uid}
1123
1123
  .hint=${this.hint}
1124
1124
  .showErrors=${!1}
@@ -1181,7 +1181,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1181
1181
  </div>
1182
1182
 
1183
1183
  ${this.showErrors?j(this.uid??"",{errors:this.errors,touched:this.touched}):""}
1184
- `}onDateChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){if(!this._popup.open){e.stopPropagation();return}e.stopPropagation(),this.commitValue(e.detail.value),this._popup.suppressNextFocusOut(),requestAnimationFrame(()=>{if(!this._popup.open)return;this.querySelector('gui-range-date-time-calendar .gui-calendar__day-button[tabindex="0"]')?.focus()})}onCalendarInputError(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("inputError",{detail:e.detail,bubbles:!0,composed:!0}))}commitValue(e){this.value=e??void 0,this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0}))}onCalendarBlur(){this._popup.closeOnFocusLeave()}onPillClick(e){this._focusDate=e.detail.range.start,this._popup.show()}closePillsDropdown(){this.querySelector("gui-pills")?.closeDropdown?.()}};w([n.property({type:String})],v.prototype,"uid",2),w([n.property({type:String})],v.prototype,"label",2),w([n.property({type:String})],v.prototype,"hint",2),w([n.property({type:String})],v.prototype,"icon",2),w([n.property({type:Array})],v.prototype,"errors",2),w([n.property({type:Boolean})],v.prototype,"showErrors",2),w([n.property({type:Boolean})],v.prototype,"touched",2),w([n.property({type:Boolean})],v.prototype,"required",2),w([n.property({type:Boolean})],v.prototype,"disabled",2),w([n.property({type:Boolean,attribute:"readonly"})],v.prototype,"readOnly",2),w([n.property({type:String,attribute:"locale-id"})],v.prototype,"localeId",2),w([n.property({type:Array})],v.prototype,"value",2),w([n.property({type:String,attribute:"toggle-aria-label"})],v.prototype,"toggleAriaLabel",2),w([n.property({type:String})],v.prototype,"dayAriaLabel",2),w([n.property({type:String})],v.prototype,"monthAriaLabel",2),w([n.property({type:String})],v.prototype,"yearAriaLabel",2),w([n.property({type:String})],v.prototype,"hourAriaLabel",2),w([n.property({type:String})],v.prototype,"minuteAriaLabel",2),w([n.property({type:String})],v.prototype,"dayPeriodAriaLabel",2),w([n.property({type:String})],v.prototype,"separator",2),w([n.property({type:String,attribute:"remove-pill-aria-label"})],v.prototype,"removePillAriaLabel",2),w([n.property({type:String,attribute:"start-date-time-aria-label"})],v.prototype,"startDateTimeAriaLabel",2),w([n.property({type:String,attribute:"end-date-time-aria-label"})],v.prototype,"endDateTimeAriaLabel",2),w([n.property({type:String,attribute:"invalid-date-message"})],v.prototype,"invalidDateMessage",2),w([n.property({type:String,attribute:"prev-month-icon"})],v.prototype,"prevMonthIcon",2),w([n.property({type:String,attribute:"next-month-icon"})],v.prototype,"nextMonthIcon",2),w([n.property({type:String,attribute:"prev-month-aria-label"})],v.prototype,"prevMonthAriaLabel",2),w([n.property({type:String,attribute:"next-month-aria-label"})],v.prototype,"nextMonthAriaLabel",2),w([n.property({type:String,attribute:"select-year-aria-label"})],v.prototype,"selectYearAriaLabel",2),w([n.property({type:String,attribute:"year-grid-aria-label"})],v.prototype,"yearGridAriaLabel",2),w([n.property({type:String,attribute:"day-format"})],v.prototype,"dayFormat",2),w([n.property({type:String,attribute:"weekday-format"})],v.prototype,"weekdayFormat",2),w([n.property({type:String,attribute:"month-format"})],v.prototype,"monthFormat",2),w([n.property({type:Number,attribute:"number-of-months"})],v.prototype,"numberOfMonths",2),w([n.property({type:String,attribute:"hour-format"})],v.prototype,"hourFormat",2),w([n.property({type:Number,attribute:"minute-step"})],v.prototype,"minuteStep",2),w([n.property({type:Boolean,attribute:"allow-custom-time"})],v.prototype,"allowCustomTime",2),w([n.property({type:String,attribute:"start-time-label"})],v.prototype,"startTimeLabel",2),w([n.property({type:String,attribute:"end-time-label"})],v.prototype,"endTimeLabel",2),w([n.property({type:String,attribute:"min-date-time"})],v.prototype,"minDateTime",2),w([n.property({type:String,attribute:"max-date-time"})],v.prototype,"maxDateTime",2),w([n.property({type:String,attribute:"min-date-time-message"})],v.prototype,"minDateTimeMessage",2),w([n.property({type:String,attribute:"max-date-time-message"})],v.prototype,"maxDateTimeMessage",2),w([n.property({type:Array,attribute:"disabled-ranges"})],v.prototype,"disabledRanges",2),w([n.property({type:String,attribute:"disabled-range-message"})],v.prototype,"disabledRangeMessage",2),w([n.property({type:String,attribute:"no-available-times-message"})],v.prototype,"noAvailableTimesMessage",2),w([n.property({type:String,attribute:"day-count-aria-label"})],v.prototype,"dayCountAriaLabel",2),w([n.property({type:String,attribute:"disabled-day-count-aria-label"})],v.prototype,"disabledDayCountAriaLabel",2),w([n.state()],v.prototype,"_focusDate",2),v=w([n.customElement("gui-range-date-time-picker")],v),typeof customElements<"u"&&!customElements.get("gui-range-date-time-picker")&&customElements.define("gui-range-date-time-picker",v);var Sh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,Za=(e,t,i,a)=>{for(var r=a>1?void 0:a?_h(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Sh(t,i,r),r};let jt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
1184
+ `}onDateChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){if(!this._popup.open){e.stopPropagation();return}e.stopPropagation(),this.commitValue(e.detail.value),this._popup.suppressNextFocusOut(),requestAnimationFrame(()=>{if(!this._popup.open)return;this.querySelector('gui-range-date-time-calendar .gui-calendar__day-button[tabindex="0"]')?.focus()})}onCalendarInputError(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("inputError",{detail:e.detail,bubbles:!0,composed:!0}))}commitValue(e){this.value=e??void 0,this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0}))}onCalendarBlur(){this._popup.closeOnFocusLeave()}onPillClick(e){this._focusDate=e.detail.range.start,this._popup.show()}closePillsDropdown(){this.querySelector("gui-pills")?.closeDropdown?.()}};w([n.property({type:String})],v.prototype,"uid",2),w([n.property({type:String})],v.prototype,"label",2),w([n.property({type:String})],v.prototype,"hint",2),w([n.property({type:String})],v.prototype,"icon",2),w([n.property({type:Array})],v.prototype,"errors",2),w([n.property({type:Boolean})],v.prototype,"showErrors",2),w([n.property({type:Boolean})],v.prototype,"touched",2),w([n.property({type:Boolean})],v.prototype,"required",2),w([n.property({type:Boolean})],v.prototype,"disabled",2),w([n.property({type:Boolean,attribute:"readonly"})],v.prototype,"readOnly",2),w([n.property({type:String,attribute:"locale-id"})],v.prototype,"localeId",2),w([n.property({type:Array})],v.prototype,"value",2),w([n.property({type:String,attribute:"toggle-aria-label"})],v.prototype,"toggleAriaLabel",2),w([n.property({type:String})],v.prototype,"dayAriaLabel",2),w([n.property({type:String})],v.prototype,"monthAriaLabel",2),w([n.property({type:String})],v.prototype,"yearAriaLabel",2),w([n.property({type:String})],v.prototype,"hourAriaLabel",2),w([n.property({type:String})],v.prototype,"minuteAriaLabel",2),w([n.property({type:String})],v.prototype,"dayPeriodAriaLabel",2),w([n.property({type:String})],v.prototype,"separator",2),w([n.property({type:String,attribute:"remove-pill-aria-label"})],v.prototype,"removePillAriaLabel",2),w([n.property({type:String,attribute:"start-date-time-aria-label"})],v.prototype,"startDateTimeAriaLabel",2),w([n.property({type:String,attribute:"end-date-time-aria-label"})],v.prototype,"endDateTimeAriaLabel",2),w([n.property({type:String,attribute:"invalid-date-message"})],v.prototype,"invalidDateMessage",2),w([n.property({type:String,attribute:"prev-month-icon"})],v.prototype,"prevMonthIcon",2),w([n.property({type:String,attribute:"next-month-icon"})],v.prototype,"nextMonthIcon",2),w([n.property({type:String,attribute:"prev-month-aria-label"})],v.prototype,"prevMonthAriaLabel",2),w([n.property({type:String,attribute:"next-month-aria-label"})],v.prototype,"nextMonthAriaLabel",2),w([n.property({type:String,attribute:"select-year-aria-label"})],v.prototype,"selectYearAriaLabel",2),w([n.property({type:String,attribute:"year-grid-aria-label"})],v.prototype,"yearGridAriaLabel",2),w([n.property({type:String,attribute:"day-format"})],v.prototype,"dayFormat",2),w([n.property({type:String,attribute:"weekday-format"})],v.prototype,"weekdayFormat",2),w([n.property({type:String,attribute:"month-format"})],v.prototype,"monthFormat",2),w([n.property({type:Number,attribute:"number-of-months"})],v.prototype,"numberOfMonths",2),w([n.property({type:String,attribute:"hour-format"})],v.prototype,"hourFormat",2),w([n.property({type:Number,attribute:"minute-step"})],v.prototype,"minuteStep",2),w([n.property({type:Boolean,attribute:"allow-custom-time"})],v.prototype,"allowCustomTime",2),w([n.property({type:String,attribute:"start-time-label"})],v.prototype,"startTimeLabel",2),w([n.property({type:String,attribute:"end-time-label"})],v.prototype,"endTimeLabel",2),w([n.property({type:String,attribute:"min-date-time"})],v.prototype,"minDateTime",2),w([n.property({type:String,attribute:"max-date-time"})],v.prototype,"maxDateTime",2),w([n.property({type:String,attribute:"min-date-time-message"})],v.prototype,"minDateTimeMessage",2),w([n.property({type:String,attribute:"max-date-time-message"})],v.prototype,"maxDateTimeMessage",2),w([n.property({type:Array,attribute:"disabled-ranges"})],v.prototype,"disabledRanges",2),w([n.property({type:String,attribute:"disabled-range-message"})],v.prototype,"disabledRangeMessage",2),w([n.property({type:String,attribute:"no-available-times-message"})],v.prototype,"noAvailableTimesMessage",2),w([n.property({type:String,attribute:"day-count-aria-label"})],v.prototype,"dayCountAriaLabel",2),w([n.property({type:String,attribute:"disabled-day-count-aria-label"})],v.prototype,"disabledDayCountAriaLabel",2),w([n.state()],v.prototype,"_focusDate",2),v=w([n.customElement("gui-range-date-time-picker")],v),typeof customElements<"u"&&!customElements.get("gui-range-date-time-picker")&&customElements.define("gui-range-date-time-picker",v);var Sy=Object.defineProperty,_y=Object.getOwnPropertyDescriptor,Or=(e,t,i,a)=>{for(var r=a>1?void 0:a?_y(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Sy(t,i,r),r};let ai=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
1185
1185
  <gui-range-date-time-picker
1186
1186
  .uid=${this.widget.uid}
1187
1187
  .label=${e.label}
@@ -1234,7 +1234,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1234
1234
  @inputError=${this.onInputError}
1235
1235
  @blur=${()=>this.adapter.onBlur()}
1236
1236
  ></gui-range-date-time-picker>
1237
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Za([f.consume({context:c.formContext}),n.property({attribute:!1})],jt.prototype,"formContext",2),Za([f.provide({context:c.inputContext})],jt.prototype,"adapter",2),jt=Za([n.customElement("gui-range-date-time-picker-input")],jt);const Th=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateTimePickerElement(){return jt}},Symbol.toStringTag,{value:"Module"}));var Ah=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,C=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ch(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ah(t,i,r),r};let T=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=[],this.separator=void 0,this.removePillAriaLabel=void 0,this.startDateAriaLabel=void 0,this.endDateAriaLabel=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=void 0,this.invalidDateMessage=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.disabledDateRangeMessage=void 0,this._focusDate=void 0,this._invalidRange=null,this._popup=new Ot(this,{focusRestoreSelector:"gui-range-date input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-range-date-input__part")||e.closest("gui-range-calendar")?"open":"toggle",keyToggleMode:"openClose",beforeOpen:e=>{this.querySelector(".gui-pills__dropdown")&&e.suppressNextFocusOut(),this.closePillsDropdown()}}),this.onDropdownToggle=e=>{e.detail?.open&&this._popup.open&&this._popup.close()},this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("dropdowntoggle",this.onDropdownToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dropdowntoggle",this.onDropdownToggle)}render(){const e=Xe("datePicker",{icon:this.icon}),t=this._popup.open?l.html`<gui-range-calendar
1237
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Or([f.consume({context:m.formContext}),n.property({attribute:!1})],ai.prototype,"formContext",2),Or([f.provide({context:m.inputContext})],ai.prototype,"adapter",2),ai=Or([n.customElement("gui-range-date-time-picker-input")],ai);const Ay=Object.freeze(Object.defineProperty({__proto__:null,get RangeDateTimePickerElement(){return ai}},Symbol.toStringTag,{value:"Module"}));var Ey=Object.defineProperty,Cy=Object.getOwnPropertyDescriptor,E=(e,t,i,a)=>{for(var r=a>1?void 0:a?Cy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ey(t,i,r),r};let A=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=[],this.separator=void 0,this.removePillAriaLabel=void 0,this.startDateAriaLabel=void 0,this.endDateAriaLabel=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=void 0,this.invalidDateMessage=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.disabledDateRangeMessage=void 0,this._focusDate=void 0,this._invalidRange=null,this._popup=new Rt(this,{focusRestoreSelector:"gui-range-date input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-range-date-input__part")||e.closest("gui-range-calendar")?"open":"toggle",keyToggleMode:"openClose",beforeOpen:e=>{this.querySelector(".gui-pills__dropdown")&&e.suppressNextFocusOut(),this.closePillsDropdown()}}),this.onDropdownToggle=e=>{e.detail?.open&&this._popup.open&&this._popup.close()},this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("dropdowntoggle",this.onDropdownToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dropdowntoggle",this.onDropdownToggle)}render(){const e=Qe("datePicker",{icon:this.icon}),t=this._popup.open?d.html`<gui-range-calendar
1238
1238
  id=${`${this.uid}_popup`}
1239
1239
  role="dialog"
1240
1240
  aria-label=${this.label??"Calendar"}
@@ -1266,7 +1266,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1266
1266
  @blur=${this.onCalendarBlur}
1267
1267
  @change=${this.onCalendarChange}
1268
1268
  @inputError=${this.onCalendarInputError}
1269
- ></gui-range-calendar>`:l.nothing;return l.html`
1269
+ ></gui-range-calendar>`:d.nothing;return d.html`
1270
1270
  ${le(this.uid??"",{label:this.label,hint:this.hint,required:this.required},!1,void 0,!1)}
1271
1271
 
1272
1272
  <div
@@ -1276,7 +1276,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1276
1276
  >
1277
1277
  <gui-range-date
1278
1278
  id="date-input"
1279
- class=${_.classMap(e.widgetClasses)}
1279
+ class=${S.classMap(e.widgetClasses)}
1280
1280
  .uid=${this.uid}
1281
1281
  .hint=${this.hint}
1282
1282
  .showErrors=${!1}
@@ -1328,7 +1328,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1328
1328
  </div>
1329
1329
 
1330
1330
  ${this.showErrors?j(this.uid??"",{errors:this.errors,touched:this.touched}):""}
1331
- `}onDateChange(e){e.stopPropagation();const t=e.detail.value;for(const i of t??[]){const a=this.rangeError(i);if(a){this.rejectTypedRange(i,a);return}}this.commitValue(t)}rangeError(e){const t=e.start,i=e.end??e.start;if(Es(t,i,this.disabledRanges))return this.disabledDateRangeMessage??kt;const a={minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage};for(const r of[t,i]){const s=Gt(r,this.minDate,this.maxDate,void 0,a);if(s)return s}return null}rejectTypedRange(e,t){const i=e.start,a=e.end??e.start;this._invalidRange={start:i,end:a};const r=this._dateRef;r&&(r.value=this.value??[],r.showRange(i,a)),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){e.stopPropagation(),this._dateRef?.clearRangeInputs(),this.commitValue(e.detail.value)}onCalendarInputError(e){const t=e.detail?.range;t&&(this._invalidRange=t,this._dateRef?.showRange(t.start,t.end))}commitValue(e){this.value=e??void 0,this._invalidRange=null,this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0}))}onCalendarBlur(){this._popup.closeOnFocusLeave()}onPillClick(e){this._focusDate=e.detail.range.start,this._popup.show()}closePillsDropdown(){this.querySelector("gui-pills")?.closeDropdown?.()}};C([n.property({type:String})],T.prototype,"uid",2),C([n.property({type:String})],T.prototype,"label",2),C([n.property({type:String})],T.prototype,"hint",2),C([n.property({type:String})],T.prototype,"icon",2),C([n.property({type:String,attribute:"toggle-aria-label"})],T.prototype,"toggleAriaLabel",2),C([n.property({type:String})],T.prototype,"dayAriaLabel",2),C([n.property({type:String})],T.prototype,"monthAriaLabel",2),C([n.property({type:String})],T.prototype,"yearAriaLabel",2),C([n.property({type:Array})],T.prototype,"errors",2),C([n.property({type:Boolean})],T.prototype,"showErrors",2),C([n.property({type:Boolean})],T.prototype,"touched",2),C([n.property({type:Boolean})],T.prototype,"required",2),C([n.property({type:Boolean})],T.prototype,"disabled",2),C([n.property({type:Boolean,attribute:"readonly"})],T.prototype,"readOnly",2),C([n.property({type:String,attribute:"locale-id"})],T.prototype,"localeId",2),C([n.property({type:Array})],T.prototype,"value",2),C([n.property({type:String})],T.prototype,"separator",2),C([n.property({type:String,attribute:"remove-pill-aria-label"})],T.prototype,"removePillAriaLabel",2),C([n.property({type:String,attribute:"start-date-aria-label"})],T.prototype,"startDateAriaLabel",2),C([n.property({type:String,attribute:"end-date-aria-label"})],T.prototype,"endDateAriaLabel",2),C([n.property({type:String,attribute:"prev-month-icon"})],T.prototype,"prevMonthIcon",2),C([n.property({type:String,attribute:"next-month-icon"})],T.prototype,"nextMonthIcon",2),C([n.property({type:String,attribute:"prev-month-aria-label"})],T.prototype,"prevMonthAriaLabel",2),C([n.property({type:String,attribute:"next-month-aria-label"})],T.prototype,"nextMonthAriaLabel",2),C([n.property({type:String,attribute:"select-year-aria-label"})],T.prototype,"selectYearAriaLabel",2),C([n.property({type:String,attribute:"year-grid-aria-label"})],T.prototype,"yearGridAriaLabel",2),C([n.property({type:String,attribute:"day-format"})],T.prototype,"dayFormat",2),C([n.property({type:String,attribute:"weekday-format"})],T.prototype,"weekdayFormat",2),C([n.property({type:String,attribute:"month-format"})],T.prototype,"monthFormat",2),C([n.property({type:String,attribute:"min-date"})],T.prototype,"minDate",2),C([n.property({type:String,attribute:"max-date"})],T.prototype,"maxDate",2),C([n.property({type:Array,attribute:"disabled-ranges"})],T.prototype,"disabledRanges",2),C([n.property({type:Number,attribute:"number-of-months"})],T.prototype,"numberOfMonths",2),C([n.property({type:String,attribute:"invalid-date-message"})],T.prototype,"invalidDateMessage",2),C([n.property({type:String,attribute:"min-date-message"})],T.prototype,"minDateMessage",2),C([n.property({type:String,attribute:"max-date-message"})],T.prototype,"maxDateMessage",2),C([n.property({type:String,attribute:"disabled-date-range-message"})],T.prototype,"disabledDateRangeMessage",2),C([n.query("#date-input")],T.prototype,"_dateRef",2),C([n.state()],T.prototype,"_focusDate",2),C([n.state()],T.prototype,"_invalidRange",2),T=C([n.customElement("gui-range-date-picker")],T),typeof customElements<"u"&&!customElements.get("gui-range-date-picker")&&customElements.define("gui-range-date-picker",T);var Lh=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,Ya=(e,t,i,a)=>{for(var r=a>1?void 0:a?Eh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Lh(t,i,r),r};let ei=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
1331
+ `}onDateChange(e){e.stopPropagation();const t=e.detail.value;for(const i of t??[]){const a=this.rangeError(i);if(a){this.rejectTypedRange(i,a);return}}this.commitValue(t)}rangeError(e){const t=e.start,i=e.end??e.start;if(wn(t,i,this.disabledRanges))return this.disabledDateRangeMessage??St;const a={minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage};for(const r of[t,i]){const s=Yt(r,this.minDate,this.maxDate,void 0,a);if(s)return s}return null}rejectTypedRange(e,t){const i=e.start,a=e.end??e.start;this._invalidRange={start:i,end:a};const r=this._dateRef;r&&(r.value=this.value??[],r.showRange(i,a)),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){e.stopPropagation(),this._dateRef?.clearRangeInputs(),this.commitValue(e.detail.value)}onCalendarInputError(e){const t=e.detail?.range;t&&(this._invalidRange=t,this._dateRef?.showRange(t.start,t.end))}commitValue(e){this.value=e??void 0,this._invalidRange=null,this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0}))}onCalendarBlur(){this._popup.closeOnFocusLeave()}onPillClick(e){this._focusDate=e.detail.range.start,this._popup.show()}closePillsDropdown(){this.querySelector("gui-pills")?.closeDropdown?.()}};E([n.property({type:String})],A.prototype,"uid",2),E([n.property({type:String})],A.prototype,"label",2),E([n.property({type:String})],A.prototype,"hint",2),E([n.property({type:String})],A.prototype,"icon",2),E([n.property({type:String,attribute:"toggle-aria-label"})],A.prototype,"toggleAriaLabel",2),E([n.property({type:String})],A.prototype,"dayAriaLabel",2),E([n.property({type:String})],A.prototype,"monthAriaLabel",2),E([n.property({type:String})],A.prototype,"yearAriaLabel",2),E([n.property({type:Array})],A.prototype,"errors",2),E([n.property({type:Boolean})],A.prototype,"showErrors",2),E([n.property({type:Boolean})],A.prototype,"touched",2),E([n.property({type:Boolean})],A.prototype,"required",2),E([n.property({type:Boolean})],A.prototype,"disabled",2),E([n.property({type:Boolean,attribute:"readonly"})],A.prototype,"readOnly",2),E([n.property({type:String,attribute:"locale-id"})],A.prototype,"localeId",2),E([n.property({type:Array})],A.prototype,"value",2),E([n.property({type:String})],A.prototype,"separator",2),E([n.property({type:String,attribute:"remove-pill-aria-label"})],A.prototype,"removePillAriaLabel",2),E([n.property({type:String,attribute:"start-date-aria-label"})],A.prototype,"startDateAriaLabel",2),E([n.property({type:String,attribute:"end-date-aria-label"})],A.prototype,"endDateAriaLabel",2),E([n.property({type:String,attribute:"prev-month-icon"})],A.prototype,"prevMonthIcon",2),E([n.property({type:String,attribute:"next-month-icon"})],A.prototype,"nextMonthIcon",2),E([n.property({type:String,attribute:"prev-month-aria-label"})],A.prototype,"prevMonthAriaLabel",2),E([n.property({type:String,attribute:"next-month-aria-label"})],A.prototype,"nextMonthAriaLabel",2),E([n.property({type:String,attribute:"select-year-aria-label"})],A.prototype,"selectYearAriaLabel",2),E([n.property({type:String,attribute:"year-grid-aria-label"})],A.prototype,"yearGridAriaLabel",2),E([n.property({type:String,attribute:"day-format"})],A.prototype,"dayFormat",2),E([n.property({type:String,attribute:"weekday-format"})],A.prototype,"weekdayFormat",2),E([n.property({type:String,attribute:"month-format"})],A.prototype,"monthFormat",2),E([n.property({type:String,attribute:"min-date"})],A.prototype,"minDate",2),E([n.property({type:String,attribute:"max-date"})],A.prototype,"maxDate",2),E([n.property({type:Array,attribute:"disabled-ranges"})],A.prototype,"disabledRanges",2),E([n.property({type:Number,attribute:"number-of-months"})],A.prototype,"numberOfMonths",2),E([n.property({type:String,attribute:"invalid-date-message"})],A.prototype,"invalidDateMessage",2),E([n.property({type:String,attribute:"min-date-message"})],A.prototype,"minDateMessage",2),E([n.property({type:String,attribute:"max-date-message"})],A.prototype,"maxDateMessage",2),E([n.property({type:String,attribute:"disabled-date-range-message"})],A.prototype,"disabledDateRangeMessage",2),E([n.query("#date-input")],A.prototype,"_dateRef",2),E([n.state()],A.prototype,"_focusDate",2),E([n.state()],A.prototype,"_invalidRange",2),A=E([n.customElement("gui-range-date-picker")],A),typeof customElements<"u"&&!customElements.get("gui-range-date-picker")&&customElements.define("gui-range-date-picker",A);var Ly=Object.defineProperty,Iy=Object.getOwnPropertyDescriptor,Rr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Iy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ly(t,i,r),r};let ri=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-date-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
1332
1332
  <gui-range-date-picker
1333
1333
  .uid=${this.widget.uid}
1334
1334
  .label=${e.label}
@@ -1370,7 +1370,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1370
1370
  @blur=${()=>this.adapter.onBlur()}
1371
1371
  @change=${this.valueChanged}
1372
1372
  ></gui-range-date-picker>
1373
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ya([f.consume({context:c.formContext}),n.property({attribute:!1})],ei.prototype,"formContext",2),Ya([f.provide({context:c.inputContext})],ei.prototype,"adapter",2),ei=Ya([n.customElement("gui-range-date-picker-input")],ei);const xh=Object.freeze(Object.defineProperty({__proto__:null,get RangeDatePickerElement(){return ei}},Symbol.toStringTag,{value:"Module"}));var Ph=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,x=(e,t,i,a)=>{for(var r=a>1?void 0:a?Oh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ph(t,i,r),r};let L=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=[],this.separator=void 0,this.removePillAriaLabel=void 0,this.startTimeAriaLabel=void 0,this.endTimeAriaLabel=void 0,this.startTimeLabel=void 0,this.endTimeLabel=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledRanges=void 0,this.allowCustomTime=!1,this.height=void 0,this.itemHeight=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.rangeOrderMessage=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this._workingIn=void 0,this._workingOut=void 0,this._popup=new Ot(this,{focusRestoreSelector:"gui-range-time input, gui-range-time button",focusPopupSelector:'.gui-time-list__option[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-time-list__option")?"ignore":e.closest(".gui-range-time-input__part")||e.closest(".gui-range-time-picker__panel")?"open":"toggle",keyToggleMode:"openClose",beforeOpen:e=>{this.querySelector(".gui-pills__dropdown")&&e.suppressNextFocusOut(),this.closePillsDropdown()},onOpenChanged:e=>{e||(this._workingIn=void 0,this._workingOut=void 0)}}),this.onDropdownToggle=e=>{e.detail?.open&&this._popup.open&&this._popup.close()},this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("dropdowntoggle",this.onDropdownToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dropdowntoggle",this.onDropdownToggle)}get outListBounds(){if(!this._workingIn)return{minTime:this.minTime,maxTime:this.maxTime};const e=Gs(this._workingIn,this.minuteStep);return e?{minTime:e,maxTime:this.maxTime}:{minTime:"23:59:59",maxTime:"00:00:00"}}render(){const e=Xe("rangeTimePicker",{icon:this.icon}),t=this.outListBounds,i=this.startTimeLabel??"Start time",a=this.endTimeLabel??"End time",r=this._popup.open?l.html`<div
1373
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message]),this.adapter.onBlur()}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Rr([f.consume({context:m.formContext}),n.property({attribute:!1})],ri.prototype,"formContext",2),Rr([f.provide({context:m.inputContext})],ri.prototype,"adapter",2),ri=Rr([n.customElement("gui-range-date-picker-input")],ri);const xy=Object.freeze(Object.defineProperty({__proto__:null,get RangeDatePickerElement(){return ri}},Symbol.toStringTag,{value:"Module"}));var Py=Object.defineProperty,My=Object.getOwnPropertyDescriptor,x=(e,t,i,a)=>{for(var r=a>1?void 0:a?My(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Py(t,i,r),r};let C=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=[],this.separator=void 0,this.removePillAriaLabel=void 0,this.startTimeAriaLabel=void 0,this.endTimeAriaLabel=void 0,this.startTimeLabel=void 0,this.endTimeLabel=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledRanges=void 0,this.allowCustomTime=!1,this.height=void 0,this.itemHeight=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.rangeOrderMessage=void 0,this.disabledRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this._workingIn=void 0,this._workingOut=void 0,this._popup=new Rt(this,{focusRestoreSelector:"gui-range-time input, gui-range-time button",focusPopupSelector:'.gui-time-list__option[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-time-list__option")?"ignore":e.closest(".gui-range-time-input__part")||e.closest(".gui-range-time-picker__panel")?"open":"toggle",keyToggleMode:"openClose",beforeOpen:e=>{this.querySelector(".gui-pills__dropdown")&&e.suppressNextFocusOut(),this.closePillsDropdown()},onOpenChanged:e=>{e||(this._workingIn=void 0,this._workingOut=void 0)}}),this.onDropdownToggle=e=>{e.detail?.open&&this._popup.open&&this._popup.close()},this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("dropdowntoggle",this.onDropdownToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dropdowntoggle",this.onDropdownToggle)}get outListBounds(){if(!this._workingIn)return{minTime:this.minTime,maxTime:this.maxTime};const e=Pn(this._workingIn,this.minuteStep);return e?{minTime:e,maxTime:this.maxTime}:{minTime:"23:59:59",maxTime:"00:00:00"}}render(){const e=Qe("rangeTimePicker",{icon:this.icon}),t=this.outListBounds,i=this.startTimeLabel??"Start time",a=this.endTimeLabel??"End time",r=this._popup.open?d.html`<div
1374
1374
  class="gui-range-time-picker__panel"
1375
1375
  id=${`${this.uid}_popup`}
1376
1376
  role="dialog"
@@ -1418,7 +1418,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1418
1418
  @change=${this.onOutListChange}
1419
1419
  ></gui-time-list>
1420
1420
  </div>
1421
- </div>`:l.nothing;return l.html`
1421
+ </div>`:d.nothing;return d.html`
1422
1422
  ${le(this.uid??"",{label:this.label,hint:this.hint,required:this.required},!1,void 0,!1)}
1423
1423
 
1424
1424
  <div
@@ -1428,7 +1428,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1428
1428
  >
1429
1429
  <gui-range-time
1430
1430
  id="time-input"
1431
- class=${_.classMap(e.widgetClasses)}
1431
+ class=${S.classMap(e.widgetClasses)}
1432
1432
  .uid=${this.uid}
1433
1433
  .hint=${this.hint}
1434
1434
  .showErrors=${!1}
@@ -1490,7 +1490,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1490
1490
  </div>
1491
1491
 
1492
1492
  ${this.showErrors?j(this.uid??"",{errors:this.errors,touched:this.touched}):""}
1493
- `}onInputChange(e){e.stopPropagation(),this._workingIn=void 0,this._workingOut=void 0,this.commitValue(e.detail.value)}onPartsChange(e){e.stopPropagation(),this._workingIn=e.detail.start??void 0,this._workingOut=e.detail.end??void 0}onInputBlur(){this.dispatchEvent(new CustomEvent("blur"))}onInListChange(e){e.stopPropagation();const t=e.detail.value;this._workingIn=t??void 0,this._workingOut=void 0,t&&this._inputRef?.fillGroup("start",t)}onOutListChange(e){e.stopPropagation();const t=e.detail.value;if(!this._workingIn||!t||!this._inputRef)return;this._inputRef.fillGroup("end",t),this._inputRef.commitFromParts()?(this._workingIn=void 0,this._workingOut=void 0,this.updateComplete.then(()=>{this._inListRef()?.scrollToSelectedValue?.()})):(this._popup.close(),this.dispatchEvent(new CustomEvent("blur")))}_inListRef(){return this.querySelector(".gui-range-time-picker__column:first-child gui-time-list")}commitValue(e){this.value=e??void 0;const t=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}validateBounds(e){if(!e||e.length===0)return null;for(const t of e){for(const i of[t.start,t.end])if(i){if(this.minTime&&Ie(i,this.minTime)<0)return this.minTimeMessage??Cs;if(this.maxTime&&Ie(i,this.maxTime)>0)return this.maxTimeMessage??Ls}if(Us(t.start,t.end,this.disabledRanges))return this.disabledRangeMessage??Vi}return null}onPillClick(){this._popup.show()}closePillsDropdown(){this.querySelector("gui-pills")?.closeDropdown?.()}};x([n.property({type:String})],L.prototype,"uid",2),x([n.property({type:String})],L.prototype,"label",2),x([n.property({type:String})],L.prototype,"hint",2),x([n.property({type:String})],L.prototype,"icon",2),x([n.property({type:String,attribute:"toggle-aria-label"})],L.prototype,"toggleAriaLabel",2),x([n.property({type:String})],L.prototype,"hourAriaLabel",2),x([n.property({type:String})],L.prototype,"minuteAriaLabel",2),x([n.property({type:String})],L.prototype,"dayPeriodAriaLabel",2),x([n.property({type:Array})],L.prototype,"errors",2),x([n.property({type:Boolean})],L.prototype,"showErrors",2),x([n.property({type:Boolean})],L.prototype,"touched",2),x([n.property({type:Boolean})],L.prototype,"required",2),x([n.property({type:Boolean})],L.prototype,"disabled",2),x([n.property({type:Boolean,attribute:"readonly"})],L.prototype,"readOnly",2),x([n.property({type:String,attribute:"locale-id"})],L.prototype,"localeId",2),x([n.property({type:Array})],L.prototype,"value",2),x([n.property({type:String})],L.prototype,"separator",2),x([n.property({type:String,attribute:"remove-pill-aria-label"})],L.prototype,"removePillAriaLabel",2),x([n.property({type:String,attribute:"start-time-aria-label"})],L.prototype,"startTimeAriaLabel",2),x([n.property({type:String,attribute:"end-time-aria-label"})],L.prototype,"endTimeAriaLabel",2),x([n.property({type:String,attribute:"start-time-label"})],L.prototype,"startTimeLabel",2),x([n.property({type:String,attribute:"end-time-label"})],L.prototype,"endTimeLabel",2),x([n.property({type:String,attribute:"hour-format"})],L.prototype,"hourFormat",2),x([n.property({type:Number,attribute:"minute-step"})],L.prototype,"minuteStep",2),x([n.property({type:String,attribute:"min-time"})],L.prototype,"minTime",2),x([n.property({type:String,attribute:"max-time"})],L.prototype,"maxTime",2),x([n.property({type:Array,attribute:"disabled-ranges"})],L.prototype,"disabledRanges",2),x([n.property({type:Boolean,attribute:"allow-custom-time"})],L.prototype,"allowCustomTime",2),x([n.property({type:Number})],L.prototype,"height",2),x([n.property({type:Number,attribute:"item-height"})],L.prototype,"itemHeight",2),x([n.property({type:String,attribute:"min-time-message"})],L.prototype,"minTimeMessage",2),x([n.property({type:String,attribute:"max-time-message"})],L.prototype,"maxTimeMessage",2),x([n.property({type:String,attribute:"range-order-message"})],L.prototype,"rangeOrderMessage",2),x([n.property({type:String,attribute:"disabled-range-message"})],L.prototype,"disabledRangeMessage",2),x([n.property({type:String,attribute:"no-available-times-message"})],L.prototype,"noAvailableTimesMessage",2),x([n.query("#time-input")],L.prototype,"_inputRef",2),x([n.state()],L.prototype,"_workingIn",2),x([n.state()],L.prototype,"_workingOut",2),L=x([n.customElement("gui-range-time-picker")],L),typeof customElements<"u"&&!customElements.get("gui-range-time-picker")&&customElements.define("gui-range-time-picker",L);var Mh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Ha=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ih(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Mh(t,i,r),r};let ti=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
1493
+ `}onInputChange(e){e.stopPropagation(),this._workingIn=void 0,this._workingOut=void 0,this.commitValue(e.detail.value)}onPartsChange(e){e.stopPropagation(),this._workingIn=e.detail.start??void 0,this._workingOut=e.detail.end??void 0}onInputBlur(){this.dispatchEvent(new CustomEvent("blur"))}onInListChange(e){e.stopPropagation();const t=e.detail.value;this._workingIn=t??void 0,this._workingOut=void 0,t&&this._inputRef?.fillGroup("start",t)}onOutListChange(e){e.stopPropagation();const t=e.detail.value;if(!this._workingIn||!t||!this._inputRef)return;this._inputRef.fillGroup("end",t),this._inputRef.commitFromParts()?(this._workingIn=void 0,this._workingOut=void 0,this.updateComplete.then(()=>{this._inListRef()?.scrollToSelectedValue?.()})):(this._popup.close(),this.dispatchEvent(new CustomEvent("blur")))}_inListRef(){return this.querySelector(".gui-range-time-picker__column:first-child gui-time-list")}commitValue(e){this.value=e??void 0;const t=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}validateBounds(e){if(!e||e.length===0)return null;for(const t of e){for(const i of[t.start,t.end])if(i){if(this.minTime&&Re(i,this.minTime)<0)return this.minTimeMessage??vn;if(this.maxTime&&Re(i,this.maxTime)>0)return this.maxTimeMessage??Dn}if(On(t.start,t.end,this.disabledRanges))return this.disabledRangeMessage??Hi}return null}onPillClick(){this._popup.show()}closePillsDropdown(){this.querySelector("gui-pills")?.closeDropdown?.()}};x([n.property({type:String})],C.prototype,"uid",2),x([n.property({type:String})],C.prototype,"label",2),x([n.property({type:String})],C.prototype,"hint",2),x([n.property({type:String})],C.prototype,"icon",2),x([n.property({type:String,attribute:"toggle-aria-label"})],C.prototype,"toggleAriaLabel",2),x([n.property({type:String})],C.prototype,"hourAriaLabel",2),x([n.property({type:String})],C.prototype,"minuteAriaLabel",2),x([n.property({type:String})],C.prototype,"dayPeriodAriaLabel",2),x([n.property({type:Array})],C.prototype,"errors",2),x([n.property({type:Boolean})],C.prototype,"showErrors",2),x([n.property({type:Boolean})],C.prototype,"touched",2),x([n.property({type:Boolean})],C.prototype,"required",2),x([n.property({type:Boolean})],C.prototype,"disabled",2),x([n.property({type:Boolean,attribute:"readonly"})],C.prototype,"readOnly",2),x([n.property({type:String,attribute:"locale-id"})],C.prototype,"localeId",2),x([n.property({type:Array})],C.prototype,"value",2),x([n.property({type:String})],C.prototype,"separator",2),x([n.property({type:String,attribute:"remove-pill-aria-label"})],C.prototype,"removePillAriaLabel",2),x([n.property({type:String,attribute:"start-time-aria-label"})],C.prototype,"startTimeAriaLabel",2),x([n.property({type:String,attribute:"end-time-aria-label"})],C.prototype,"endTimeAriaLabel",2),x([n.property({type:String,attribute:"start-time-label"})],C.prototype,"startTimeLabel",2),x([n.property({type:String,attribute:"end-time-label"})],C.prototype,"endTimeLabel",2),x([n.property({type:String,attribute:"hour-format"})],C.prototype,"hourFormat",2),x([n.property({type:Number,attribute:"minute-step"})],C.prototype,"minuteStep",2),x([n.property({type:String,attribute:"min-time"})],C.prototype,"minTime",2),x([n.property({type:String,attribute:"max-time"})],C.prototype,"maxTime",2),x([n.property({type:Array,attribute:"disabled-ranges"})],C.prototype,"disabledRanges",2),x([n.property({type:Boolean,attribute:"allow-custom-time"})],C.prototype,"allowCustomTime",2),x([n.property({type:Number})],C.prototype,"height",2),x([n.property({type:Number,attribute:"item-height"})],C.prototype,"itemHeight",2),x([n.property({type:String,attribute:"min-time-message"})],C.prototype,"minTimeMessage",2),x([n.property({type:String,attribute:"max-time-message"})],C.prototype,"maxTimeMessage",2),x([n.property({type:String,attribute:"range-order-message"})],C.prototype,"rangeOrderMessage",2),x([n.property({type:String,attribute:"disabled-range-message"})],C.prototype,"disabledRangeMessage",2),x([n.property({type:String,attribute:"no-available-times-message"})],C.prototype,"noAvailableTimesMessage",2),x([n.query("#time-input")],C.prototype,"_inputRef",2),x([n.state()],C.prototype,"_workingIn",2),x([n.state()],C.prototype,"_workingOut",2),C=x([n.customElement("gui-range-time-picker")],C),typeof customElements<"u"&&!customElements.get("gui-range-time-picker")&&customElements.define("gui-range-time-picker",C);var Oy=Object.defineProperty,Ry=Object.getOwnPropertyDescriptor,Fr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ry(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Oy(t,i,r),r};let si=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-range-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
1494
1494
  <gui-range-time-picker
1495
1495
  .uid=${this.widget.uid}
1496
1496
  .label=${e.label}
@@ -1530,7 +1530,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1530
1530
  @blur=${()=>this.adapter.onBlur()}
1531
1531
  @change=${this.valueChanged}
1532
1532
  ></gui-range-time-picker>
1533
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ha([f.consume({context:c.formContext}),n.property({attribute:!1})],ti.prototype,"formContext",2),Ha([f.provide({context:c.inputContext})],ti.prototype,"adapter",2),ti=Ha([n.customElement("gui-range-time-picker-input")],ti);const Rh=Object.freeze(Object.defineProperty({__proto__:null,get RangeTimePickerElement(){return ti}},Symbol.toStringTag,{value:"Module"})),dn=/^[0-9.,eE+-]+$/;function pn(e){const t=e.data??e.dataTransfer?.getData("text");t&&(dn.test(t)||e.preventDefault())}function un(e){e.ctrlKey||e.metaKey||e.altKey||e.isComposing||e.key.length===1&&(dn.test(e.key)||e.preventDefault())}var Fh=Object.defineProperty,Bh=Object.getOwnPropertyDescriptor,ve=(e,t,i,a)=>{for(var r=a>1?void 0:a?Bh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Fh(t,i,r),r};let ce=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.currency=void 0,this.step=void 0,this.maximumFractionDigits=void 0,this.minimumFractionDigits=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){e.has("value")&&document.activeElement!==this.inputElement&&(this.displayValue=this.formatCurrency(this.value))}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,currency:this.currency,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete};this.displayValue=this.formatCurrency(this.value);const t=Xe("currency",e),i={"gui-widget-input":!0,"gui-currency--icon":!!this.icon};return l.html`
1533
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Fr([f.consume({context:m.formContext}),n.property({attribute:!1})],si.prototype,"formContext",2),Fr([f.provide({context:m.inputContext})],si.prototype,"adapter",2),si=Fr([n.customElement("gui-range-time-picker-input")],si);const Fy=Object.freeze(Object.defineProperty({__proto__:null,get RangeTimePickerElement(){return si}},Symbol.toStringTag,{value:"Module"})),jn=/^[0-9.,eE+-]+$/;function eo(e){const t=e.data??e.dataTransfer?.getData("text");t&&(jn.test(t)||e.preventDefault())}function to(e){e.ctrlKey||e.metaKey||e.altKey||e.isComposing||e.key.length===1&&(jn.test(e.key)||e.preventDefault())}var By=Object.defineProperty,Ny=Object.getOwnPropertyDescriptor,ve=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ny(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&By(t,i,r),r};let me=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.currency=void 0,this.step=void 0,this.maximumFractionDigits=void 0,this.minimumFractionDigits=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){e.has("value")&&document.activeElement!==this.inputElement&&(this.displayValue=this.formatCurrency(this.value))}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,currency:this.currency,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete};this.displayValue=this.formatCurrency(this.value);const t=Qe("currency",e),i={"gui-widget-input":!0,"gui-currency--icon":!!this.icon};return d.html`
1534
1534
  ${le(this.uid,e)}
1535
1535
 
1536
1536
  <div class="gui-widget">
@@ -1539,30 +1539,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1539
1539
  inputmode="decimal"
1540
1540
  id=${this.uid}
1541
1541
  data-cy=${`${this.uid}_currency`}
1542
- class=${_.classMap(i)}
1543
- step=${this.step&&this.step>0?this.step:l.nothing}
1542
+ class=${S.classMap(i)}
1543
+ step=${this.step&&this.step>0?this.step:d.nothing}
1544
1544
  .value=${this.value??""}
1545
1545
  ?required=${this.required}
1546
1546
  ?disabled=${this.disabled}
1547
1547
  ?readonly=${this.readOnly}
1548
- placeholder=${this.placeholder||l.nothing}
1549
- autocomplete=${this.autocomplete||l.nothing}
1548
+ placeholder=${this.placeholder||d.nothing}
1549
+ autocomplete=${this.autocomplete||d.nothing}
1550
1550
  @input=${this.handleInput}
1551
- @beforeinput=${pn}
1552
- @keydown=${un}
1551
+ @beforeinput=${eo}
1552
+ @keydown=${to}
1553
1553
  @focus=${this.handleFocus}
1554
1554
  @blur=${this.handleBlur}
1555
1555
  />
1556
- ${this.displayValue?l.html`<span
1556
+ ${this.displayValue?d.html`<span
1557
1557
  aria-hidden="true"
1558
1558
  class="gui-currency__format-value ${this.icon?"gui-currency__format-value--icon":""}"
1559
1559
  >${this.displayValue}</span
1560
- >`:l.nothing}
1560
+ >`:d.nothing}
1561
1561
  ${t.html}
1562
1562
  </div>
1563
1563
 
1564
1564
  ${j(this.uid,e)}
1565
- `}handleInput(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.displayValue=this.formatCurrency(t.valueAsNumber);const i=t.valueAsNumber;this.dispatchEvent(new CustomEvent("input",{detail:{value:Number.isNaN(i)?void 0:i},bubbles:!0,composed:!0}))}}handleFocus(){this.displayValue=this.formatCurrency(this.value)}handleBlur(){this.displayValue=this.formatCurrency(this.value),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}formatCurrency(e){if(e===""||e===void 0||e===null||isNaN(e))return"";try{const t=this.maximumFractionDigits??Math.max(this.minimumFractionDigits??2,2),i=Math.min(this.minimumFractionDigits??2,t);return new Intl.NumberFormat(this.localeId??"en",{style:"currency",currency:this.currency??"USD",maximumFractionDigits:t,minimumFractionDigits:i}).format(e)}catch(t){return console.warn("Invalid locale or currency",t),e.toString()}}get separators(){const e=new Intl.NumberFormat(this.localeId??"en").format(1111.1);return{group:e.replace(/1/g,"").replace(/\d/g,"")[0]||",",decimal:e.replace(/1/g,"").replace(/\d/g,"").slice(-1)||"."}}};ve([n.property({type:String})],ce.prototype,"uid",2),ve([n.property({type:String})],ce.prototype,"label",2),ve([n.property({type:String,attribute:"locale-id"})],ce.prototype,"localeId",2),ve([n.property({type:Array})],ce.prototype,"errors",2),ve([n.property({type:Boolean})],ce.prototype,"touched",2),ve([n.property({type:Boolean})],ce.prototype,"required",2),ve([n.property({type:Boolean})],ce.prototype,"disabled",2),ve([n.property({type:Boolean,attribute:"readonly"})],ce.prototype,"readOnly",2),ve([n.property({type:String})],ce.prototype,"value",2),ve([n.property({type:String})],ce.prototype,"currency",2),ve([n.property({type:String})],ce.prototype,"step",2),ve([n.property({type:String})],ce.prototype,"maximumFractionDigits",2),ve([n.property({type:String})],ce.prototype,"minimumFractionDigits",2),ve([n.property({type:String})],ce.prototype,"hint",2),ve([n.property({type:String})],ce.prototype,"icon",2),ve([n.property({type:String})],ce.prototype,"placeholder",2),ve([n.property({type:String})],ce.prototype,"autocomplete",2),ve([n.state()],ce.prototype,"displayValue",2),ve([n.query("input")],ce.prototype,"inputElement",2),ce=ve([n.customElement("gui-currency")],ce),typeof customElements<"u"&&!customElements.get("gui-currency")&&customElements.define("gui-currency",ce);var Nh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,Wa=(e,t,i,a)=>{for(var r=a>1?void 0:a?qh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Nh(t,i,r),r};let ii=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-currency","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
1565
+ `}handleInput(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.displayValue=this.formatCurrency(t.valueAsNumber);const i=t.valueAsNumber;this.dispatchEvent(new CustomEvent("input",{detail:{value:Number.isNaN(i)?void 0:i},bubbles:!0,composed:!0}))}}handleFocus(){this.displayValue=this.formatCurrency(this.value)}handleBlur(){this.displayValue=this.formatCurrency(this.value),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}formatCurrency(e){if(e===""||e===void 0||e===null||isNaN(e))return"";try{const t=this.maximumFractionDigits??Math.max(this.minimumFractionDigits??2,2),i=Math.min(this.minimumFractionDigits??2,t);return new Intl.NumberFormat(this.localeId??"en",{style:"currency",currency:this.currency??"USD",maximumFractionDigits:t,minimumFractionDigits:i}).format(e)}catch(t){return console.warn("Invalid locale or currency",t),e.toString()}}get separators(){const e=new Intl.NumberFormat(this.localeId??"en").format(1111.1);return{group:e.replace(/1/g,"").replace(/\d/g,"")[0]||",",decimal:e.replace(/1/g,"").replace(/\d/g,"").slice(-1)||"."}}};ve([n.property({type:String})],me.prototype,"uid",2),ve([n.property({type:String})],me.prototype,"label",2),ve([n.property({type:String,attribute:"locale-id"})],me.prototype,"localeId",2),ve([n.property({type:Array})],me.prototype,"errors",2),ve([n.property({type:Boolean})],me.prototype,"touched",2),ve([n.property({type:Boolean})],me.prototype,"required",2),ve([n.property({type:Boolean})],me.prototype,"disabled",2),ve([n.property({type:Boolean,attribute:"readonly"})],me.prototype,"readOnly",2),ve([n.property({type:String})],me.prototype,"value",2),ve([n.property({type:String})],me.prototype,"currency",2),ve([n.property({type:String})],me.prototype,"step",2),ve([n.property({type:String})],me.prototype,"maximumFractionDigits",2),ve([n.property({type:String})],me.prototype,"minimumFractionDigits",2),ve([n.property({type:String})],me.prototype,"hint",2),ve([n.property({type:String})],me.prototype,"icon",2),ve([n.property({type:String})],me.prototype,"placeholder",2),ve([n.property({type:String})],me.prototype,"autocomplete",2),ve([n.state()],me.prototype,"displayValue",2),ve([n.query("input")],me.prototype,"inputElement",2),me=ve([n.customElement("gui-currency")],me),typeof customElements<"u"&&!customElements.get("gui-currency")&&customElements.define("gui-currency",me);var qy=Object.defineProperty,zy=Object.getOwnPropertyDescriptor,Br=(e,t,i,a)=>{for(var r=a>1?void 0:a?zy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&qy(t,i,r),r};let ni=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-currency","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
1566
1566
  <gui-currency
1567
1567
  .uid=${this.widget.uid}
1568
1568
  .label=${this.adapter.templateData.label}
@@ -1584,8 +1584,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1584
1584
  @input=${this.valueChanged}
1585
1585
  @blur=${()=>this.adapter.onBlur()}
1586
1586
  ></gui-currency>
1587
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Wa([f.consume({context:c.formContext}),n.property({attribute:!1})],ii.prototype,"formContext",2),Wa([f.provide({context:c.inputContext})],ii.prototype,"adapter",2),ii=Wa([n.customElement("gui-currency-input")],ii);const zh=Object.freeze(Object.defineProperty({__proto__:null,get CurrencyElement(){return ii}},Symbol.toStringTag,{value:"Module"}));var Gh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,ge=(e,t,i,a)=>{for(var r=a>1?void 0:a?Vh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Gh(t,i,r),r};let pe=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.value=void 0,this.invalidDateMessage=void 0,this.minDate=void 0,this.maxDate=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.inputBlockClass="gui-date-input",this.groups=["default"],this.partDescriptors=Fa(),this._parts=new Pt(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:e=>this.validateAndEmit(e),isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>this.dispatchEvent(new CustomEvent("change",{detail:{value:null},bubbles:!0}))}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}getPartDescriptor(e){return this.partDescriptors[e]}willUpdate(e){e.has("value")&&this._parts.setGroupFromISO("default",this.value??"","date")}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:xs(this.localeId),getDescriptor:a=>this.getPartDescriptor(a),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(a,r)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel})[r]??St[r],disabled:this.disabled,partsReadonly:!!this.readOnly},i={"gui-widget-icon":!0,[this.icon]:!0};return l.html`
1588
- ${this.label?le(this.uid,e,!1,void 0,!1):l.nothing}
1587
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Br([f.consume({context:m.formContext}),n.property({attribute:!1})],ni.prototype,"formContext",2),Br([f.provide({context:m.inputContext})],ni.prototype,"adapter",2),ni=Br([n.customElement("gui-currency-input")],ni);const Uy=Object.freeze(Object.defineProperty({__proto__:null,get CurrencyElement(){return ni}},Symbol.toStringTag,{value:"Module"}));var Gy=Object.defineProperty,Vy=Object.getOwnPropertyDescriptor,ge=(e,t,i,a)=>{for(var r=a>1?void 0:a?Vy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Gy(t,i,r),r};let ue=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.value=void 0,this.invalidDateMessage=void 0,this.minDate=void 0,this.maxDate=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.inputBlockClass="gui-date-input",this.groups=["default"],this.partDescriptors=Ar(),this._parts=new Ot(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:e=>this.validateAndEmit(e),isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>this.dispatchEvent(new CustomEvent("change",{detail:{value:null},bubbles:!0}))}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}getPartDescriptor(e){return this.partDescriptors[e]}willUpdate(e){e.has("value")&&this._parts.setGroupFromISO("default",this.value??"","date")}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:$n(this.localeId),getDescriptor:a=>this.getPartDescriptor(a),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(a,r)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel})[r]??_t[r],disabled:this.disabled,partsReadonly:!!this.readOnly},i={"gui-widget-icon":!0,[this.icon]:!0};return d.html`
1588
+ ${this.label?le(this.uid,e,!1,void 0,!1):d.nothing}
1589
1589
 
1590
1590
  <div class="gui-widget">
1591
1591
  <div
@@ -1594,19 +1594,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1594
1594
  role="group"
1595
1595
  aria-labelledby=${`${this.uid}_label`}
1596
1596
  >
1597
- ${yt("default",t,this._parts)}
1597
+ ${bt("default",t,this._parts)}
1598
1598
  </div>
1599
- ${this.icon?l.html`<span
1600
- class=${_.classMap(i)}
1599
+ ${this.icon?d.html`<span
1600
+ class=${S.classMap(i)}
1601
1601
  data-icon=${this.icon}
1602
1602
  aria-hidden="true"
1603
- ></span>`:l.nothing}
1603
+ ></span>`:d.nothing}
1604
1604
  </div>
1605
1605
 
1606
- ${this.showErrors&&this.errors?.length?j(this.uid,e):l.nothing}
1607
- `}validateAndEmit(e){const{result:t,writeBacks:i}=en(this._parts.values[e]??{},{descriptors:this.partDescriptors,invalidDateMessage:this.invalidDateMessage});if(this._parts.applyWriteBacks(e,i),t.kind==="invalid")this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t.message},bubbles:!0}));else if(t.kind==="valid"){const a=Gt(t.iso,this.minDate,this.maxDate,void 0,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage});if(a){this.dispatchEvent(new CustomEvent("change",{detail:{value:t.iso},bubbles:!0})),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:a},bubbles:!0})),this.requestUpdate();return}this.value=t.iso,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0}))}this.requestUpdate()}};ge([n.property({type:String})],pe.prototype,"uid",2),ge([n.property({type:String})],pe.prototype,"label",2),ge([n.property({type:String,attribute:"locale-id"})],pe.prototype,"localeId",2),ge([n.property({type:Array})],pe.prototype,"errors",2),ge([n.property({type:Boolean})],pe.prototype,"showErrors",2),ge([n.property({type:Boolean})],pe.prototype,"touched",2),ge([n.property({type:Boolean})],pe.prototype,"required",2),ge([n.property({type:Boolean})],pe.prototype,"disabled",2),ge([n.property({type:Boolean,attribute:"readonly"})],pe.prototype,"readOnly",2),ge([n.property({type:String})],pe.prototype,"icon",2),ge([n.property({type:String})],pe.prototype,"hint",2),ge([n.property({type:String})],pe.prototype,"dayAriaLabel",2),ge([n.property({type:String})],pe.prototype,"monthAriaLabel",2),ge([n.property({type:String})],pe.prototype,"yearAriaLabel",2),ge([n.property({type:String})],pe.prototype,"value",2),ge([n.property({type:String,attribute:"invalid-date-message"})],pe.prototype,"invalidDateMessage",2),ge([n.property({type:String,attribute:"min-date"})],pe.prototype,"minDate",2),ge([n.property({type:String,attribute:"max-date"})],pe.prototype,"maxDate",2),ge([n.property({type:String,attribute:"min-date-message"})],pe.prototype,"minDateMessage",2),ge([n.property({type:String,attribute:"max-date-message"})],pe.prototype,"maxDateMessage",2),pe=ge([n.customElement("gui-date")],pe),typeof customElements<"u"&&!customElements.get("gui-date")&&customElements.define("gui-date",pe);var Uh=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,Ka=(e,t,i,a)=>{for(var r=a>1?void 0:a?Zh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Uh(t,i,r),r};let ai=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=Xe("date",this.adapter.templateData);return l.html`
1606
+ ${this.showErrors&&this.errors?.length?j(this.uid,e):d.nothing}
1607
+ `}validateAndEmit(e){const{result:t,writeBacks:i}=Zn(this._parts.values[e]??{},{descriptors:this.partDescriptors,invalidDateMessage:this.invalidDateMessage});if(this._parts.applyWriteBacks(e,i),t.kind==="invalid")this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t.message},bubbles:!0}));else if(t.kind==="valid"){const a=Yt(t.iso,this.minDate,this.maxDate,void 0,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage});if(a){this.dispatchEvent(new CustomEvent("change",{detail:{value:t.iso},bubbles:!0})),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:a},bubbles:!0})),this.requestUpdate();return}this.value=t.iso,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0}))}this.requestUpdate()}};ge([n.property({type:String})],ue.prototype,"uid",2),ge([n.property({type:String})],ue.prototype,"label",2),ge([n.property({type:String,attribute:"locale-id"})],ue.prototype,"localeId",2),ge([n.property({type:Array})],ue.prototype,"errors",2),ge([n.property({type:Boolean})],ue.prototype,"showErrors",2),ge([n.property({type:Boolean})],ue.prototype,"touched",2),ge([n.property({type:Boolean})],ue.prototype,"required",2),ge([n.property({type:Boolean})],ue.prototype,"disabled",2),ge([n.property({type:Boolean,attribute:"readonly"})],ue.prototype,"readOnly",2),ge([n.property({type:String})],ue.prototype,"icon",2),ge([n.property({type:String})],ue.prototype,"hint",2),ge([n.property({type:String})],ue.prototype,"dayAriaLabel",2),ge([n.property({type:String})],ue.prototype,"monthAriaLabel",2),ge([n.property({type:String})],ue.prototype,"yearAriaLabel",2),ge([n.property({type:String})],ue.prototype,"value",2),ge([n.property({type:String,attribute:"invalid-date-message"})],ue.prototype,"invalidDateMessage",2),ge([n.property({type:String,attribute:"min-date"})],ue.prototype,"minDate",2),ge([n.property({type:String,attribute:"max-date"})],ue.prototype,"maxDate",2),ge([n.property({type:String,attribute:"min-date-message"})],ue.prototype,"minDateMessage",2),ge([n.property({type:String,attribute:"max-date-message"})],ue.prototype,"maxDateMessage",2),ue=ge([n.customElement("gui-date")],ue),typeof customElements<"u"&&!customElements.get("gui-date")&&customElements.define("gui-date",ue);var Zy=Object.defineProperty,Yy=Object.getOwnPropertyDescriptor,Nr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Yy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Zy(t,i,r),r};let oi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=Qe("date",this.adapter.templateData);return d.html`
1608
1608
  <gui-date
1609
- class=${_.classMap(e.widgetClasses)}
1609
+ class=${S.classMap(e.widgetClasses)}
1610
1610
  .uid=${this.widget.uid}
1611
1611
  .label=${this.adapter.templateData.label}
1612
1612
  .hint=${this.adapter.templateData.hint}
@@ -1630,7 +1630,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1630
1630
  @blur=${()=>this.adapter.onBlur()}
1631
1631
  @change=${this.valueChanged}
1632
1632
  ></gui-date>
1633
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ka([f.consume({context:c.formContext}),n.property({attribute:!1})],ai.prototype,"formContext",2),Ka([f.provide({context:c.inputContext})],ai.prototype,"adapter",2),ai=Ka([n.customElement("gui-date-input")],ai);const Yh=Object.freeze(Object.defineProperty({__proto__:null,get DateElement(){return ai}},Symbol.toStringTag,{value:"Module"}));var Hh=Object.defineProperty,Wh=Object.getOwnPropertyDescriptor,R=(e,t,i,a)=>{for(var r=a>1?void 0:a?Wh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Hh(t,i,r),r};let M=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=void 0,this.invalidDateMessage=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.disabledDateRangeMessage=void 0,this._popup=new Ot(this,{focusRestoreSelector:"gui-date input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-calendar__day-button")?"ignore":e.closest(".gui-date-input__part")||e.closest("gui-calendar")?"open":"toggle",keyToggleMode:"toggle"}),this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}render(){const e=Xe("datePicker",{icon:this.icon}),t=this._popup.open?l.html`<gui-calendar
1633
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Nr([f.consume({context:m.formContext}),n.property({attribute:!1})],oi.prototype,"formContext",2),Nr([f.provide({context:m.inputContext})],oi.prototype,"adapter",2),oi=Nr([n.customElement("gui-date-input")],oi);const Hy=Object.freeze(Object.defineProperty({__proto__:null,get DateElement(){return oi}},Symbol.toStringTag,{value:"Module"}));var Wy=Object.defineProperty,Ky=Object.getOwnPropertyDescriptor,F=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ky(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Wy(t,i,r),r};let O=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=void 0,this.invalidDateMessage=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.disabledDateRangeMessage=void 0,this._popup=new Rt(this,{focusRestoreSelector:"gui-date input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-calendar__day-button")?"ignore":e.closest(".gui-date-input__part")||e.closest("gui-calendar")?"open":"toggle",keyToggleMode:"toggle"}),this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}render(){const e=Qe("datePicker",{icon:this.icon}),t=this._popup.open?d.html`<gui-calendar
1634
1634
  id=${`${this.uid}_popup`}
1635
1635
  role="dialog"
1636
1636
  aria-label=${this.label??"Calendar"}
@@ -1657,7 +1657,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1657
1657
  .localeId=${this.localeId}
1658
1658
  @blur=${this.onCalendarBlur}
1659
1659
  @change=${this.onCalendarChange}
1660
- ></gui-calendar>`:l.nothing;return l.html`
1660
+ ></gui-calendar>`:d.nothing;return d.html`
1661
1661
  ${le(this.uid??"",{label:this.label,hint:this.hint,required:this.required},!1,void 0,!1)}
1662
1662
 
1663
1663
  <div
@@ -1667,7 +1667,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1667
1667
  >
1668
1668
  <gui-date
1669
1669
  id="date-input"
1670
- class=${_.classMap(e.widgetClasses)}
1670
+ class=${S.classMap(e.widgetClasses)}
1671
1671
  .uid=${this.uid}
1672
1672
  .hint=${this.hint}
1673
1673
  .showErrors=${!1}
@@ -1714,7 +1714,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1714
1714
  </div>
1715
1715
 
1716
1716
  ${this.showErrors?j(this.uid??"",{errors:this.errors,touched:this.touched}):""}
1717
- `}onDateChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){e.stopPropagation(),this.commitValue(e.detail.value),this._popup.close()}commitValue(e){this.value=e??void 0;const t=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}validateBounds(e){return e?Gt(e,this.minDate,this.maxDate,this.disabledRanges,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage,disabledDateRangeMessage:this.disabledDateRangeMessage}):null}onCalendarBlur(){this._popup.closeOnFocusLeave()}};R([n.property({type:String})],M.prototype,"uid",2),R([n.property({type:String})],M.prototype,"label",2),R([n.property({type:String})],M.prototype,"hint",2),R([n.property({type:String})],M.prototype,"icon",2),R([n.property({type:String,attribute:"toggle-aria-label"})],M.prototype,"toggleAriaLabel",2),R([n.property({type:String})],M.prototype,"dayAriaLabel",2),R([n.property({type:String})],M.prototype,"monthAriaLabel",2),R([n.property({type:String})],M.prototype,"yearAriaLabel",2),R([n.property({type:Array})],M.prototype,"errors",2),R([n.property({type:Boolean})],M.prototype,"showErrors",2),R([n.property({type:Boolean})],M.prototype,"touched",2),R([n.property({type:Boolean})],M.prototype,"required",2),R([n.property({type:Boolean})],M.prototype,"disabled",2),R([n.property({type:Boolean,attribute:"readonly"})],M.prototype,"readOnly",2),R([n.property({type:String,attribute:"locale-id"})],M.prototype,"localeId",2),R([n.property({type:String})],M.prototype,"value",2),R([n.property({type:String,attribute:"prev-month-icon"})],M.prototype,"prevMonthIcon",2),R([n.property({type:String,attribute:"next-month-icon"})],M.prototype,"nextMonthIcon",2),R([n.property({type:String,attribute:"prev-month-aria-label"})],M.prototype,"prevMonthAriaLabel",2),R([n.property({type:String,attribute:"next-month-aria-label"})],M.prototype,"nextMonthAriaLabel",2),R([n.property({type:String,attribute:"select-year-aria-label"})],M.prototype,"selectYearAriaLabel",2),R([n.property({type:String,attribute:"year-grid-aria-label"})],M.prototype,"yearGridAriaLabel",2),R([n.property({type:String,attribute:"day-format"})],M.prototype,"dayFormat",2),R([n.property({type:String,attribute:"weekday-format"})],M.prototype,"weekdayFormat",2),R([n.property({type:String,attribute:"month-format"})],M.prototype,"monthFormat",2),R([n.property({type:String,attribute:"min-date"})],M.prototype,"minDate",2),R([n.property({type:String,attribute:"max-date"})],M.prototype,"maxDate",2),R([n.property({type:Array,attribute:"disabled-ranges"})],M.prototype,"disabledRanges",2),R([n.property({type:Number,attribute:"number-of-months"})],M.prototype,"numberOfMonths",2),R([n.property({type:String,attribute:"invalid-date-message"})],M.prototype,"invalidDateMessage",2),R([n.property({type:String,attribute:"min-date-message"})],M.prototype,"minDateMessage",2),R([n.property({type:String,attribute:"max-date-message"})],M.prototype,"maxDateMessage",2),R([n.property({type:String,attribute:"disabled-date-range-message"})],M.prototype,"disabledDateRangeMessage",2),M=R([n.customElement("gui-date-picker")],M),typeof customElements<"u"&&!customElements.get("gui-date-picker")&&customElements.define("gui-date-picker",M);var Kh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Ja=(e,t,i,a)=>{for(var r=a>1?void 0:a?Jh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Kh(t,i,r),r};let ri=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
1717
+ `}onDateChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){e.stopPropagation(),this.commitValue(e.detail.value),this._popup.close()}commitValue(e){this.value=e??void 0;const t=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}validateBounds(e){return e?Yt(e,this.minDate,this.maxDate,this.disabledRanges,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage,disabledDateRangeMessage:this.disabledDateRangeMessage}):null}onCalendarBlur(){this._popup.closeOnFocusLeave()}};F([n.property({type:String})],O.prototype,"uid",2),F([n.property({type:String})],O.prototype,"label",2),F([n.property({type:String})],O.prototype,"hint",2),F([n.property({type:String})],O.prototype,"icon",2),F([n.property({type:String,attribute:"toggle-aria-label"})],O.prototype,"toggleAriaLabel",2),F([n.property({type:String})],O.prototype,"dayAriaLabel",2),F([n.property({type:String})],O.prototype,"monthAriaLabel",2),F([n.property({type:String})],O.prototype,"yearAriaLabel",2),F([n.property({type:Array})],O.prototype,"errors",2),F([n.property({type:Boolean})],O.prototype,"showErrors",2),F([n.property({type:Boolean})],O.prototype,"touched",2),F([n.property({type:Boolean})],O.prototype,"required",2),F([n.property({type:Boolean})],O.prototype,"disabled",2),F([n.property({type:Boolean,attribute:"readonly"})],O.prototype,"readOnly",2),F([n.property({type:String,attribute:"locale-id"})],O.prototype,"localeId",2),F([n.property({type:String})],O.prototype,"value",2),F([n.property({type:String,attribute:"prev-month-icon"})],O.prototype,"prevMonthIcon",2),F([n.property({type:String,attribute:"next-month-icon"})],O.prototype,"nextMonthIcon",2),F([n.property({type:String,attribute:"prev-month-aria-label"})],O.prototype,"prevMonthAriaLabel",2),F([n.property({type:String,attribute:"next-month-aria-label"})],O.prototype,"nextMonthAriaLabel",2),F([n.property({type:String,attribute:"select-year-aria-label"})],O.prototype,"selectYearAriaLabel",2),F([n.property({type:String,attribute:"year-grid-aria-label"})],O.prototype,"yearGridAriaLabel",2),F([n.property({type:String,attribute:"day-format"})],O.prototype,"dayFormat",2),F([n.property({type:String,attribute:"weekday-format"})],O.prototype,"weekdayFormat",2),F([n.property({type:String,attribute:"month-format"})],O.prototype,"monthFormat",2),F([n.property({type:String,attribute:"min-date"})],O.prototype,"minDate",2),F([n.property({type:String,attribute:"max-date"})],O.prototype,"maxDate",2),F([n.property({type:Array,attribute:"disabled-ranges"})],O.prototype,"disabledRanges",2),F([n.property({type:Number,attribute:"number-of-months"})],O.prototype,"numberOfMonths",2),F([n.property({type:String,attribute:"invalid-date-message"})],O.prototype,"invalidDateMessage",2),F([n.property({type:String,attribute:"min-date-message"})],O.prototype,"minDateMessage",2),F([n.property({type:String,attribute:"max-date-message"})],O.prototype,"maxDateMessage",2),F([n.property({type:String,attribute:"disabled-date-range-message"})],O.prototype,"disabledDateRangeMessage",2),O=F([n.customElement("gui-date-picker")],O),typeof customElements<"u"&&!customElements.get("gui-date-picker")&&customElements.define("gui-date-picker",O);var Jy=Object.defineProperty,Xy=Object.getOwnPropertyDescriptor,qr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Xy(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Jy(t,i,r),r};let li=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
1718
1718
  <gui-date-picker
1719
1719
  .uid=${this.widget.uid}
1720
1720
  .label=${e.label}
@@ -1752,8 +1752,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1752
1752
  @blur=${()=>this.adapter.onBlur()}
1753
1753
  @change=${this.valueChanged}
1754
1754
  ></gui-date-picker>
1755
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Ja([f.consume({context:c.formContext}),n.property({attribute:!1})],ri.prototype,"formContext",2),Ja([f.provide({context:c.inputContext})],ri.prototype,"adapter",2),ri=Ja([n.customElement("gui-date-picker-input")],ri);const Xh=Object.freeze(Object.defineProperty({__proto__:null,get DatePickerElement(){return ri}},Symbol.toStringTag,{value:"Module"}));var Qh=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,K=(e,t,i,a)=>{for(var r=a>1?void 0:a?jh(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Qh(t,i,r),r};let U=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.hourFormat=void 0,this.minuteStep=1,this.invalidDateMessage=void 0,this.value=void 0,this.minDate=void 0,this.maxDate=void 0,this.minTime=void 0,this.maxTime=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.inputBlockClass="gui-date-time-input",this.groups=["default"],this._parts=new Pt(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:e=>this.validateAndEmit(e),isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>this.dispatchEvent(new CustomEvent("change",{detail:{value:null},bubbles:!0})),getHourFormat:()=>this.localeData.effectiveHourFormat,getDayPeriodLabels:()=>this.localeData.dayPeriodLabels}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get localeData(){return ra(this.localeId,this.hourFormat,this.minuteStep,!0)}getPartDescriptor(e){return this.localeData.descriptors[e]}boundsError(e,t){return Gt(e,this.minDate,this.maxDate,void 0,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage})??aa(ct(t),{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage})}willUpdate(e){(!this.hasUpdated||e.has("value")||e.has("hourFormat")||e.has("localeId"))&&this._parts.setGroupFromISO("default",this.value??"","dateTime",this.localeData.effectiveHourFormat)}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:zs(this.localeId,this.localeData.effectiveHourFormat),getDescriptor:a=>this.getPartDescriptor(a),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(a,r)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel,hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[r]??St[r],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly},i={"gui-widget-icon":!0,[this.icon]:!0};return l.html`
1756
- ${this.label?le(this.uid,e,!1,void 0,!1):l.nothing}
1755
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};qr([f.consume({context:m.formContext}),n.property({attribute:!1})],li.prototype,"formContext",2),qr([f.provide({context:m.inputContext})],li.prototype,"adapter",2),li=qr([n.customElement("gui-date-picker-input")],li);const Qy=Object.freeze(Object.defineProperty({__proto__:null,get DatePickerElement(){return li}},Symbol.toStringTag,{value:"Module"}));var jy=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,K=(e,t,i,a)=>{for(var r=a>1?void 0:a?eg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&jy(t,i,r),r};let V=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.icon="",this.hint=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.hourFormat=void 0,this.minuteStep=1,this.invalidDateMessage=void 0,this.value=void 0,this.minDate=void 0,this.maxDate=void 0,this.minTime=void 0,this.maxTime=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.inputBlockClass="gui-date-time-input",this.groups=["default"],this._parts=new Ot(this,{blockClass:this.inputBlockClass,groups:this.groups,getDescriptor:e=>this.getPartDescriptor(e),commitGroup:e=>this.validateAndEmit(e),isReadonly:()=>!!this.readOnly,isDisabled:()=>!!this.disabled,onEmptyPartBlur:()=>this.dispatchEvent(new CustomEvent("change",{detail:{value:null},bubbles:!0})),getHourFormat:()=>this.localeData.effectiveHourFormat,getDayPeriodLabels:()=>this.localeData.dayPeriodLabels}),this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`.${this.inputBlockClass}`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}get localeData(){return la(this.localeId,this.hourFormat,this.minuteStep,!0)}getPartDescriptor(e){return this.localeData.descriptors[e]}boundsError(e,t){return Yt(e,this.minDate,this.maxDate,void 0,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage})??oa(gt(t),{minTime:this.minTime,maxTime:this.maxTime,minTimeMessage:this.minTimeMessage,maxTimeMessage:this.maxTimeMessage})}willUpdate(e){(!this.hasUpdated||e.has("value")||e.has("hourFormat")||e.has("localeId"))&&this._parts.setGroupFromISO("default",this.value??"","dateTime",this.localeData.effectiveHourFormat)}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t={blockClass:this.inputBlockClass,groups:this.groups,formatParts:xn(this.localeId,this.localeData.effectiveHourFormat),getDescriptor:a=>this.getPartDescriptor(a),getDisplayValue:this._parts.getPartDisplay,getPartAriaLabel:(a,r)=>({day:this.dayAriaLabel,month:this.monthAriaLabel,year:this.yearAriaLabel,hour:this.hourAriaLabel,minute:this.minuteAriaLabel})[r]??_t[r],dayPeriodAriaLabel:this.dayPeriodAriaLabel,disabled:this.disabled,partsReadonly:!!this.readOnly},i={"gui-widget-icon":!0,[this.icon]:!0};return d.html`
1756
+ ${this.label?le(this.uid,e,!1,void 0,!1):d.nothing}
1757
1757
 
1758
1758
  <div class="gui-widget">
1759
1759
  <div
@@ -1762,17 +1762,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1762
1762
  role="group"
1763
1763
  aria-labelledby=${`${this.uid}_label`}
1764
1764
  >
1765
- ${yt("default",t,this._parts)}
1765
+ ${bt("default",t,this._parts)}
1766
1766
  </div>
1767
- ${this.icon?l.html`<span
1768
- class=${_.classMap(i)}
1767
+ ${this.icon?d.html`<span
1768
+ class=${S.classMap(i)}
1769
1769
  data-icon=${this.icon}
1770
1770
  aria-hidden="true"
1771
- ></span>`:l.nothing}
1771
+ ></span>`:d.nothing}
1772
1772
  </div>
1773
1773
 
1774
- ${this.showErrors&&this.errors?.length?j(this.uid,e):l.nothing}
1775
- `}validateAndEmit(e){const{effectiveHourFormat:t,descriptors:i}=this.localeData,{result:a,writeBacks:r}=an(this._parts.values[e]??{},{hourFormat:t,descriptors:i,invalidDateMessage:this.invalidDateMessage});if(this._parts.applyWriteBacks(e,r),a.kind==="incomplete"){this.requestUpdate();return}if(a.kind==="invalid"){this.dispatchEvent(new CustomEvent("inputError",{detail:{message:a.message},bubbles:!0})),this.requestUpdate();return}const s=this.boundsError(a.iso,a.instant);if(s){this.dispatchEvent(new CustomEvent("change",{detail:{value:a.iso},bubbles:!0})),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:s},bubbles:!0})),this.requestUpdate();return}this.value=a.iso,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0})),this.requestUpdate()}};K([n.property({type:String})],U.prototype,"uid",2),K([n.property({type:String})],U.prototype,"label",2),K([n.property({type:String,attribute:"locale-id"})],U.prototype,"localeId",2),K([n.property({type:Array})],U.prototype,"errors",2),K([n.property({type:Boolean})],U.prototype,"showErrors",2),K([n.property({type:Boolean})],U.prototype,"touched",2),K([n.property({type:Boolean})],U.prototype,"required",2),K([n.property({type:Boolean})],U.prototype,"disabled",2),K([n.property({type:Boolean,attribute:"readonly"})],U.prototype,"readOnly",2),K([n.property({type:String})],U.prototype,"icon",2),K([n.property({type:String})],U.prototype,"hint",2),K([n.property({type:String})],U.prototype,"dayAriaLabel",2),K([n.property({type:String})],U.prototype,"monthAriaLabel",2),K([n.property({type:String})],U.prototype,"yearAriaLabel",2),K([n.property({type:String})],U.prototype,"hourAriaLabel",2),K([n.property({type:String})],U.prototype,"minuteAriaLabel",2),K([n.property({type:String})],U.prototype,"dayPeriodAriaLabel",2),K([n.property({type:String,attribute:"hour-format"})],U.prototype,"hourFormat",2),K([n.property({type:Number,attribute:"minute-step"})],U.prototype,"minuteStep",2),K([n.property({type:String,attribute:"invalid-date-message"})],U.prototype,"invalidDateMessage",2),K([n.property({type:String})],U.prototype,"value",2),K([n.property({type:String,attribute:"min-date"})],U.prototype,"minDate",2),K([n.property({type:String,attribute:"max-date"})],U.prototype,"maxDate",2),K([n.property({type:String,attribute:"min-time"})],U.prototype,"minTime",2),K([n.property({type:String,attribute:"max-time"})],U.prototype,"maxTime",2),K([n.property({type:String,attribute:"min-date-message"})],U.prototype,"minDateMessage",2),K([n.property({type:String,attribute:"max-date-message"})],U.prototype,"maxDateMessage",2),K([n.property({type:String,attribute:"min-time-message"})],U.prototype,"minTimeMessage",2),K([n.property({type:String,attribute:"max-time-message"})],U.prototype,"maxTimeMessage",2),U=K([n.customElement("gui-date-time")],U),typeof customElements<"u"&&!customElements.get("gui-date-time")&&customElements.define("gui-date-time",U);var em=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,S=(e,t,i,a)=>{for(var r=a>1?void 0:a?tm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&em(t,i,r),r};let k=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledTimeRanges=void 0,this.allowCustomTime=!1,this.invalidDateMessage=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.disabledDateRangeMessage=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.disabledTimeRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this._popup=new Ot(this,{focusRestoreSelector:"gui-date-time input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-calendar__day-button")||e.closest(".gui-time-list__option")?"ignore":e.closest(".gui-date-time-input__part")||e.closest("gui-date-time-calendar")?"open":"toggle",keyToggleMode:"toggle"}),this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}render(){const e=Xe("datePicker",{icon:this.icon}),t=this._popup.open?l.html`<gui-date-time-calendar
1774
+ ${this.showErrors&&this.errors?.length?j(this.uid,e):d.nothing}
1775
+ `}validateAndEmit(e){const{effectiveHourFormat:t,descriptors:i}=this.localeData,{result:a,writeBacks:r}=Hn(this._parts.values[e]??{},{hourFormat:t,descriptors:i,invalidDateMessage:this.invalidDateMessage});if(this._parts.applyWriteBacks(e,r),a.kind==="incomplete"){this.requestUpdate();return}if(a.kind==="invalid"){this.dispatchEvent(new CustomEvent("inputError",{detail:{message:a.message},bubbles:!0})),this.requestUpdate();return}const s=this.boundsError(a.iso,a.instant);if(s){this.dispatchEvent(new CustomEvent("change",{detail:{value:a.iso},bubbles:!0})),this.dispatchEvent(new CustomEvent("inputError",{detail:{message:s},bubbles:!0})),this.requestUpdate();return}this.value=a.iso,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0})),this.requestUpdate()}};K([n.property({type:String})],V.prototype,"uid",2),K([n.property({type:String})],V.prototype,"label",2),K([n.property({type:String,attribute:"locale-id"})],V.prototype,"localeId",2),K([n.property({type:Array})],V.prototype,"errors",2),K([n.property({type:Boolean})],V.prototype,"showErrors",2),K([n.property({type:Boolean})],V.prototype,"touched",2),K([n.property({type:Boolean})],V.prototype,"required",2),K([n.property({type:Boolean})],V.prototype,"disabled",2),K([n.property({type:Boolean,attribute:"readonly"})],V.prototype,"readOnly",2),K([n.property({type:String})],V.prototype,"icon",2),K([n.property({type:String})],V.prototype,"hint",2),K([n.property({type:String})],V.prototype,"dayAriaLabel",2),K([n.property({type:String})],V.prototype,"monthAriaLabel",2),K([n.property({type:String})],V.prototype,"yearAriaLabel",2),K([n.property({type:String})],V.prototype,"hourAriaLabel",2),K([n.property({type:String})],V.prototype,"minuteAriaLabel",2),K([n.property({type:String})],V.prototype,"dayPeriodAriaLabel",2),K([n.property({type:String,attribute:"hour-format"})],V.prototype,"hourFormat",2),K([n.property({type:Number,attribute:"minute-step"})],V.prototype,"minuteStep",2),K([n.property({type:String,attribute:"invalid-date-message"})],V.prototype,"invalidDateMessage",2),K([n.property({type:String})],V.prototype,"value",2),K([n.property({type:String,attribute:"min-date"})],V.prototype,"minDate",2),K([n.property({type:String,attribute:"max-date"})],V.prototype,"maxDate",2),K([n.property({type:String,attribute:"min-time"})],V.prototype,"minTime",2),K([n.property({type:String,attribute:"max-time"})],V.prototype,"maxTime",2),K([n.property({type:String,attribute:"min-date-message"})],V.prototype,"minDateMessage",2),K([n.property({type:String,attribute:"max-date-message"})],V.prototype,"maxDateMessage",2),K([n.property({type:String,attribute:"min-time-message"})],V.prototype,"minTimeMessage",2),K([n.property({type:String,attribute:"max-time-message"})],V.prototype,"maxTimeMessage",2),V=K([n.customElement("gui-date-time")],V),typeof customElements<"u"&&!customElements.get("gui-date-time")&&customElements.define("gui-date-time",V);var tg=Object.defineProperty,ig=Object.getOwnPropertyDescriptor,T=(e,t,i,a)=>{for(var r=a>1?void 0:a?ig(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&tg(t,i,r),r};let k=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.icon="",this.toggleAriaLabel=void 0,this.dayAriaLabel=void 0,this.monthAriaLabel=void 0,this.yearAriaLabel=void 0,this.hourAriaLabel=void 0,this.minuteAriaLabel=void 0,this.dayPeriodAriaLabel=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.localeId=void 0,this.value=void 0,this.prevMonthIcon="",this.nextMonthIcon="",this.prevMonthAriaLabel=void 0,this.nextMonthAriaLabel=void 0,this.selectYearAriaLabel=void 0,this.yearGridAriaLabel=void 0,this.dayFormat=void 0,this.weekdayFormat=void 0,this.monthFormat=void 0,this.minDate=void 0,this.maxDate=void 0,this.disabledRanges=void 0,this.numberOfMonths=void 0,this.hourFormat=void 0,this.minuteStep=void 0,this.minTime=void 0,this.maxTime=void 0,this.disabledTimeRanges=void 0,this.allowCustomTime=!1,this.invalidDateMessage=void 0,this.minDateMessage=void 0,this.maxDateMessage=void 0,this.disabledDateRangeMessage=void 0,this.minTimeMessage=void 0,this.maxTimeMessage=void 0,this.disabledTimeRangeMessage=void 0,this.noAvailableTimesMessage=void 0,this._popup=new Rt(this,{focusRestoreSelector:"gui-date-time input",focusPopupSelector:'.gui-calendar__day-button[tabindex="0"]',isDisabled:()=>!!this.disabled,clickIntent:e=>e.closest(".gui-calendar__day-button")||e.closest(".gui-time-list__option")?"ignore":e.closest(".gui-date-time-input__part")||e.closest("gui-date-time-calendar")?"open":"toggle",keyToggleMode:"toggle"}),this.onToggleClick=e=>{e.stopPropagation(),this._popup.open?this._popup.close():this._popup.openAndFocus()}}createRenderRoot(){return this}render(){const e=Qe("datePicker",{icon:this.icon}),t=this._popup.open?d.html`<gui-date-time-calendar
1776
1776
  id=${`${this.uid}_popup`}
1777
1777
  role="dialog"
1778
1778
  aria-label=${this.label??"Calendar"}
@@ -1809,7 +1809,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1809
1809
  .noAvailableTimesMessage=${this.noAvailableTimesMessage}
1810
1810
  @blur=${this.onCalendarBlur}
1811
1811
  @change=${this.onCalendarChange}
1812
- ></gui-date-time-calendar>`:l.nothing;return l.html`
1812
+ ></gui-date-time-calendar>`:d.nothing;return d.html`
1813
1813
  ${le(this.uid??"",{label:this.label,hint:this.hint,required:this.required},!1,void 0,!1)}
1814
1814
 
1815
1815
  <div
@@ -1819,7 +1819,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1819
1819
  >
1820
1820
  <gui-date-time
1821
1821
  id="date-input"
1822
- class=${_.classMap(e.widgetClasses)}
1822
+ class=${S.classMap(e.widgetClasses)}
1823
1823
  .uid=${this.uid}
1824
1824
  .hint=${this.hint}
1825
1825
  .showErrors=${!1}
@@ -1875,7 +1875,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1875
1875
  </div>
1876
1876
 
1877
1877
  ${this.showErrors?j(this.uid??"",{errors:this.errors,touched:this.touched}):""}
1878
- `}onDateChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){if(!this._popup.open){e.stopPropagation();return}e.stopPropagation(),this.commitValue(e.detail.value),e.detail.value&&e.detail.commit&&this._popup.close()}commitValue(e){this.value=e??void 0;const t=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}validateBounds(e){if(!e)return null;const t=ee(e);if(isNaN(t.getTime()))return null;const i=ae(t),a=Gt(i,this.minDate,this.maxDate,this.disabledRanges,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage,disabledDateRangeMessage:this.disabledDateRangeMessage});if(a)return a;const r=Vs(this.disabledTimeRanges,i);return ta(ct(t),r)?this.disabledTimeRangeMessage??Vi:null}onCalendarBlur(){this._popup.closeOnFocusLeave()}};S([n.property({type:String})],k.prototype,"uid",2),S([n.property({type:String})],k.prototype,"label",2),S([n.property({type:String})],k.prototype,"hint",2),S([n.property({type:String})],k.prototype,"icon",2),S([n.property({type:String,attribute:"toggle-aria-label"})],k.prototype,"toggleAriaLabel",2),S([n.property({type:String})],k.prototype,"dayAriaLabel",2),S([n.property({type:String})],k.prototype,"monthAriaLabel",2),S([n.property({type:String})],k.prototype,"yearAriaLabel",2),S([n.property({type:String})],k.prototype,"hourAriaLabel",2),S([n.property({type:String})],k.prototype,"minuteAriaLabel",2),S([n.property({type:String})],k.prototype,"dayPeriodAriaLabel",2),S([n.property({type:Array})],k.prototype,"errors",2),S([n.property({type:Boolean})],k.prototype,"showErrors",2),S([n.property({type:Boolean})],k.prototype,"touched",2),S([n.property({type:Boolean})],k.prototype,"required",2),S([n.property({type:Boolean})],k.prototype,"disabled",2),S([n.property({type:Boolean,attribute:"readonly"})],k.prototype,"readOnly",2),S([n.property({type:String,attribute:"locale-id"})],k.prototype,"localeId",2),S([n.property({type:String})],k.prototype,"value",2),S([n.property({type:String,attribute:"prev-month-icon"})],k.prototype,"prevMonthIcon",2),S([n.property({type:String,attribute:"next-month-icon"})],k.prototype,"nextMonthIcon",2),S([n.property({type:String,attribute:"prev-month-aria-label"})],k.prototype,"prevMonthAriaLabel",2),S([n.property({type:String,attribute:"next-month-aria-label"})],k.prototype,"nextMonthAriaLabel",2),S([n.property({type:String,attribute:"select-year-aria-label"})],k.prototype,"selectYearAriaLabel",2),S([n.property({type:String,attribute:"year-grid-aria-label"})],k.prototype,"yearGridAriaLabel",2),S([n.property({type:String,attribute:"day-format"})],k.prototype,"dayFormat",2),S([n.property({type:String,attribute:"weekday-format"})],k.prototype,"weekdayFormat",2),S([n.property({type:String,attribute:"month-format"})],k.prototype,"monthFormat",2),S([n.property({type:String,attribute:"min-date"})],k.prototype,"minDate",2),S([n.property({type:String,attribute:"max-date"})],k.prototype,"maxDate",2),S([n.property({type:Array,attribute:"disabled-ranges"})],k.prototype,"disabledRanges",2),S([n.property({type:Number,attribute:"number-of-months"})],k.prototype,"numberOfMonths",2),S([n.property({type:String,attribute:"hour-format"})],k.prototype,"hourFormat",2),S([n.property({type:Number,attribute:"minute-step"})],k.prototype,"minuteStep",2),S([n.property({type:String,attribute:"min-time"})],k.prototype,"minTime",2),S([n.property({type:String,attribute:"max-time"})],k.prototype,"maxTime",2),S([n.property({type:Array,attribute:"disabled-time-ranges"})],k.prototype,"disabledTimeRanges",2),S([n.property({type:Boolean,attribute:"allow-custom-time"})],k.prototype,"allowCustomTime",2),S([n.property({type:String,attribute:"invalid-date-message"})],k.prototype,"invalidDateMessage",2),S([n.property({type:String,attribute:"min-date-message"})],k.prototype,"minDateMessage",2),S([n.property({type:String,attribute:"max-date-message"})],k.prototype,"maxDateMessage",2),S([n.property({type:String,attribute:"disabled-date-range-message"})],k.prototype,"disabledDateRangeMessage",2),S([n.property({type:String,attribute:"min-time-message"})],k.prototype,"minTimeMessage",2),S([n.property({type:String,attribute:"max-time-message"})],k.prototype,"maxTimeMessage",2),S([n.property({type:String,attribute:"disabled-time-range-message"})],k.prototype,"disabledTimeRangeMessage",2),S([n.property({type:String,attribute:"no-available-times-message"})],k.prototype,"noAvailableTimesMessage",2),k=S([n.customElement("gui-date-time-picker")],k),typeof customElements<"u"&&!customElements.get("gui-date-time-picker")&&customElements.define("gui-date-time-picker",k);var im=Object.defineProperty,am=Object.getOwnPropertyDescriptor,Xa=(e,t,i,a)=>{for(var r=a>1?void 0:a?am(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&im(t,i,r),r};let si=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
1878
+ `}onDateChange(e){e.stopPropagation(),this.commitValue(e.detail.value)}onDateBlur(){this.dispatchEvent(new CustomEvent("blur"))}onCalendarChange(e){if(!this._popup.open){e.stopPropagation();return}e.stopPropagation(),this.commitValue(e.detail.value),e.detail.value&&e.detail.commit&&this._popup.close()}commitValue(e){this.value=e??void 0;const t=this.validateBounds(this.value);this.dispatchEvent(new CustomEvent("change",{detail:{value:e??null},bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:t},bubbles:!0,composed:!0}))}validateBounds(e){if(!e)return null;const t=ee(e);if(isNaN(t.getTime()))return null;const i=ae(t),a=Yt(i,this.minDate,this.maxDate,this.disabledRanges,{minDateMessage:this.minDateMessage,maxDateMessage:this.maxDateMessage,disabledDateRangeMessage:this.disabledDateRangeMessage});if(a)return a;const r=Mn(this.disabledTimeRanges,i);return sa(gt(t),r)?this.disabledTimeRangeMessage??Hi:null}onCalendarBlur(){this._popup.closeOnFocusLeave()}};T([n.property({type:String})],k.prototype,"uid",2),T([n.property({type:String})],k.prototype,"label",2),T([n.property({type:String})],k.prototype,"hint",2),T([n.property({type:String})],k.prototype,"icon",2),T([n.property({type:String,attribute:"toggle-aria-label"})],k.prototype,"toggleAriaLabel",2),T([n.property({type:String})],k.prototype,"dayAriaLabel",2),T([n.property({type:String})],k.prototype,"monthAriaLabel",2),T([n.property({type:String})],k.prototype,"yearAriaLabel",2),T([n.property({type:String})],k.prototype,"hourAriaLabel",2),T([n.property({type:String})],k.prototype,"minuteAriaLabel",2),T([n.property({type:String})],k.prototype,"dayPeriodAriaLabel",2),T([n.property({type:Array})],k.prototype,"errors",2),T([n.property({type:Boolean})],k.prototype,"showErrors",2),T([n.property({type:Boolean})],k.prototype,"touched",2),T([n.property({type:Boolean})],k.prototype,"required",2),T([n.property({type:Boolean})],k.prototype,"disabled",2),T([n.property({type:Boolean,attribute:"readonly"})],k.prototype,"readOnly",2),T([n.property({type:String,attribute:"locale-id"})],k.prototype,"localeId",2),T([n.property({type:String})],k.prototype,"value",2),T([n.property({type:String,attribute:"prev-month-icon"})],k.prototype,"prevMonthIcon",2),T([n.property({type:String,attribute:"next-month-icon"})],k.prototype,"nextMonthIcon",2),T([n.property({type:String,attribute:"prev-month-aria-label"})],k.prototype,"prevMonthAriaLabel",2),T([n.property({type:String,attribute:"next-month-aria-label"})],k.prototype,"nextMonthAriaLabel",2),T([n.property({type:String,attribute:"select-year-aria-label"})],k.prototype,"selectYearAriaLabel",2),T([n.property({type:String,attribute:"year-grid-aria-label"})],k.prototype,"yearGridAriaLabel",2),T([n.property({type:String,attribute:"day-format"})],k.prototype,"dayFormat",2),T([n.property({type:String,attribute:"weekday-format"})],k.prototype,"weekdayFormat",2),T([n.property({type:String,attribute:"month-format"})],k.prototype,"monthFormat",2),T([n.property({type:String,attribute:"min-date"})],k.prototype,"minDate",2),T([n.property({type:String,attribute:"max-date"})],k.prototype,"maxDate",2),T([n.property({type:Array,attribute:"disabled-ranges"})],k.prototype,"disabledRanges",2),T([n.property({type:Number,attribute:"number-of-months"})],k.prototype,"numberOfMonths",2),T([n.property({type:String,attribute:"hour-format"})],k.prototype,"hourFormat",2),T([n.property({type:Number,attribute:"minute-step"})],k.prototype,"minuteStep",2),T([n.property({type:String,attribute:"min-time"})],k.prototype,"minTime",2),T([n.property({type:String,attribute:"max-time"})],k.prototype,"maxTime",2),T([n.property({type:Array,attribute:"disabled-time-ranges"})],k.prototype,"disabledTimeRanges",2),T([n.property({type:Boolean,attribute:"allow-custom-time"})],k.prototype,"allowCustomTime",2),T([n.property({type:String,attribute:"invalid-date-message"})],k.prototype,"invalidDateMessage",2),T([n.property({type:String,attribute:"min-date-message"})],k.prototype,"minDateMessage",2),T([n.property({type:String,attribute:"max-date-message"})],k.prototype,"maxDateMessage",2),T([n.property({type:String,attribute:"disabled-date-range-message"})],k.prototype,"disabledDateRangeMessage",2),T([n.property({type:String,attribute:"min-time-message"})],k.prototype,"minTimeMessage",2),T([n.property({type:String,attribute:"max-time-message"})],k.prototype,"maxTimeMessage",2),T([n.property({type:String,attribute:"disabled-time-range-message"})],k.prototype,"disabledTimeRangeMessage",2),T([n.property({type:String,attribute:"no-available-times-message"})],k.prototype,"noAvailableTimesMessage",2),k=T([n.customElement("gui-date-time-picker")],k),typeof customElements<"u"&&!customElements.get("gui-date-time-picker")&&customElements.define("gui-date-time-picker",k);var ag=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,zr=(e,t,i,a)=>{for(var r=a>1?void 0:a?rg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ag(t,i,r),r};let di=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
1879
1879
  <gui-date-time-picker
1880
1880
  .uid=${this.widget.uid}
1881
1881
  .label=${e.label}
@@ -1926,16 +1926,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1926
1926
  @blur=${()=>this.adapter.onBlur()}
1927
1927
  @change=${this.valueChanged}
1928
1928
  ></gui-date-time-picker>
1929
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Xa([f.consume({context:c.formContext}),n.property({attribute:!1})],si.prototype,"formContext",2),Xa([f.provide({context:c.inputContext})],si.prototype,"adapter",2),si=Xa([n.customElement("gui-date-time-picker-input")],si);const rm=Object.freeze(Object.defineProperty({__proto__:null,get DateTimePickerElement(){return si}},Symbol.toStringTag,{value:"Module"})),hn=e=>{const t={"gui-list__item":!0,"gui-list__item-selected":!!e.selected,"gui-list__item-focused":!!e.focused,"gui-list__item-disabled":!!e.disabled};return l.html`
1929
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};zr([f.consume({context:m.formContext}),n.property({attribute:!1})],di.prototype,"formContext",2),zr([f.provide({context:m.inputContext})],di.prototype,"adapter",2),di=zr([n.customElement("gui-date-time-picker-input")],di);const sg=Object.freeze(Object.defineProperty({__proto__:null,get DateTimePickerElement(){return di}},Symbol.toStringTag,{value:"Module"})),io=e=>{const t={"gui-list__item":!0,"gui-list__item-selected":!!e.selected,"gui-list__item-focused":!!e.focused,"gui-list__item-disabled":!!e.disabled};return d.html`
1930
1930
  <div
1931
1931
  role="option"
1932
- class=${_.classMap(t)}
1932
+ class=${S.classMap(t)}
1933
1933
  aria-selected=${e.selected?"true":"false"}
1934
1934
  aria-disabled=${e.disabled?"true":"false"}
1935
1935
  >
1936
1936
  ${e.template}
1937
1937
  </div>
1938
- `};var sm=Object.defineProperty,nm=Object.getOwnPropertyDescriptor,ot=(e,t,i,a)=>{for(var r=a>1?void 0:a?nm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&sm(t,i,r),r};let Qe=class extends l.LitElement{constructor(){super(...arguments),this.targetElement=void 0,this.uid=void 0,this.label=void 0,this.hint=void 0,this.required=void 0,this.errors=[],this.disabled=!1,this.readOnly=!1,this.touched=!1,this.native=!0,this.ariaController=new he(this,{getTargets:()=>Array.isArray(this.targetElement)?[...this.targetElement]:[this.targetElement],getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}render(){return super.render(),l.html`${le(this.uid,{label:this.label,hint:this.hint,required:this.required,errors:this.errors,touched:this.touched},!1,void 0,this.native)}`}};ot([n.property({type:Object})],Qe.prototype,"targetElement",2),ot([n.property({type:String})],Qe.prototype,"uid",2),ot([n.property({type:String})],Qe.prototype,"label",2),ot([n.property({type:String})],Qe.prototype,"hint",2),ot([n.property({type:Boolean})],Qe.prototype,"required",2),ot([n.property({type:Array})],Qe.prototype,"errors",2),ot([n.property({type:Boolean})],Qe.prototype,"disabled",2),ot([n.property({type:Boolean,attribute:"readonly"})],Qe.prototype,"readOnly",2),ot([n.property({type:Boolean})],Qe.prototype,"touched",2),ot([n.property({type:Boolean})],Qe.prototype,"native",2),Qe=ot([n.customElement("gui-label")],Qe),typeof customElements<"u"&&!customElements.get("gui-label")&&customElements.define("gui-label",Qe);const om=e=>e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"template")&&Object.prototype.hasOwnProperty.call(e,"value");function lm(e){const t=typeof e;return t==="string"||t==="number"}const dm=(e,{valueField:t})=>{if(e===null||typeof e!="object")return!1;const i=e,a=t??"value";return!!Object.prototype.hasOwnProperty.call(i,a)};function pm(e,{valueField:t}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const i=e,a=t??"value",r=Object.prototype.hasOwnProperty.call(i,a)?a:void 0;if(!r)throw new Error("No valueField exists on the object");return s=>{if(s===null||typeof s!="object")throw new Error("Item is not an object");const o=s;return{template:s,value:r?o[r]:"",...typeof o.disabled=="boolean"?{disabled:o.disabled}:{}}}}const um=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!om(e[0])){if(lm(e[0]))return e.map(i=>({template:i,value:i}));if(dm(e[0],t)){const i=pm(e[0],t);return e.map(i)}else throw new Error("Invalid list item shape")}return e};var hm=Object.defineProperty,mm=Object.getOwnPropertyDescriptor,Le=(e,t,i,a)=>{for(var r=a>1?void 0:a?mm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&hm(t,i,r),r};let De=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.valueField=void 0,this.label=void 0,this.hint=void 0,this.items=[],this.itemHeight=void 0,this.height=void 0,this._items=[],this._scrollTop=0,this._viewportHeight=0,this._focusedIndex=-1,this.buffer=5,this.onKeyDown=e=>{if(this.disabled||this.readOnly)return;const t=this.itemHeight??40,i=Math.ceil(this._viewportHeight/t),a=this.items.length-1;let r=!1;switch(e.key){case"ArrowDown":this.setFocusedIndex(this.findEnabledIndex(Math.min(this._focusedIndex+1,a),1)),r=!0;break;case"ArrowUp":this.setFocusedIndex(this.findEnabledIndex(Math.max(this._focusedIndex-1,0),-1)),r=!0;break;case"PageDown":this.setFocusedIndex(this.findEnabledIndex(Math.min(this._focusedIndex+i,a),1)),r=!0;break;case"PageUp":this.setFocusedIndex(this.findEnabledIndex(Math.max(this._focusedIndex-i,0),-1)),r=!0;break;case"Home":this.setFocusedIndex(this.findEnabledIndex(0,1)),r=!0;break;case"End":this.setFocusedIndex(this.findEnabledIndex(a,-1)),r=!0;break;case"Enter":case" ":{const s=this._items[this._focusedIndex];this._focusedIndex>=0&&s!=null&&!s.disabled&&this.selectItem(s),r=!0;break}}r&&e.preventDefault()},this.onFocus=()=>{if(!this.value||!this.items.length)return;const e=this._items.findIndex(t=>t.value===this.value);this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0}))},this.onFocusOut=e=>{e.relatedTarget&&this.contains(e.relatedTarget)||(this._focusedIndex=-1,this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:-1},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0})))}}willUpdate(e){super.willUpdate(e),e.has("items")&&this.updateItems(),(e.has("items")||e.has("_scrollTop")||e.has("height"))&&this.emitRangeChange(),this.syncHostAria()}syncHostAria(){this.setAttribute("role","listbox"),this.tabIndex=this.disabled?-1:0;const e=(t,i)=>{i===null?this.removeAttribute(t):this.setAttribute(t,i)};e("aria-required",this.required?"true":null),e("aria-disabled",this.disabled||this.readOnly?"true":null),e("aria-activedescendant",this._focusedIndex>=0?`${this.uid}-item-${this._focusedIndex}`:null),e("aria-label",this.label??null),e("aria-description",this.hint??null)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("focus",this.onFocus),this.addEventListener("focusout",this.onFocusOut)}firstUpdated(){this.measureViewport(),new ResizeObserver(()=>this.measureViewport()).observe(this.viewportElement)}render(){const e=this.height??300,t=this.itemHeight??40,i=(this.items?.length??0)*t,{offsetY:a}=this.calculateRange();return l.html`
1938
+ `};var ng=Object.defineProperty,og=Object.getOwnPropertyDescriptor,lt=(e,t,i,a)=>{for(var r=a>1?void 0:a?og(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ng(t,i,r),r};let je=class extends d.LitElement{constructor(){super(...arguments),this.targetElement=void 0,this.uid=void 0,this.label=void 0,this.hint=void 0,this.required=void 0,this.errors=[],this.disabled=!1,this.readOnly=!1,this.touched=!1,this.native=!0,this.ariaController=new he(this,{getTargets:()=>Array.isArray(this.targetElement)?[...this.targetElement]:[this.targetElement],getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}render(){return super.render(),d.html`${le(this.uid,{label:this.label,hint:this.hint,required:this.required,errors:this.errors,touched:this.touched},!1,void 0,this.native)}`}};lt([n.property({type:Object})],je.prototype,"targetElement",2),lt([n.property({type:String})],je.prototype,"uid",2),lt([n.property({type:String})],je.prototype,"label",2),lt([n.property({type:String})],je.prototype,"hint",2),lt([n.property({type:Boolean})],je.prototype,"required",2),lt([n.property({type:Array})],je.prototype,"errors",2),lt([n.property({type:Boolean})],je.prototype,"disabled",2),lt([n.property({type:Boolean,attribute:"readonly"})],je.prototype,"readOnly",2),lt([n.property({type:Boolean})],je.prototype,"touched",2),lt([n.property({type:Boolean})],je.prototype,"native",2),je=lt([n.customElement("gui-label")],je),typeof customElements<"u"&&!customElements.get("gui-label")&&customElements.define("gui-label",je);const lg=e=>e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"template")&&Object.prototype.hasOwnProperty.call(e,"value");function dg(e){const t=typeof e;return t==="string"||t==="number"}const ug=(e,{valueField:t})=>{if(e===null||typeof e!="object")return!1;const i=e,a=t??"value";return!!Object.prototype.hasOwnProperty.call(i,a)};function pg(e,{valueField:t}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const i=e,a=t??"value",r=Object.prototype.hasOwnProperty.call(i,a)?a:void 0;if(!r)throw new Error("No valueField exists on the object");return s=>{if(s===null||typeof s!="object")throw new Error("Item is not an object");const o=s;return{template:s,value:r?o[r]:"",...typeof o.disabled=="boolean"?{disabled:o.disabled}:{}}}}const hg=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!lg(e[0])){if(dg(e[0]))return e.map(i=>({template:i,value:i}));if(ug(e[0],t)){const i=pg(e[0],t);return e.map(i)}else throw new Error("Invalid list item shape")}return e};var cg=Object.defineProperty,mg=Object.getOwnPropertyDescriptor,Le=(e,t,i,a)=>{for(var r=a>1?void 0:a?mg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&cg(t,i,r),r};let De=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.valueField=void 0,this.label=void 0,this.hint=void 0,this.items=[],this.itemHeight=void 0,this.height=void 0,this._items=[],this._scrollTop=0,this._viewportHeight=0,this._focusedIndex=-1,this.buffer=5,this.onKeyDown=e=>{if(this.disabled||this.readOnly)return;const t=this.itemHeight??40,i=Math.ceil(this._viewportHeight/t),a=this.items.length-1;let r=!1;switch(e.key){case"ArrowDown":this.setFocusedIndex(this.findEnabledIndex(Math.min(this._focusedIndex+1,a),1)),r=!0;break;case"ArrowUp":this.setFocusedIndex(this.findEnabledIndex(Math.max(this._focusedIndex-1,0),-1)),r=!0;break;case"PageDown":this.setFocusedIndex(this.findEnabledIndex(Math.min(this._focusedIndex+i,a),1)),r=!0;break;case"PageUp":this.setFocusedIndex(this.findEnabledIndex(Math.max(this._focusedIndex-i,0),-1)),r=!0;break;case"Home":this.setFocusedIndex(this.findEnabledIndex(0,1)),r=!0;break;case"End":this.setFocusedIndex(this.findEnabledIndex(a,-1)),r=!0;break;case"Enter":case" ":{const s=this._items[this._focusedIndex];this._focusedIndex>=0&&s!=null&&!s.disabled&&this.selectItem(s),r=!0;break}}r&&e.preventDefault()},this.onFocus=()=>{if(!this.value||!this.items.length)return;const e=this._items.findIndex(t=>t.value===this.value);this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0}))},this.onFocusOut=e=>{e.relatedTarget&&this.contains(e.relatedTarget)||(this._focusedIndex=-1,this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:-1},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0})))}}willUpdate(e){super.willUpdate(e),e.has("items")&&this.updateItems(),(e.has("items")||e.has("_scrollTop")||e.has("height"))&&this.emitRangeChange(),this.syncHostAria()}syncHostAria(){this.setAttribute("role","listbox"),this.tabIndex=this.disabled?-1:0;const e=(t,i)=>{i===null?this.removeAttribute(t):this.setAttribute(t,i)};e("aria-required",this.required?"true":null),e("aria-disabled",this.disabled||this.readOnly?"true":null),e("aria-activedescendant",this._focusedIndex>=0?`${this.uid}-item-${this._focusedIndex}`:null),e("aria-label",this.label??null),e("aria-description",this.hint??null)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("focus",this.onFocus),this.addEventListener("focusout",this.onFocusOut)}firstUpdated(){this.measureViewport(),new ResizeObserver(()=>this.measureViewport()).observe(this.viewportElement)}render(){const e=this.height??300,t=this.itemHeight??40,i=(this.items?.length??0)*t,{offsetY:a}=this.calculateRange();return d.html`
1939
1939
  <div
1940
1940
  class="gui-list__scroll-viewport"
1941
1941
  style="max-height: ${e}px; min-height: 40px; overflow-y: auto; position: relative; display: block;"
@@ -1953,7 +1953,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1953
1953
  <slot></slot>
1954
1954
  </div>
1955
1955
  </div>
1956
- `}focusItemAtIndex(e){this._focusedIndex=e}scrollToSelectedIndex(){const e=this._items.findIndex(t=>t.value===this.value);this.scrollToIndex(e)}scrollToIndex(e){const t=this.itemHeight??40,i=this.height??300,a=e*t,r=a+t,s=this.viewportElement.scrollTop,o=s+i;a<s?this.viewportElement.scrollTop=a:r>o&&(this.viewportElement.scrollTop=r-i)}selectItem(e){this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0}))}findEnabledIndex(e,t){for(let i=e;i>=0&&i<this._items.length;i+=t)if(!this._items[i]?.disabled)return i;return-1}setFocusedIndex(e){e<0||e>=this.items.length||(this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0})))}updateItems(){this._items=um(this.items,{valueField:this.valueField}),this.dispatchEvent(new CustomEvent("gui-update-items",{detail:this._items,bubbles:!0,composed:!0}))}emitRangeChange(){const{startIndex:e,endIndex:t}=this.calculateRange();this.dispatchEvent(new CustomEvent("gui-range-change",{detail:{startIndex:e,endIndex:t},bubbles:!0,composed:!0}))}measureViewport(){this.viewportElement&&(this._viewportHeight=this.viewportElement.offsetHeight,this.emitRangeChange())}onScroll(e){const t=e.target;this._scrollTop=t.scrollTop}calculateRange(){const e=this.itemHeight??40,t=this.items?.length??0,i=Math.ceil(this._viewportHeight/e),a=Math.floor(this._scrollTop/e),r=Math.max(0,a-this.buffer),s=Math.min(t,a+i+this.buffer),o=r*e;return{startIndex:r,endIndex:s,offsetY:o}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("focus",this.onFocus),this.removeEventListener("focusout",this.onFocusOut)}};Le([n.property({type:String})],De.prototype,"uid",2),Le([n.property({type:Boolean})],De.prototype,"touched",2),Le([n.property({type:Boolean})],De.prototype,"required",2),Le([n.property({type:Boolean})],De.prototype,"disabled",2),Le([n.property({type:Boolean,attribute:"readonly"})],De.prototype,"readOnly",2),Le([n.property({type:String})],De.prototype,"value",2),Le([n.property({type:String})],De.prototype,"valueField",2),Le([n.property({type:String})],De.prototype,"label",2),Le([n.property({type:String})],De.prototype,"hint",2),Le([n.property({type:Array})],De.prototype,"items",2),Le([n.property({type:Number})],De.prototype,"itemHeight",2),Le([n.property({type:Number})],De.prototype,"height",2),Le([n.state()],De.prototype,"_items",2),Le([n.state()],De.prototype,"_scrollTop",2),Le([n.state()],De.prototype,"_viewportHeight",2),Le([n.state()],De.prototype,"_focusedIndex",2),Le([n.query(".gui-list__scroll-viewport")],De.prototype,"viewportElement",2),De=Le([n.customElement("gui-list")],De),typeof customElements<"u"&&!customElements.get("gui-list")&&customElements.define("gui-list",De);var cm=Object.defineProperty,ym=Object.getOwnPropertyDescriptor,da=(e,t,i,a)=>{for(var r=a>1?void 0:a?ym(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&cm(t,i,r),r};let It=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.errors=[],this.touched=!1}createRenderRoot(){return this}render(){return super.render(),l.html`${j(this.uid,{touched:this.touched,errors:this.errors})}`}};da([n.property({type:String})],It.prototype,"uid",2),da([n.property({type:Array})],It.prototype,"errors",2),da([n.property({type:Boolean})],It.prototype,"touched",2),It=da([n.customElement("gui-errors")],It),typeof customElements<"u"&&!customElements.get("gui-errors")&&customElements.define("gui-errors",It);var gm=Object.defineProperty,bm=Object.getOwnPropertyDescriptor,it=(e,t,i,a)=>{for(var r=a>1?void 0:a?bm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&gm(t,i,r),r};let Ye=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.debouncer=new vr.Subject,this.subscriptions=[],this._range={start:0,end:10},this._filteredItems=[],this._listItems=[],this._focusedIndex=-1,this._isFiltering=!1,this._isListVisible=!1,this._selectedItem=void 0,this._ignoreNextFocus=!1,this.onDocumentClick=e=>{if(!this._isListVisible)return;const t=e.composedPath(),i=this._inputRef&&t.includes(this._inputRef),a=this._listRef&&t.includes(this._listRef);!i&&!a&&(this._isListVisible=!1)}}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onDocumentClick),this.classList.add("gui-dropdown","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this._filteredItems=this.adapter.templateData.items,this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>{const e=this.adapter.templateData;e.items&&this._listItems?.length===0&&this._filteredItems?.length===0&&(this._filteredItems=e.items,this._listItems=e.items),this.requestUpdate()}),this.debouncer.pipe(vr.debounceTime(this.adapter.templateData.inputDebounce??500)).subscribe(e=>{this._filterItems(e)}))}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}_onRangeChange(e){this._range={start:e.detail.startIndex,end:e.detail.endIndex}}_onUpdateItems(e){const t=e.detail||[];if(this._listItems=t,!this._selectedItem&&this.adapter.templateData.value!=null){const i=t.find(a=>a.value===this.adapter.templateData.value);i&&(this._selectedItem=i)}}_onFocusChange(e){this._focusedIndex=e.detail.index}_onClickItem(e,t){if(this.adapter.templateData.readonly||e.disabled)return;const i=this.adapter.templateData;this.adapter.valueChanged(e.value),this.adapter.filterChanged(""),this._focusedIndex=t,this._selectedItem=e,this._isFiltering=!1,this._isListVisible=!1,this._listRef&&(this._listRef.focusItemAtIndex(t),this._inputRef.value=i.valueField?e.template[i.valueField]:e.template)}_onValueChange(e){const t=e.detail.value;this.adapter.valueChanged(t),this.adapter.filterChanged(""),this._selectedItem=this._listItems.find(i=>i.value===t),this._isFiltering=!1,this._isListVisible=!1}async _onKeyDown(e){switch(e.key){case"ArrowDown":e.preventDefault(),this._isListVisible=!0,await this.updateComplete,this._listRef.focus(),this._listRef.scrollToSelectedIndex();break;case"Enter":this._inputRef.value||(this.adapter.valueChanged(null),this._isListVisible=!1,this._isFiltering=!1);break}}_onInput(e){const t=e.target.value;this.debouncer.next(t)}_filterItems(e){const t=this.adapter.templateData,i=!!this.widget.on?.filter;if(this.adapter.filterChanged(e),e&&!i){this._isFiltering=!0,this._isListVisible=!0;const a=t.searchFields??[t.labelField,t.valueField].filter(d=>!!d),r=a.length>0,o=(t.items||[]).filter(d=>{if(d===null||typeof d!="object")return d!=null&&d.toString().toLowerCase().includes(e.toLowerCase());const u=Object.keys(d),h=(m,y)=>m||d[y].toString().toLowerCase().includes(e.toLowerCase());return r?u.filter(m=>a.includes(m)).reduce(h,!1):u.reduce(h,!1)});this._filteredItems=[...o]}else this._isFiltering=!1,this._filteredItems=[...t.items]}_onWidgetKeyDown(e){e.key!=="Escape"||!this._isListVisible||(e.preventDefault(),e.stopPropagation(),this._isListVisible=!1,this._isFiltering=!1,this._ignoreNextFocus=!0,this._inputRef?.focus(),setTimeout(()=>{this._ignoreNextFocus=!1}))}async _onFocus(){this._ignoreNextFocus||(this._isListVisible=!0,await this.updateComplete,this._listRef.scrollToSelectedIndex())}_onFocusOutInput(e){const t=e.relatedTarget;t&&this.contains(t)||(this.adapter.onBlur(),this._isListVisible=!1,this._isFiltering=!1)}_onBlur(){this.adapter.onBlur(),this._isListVisible=!1,this._isFiltering=!1}render(){const e=this.adapter.templateData,t=e.touched&&e.errors&&e.errors.length>0,i=this._listItems.slice(this._range.start,this._range.end),a=this.adapter.getItemRenderer(e.itemRenderer,hn),s=this._selectedItem?.template!==null&&typeof this._selectedItem?.template=="object"?e.labelField??"label":null,o=s?this._selectedItem?.template[s]:this._selectedItem?.template,d=!!this.widget.on?.filter;return l.html`
1956
+ `}focusItemAtIndex(e){this._focusedIndex=e}scrollToSelectedIndex(){const e=this._items.findIndex(t=>t.value===this.value);this.scrollToIndex(e)}scrollToIndex(e){const t=this.itemHeight??40,i=this.height??300,a=e*t,r=a+t,s=this.viewportElement.scrollTop,o=s+i;a<s?this.viewportElement.scrollTop=a:r>o&&(this.viewportElement.scrollTop=r-i)}selectItem(e){this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0}))}findEnabledIndex(e,t){for(let i=e;i>=0&&i<this._items.length;i+=t)if(!this._items[i]?.disabled)return i;return-1}setFocusedIndex(e){e<0||e>=this.items.length||(this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0})))}updateItems(){this._items=hg(this.items,{valueField:this.valueField}),this.dispatchEvent(new CustomEvent("gui-update-items",{detail:this._items,bubbles:!0,composed:!0}))}emitRangeChange(){const{startIndex:e,endIndex:t}=this.calculateRange();this.dispatchEvent(new CustomEvent("gui-range-change",{detail:{startIndex:e,endIndex:t},bubbles:!0,composed:!0}))}measureViewport(){this.viewportElement&&(this._viewportHeight=this.viewportElement.offsetHeight,this.emitRangeChange())}onScroll(e){const t=e.target;this._scrollTop=t.scrollTop}calculateRange(){const e=this.itemHeight??40,t=this.items?.length??0,i=Math.ceil(this._viewportHeight/e),a=Math.floor(this._scrollTop/e),r=Math.max(0,a-this.buffer),s=Math.min(t,a+i+this.buffer),o=r*e;return{startIndex:r,endIndex:s,offsetY:o}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("focus",this.onFocus),this.removeEventListener("focusout",this.onFocusOut)}};Le([n.property({type:String})],De.prototype,"uid",2),Le([n.property({type:Boolean})],De.prototype,"touched",2),Le([n.property({type:Boolean})],De.prototype,"required",2),Le([n.property({type:Boolean})],De.prototype,"disabled",2),Le([n.property({type:Boolean,attribute:"readonly"})],De.prototype,"readOnly",2),Le([n.property({type:String})],De.prototype,"value",2),Le([n.property({type:String})],De.prototype,"valueField",2),Le([n.property({type:String})],De.prototype,"label",2),Le([n.property({type:String})],De.prototype,"hint",2),Le([n.property({type:Array})],De.prototype,"items",2),Le([n.property({type:Number})],De.prototype,"itemHeight",2),Le([n.property({type:Number})],De.prototype,"height",2),Le([n.state()],De.prototype,"_items",2),Le([n.state()],De.prototype,"_scrollTop",2),Le([n.state()],De.prototype,"_viewportHeight",2),Le([n.state()],De.prototype,"_focusedIndex",2),Le([n.query(".gui-list__scroll-viewport")],De.prototype,"viewportElement",2),De=Le([n.customElement("gui-list")],De),typeof customElements<"u"&&!customElements.get("gui-list")&&customElements.define("gui-list",De);var yg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,ca=(e,t,i,a)=>{for(var r=a>1?void 0:a?gg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&yg(t,i,r),r};let Bt=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.errors=[],this.touched=!1}createRenderRoot(){return this}render(){return super.render(),d.html`${j(this.uid,{touched:this.touched,errors:this.errors})}`}};ca([n.property({type:String})],Bt.prototype,"uid",2),ca([n.property({type:Array})],Bt.prototype,"errors",2),ca([n.property({type:Boolean})],Bt.prototype,"touched",2),Bt=ca([n.customElement("gui-errors")],Bt),typeof customElements<"u"&&!customElements.get("gui-errors")&&customElements.define("gui-errors",Bt);var bg=Object.defineProperty,fg=Object.getOwnPropertyDescriptor,at=(e,t,i,a)=>{for(var r=a>1?void 0:a?fg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&bg(t,i,r),r};let Ye=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.debouncer=new ds.Subject,this.subscriptions=[],this._range={start:0,end:10},this._filteredItems=[],this._listItems=[],this._focusedIndex=-1,this._isFiltering=!1,this._isListVisible=!1,this._selectedItem=void 0,this._ignoreNextFocus=!1,this.onDocumentClick=e=>{if(!this._isListVisible)return;const t=e.composedPath(),i=this._inputRef&&t.includes(this._inputRef),a=this._listRef&&t.includes(this._listRef);!i&&!a&&(this._isListVisible=!1)}}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onDocumentClick),this.classList.add("gui-dropdown","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this._filteredItems=this.adapter.templateData.items,this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>{const e=this.adapter.templateData;e.items&&this._listItems?.length===0&&this._filteredItems?.length===0&&(this._filteredItems=e.items,this._listItems=e.items),this.requestUpdate()}),this.debouncer.pipe(ds.debounceTime(this.adapter.templateData.inputDebounce??500)).subscribe(e=>{this._filterItems(e)}))}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}_onRangeChange(e){this._range={start:e.detail.startIndex,end:e.detail.endIndex}}_onUpdateItems(e){const t=e.detail||[];if(this._listItems=t,!this._selectedItem&&this.adapter.templateData.value!=null){const i=t.find(a=>a.value===this.adapter.templateData.value);i&&(this._selectedItem=i)}}_onFocusChange(e){this._focusedIndex=e.detail.index}_onClickItem(e,t){if(this.adapter.templateData.readonly||e.disabled)return;const i=this.adapter.templateData;this.adapter.valueChanged(e.value),this.adapter.filterChanged(""),this._focusedIndex=t,this._selectedItem=e,this._isFiltering=!1,this._isListVisible=!1,this._listRef&&(this._listRef.focusItemAtIndex(t),this._inputRef.value=i.valueField?e.template[i.valueField]:e.template)}_onValueChange(e){const t=e.detail.value;this.adapter.valueChanged(t),this.adapter.filterChanged(""),this._selectedItem=this._listItems.find(i=>i.value===t),this._isFiltering=!1,this._isListVisible=!1}async _onKeyDown(e){switch(e.key){case"ArrowDown":e.preventDefault(),this._isListVisible=!0,await this.updateComplete,this._listRef.focus(),this._listRef.scrollToSelectedIndex();break;case"Enter":this._inputRef.value||(this.adapter.valueChanged(null),this._isListVisible=!1,this._isFiltering=!1);break}}_onInput(e){const t=e.target.value;this.debouncer.next(t)}_filterItems(e){const t=this.adapter.templateData,i=!!this.widget.on?.filter;if(this.adapter.filterChanged(e),e&&!i){this._isFiltering=!0,this._isListVisible=!0;const a=t.searchFields??[t.labelField,t.valueField].filter(l=>!!l),r=a.length>0,o=(t.items||[]).filter(l=>{if(l===null||typeof l!="object")return l!=null&&l.toString().toLowerCase().includes(e.toLowerCase());const p=Object.keys(l),h=(c,y)=>c||l[y].toString().toLowerCase().includes(e.toLowerCase());return r?p.filter(c=>a.includes(c)).reduce(h,!1):p.reduce(h,!1)});this._filteredItems=[...o]}else this._isFiltering=!1,this._filteredItems=[...t.items]}_onWidgetKeyDown(e){e.key!=="Escape"||!this._isListVisible||(e.preventDefault(),e.stopPropagation(),this._isListVisible=!1,this._isFiltering=!1,this._ignoreNextFocus=!0,this._inputRef?.focus(),setTimeout(()=>{this._ignoreNextFocus=!1}))}async _onFocus(){this._ignoreNextFocus||(this._isListVisible=!0,await this.updateComplete,this._listRef.scrollToSelectedIndex())}_onFocusOutInput(e){const t=e.relatedTarget;t&&this.contains(t)||(this.adapter.onBlur(),this._isListVisible=!1,this._isFiltering=!1)}_onBlur(){this.adapter.onBlur(),this._isListVisible=!1,this._isFiltering=!1}render(){const e=this.adapter.templateData,t=e.touched&&e.errors&&e.errors.length>0,i=this._listItems.slice(this._range.start,this._range.end),a=this.adapter.getItemRenderer(e.itemRenderer,io),s=this._selectedItem?.template!==null&&typeof this._selectedItem?.template=="object"?e.labelField??"label":null,o=s?this._selectedItem?.template[s]:this._selectedItem?.template,l=!!this.widget.on?.filter;return d.html`
1957
1957
  <gui-label
1958
1958
  .targetElement=${[this._listRef,this._inputRef]}
1959
1959
  .uid=${this.widget.uid}
@@ -1977,7 +1977,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1977
1977
  ?disabled=${e.disabled}
1978
1978
  ?readonly=${e.readonly}
1979
1979
  placeholder=${e.placeholder??""}
1980
- autocomplete=${e.autocomplete||l.nothing}
1980
+ autocomplete=${e.autocomplete||d.nothing}
1981
1981
  @keydown=${this._onKeyDown}
1982
1982
  @input=${this._onInput}
1983
1983
  @focusout=${this._onFocusOutInput}
@@ -1985,8 +1985,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1985
1985
  aria-expanded=${this._isListVisible?"true":"false"}
1986
1986
  aria-controls=${`${this.widget.uid}-list`}
1987
1987
  aria-autocomplete="list"
1988
- aria-labelledby=${e.label?`${this.widget.uid}_label`:l.nothing}
1989
- aria-describedby=${e.hint?`${this.widget.uid}_hint`:l.nothing}
1988
+ aria-labelledby=${e.label?`${this.widget.uid}_label`:d.nothing}
1989
+ aria-describedby=${e.hint?`${this.widget.uid}_hint`:d.nothing}
1990
1990
  />
1991
1991
  <span class="gui-dropdown__arrow"
1992
1992
  ><svg
@@ -2006,7 +2006,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2006
2006
  .uid=${this.widget.uid}
2007
2007
  .value=${e.value??""}
2008
2008
  .valueField=${e.valueField}
2009
- .items=${this._isFiltering&&!d?this._filteredItems:e.items}
2009
+ .items=${this._isFiltering&&!l?this._filteredItems:e.items}
2010
2010
  .itemHeight=${e.itemHeight}
2011
2011
  .height=${e.height}
2012
2012
  ?required=${e.validator?.required}
@@ -2021,29 +2021,29 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2021
2021
  @blur=${this._onBlur}
2022
2022
  @change=${this._onValueChange}
2023
2023
  >
2024
- ${i.map((p,u)=>{const h=this._range.start+u,m=e.value===p.value,y=this._focusedIndex===h,g=!!e.disabled||!!p.disabled,A=e.labelField??"label",Ne=p.template!==null&&typeof p.template=="object"&&A&&!e.itemRenderer?p.template[A]:p.template;return l.html`
2024
+ ${i.map((u,p)=>{const h=this._range.start+p,c=e.value===u.value,y=this._focusedIndex===h,g=!!e.disabled||!!u.disabled,_=e.labelField??"label",Ae=u.template!==null&&typeof u.template=="object"&&_&&!e.itemRenderer?u.template[_]:u.template;return d.html`
2025
2025
  <div
2026
2026
  role="option"
2027
2027
  tabindex="-1"
2028
2028
  class="gui-list__item-wrapper"
2029
2029
  id="${this.widget.uid}-item-${h}"
2030
2030
  style="height: ${e.itemHeight||40}px"
2031
- aria-selected=${m?"true":"false"}
2031
+ aria-selected=${c?"true":"false"}
2032
2032
  aria-disabled=${g?"true":"false"}
2033
- @click=${()=>this._onClickItem(p,h)}
2033
+ @click=${()=>this._onClickItem(u,h)}
2034
2034
  >
2035
- ${a({template:Ne,value:p.value,index:h,selected:m,disabled:g,focused:y})}
2035
+ ${a({template:Ae,value:u.value,index:h,selected:c,disabled:g,focused:y})}
2036
2036
  </div>
2037
2037
  `})}
2038
2038
  </gui-list>
2039
2039
  </div>
2040
2040
 
2041
- ${t?l.html`<gui-errors
2041
+ ${t?d.html`<gui-errors
2042
2042
  .uid=${this.widget.uid}
2043
2043
  .errors=${e.errors}
2044
2044
  .touched=${e.touched}
2045
- ></gui-errors>`:l.nothing}
2046
- `}};it([f.consume({context:c.formContext}),n.property({attribute:!1})],Ye.prototype,"formContext",2),it([f.provide({context:c.inputContext})],Ye.prototype,"adapter",2),it([n.state()],Ye.prototype,"_range",2),it([n.state()],Ye.prototype,"_filteredItems",2),it([n.state()],Ye.prototype,"_listItems",2),it([n.state()],Ye.prototype,"_focusedIndex",2),it([n.state()],Ye.prototype,"_isFiltering",2),it([n.state()],Ye.prototype,"_isListVisible",2),it([n.state()],Ye.prototype,"_selectedItem",2),it([n.query("input")],Ye.prototype,"_inputRef",2),it([n.query("gui-list")],Ye.prototype,"_listRef",2),Ye=it([n.customElement("gui-dropdown-input")],Ye);const fm=Object.freeze(Object.defineProperty({__proto__:null,get DropdownElement(){return Ye}},Symbol.toStringTag,{value:"Module"}));var vm=Object.defineProperty,Dm=Object.getOwnPropertyDescriptor,_t=(e,t,i,a)=>{for(var r=a>1?void 0:a?Dm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&vm(t,i,r),r};let gt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[],this._range={start:0,end:10},this._listItems=[],this._focusedIndex=-1}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-list","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>{const e=this.adapter.templateData;e.items&&this._listItems.length===0&&(this._listItems=e.items),this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){const e=this.adapter.templateData,t=e.touched&&e.errors&&e.errors.length>0,i=this._listItems.slice(this._range.start,this._range.end),a=this.adapter.getItemRenderer(e.itemRenderer,hn);return l.html`
2045
+ ></gui-errors>`:d.nothing}
2046
+ `}};at([f.consume({context:m.formContext}),n.property({attribute:!1})],Ye.prototype,"formContext",2),at([f.provide({context:m.inputContext})],Ye.prototype,"adapter",2),at([n.state()],Ye.prototype,"_range",2),at([n.state()],Ye.prototype,"_filteredItems",2),at([n.state()],Ye.prototype,"_listItems",2),at([n.state()],Ye.prototype,"_focusedIndex",2),at([n.state()],Ye.prototype,"_isFiltering",2),at([n.state()],Ye.prototype,"_isListVisible",2),at([n.state()],Ye.prototype,"_selectedItem",2),at([n.query("input")],Ye.prototype,"_inputRef",2),at([n.query("gui-list")],Ye.prototype,"_listRef",2),Ye=at([n.customElement("gui-dropdown-input")],Ye);const vg=Object.freeze(Object.defineProperty({__proto__:null,get DropdownElement(){return Ye}},Symbol.toStringTag,{value:"Module"}));var Dg=Object.defineProperty,wg=Object.getOwnPropertyDescriptor,At=(e,t,i,a)=>{for(var r=a>1?void 0:a?wg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Dg(t,i,r),r};let ft=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[],this._range={start:0,end:10},this._listItems=[],this._focusedIndex=-1}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-list","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>{const e=this.adapter.templateData;e.items&&this._listItems.length===0&&(this._listItems=e.items),this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}render(){const e=this.adapter.templateData,t=e.touched&&e.errors&&e.errors.length>0,i=this._listItems.slice(this._range.start,this._range.end),a=this.adapter.getItemRenderer(e.itemRenderer,io);return d.html`
2047
2047
  <gui-label
2048
2048
  .targetElement=${this._guiListRef}
2049
2049
  .uid=${this.widget.uid}
@@ -2067,44 +2067,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2067
2067
  ?touched=${e.touched}
2068
2068
  ?disabled=${e.disabled}
2069
2069
  ?readonly=${e.readonly}
2070
- aria-labelledby=${e.label?`${this.widget.uid}_label`:l.nothing}
2071
- aria-describedby=${e.hint?`${this.widget.uid}_hint`:l.nothing}
2070
+ aria-labelledby=${e.label?`${this.widget.uid}_label`:d.nothing}
2071
+ aria-describedby=${e.hint?`${this.widget.uid}_hint`:d.nothing}
2072
2072
  @gui-range-change=${this._onRangeChange}
2073
2073
  @gui-update-items=${this._onUpdateItems}
2074
2074
  @gui-focus-change=${this._onFocusChange}
2075
2075
  @blur=${()=>this.adapter.onBlur()}
2076
2076
  @change=${this._valueChanged}
2077
2077
  >
2078
- ${i.map((r,s)=>{const o=this._range.start+s,d=e.value===r.value,p=this._focusedIndex===o,u=!!e.disabled||!!r.disabled,h=e.labelField??"label",y=r.template!==null&&typeof r.template=="object"&&h&&!e.itemRenderer?r.template[h]:r.template;return l.html`
2078
+ ${i.map((r,s)=>{const o=this._range.start+s,l=e.value===r.value,u=this._focusedIndex===o,p=!!e.disabled||!!r.disabled,h=e.labelField??"label",y=r.template!==null&&typeof r.template=="object"&&h&&!e.itemRenderer?r.template[h]:r.template;return d.html`
2079
2079
  <div
2080
2080
  role="option"
2081
2081
  tabindex="-1"
2082
2082
  class="gui-list__item-wrapper"
2083
2083
  id="${this.widget.uid}-item-${o}"
2084
2084
  style="height: ${e.itemHeight||40}px"
2085
- aria-selected=${d?"true":"false"}
2086
- aria-disabled=${u?"true":"false"}
2085
+ aria-selected=${l?"true":"false"}
2086
+ aria-disabled=${p?"true":"false"}
2087
2087
  @click=${()=>this._onClickItem(r,o)}
2088
2088
  >
2089
- ${a({template:y,value:r.value,index:o,selected:d,disabled:u,focused:p})}
2089
+ ${a({template:y,value:r.value,index:o,selected:l,disabled:p,focused:u})}
2090
2090
  </div>
2091
2091
  `})}
2092
2092
  </gui-list>
2093
2093
  </div>
2094
2094
 
2095
- ${t?l.html`<gui-errors
2095
+ ${t?d.html`<gui-errors
2096
2096
  .uid=${this.widget.uid}
2097
2097
  .errors=${e.errors}
2098
2098
  .touched=${e.touched}
2099
- ></gui-errors>`:l.nothing}
2100
- `}_onRangeChange(e){this._range={start:e.detail.startIndex,end:e.detail.endIndex}}_onUpdateItems(e){this._listItems=e.detail||[]}_onFocusChange(e){this._focusedIndex=e.detail.index}_onClickItem(e,t){this.adapter.templateData.disabled||e.disabled||(this.adapter.valueChanged(e.value),this._focusedIndex=t,this._guiListRef&&typeof this._guiListRef.focusItemAtIndex=="function"&&this._guiListRef.focusItemAtIndex(t))}_valueChanged(e){this.adapter.templateData.readonly||this.adapter.valueChanged(e.detail.value)}};_t([f.consume({context:c.formContext}),n.property({attribute:!1})],gt.prototype,"formContext",2),_t([f.provide({context:c.inputContext})],gt.prototype,"adapter",2),_t([n.state()],gt.prototype,"_range",2),_t([n.state()],gt.prototype,"_listItems",2),_t([n.state()],gt.prototype,"_focusedIndex",2),_t([n.query("gui-list")],gt.prototype,"_guiListRef",2),gt=_t([n.customElement("gui-list-input")],gt);const wm=Object.freeze(Object.defineProperty({__proto__:null,get ListElement(){return gt}},Symbol.toStringTag,{value:"Module"}));var $m=Object.defineProperty,km=Object.getOwnPropertyDescriptor,Qa=(e,t,i,a)=>{for(var r=a>1?void 0:a?km(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&$m(t,i,r),r};let ni=class extends l.LitElement{constructor(){super(...arguments),this.md=void 0,this.dependencies=void 0}createRenderRoot(){return this}render(){return l.html`${bn.unsafeHTML(this.dependencies?.markdown?.parse(this.md??""))}`}};Qa([n.property({type:String})],ni.prototype,"md",2),Qa([n.property({type:Object})],ni.prototype,"dependencies",2),ni=Qa([n.customElement("gui-markdown-text")],ni),typeof customElements<"u"&&!customElements.get("gui-markdown-text")&&customElements.define("gui-markdown-text",ni);var Sm=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,Z=(e,t,i,a)=>{for(var r=a>1?void 0:a?_m(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Sm(t,i,r),r};let F=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.tools=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimumHeight=void 0,this.autoGrow=!1,this.defaultOpenPreview=void 0,this.maxLength=void 0,this.headingTitle=void 0,this.boldTitle=void 0,this.italicTitle=void 0,this.strikethroughTitle=void 0,this.quoteTitle=void 0,this.linkTitle=void 0,this.orderedListTitle=void 0,this.unorderedListTitle=void 0,this.splitViewTitle=void 0,this.toolbarAriaLabel=void 0,this.dependencies=void 0,this.splitViewActive=!1,this.activeFormats={},this.splitViewInitialized=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`textarea[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}updated(){this.recalculateAutoGrow()}willUpdate(e){!this.splitViewInitialized&&e.has("defaultOpenPreview")&&(this.splitViewActive=!!this.defaultOpenPreview,this.splitViewInitialized=!0)}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,placeholder:this.placeholder,counterMode:this.counterMode??"remaining",minimumHeight:this.minimumHeight??120,autoGrow:this.autoGrow??!1,defaultOpenPreview:this.defaultOpenPreview??!1,maxLength:this.maxLength,dependencies:this.dependencies},t={"gui-widget-input":!0,"gui-markdown--icon":!1};let i=l.html``;if(e.counterMode&&e.maxLength){const r={"gui-markdown--counter":!0,"gui-markdown--counter__error":(e.value?.length??0)>e.maxLength},s=e.counterMode==="current"?l.html`<span>${e.value?.length??0}</span>`:l.html`<span>${e.maxLength-(e.value?.length??0)}</span>`;i=l.html`<div class=${_.classMap(r)}>
2099
+ ></gui-errors>`:d.nothing}
2100
+ `}_onRangeChange(e){this._range={start:e.detail.startIndex,end:e.detail.endIndex}}_onUpdateItems(e){this._listItems=e.detail||[]}_onFocusChange(e){this._focusedIndex=e.detail.index}_onClickItem(e,t){this.adapter.templateData.disabled||e.disabled||(this.adapter.valueChanged(e.value),this._focusedIndex=t,this._guiListRef&&typeof this._guiListRef.focusItemAtIndex=="function"&&this._guiListRef.focusItemAtIndex(t))}_valueChanged(e){this.adapter.templateData.readonly||this.adapter.valueChanged(e.detail.value)}};At([f.consume({context:m.formContext}),n.property({attribute:!1})],ft.prototype,"formContext",2),At([f.provide({context:m.inputContext})],ft.prototype,"adapter",2),At([n.state()],ft.prototype,"_range",2),At([n.state()],ft.prototype,"_listItems",2),At([n.state()],ft.prototype,"_focusedIndex",2),At([n.query("gui-list")],ft.prototype,"_guiListRef",2),ft=At([n.customElement("gui-list-input")],ft);const $g=Object.freeze(Object.defineProperty({__proto__:null,get ListElement(){return ft}},Symbol.toStringTag,{value:"Module"}));var kg=Object.defineProperty,Tg=Object.getOwnPropertyDescriptor,Ur=(e,t,i,a)=>{for(var r=a>1?void 0:a?Tg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&kg(t,i,r),r};let ui=class extends d.LitElement{constructor(){super(...arguments),this.md=void 0,this.dependencies=void 0}createRenderRoot(){return this}render(){return d.html`${oo.unsafeHTML(this.dependencies?.markdown?.parse(this.md??""))}`}};Ur([n.property({type:String})],ui.prototype,"md",2),Ur([n.property({type:Object})],ui.prototype,"dependencies",2),ui=Ur([n.customElement("gui-markdown-text")],ui),typeof customElements<"u"&&!customElements.get("gui-markdown-text")&&customElements.define("gui-markdown-text",ui);var Sg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,Z=(e,t,i,a)=>{for(var r=a>1?void 0:a?_g(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Sg(t,i,r),r};let B=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.tools=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimumHeight=void 0,this.autoGrow=!1,this.defaultOpenPreview=void 0,this.maxLength=void 0,this.headingTitle=void 0,this.boldTitle=void 0,this.italicTitle=void 0,this.strikethroughTitle=void 0,this.quoteTitle=void 0,this.linkTitle=void 0,this.orderedListTitle=void 0,this.unorderedListTitle=void 0,this.splitViewTitle=void 0,this.toolbarAriaLabel=void 0,this.dependencies=void 0,this.splitViewActive=!1,this.activeFormats={},this.splitViewInitialized=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`textarea[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}updated(){this.recalculateAutoGrow()}willUpdate(e){!this.splitViewInitialized&&e.has("defaultOpenPreview")&&(this.splitViewActive=!!this.defaultOpenPreview,this.splitViewInitialized=!0)}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,placeholder:this.placeholder,counterMode:this.counterMode??"remaining",minimumHeight:this.minimumHeight??120,autoGrow:this.autoGrow??!1,defaultOpenPreview:this.defaultOpenPreview??!1,maxLength:this.maxLength,dependencies:this.dependencies},t={"gui-widget-input":!0,"gui-markdown--icon":!1};let i=d.html``;if(e.counterMode&&e.maxLength){const r={"gui-markdown--counter":!0,"gui-markdown--counter__error":(e.value?.length??0)>e.maxLength},s=e.counterMode==="current"?d.html`<span>${e.value?.length??0}</span>`:d.html`<span>${e.maxLength-(e.value?.length??0)}</span>`;i=d.html`<div class=${S.classMap(r)}>
2101
2101
  ${s}
2102
2102
  <span> / ${e.maxLength}</span>
2103
- </div>`}const a={"min-height":`${e.minimumHeight}px`};return l.html`
2103
+ </div>`}const a={"min-height":`${e.minimumHeight}px`};return d.html`
2104
2104
  ${le(this.uid,e)}
2105
2105
 
2106
2106
  <div
2107
- class=${_.classMap({"gui-widget":!0,"gui-markdown--with-preview":this.splitViewActive})}
2107
+ class=${S.classMap({"gui-widget":!0,"gui-markdown--with-preview":this.splitViewActive})}
2108
2108
  >
2109
2109
  <nav
2110
2110
  class="gui-markdown__toolbar"
@@ -2116,7 +2116,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2116
2116
  <li role="presentation">
2117
2117
  <button
2118
2118
  type="button"
2119
- class=${_.classMap({"gui-markdown__toolbar-button":!0,"gui-markdown__toolbar-button--active":this.splitViewActive})}
2119
+ class=${S.classMap({"gui-markdown__toolbar-button":!0,"gui-markdown__toolbar-button--active":this.splitViewActive})}
2120
2120
  ?disabled=${this.disabled}
2121
2121
  aria-label=${this.splitViewTitle??"Split View"}
2122
2122
  aria-pressed=${this.splitViewActive?"true":"false"}
@@ -2141,14 +2141,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2141
2141
 
2142
2142
  <div class="gui-markdown__container">
2143
2143
  <textarea
2144
- id=${pa.ifDefined(this.uid)}
2145
- class=${_.classMap(t)}
2146
- style=${vt.styleMap(a)}
2144
+ id=${ma.ifDefined(this.uid)}
2145
+ class=${S.classMap(t)}
2146
+ style=${wt.styleMap(a)}
2147
2147
  ?required=${e.required}
2148
2148
  ?disabled=${e.disabled}
2149
2149
  ?readonly=${e.readonly}
2150
- placeholder=${pa.ifDefined(e.placeholder)}
2151
- autocomplete=${this.autocomplete||l.nothing}
2150
+ placeholder=${ma.ifDefined(e.placeholder)}
2151
+ autocomplete=${this.autocomplete||d.nothing}
2152
2152
  .value=${this.value||""}
2153
2153
  @input=${this.valueChanged}
2154
2154
  @keyup=${this.detectFormats}
@@ -2156,18 +2156,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2156
2156
  @blur=${this.onBlur}
2157
2157
  ></textarea>
2158
2158
 
2159
- ${this.splitViewActive?l.html`
2159
+ ${this.splitViewActive?d.html`
2160
2160
  <section
2161
- data-cy=${pa.ifDefined(this.uid?`${this.uid}_markdown`:l.nothing)}
2161
+ data-cy=${ma.ifDefined(this.uid?`${this.uid}_markdown`:d.nothing)}
2162
2162
  class="gui-markdown__preview"
2163
- style=${vt.styleMap(a)}
2163
+ style=${wt.styleMap(a)}
2164
2164
  >
2165
2165
  <gui-markdown-text
2166
2166
  .md=${this.value||""}
2167
2167
  .dependencies=${this.dependencies}
2168
2168
  ></gui-markdown-text>
2169
2169
  </section>
2170
- `:l.nothing}
2170
+ `:d.nothing}
2171
2171
  </div>
2172
2172
  </div>
2173
2173
 
@@ -2175,7 +2175,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2175
2175
  <div>${j(this.uid,e)}</div>
2176
2176
  ${i}
2177
2177
  </div>
2178
- `}recalculateAutoGrow(){if(!this.autoGrow)return;const e=this.querySelector(`textarea[id="${this.uid}"]`);if(!e)return;const t=window.getComputedStyle(e),i=parseFloat(t.paddingTop),a=parseFloat(t.paddingBottom),r=i+a;e.style.height="auto",e.style.height=`${Math.max(this.minimumHeight??120,e.scrollHeight-r)}px`}splitView(){this.disabled||(this.splitViewActive=!this.splitViewActive)}renderToolbarItem(e){switch(e){case"H":return l.html`<li role="presentation">
2178
+ `}recalculateAutoGrow(){if(!this.autoGrow)return;const e=this.querySelector(`textarea[id="${this.uid}"]`);if(!e)return;const t=window.getComputedStyle(e),i=parseFloat(t.paddingTop),a=parseFloat(t.paddingBottom),r=i+a;e.style.height="auto",e.style.height=`${Math.max(this.minimumHeight??120,e.scrollHeight-r)}px`}splitView(){this.disabled||(this.splitViewActive=!this.splitViewActive)}renderToolbarItem(e){switch(e){case"H":return d.html`<li role="presentation">
2179
2179
  <button
2180
2180
  type="button"
2181
2181
  class=${this.toolbarBtnClass("heading")}
@@ -2197,7 +2197,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2197
2197
  ></path>
2198
2198
  </svg>
2199
2199
  </button>
2200
- </li>`;case"B":return l.html`<li role="presentation">
2200
+ </li>`;case"B":return d.html`<li role="presentation">
2201
2201
  <button
2202
2202
  type="button"
2203
2203
  class=${this.toolbarBtnClass("bold")}
@@ -2219,7 +2219,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2219
2219
  ></path>
2220
2220
  </svg>
2221
2221
  </button>
2222
- </li>`;case"I":return l.html`<li role="presentation">
2222
+ </li>`;case"I":return d.html`<li role="presentation">
2223
2223
  <button
2224
2224
  type="button"
2225
2225
  class=${this.toolbarBtnClass("italic")}
@@ -2241,7 +2241,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2241
2241
  ></path>
2242
2242
  </svg>
2243
2243
  </button>
2244
- </li>`;case"S":return l.html`<li role="presentation">
2244
+ </li>`;case"S":return d.html`<li role="presentation">
2245
2245
  <button
2246
2246
  type="button"
2247
2247
  class=${this.toolbarBtnClass("strikethrough")}
@@ -2263,7 +2263,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2263
2263
  ></path>
2264
2264
  </svg>
2265
2265
  </button>
2266
- </li>`;case"Q":return l.html`<li role="presentation">
2266
+ </li>`;case"Q":return d.html`<li role="presentation">
2267
2267
  <button
2268
2268
  type="button"
2269
2269
  class=${this.toolbarBtnClass("quote")}
@@ -2285,7 +2285,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2285
2285
  ></path>
2286
2286
  </svg>
2287
2287
  </button>
2288
- </li>`;case"L":return l.html`<li role="presentation">
2288
+ </li>`;case"L":return d.html`<li role="presentation">
2289
2289
  <button
2290
2290
  type="button"
2291
2291
  class=${this.toolbarBtnClass("link")}
@@ -2307,7 +2307,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2307
2307
  ></path>
2308
2308
  </svg>
2309
2309
  </button>
2310
- </li>`;case"OL":return l.html`<li role="presentation">
2310
+ </li>`;case"OL":return d.html`<li role="presentation">
2311
2311
  <button
2312
2312
  type="button"
2313
2313
  class=${this.toolbarBtnClass("orderedList")}
@@ -2329,7 +2329,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2329
2329
  ></path>
2330
2330
  </svg>
2331
2331
  </button>
2332
- </li>`;case"UL":return l.html`<li role="presentation">
2332
+ </li>`;case"UL":return d.html`<li role="presentation">
2333
2333
  <button
2334
2334
  type="button"
2335
2335
  class=${this.toolbarBtnClass("unorderedList")}
@@ -2351,7 +2351,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2351
2351
  ></path>
2352
2352
  </svg>
2353
2353
  </button>
2354
- </li>`;case"|":return l.html`<li role="presentation">
2354
+ </li>`;case"|":return d.html`<li role="presentation">
2355
2355
  <span class="gui-markdown__toolbar-separator">
2356
2356
  <svg
2357
2357
  xmlns="http://www.w3.org/2000/svg"
@@ -2363,15 +2363,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2363
2363
  <path d="M140,24V232a12,12,0,0,1-24,0V24a12,12,0,0,1,24,0Z"></path>
2364
2364
  </svg>
2365
2365
  </span>
2366
- </li>`;default:return l.nothing}}toolbarBtnClass(e){return _.classMap({"gui-markdown__toolbar-button":!0,"gui-markdown__toolbar-button--disabled":this.disabled===!0||this.readOnly===!0,"gui-markdown__toolbar-button--active":!!e&&!!this.activeFormats[e]})}detectFormats(){const e=this.querySelector(`textarea[id="${this.uid}"]`);if(!e)return;const{selectionStart:t,value:i}=e,a=i.lastIndexOf(`
2366
+ </li>`;default:return d.nothing}}toolbarBtnClass(e){return S.classMap({"gui-markdown__toolbar-button":!0,"gui-markdown__toolbar-button--disabled":this.disabled===!0||this.readOnly===!0,"gui-markdown__toolbar-button--active":!!e&&!!this.activeFormats[e]})}detectFormats(){const e=this.querySelector(`textarea[id="${this.uid}"]`);if(!e)return;const{selectionStart:t,value:i}=e,a=i.lastIndexOf(`
2367
2367
  `,t-1)+1,r=i.indexOf(`
2368
2368
  `,t),s=i.substring(a,r===-1?i.length:r);this.activeFormats={heading:/^#{1,6}\s/.test(s),bold:this.isInsideInlineFormat(i,t,"**"),italic:this.isInsideInlineFormat(i,t,"_"),strikethrough:this.isInsideInlineFormat(i,t,"~~"),quote:s.startsWith("> "),link:this.isInsideLink(i,t),orderedList:/^\d+\.\s/.test(s),unorderedList:s.startsWith("- ")}}isInsideInlineFormat(e,t,i){const a=e.lastIndexOf(`
2369
2369
  `,t-1)+1,r=e.indexOf(`
2370
- `,t),s=e.substring(a,r===-1?e.length:r),o=t-a;let d=0;for(;d<s.length;){const p=s.indexOf(i,d);if(p===-1)break;const u=s.indexOf(i,p+i.length);if(u===-1)break;if(o>=p&&o<=u+i.length)return!0;d=u+i.length}return!1}isInsideLink(e,t){const i=e.lastIndexOf(`
2370
+ `,t),s=e.substring(a,r===-1?e.length:r),o=t-a;let l=0;for(;l<s.length;){const u=s.indexOf(i,l);if(u===-1)break;const p=s.indexOf(i,u+i.length);if(p===-1)break;if(o>=u&&o<=p+i.length)return!0;l=p+i.length}return!1}isInsideLink(e,t){const i=e.lastIndexOf(`
2371
2371
  `,t-1)+1,a=e.indexOf(`
2372
- `,t),r=e.substring(i,a===-1?e.length:a),s=t-i,o=/\[[^\]]*\]\([^)]*\)/g;let d;for(;(d=o.exec(r))!==null;)if(s>=d.index&&s<=d.index+d[0].length)return!0;return!1}applyFormat(e,t="",i=""){return()=>{if(this.disabled||this.readOnly)return;const a=this.querySelector(`textarea[id="${this.uid}"]`);if(a){if(i&&this.activeFormats[i])this.removeFormat(a,e,t,i);else{const{selectionStart:r,selectionEnd:s,value:o}=a,d=o.substring(r,s),p=o.substring(0,r),u=o.substring(s);a.value=`${p}${e}${d}${t}${u}`,a.selectionStart=r+e.length,a.selectionEnd=r+e.length+d.length}a.focus(),a.dispatchEvent(new Event("input",{bubbles:!0})),this.detectFormats()}}}removeFormat(e,t,i,a){const{selectionStart:r,value:s}=e,o=s.lastIndexOf(`
2373
- `,r-1)+1,d=s.indexOf(`
2374
- `,r),p=s.substring(o,d===-1?s.length:d);if(i)if(a==="link"){const u=r-o,h=/\[([^\]]*)\]\([^)]*\)/g;let m;for(;(m=h.exec(p))!==null;)if(u>=m.index&&u<=m.index+m[0].length){const y=m[1],g=o+m.index,A=g+m[0].length;e.value=`${s.substring(0,g)}${y}${s.substring(A)}`,e.selectionStart=g,e.selectionEnd=g+y.length;break}}else{const u=r-o;let h=0;for(;h<p.length;){const m=p.indexOf(t,h);if(m===-1)break;const y=p.indexOf(i,m+t.length);if(y===-1)break;if(u>=m&&u<=y+i.length){const g=p.substring(m+t.length,y),A=o+m,q=o+y+i.length;e.value=`${s.substring(0,A)}${g}${s.substring(q)}`,e.selectionStart=A,e.selectionEnd=A+g.length;break}h=y+i.length}}else{let u=t;if(a==="heading"){const g=p.match(/^#{1,6}\s/);g&&(u=g[0])}else if(a==="orderedList"){const g=p.match(/^\d+\.\s/);g&&(u=g[0])}const h=s.substring(0,o),m=p.substring(u.length),y=s.substring(d===-1?s.length:d);e.value=`${h}${m}${y}`,e.selectionStart=Math.max(o,r-u.length),e.selectionEnd=e.selectionStart}}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Z([n.property({type:String})],F.prototype,"uid",2),Z([n.property({type:String})],F.prototype,"label",2),Z([n.property({type:String,attribute:"locale-id"})],F.prototype,"localeId",2),Z([n.property({type:Array})],F.prototype,"errors",2),Z([n.property({type:Boolean})],F.prototype,"touched",2),Z([n.property({type:Boolean})],F.prototype,"required",2),Z([n.property({type:Boolean})],F.prototype,"disabled",2),Z([n.property({type:Boolean,attribute:"readonly"})],F.prototype,"readOnly",2),Z([n.property({type:String})],F.prototype,"value",2),Z([n.property({type:String})],F.prototype,"hint",2),Z([n.property({type:Array})],F.prototype,"tools",2),Z([n.property({type:String})],F.prototype,"placeholder",2),Z([n.property({type:String})],F.prototype,"autocomplete",2),Z([n.property({type:String,attribute:"countermode"})],F.prototype,"counterMode",2),Z([n.property({type:Number,attribute:"minimumheight"})],F.prototype,"minimumHeight",2),Z([n.property({type:Boolean,attribute:"autogrow"})],F.prototype,"autoGrow",2),Z([n.property({type:Boolean,attribute:"defaultopenpreview"})],F.prototype,"defaultOpenPreview",2),Z([n.property({type:Number,attribute:"maxlength"})],F.prototype,"maxLength",2),Z([n.property({type:String})],F.prototype,"headingTitle",2),Z([n.property({type:String})],F.prototype,"boldTitle",2),Z([n.property({type:String})],F.prototype,"italicTitle",2),Z([n.property({type:String})],F.prototype,"strikethroughTitle",2),Z([n.property({type:String})],F.prototype,"quoteTitle",2),Z([n.property({type:String})],F.prototype,"linkTitle",2),Z([n.property({type:String})],F.prototype,"orderedListTitle",2),Z([n.property({type:String})],F.prototype,"unorderedListTitle",2),Z([n.property({type:String})],F.prototype,"splitViewTitle",2),Z([n.property({type:String,attribute:"toolbar-aria-label"})],F.prototype,"toolbarAriaLabel",2),Z([n.property({type:Object})],F.prototype,"dependencies",2),Z([n.state()],F.prototype,"splitViewActive",2),Z([n.state()],F.prototype,"activeFormats",2),F=Z([n.customElement("gui-markdown")],F),typeof customElements<"u"&&!customElements.get("gui-markdown")&&customElements.define("gui-markdown",F);var Tm=Object.defineProperty,Am=Object.getOwnPropertyDescriptor,ja=(e,t,i,a)=>{for(var r=a>1?void 0:a?Am(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Tm(t,i,r),r};let oi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-markdown","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2372
+ `,t),r=e.substring(i,a===-1?e.length:a),s=t-i,o=/\[[^\]]*\]\([^)]*\)/g;let l;for(;(l=o.exec(r))!==null;)if(s>=l.index&&s<=l.index+l[0].length)return!0;return!1}applyFormat(e,t="",i=""){return()=>{if(this.disabled||this.readOnly)return;const a=this.querySelector(`textarea[id="${this.uid}"]`);if(a){if(i&&this.activeFormats[i])this.removeFormat(a,e,t,i);else{const{selectionStart:r,selectionEnd:s,value:o}=a,l=o.substring(r,s),u=o.substring(0,r),p=o.substring(s);a.value=`${u}${e}${l}${t}${p}`,a.selectionStart=r+e.length,a.selectionEnd=r+e.length+l.length}a.focus(),a.dispatchEvent(new Event("input",{bubbles:!0})),this.detectFormats()}}}removeFormat(e,t,i,a){const{selectionStart:r,value:s}=e,o=s.lastIndexOf(`
2373
+ `,r-1)+1,l=s.indexOf(`
2374
+ `,r),u=s.substring(o,l===-1?s.length:l);if(i)if(a==="link"){const p=r-o,h=/\[([^\]]*)\]\([^)]*\)/g;let c;for(;(c=h.exec(u))!==null;)if(p>=c.index&&p<=c.index+c[0].length){const y=c[1],g=o+c.index,_=g+c[0].length;e.value=`${s.substring(0,g)}${y}${s.substring(_)}`,e.selectionStart=g,e.selectionEnd=g+y.length;break}}else{const p=r-o;let h=0;for(;h<u.length;){const c=u.indexOf(t,h);if(c===-1)break;const y=u.indexOf(i,c+t.length);if(y===-1)break;if(p>=c&&p<=y+i.length){const g=u.substring(c+t.length,y),_=o+c,L=o+y+i.length;e.value=`${s.substring(0,_)}${g}${s.substring(L)}`,e.selectionStart=_,e.selectionEnd=_+g.length;break}h=y+i.length}}else{let p=t;if(a==="heading"){const g=u.match(/^#{1,6}\s/);g&&(p=g[0])}else if(a==="orderedList"){const g=u.match(/^\d+\.\s/);g&&(p=g[0])}const h=s.substring(0,o),c=u.substring(p.length),y=s.substring(l===-1?s.length:l);e.value=`${h}${c}${y}`,e.selectionStart=Math.max(o,r-p.length),e.selectionEnd=e.selectionStart}}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Z([n.property({type:String})],B.prototype,"uid",2),Z([n.property({type:String})],B.prototype,"label",2),Z([n.property({type:String,attribute:"locale-id"})],B.prototype,"localeId",2),Z([n.property({type:Array})],B.prototype,"errors",2),Z([n.property({type:Boolean})],B.prototype,"touched",2),Z([n.property({type:Boolean})],B.prototype,"required",2),Z([n.property({type:Boolean})],B.prototype,"disabled",2),Z([n.property({type:Boolean,attribute:"readonly"})],B.prototype,"readOnly",2),Z([n.property({type:String})],B.prototype,"value",2),Z([n.property({type:String})],B.prototype,"hint",2),Z([n.property({type:Array})],B.prototype,"tools",2),Z([n.property({type:String})],B.prototype,"placeholder",2),Z([n.property({type:String})],B.prototype,"autocomplete",2),Z([n.property({type:String,attribute:"countermode"})],B.prototype,"counterMode",2),Z([n.property({type:Number,attribute:"minimumheight"})],B.prototype,"minimumHeight",2),Z([n.property({type:Boolean,attribute:"autogrow"})],B.prototype,"autoGrow",2),Z([n.property({type:Boolean,attribute:"defaultopenpreview"})],B.prototype,"defaultOpenPreview",2),Z([n.property({type:Number,attribute:"maxlength"})],B.prototype,"maxLength",2),Z([n.property({type:String})],B.prototype,"headingTitle",2),Z([n.property({type:String})],B.prototype,"boldTitle",2),Z([n.property({type:String})],B.prototype,"italicTitle",2),Z([n.property({type:String})],B.prototype,"strikethroughTitle",2),Z([n.property({type:String})],B.prototype,"quoteTitle",2),Z([n.property({type:String})],B.prototype,"linkTitle",2),Z([n.property({type:String})],B.prototype,"orderedListTitle",2),Z([n.property({type:String})],B.prototype,"unorderedListTitle",2),Z([n.property({type:String})],B.prototype,"splitViewTitle",2),Z([n.property({type:String,attribute:"toolbar-aria-label"})],B.prototype,"toolbarAriaLabel",2),Z([n.property({type:Object})],B.prototype,"dependencies",2),Z([n.state()],B.prototype,"splitViewActive",2),Z([n.state()],B.prototype,"activeFormats",2),B=Z([n.customElement("gui-markdown")],B),typeof customElements<"u"&&!customElements.get("gui-markdown")&&customElements.define("gui-markdown",B);var Ag=Object.defineProperty,Eg=Object.getOwnPropertyDescriptor,Gr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Eg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ag(t,i,r),r};let pi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-markdown","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2375
2375
  <gui-markdown
2376
2376
  .uid=${this.widget.uid}
2377
2377
  .label=${this.adapter.templateData.label}
@@ -2404,7 +2404,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2404
2404
  @input=${this.valueChanged}
2405
2405
  @blur=${()=>this.adapter.onBlur()}
2406
2406
  ></gui-markdown>
2407
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ja([f.consume({context:c.formContext}),n.property({attribute:!1})],oi.prototype,"formContext",2),ja([f.provide({context:c.inputContext})],oi.prototype,"adapter",2),oi=ja([n.customElement("gui-markdown-input")],oi);const Cm=Object.freeze(Object.defineProperty({__proto__:null,get MarkdownElement(){return oi}},Symbol.toStringTag,{value:"Module"}));var Lm=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,ke=(e,t,i,a)=>{for(var r=a>1?void 0:a?Em(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Lm(t,i,r),r};let be=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.showPasswordIcon=void 0,this.hidePasswordIcon=void 0,this.showPasswordLabel=void 0,this.hidePasswordLabel=void 0,this.showPassword=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete,showPasswordIcon:this.showPasswordIcon,hidePasswordIcon:this.hidePasswordIcon,showPasswordLabel:this.showPasswordLabel,hidePasswordLabel:this.hidePasswordLabel},t=Xe("password",e),i={"gui-widget-input":!0,"gui-password--icon":!!this.icon};return l.html`
2407
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Gr([f.consume({context:m.formContext}),n.property({attribute:!1})],pi.prototype,"formContext",2),Gr([f.provide({context:m.inputContext})],pi.prototype,"adapter",2),pi=Gr([n.customElement("gui-markdown-input")],pi);const Cg=Object.freeze(Object.defineProperty({__proto__:null,get MarkdownElement(){return pi}},Symbol.toStringTag,{value:"Module"}));var Lg=Object.defineProperty,Ig=Object.getOwnPropertyDescriptor,ke=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ig(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Lg(t,i,r),r};let be=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.showPasswordIcon=void 0,this.hidePasswordIcon=void 0,this.showPasswordLabel=void 0,this.hidePasswordLabel=void 0,this.showPassword=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete,showPasswordIcon:this.showPasswordIcon,hidePasswordIcon:this.hidePasswordIcon,showPasswordLabel:this.showPasswordLabel,hidePasswordLabel:this.hidePasswordLabel},t=Qe("password",e),i={"gui-widget-input":!0,"gui-password--icon":!!this.icon};return d.html`
2408
2408
  ${le(this.uid,e)}
2409
2409
 
2410
2410
  <div class="gui-widget">
@@ -2412,13 +2412,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2412
2412
  type=${this.showPassword?"text":"password"}
2413
2413
  id=${this.uid}
2414
2414
  data-cy=${`${this.uid}_password`}
2415
- class=${_.classMap(i)}
2415
+ class=${S.classMap(i)}
2416
2416
  value=${this.value}
2417
2417
  ?required=${this.required}
2418
2418
  ?disabled=${this.disabled}
2419
2419
  ?readonly=${this.readOnly}
2420
- placeholder=${this.placeholder||l.nothing}
2421
- autocomplete=${this.autocomplete||l.nothing}
2420
+ placeholder=${this.placeholder||d.nothing}
2421
+ autocomplete=${this.autocomplete||d.nothing}
2422
2422
  @input=${this.valueChanged}
2423
2423
  @blur=${this.onBlur}
2424
2424
  />
@@ -2431,14 +2431,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2431
2431
  aria-label=${this.showPassword?e.hidePasswordLabel??"Hide password":e.showPasswordLabel??"Show password"}
2432
2432
  @click=${()=>this.showPassword=!this.showPassword}
2433
2433
  >
2434
- ${e.showPasswordIcon||e.hidePasswordIcon?l.nothing:l.html`<span aria-hidden="true"
2434
+ ${e.showPasswordIcon||e.hidePasswordIcon?d.nothing:d.html`<span aria-hidden="true"
2435
2435
  >${this.showPassword?e.hidePasswordLabel??"Hide":e.showPasswordLabel??"Show"}</span
2436
2436
  >`}
2437
2437
  </button>
2438
2438
  </div>
2439
2439
 
2440
2440
  ${j(this.uid,e)}
2441
- `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};ke([n.property({type:String})],be.prototype,"uid",2),ke([n.property({type:String})],be.prototype,"label",2),ke([n.property({type:String,attribute:"locale-id"})],be.prototype,"localeId",2),ke([n.property({type:Array})],be.prototype,"errors",2),ke([n.property({type:Boolean})],be.prototype,"touched",2),ke([n.property({type:Boolean})],be.prototype,"required",2),ke([n.property({type:Boolean})],be.prototype,"disabled",2),ke([n.property({type:Boolean,attribute:"readonly"})],be.prototype,"readOnly",2),ke([n.property({type:String})],be.prototype,"value",2),ke([n.property({type:String})],be.prototype,"hint",2),ke([n.property({type:String})],be.prototype,"icon",2),ke([n.property({type:String})],be.prototype,"placeholder",2),ke([n.property({type:String})],be.prototype,"autocomplete",2),ke([n.property({type:String})],be.prototype,"showPasswordIcon",2),ke([n.property({type:String})],be.prototype,"hidePasswordIcon",2),ke([n.property({type:String})],be.prototype,"showPasswordLabel",2),ke([n.property({type:String})],be.prototype,"hidePasswordLabel",2),ke([n.state()],be.prototype,"showPassword",2),be=ke([n.customElement("gui-password")],be),typeof customElements<"u"&&!customElements.get("gui-password")&&customElements.define("gui-password",be);var xm=Object.defineProperty,Pm=Object.getOwnPropertyDescriptor,er=(e,t,i,a)=>{for(var r=a>1?void 0:a?Pm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&xm(t,i,r),r};let li=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-password","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2441
+ `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};ke([n.property({type:String})],be.prototype,"uid",2),ke([n.property({type:String})],be.prototype,"label",2),ke([n.property({type:String,attribute:"locale-id"})],be.prototype,"localeId",2),ke([n.property({type:Array})],be.prototype,"errors",2),ke([n.property({type:Boolean})],be.prototype,"touched",2),ke([n.property({type:Boolean})],be.prototype,"required",2),ke([n.property({type:Boolean})],be.prototype,"disabled",2),ke([n.property({type:Boolean,attribute:"readonly"})],be.prototype,"readOnly",2),ke([n.property({type:String})],be.prototype,"value",2),ke([n.property({type:String})],be.prototype,"hint",2),ke([n.property({type:String})],be.prototype,"icon",2),ke([n.property({type:String})],be.prototype,"placeholder",2),ke([n.property({type:String})],be.prototype,"autocomplete",2),ke([n.property({type:String})],be.prototype,"showPasswordIcon",2),ke([n.property({type:String})],be.prototype,"hidePasswordIcon",2),ke([n.property({type:String})],be.prototype,"showPasswordLabel",2),ke([n.property({type:String})],be.prototype,"hidePasswordLabel",2),ke([n.state()],be.prototype,"showPassword",2),be=ke([n.customElement("gui-password")],be),typeof customElements<"u"&&!customElements.get("gui-password")&&customElements.define("gui-password",be);var xg=Object.defineProperty,Pg=Object.getOwnPropertyDescriptor,Vr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Pg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&xg(t,i,r),r};let hi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-password","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2442
2442
  <gui-password
2443
2443
  .uid=${this.widget.uid}
2444
2444
  .label=${this.adapter.templateData.label}
@@ -2459,7 +2459,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2459
2459
  @input=${this.valueChanged}
2460
2460
  @blur=${()=>this.adapter.onBlur()}
2461
2461
  ></gui-password>
2462
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};er([f.consume({context:c.formContext}),n.property({attribute:!1})],li.prototype,"formContext",2),er([f.provide({context:c.inputContext})],li.prototype,"adapter",2),li=er([n.customElement("gui-password-input")],li);const Om=Object.freeze(Object.defineProperty({__proto__:null,get PasswordElement(){return li}},Symbol.toStringTag,{value:"Module"}));var Mm=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,He=(e,t,i,a)=>{for(var r=a>1?void 0:a?Im(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Mm(t,i,r),r};let Be=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete},t=Xe("textinput",e),i={"gui-widget-input":!0,"gui-textinput--icon":!!this.icon};return l.html`
2462
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Vr([f.consume({context:m.formContext}),n.property({attribute:!1})],hi.prototype,"formContext",2),Vr([f.provide({context:m.inputContext})],hi.prototype,"adapter",2),hi=Vr([n.customElement("gui-password-input")],hi);const Mg=Object.freeze(Object.defineProperty({__proto__:null,get PasswordElement(){return hi}},Symbol.toStringTag,{value:"Module"}));var Og=Object.defineProperty,Rg=Object.getOwnPropertyDescriptor,He=(e,t,i,a)=>{for(var r=a>1?void 0:a?Rg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Og(t,i,r),r};let Ne=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete},t=Qe("textinput",e),i={"gui-widget-input":!0,"gui-textinput--icon":!!this.icon};return d.html`
2463
2463
  ${le(this.uid,e)}
2464
2464
 
2465
2465
  <div class="gui-widget">
@@ -2467,13 +2467,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2467
2467
  type="text"
2468
2468
  id=${this.uid}
2469
2469
  data-cy=${`${this.uid}_textinput`}
2470
- class=${_.classMap(i)}
2470
+ class=${S.classMap(i)}
2471
2471
  value=${this.value}
2472
2472
  ?required=${this.required}
2473
2473
  ?disabled=${this.disabled}
2474
2474
  ?readonly=${this.readOnly}
2475
- placeholder=${this.placeholder||l.nothing}
2476
- autocomplete=${this.autocomplete||l.nothing}
2475
+ placeholder=${this.placeholder||d.nothing}
2476
+ autocomplete=${this.autocomplete||d.nothing}
2477
2477
  @input=${this.valueChanged}
2478
2478
  @blur=${this.onBlur}
2479
2479
  />
@@ -2481,7 +2481,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2481
2481
  </div>
2482
2482
 
2483
2483
  ${j(this.uid,e)}
2484
- `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};He([n.property({type:String})],Be.prototype,"uid",2),He([n.property({type:String})],Be.prototype,"label",2),He([n.property({type:String,attribute:"locale-id"})],Be.prototype,"localeId",2),He([n.property({type:Array})],Be.prototype,"errors",2),He([n.property({type:Boolean})],Be.prototype,"touched",2),He([n.property({type:Boolean})],Be.prototype,"required",2),He([n.property({type:Boolean})],Be.prototype,"disabled",2),He([n.property({type:Boolean,attribute:"readonly"})],Be.prototype,"readOnly",2),He([n.property({type:String})],Be.prototype,"value",2),He([n.property({type:String})],Be.prototype,"hint",2),He([n.property({type:String})],Be.prototype,"icon",2),He([n.property({type:String})],Be.prototype,"placeholder",2),He([n.property({type:String})],Be.prototype,"autocomplete",2),Be=He([n.customElement("gui-textinput")],Be),typeof customElements<"u"&&!customElements.get("gui-textinput")&&customElements.define("gui-textinput",Be);var Rm=Object.defineProperty,Fm=Object.getOwnPropertyDescriptor,tr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Fm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Rm(t,i,r),r};let di=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-textinput","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2484
+ `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};He([n.property({type:String})],Ne.prototype,"uid",2),He([n.property({type:String})],Ne.prototype,"label",2),He([n.property({type:String,attribute:"locale-id"})],Ne.prototype,"localeId",2),He([n.property({type:Array})],Ne.prototype,"errors",2),He([n.property({type:Boolean})],Ne.prototype,"touched",2),He([n.property({type:Boolean})],Ne.prototype,"required",2),He([n.property({type:Boolean})],Ne.prototype,"disabled",2),He([n.property({type:Boolean,attribute:"readonly"})],Ne.prototype,"readOnly",2),He([n.property({type:String})],Ne.prototype,"value",2),He([n.property({type:String})],Ne.prototype,"hint",2),He([n.property({type:String})],Ne.prototype,"icon",2),He([n.property({type:String})],Ne.prototype,"placeholder",2),He([n.property({type:String})],Ne.prototype,"autocomplete",2),Ne=He([n.customElement("gui-textinput")],Ne),typeof customElements<"u"&&!customElements.get("gui-textinput")&&customElements.define("gui-textinput",Ne);var Fg=Object.defineProperty,Bg=Object.getOwnPropertyDescriptor,Zr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Bg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Fg(t,i,r),r};let ci=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-textinput","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2485
2485
  <gui-textinput
2486
2486
  .uid=${this.widget.uid}
2487
2487
  .label=${this.adapter.templateData.label}
@@ -2498,9 +2498,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2498
2498
  @input=${this.valueChanged}
2499
2499
  @blur=${()=>this.adapter.onBlur()}
2500
2500
  ></gui-textinput>
2501
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};tr([f.consume({context:c.formContext}),n.property({attribute:!1})],di.prototype,"formContext",2),tr([f.provide({context:c.inputContext})],di.prototype,"adapter",2),di=tr([n.customElement("gui-textinput-input")],di);const Bm=Object.freeze(Object.defineProperty({__proto__:null,get TextinputElement(){return di}},Symbol.toStringTag,{value:"Module"}));var Nm=Object.defineProperty,qm=Object.getOwnPropertyDescriptor,ir=(e,t,i,a)=>{for(var r=a>1?void 0:a?qm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Nm(t,i,r),r};let pi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=Xe("time",this.adapter.templateData);return l.html`
2501
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Zr([f.consume({context:m.formContext}),n.property({attribute:!1})],ci.prototype,"formContext",2),Zr([f.provide({context:m.inputContext})],ci.prototype,"adapter",2),ci=Zr([n.customElement("gui-textinput-input")],ci);const Ng=Object.freeze(Object.defineProperty({__proto__:null,get TextinputElement(){return ci}},Symbol.toStringTag,{value:"Module"}));var qg=Object.defineProperty,zg=Object.getOwnPropertyDescriptor,Yr=(e,t,i,a)=>{for(var r=a>1?void 0:a?zg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&qg(t,i,r),r};let mi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=Qe("time",this.adapter.templateData);return d.html`
2502
2502
  <gui-time
2503
- class=${_.classMap(e.widgetClasses)}
2503
+ class=${S.classMap(e.widgetClasses)}
2504
2504
  .uid=${this.widget.uid}
2505
2505
  .label=${this.adapter.templateData.label}
2506
2506
  .hint=${this.adapter.templateData.hint}
@@ -2525,7 +2525,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2525
2525
  @blur=${()=>this.adapter.onBlur()}
2526
2526
  @change=${this.valueChanged}
2527
2527
  ></gui-time>
2528
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ir([f.consume({context:c.formContext}),n.property({attribute:!1})],pi.prototype,"formContext",2),ir([f.provide({context:c.inputContext})],pi.prototype,"adapter",2),pi=ir([n.customElement("gui-time-input")],pi);const zm=Object.freeze(Object.defineProperty({__proto__:null,get TimeElement(){return pi}},Symbol.toStringTag,{value:"Module"}));var Gm=Object.defineProperty,Vm=Object.getOwnPropertyDescriptor,ar=(e,t,i,a)=>{for(var r=a>1?void 0:a?Vm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Gm(t,i,r),r};let ui=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return l.html`
2528
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Yr([f.consume({context:m.formContext}),n.property({attribute:!1})],mi.prototype,"formContext",2),Yr([f.provide({context:m.inputContext})],mi.prototype,"adapter",2),mi=Yr([n.customElement("gui-time-input")],mi);const Ug=Object.freeze(Object.defineProperty({__proto__:null,get TimeElement(){return mi}},Symbol.toStringTag,{value:"Module"}));var Gg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,Hr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Vg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Gg(t,i,r),r};let yi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-time-picker","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=this.adapter.templateData;return d.html`
2529
2529
  <gui-time-picker
2530
2530
  .uid=${this.widget.uid}
2531
2531
  .label=${e.label}
@@ -2558,9 +2558,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2558
2558
  @blur=${()=>this.adapter.onBlur()}
2559
2559
  @change=${this.valueChanged}
2560
2560
  ></gui-time-picker>
2561
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ar([f.consume({context:c.formContext}),n.property({attribute:!1})],ui.prototype,"formContext",2),ar([f.provide({context:c.inputContext})],ui.prototype,"adapter",2),ui=ar([n.customElement("gui-time-picker-input")],ui);const Um=Object.freeze(Object.defineProperty({__proto__:null,get TimePickerElement(){return ui}},Symbol.toStringTag,{value:"Module"}));var Zm=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,rr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ym(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Zm(t,i,r),r};let hi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=Xe("date-time",this.adapter.templateData);return l.html`
2561
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Hr([f.consume({context:m.formContext}),n.property({attribute:!1})],yi.prototype,"formContext",2),Hr([f.provide({context:m.inputContext})],yi.prototype,"adapter",2),yi=Hr([n.customElement("gui-time-picker-input")],yi);const Zg=Object.freeze(Object.defineProperty({__proto__:null,get TimePickerElement(){return yi}},Symbol.toStringTag,{value:"Module"}));var Yg=Object.defineProperty,Hg=Object.getOwnPropertyDescriptor,Wr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Hg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Yg(t,i,r),r};let gi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-date-time","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){super.render();const e=Qe("date-time",this.adapter.templateData);return d.html`
2562
2562
  <gui-date-time
2563
- class=${_.classMap(e.widgetClasses)}
2563
+ class=${S.classMap(e.widgetClasses)}
2564
2564
  .uid=${this.widget.uid}
2565
2565
  .label=${this.adapter.templateData.label}
2566
2566
  .hint=${this.adapter.templateData.hint}
@@ -2593,10 +2593,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2593
2593
  @blur=${()=>this.adapter.onBlur()}
2594
2594
  @change=${this.valueChanged}
2595
2595
  ></gui-date-time>
2596
- `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};rr([f.consume({context:c.formContext}),n.property({attribute:!1})],hi.prototype,"formContext",2),rr([f.provide({context:c.inputContext})],hi.prototype,"adapter",2),hi=rr([n.customElement("gui-date-time-input")],hi);const Hm=Object.freeze(Object.defineProperty({__proto__:null,get DateTimeElement(){return hi}},Symbol.toStringTag,{value:"Module"}));var Wm=Object.defineProperty,Km=Object.getOwnPropertyDescriptor,Pe=(e,t,i,a)=>{for(var r=a>1?void 0:a?Km(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Wm(t,i,r),r};let Se=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimumHeight=void 0,this.autoGrow=!1,this.maxLength=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`textarea[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,placeholder:this.placeholder,autocomplete:this.autocomplete,counterMode:this.counterMode??"remaining",minimumHeight:this.minimumHeight??120,autoGrow:this.autoGrow??!1,maxLength:this.maxLength};let t=l.html``;if(e.counterMode&&e.maxLength){const r={"gui-textarea--counter":!0,"gui-textarea--counter__error":(e.value?.length??0)>e.maxLength},s=e.counterMode==="current"?l.html`<span>${e.value?.length??0}</span>`:l.html`<span>${e.maxLength-(e.value?.length??0)}</span>`;t=l.html`<div class=${_.classMap(r)}>
2596
+ `}valueChanged(e){this.adapter.injectValidationIssues(null),this.adapter.valueChanged(e.detail.value)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Wr([f.consume({context:m.formContext}),n.property({attribute:!1})],gi.prototype,"formContext",2),Wr([f.provide({context:m.inputContext})],gi.prototype,"adapter",2),gi=Wr([n.customElement("gui-date-time-input")],gi);const Wg=Object.freeze(Object.defineProperty({__proto__:null,get DateTimeElement(){return gi}},Symbol.toStringTag,{value:"Module"}));var Kg=Object.defineProperty,Jg=Object.getOwnPropertyDescriptor,Pe=(e,t,i,a)=>{for(var r=a>1?void 0:a?Jg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Kg(t,i,r),r};let Te=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimumHeight=void 0,this.autoGrow=!1,this.maxLength=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`textarea[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,placeholder:this.placeholder,autocomplete:this.autocomplete,counterMode:this.counterMode??"remaining",minimumHeight:this.minimumHeight??120,autoGrow:this.autoGrow??!1,maxLength:this.maxLength};let t=d.html``;if(e.counterMode&&e.maxLength){const r={"gui-textarea--counter":!0,"gui-textarea--counter__error":(e.value?.length??0)>e.maxLength},s=e.counterMode==="current"?d.html`<span>${e.value?.length??0}</span>`:d.html`<span>${e.maxLength-(e.value?.length??0)}</span>`;t=d.html`<div class=${S.classMap(r)}>
2597
2597
  ${s}
2598
2598
  <span> / ${e.maxLength}</span>
2599
- </div>`}const i={height:`${e.minimumHeight}px`,"min-height":`${e.minimumHeight}px`},a=this.querySelector(`textarea[id="${this.uid}"]`);if(this.autoGrow&&a){const r=window.getComputedStyle(a),s=parseFloat(r.paddingTop),o=parseFloat(r.paddingBottom),d=s+o;a.style.height="auto",i.height=`${Math.max(this.minimumHeight??120,a.scrollHeight-d)}px`}return l.html`
2599
+ </div>`}const i={height:`${e.minimumHeight}px`,"min-height":`${e.minimumHeight}px`},a=this.querySelector(`textarea[id="${this.uid}"]`);if(this.autoGrow&&a){const r=window.getComputedStyle(a),s=parseFloat(r.paddingTop),o=parseFloat(r.paddingBottom),l=s+o;a.style.height="auto",i.height=`${Math.max(this.minimumHeight??120,a.scrollHeight-l)}px`}return d.html`
2600
2600
  ${le(this.uid,e)}
2601
2601
 
2602
2602
  <div class="gui-widget">
@@ -2604,12 +2604,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2604
2604
  id=${this.uid}
2605
2605
  data-cy=${`${this.uid}_textarea`}
2606
2606
  class="gui-widget-input"
2607
- style=${vt.styleMap(i)}
2607
+ style=${wt.styleMap(i)}
2608
2608
  ?required=${e.required}
2609
2609
  ?disabled=${e.disabled}
2610
2610
  ?readonly=${e.readonly}
2611
- placeholder=${e.placeholder||l.nothing}
2612
- autocomplete=${this.autocomplete||l.nothing}
2611
+ placeholder=${e.placeholder||d.nothing}
2612
+ autocomplete=${this.autocomplete||d.nothing}
2613
2613
  .value=${this.value||""}
2614
2614
  @input=${this.valueChanged}
2615
2615
  @blur=${this.onBlur}
@@ -2620,7 +2620,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2620
2620
  <div>${j(this.uid,e)}</div>
2621
2621
  ${t}
2622
2622
  </div>
2623
- `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Pe([n.property({type:String})],Se.prototype,"uid",2),Pe([n.property({type:String})],Se.prototype,"label",2),Pe([n.property({type:String,attribute:"locale-id"})],Se.prototype,"localeId",2),Pe([n.property({type:Array})],Se.prototype,"errors",2),Pe([n.property({type:Boolean})],Se.prototype,"touched",2),Pe([n.property({type:Boolean})],Se.prototype,"required",2),Pe([n.property({type:Boolean})],Se.prototype,"disabled",2),Pe([n.property({type:Boolean,attribute:"readonly"})],Se.prototype,"readOnly",2),Pe([n.property({type:String})],Se.prototype,"value",2),Pe([n.property({type:String})],Se.prototype,"hint",2),Pe([n.property({type:String})],Se.prototype,"placeholder",2),Pe([n.property({type:String})],Se.prototype,"autocomplete",2),Pe([n.property({type:String,attribute:"countermode"})],Se.prototype,"counterMode",2),Pe([n.property({type:Number,attribute:"minimumheight"})],Se.prototype,"minimumHeight",2),Pe([n.property({type:Boolean,attribute:"autogrow"})],Se.prototype,"autoGrow",2),Pe([n.property({type:Number,attribute:"maxlength"})],Se.prototype,"maxLength",2),Se=Pe([n.customElement("gui-textarea")],Se),typeof customElements<"u"&&!customElements.get("gui-textarea")&&customElements.define("gui-textarea",Se);var Jm=Object.defineProperty,Xm=Object.getOwnPropertyDescriptor,sr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Xm(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Jm(t,i,r),r};let mi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-textarea","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2623
+ `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Pe([n.property({type:String})],Te.prototype,"uid",2),Pe([n.property({type:String})],Te.prototype,"label",2),Pe([n.property({type:String,attribute:"locale-id"})],Te.prototype,"localeId",2),Pe([n.property({type:Array})],Te.prototype,"errors",2),Pe([n.property({type:Boolean})],Te.prototype,"touched",2),Pe([n.property({type:Boolean})],Te.prototype,"required",2),Pe([n.property({type:Boolean})],Te.prototype,"disabled",2),Pe([n.property({type:Boolean,attribute:"readonly"})],Te.prototype,"readOnly",2),Pe([n.property({type:String})],Te.prototype,"value",2),Pe([n.property({type:String})],Te.prototype,"hint",2),Pe([n.property({type:String})],Te.prototype,"placeholder",2),Pe([n.property({type:String})],Te.prototype,"autocomplete",2),Pe([n.property({type:String,attribute:"countermode"})],Te.prototype,"counterMode",2),Pe([n.property({type:Number,attribute:"minimumheight"})],Te.prototype,"minimumHeight",2),Pe([n.property({type:Boolean,attribute:"autogrow"})],Te.prototype,"autoGrow",2),Pe([n.property({type:Number,attribute:"maxlength"})],Te.prototype,"maxLength",2),Te=Pe([n.customElement("gui-textarea")],Te),typeof customElements<"u"&&!customElements.get("gui-textarea")&&customElements.define("gui-textarea",Te);var Xg=Object.defineProperty,Qg=Object.getOwnPropertyDescriptor,Kr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Qg(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Xg(t,i,r),r};let bi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-textarea","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2624
2624
  <gui-textarea
2625
2625
  .uid=${this.widget.uid}
2626
2626
  .label=${this.adapter.templateData.label}
@@ -2640,7 +2640,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2640
2640
  @input=${this.valueChanged}
2641
2641
  @blur=${()=>this.adapter.onBlur()}
2642
2642
  ></gui-textarea>
2643
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};sr([f.consume({context:c.formContext}),n.property({attribute:!1})],mi.prototype,"formContext",2),sr([f.provide({context:c.inputContext})],mi.prototype,"adapter",2),mi=sr([n.customElement("gui-textarea-input")],mi);const Qm=Object.freeze(Object.defineProperty({__proto__:null,get TextareaElement(){return mi}},Symbol.toStringTag,{value:"Module"}));var jm=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,at=(e,t,i,a)=>{for(var r=a>1?void 0:a?ec(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&jm(t,i,r),r};let We=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.togglePosition="left",this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,togglePosition:this.togglePosition};return e.togglePosition==="right"?this.classList.add("gui-toggle--right"):this.classList.contains("gui-toggle--right")&&this.classList.remove("gui-toggle--right"),l.html`
2643
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Kr([f.consume({context:m.formContext}),n.property({attribute:!1})],bi.prototype,"formContext",2),Kr([f.provide({context:m.inputContext})],bi.prototype,"adapter",2),bi=Kr([n.customElement("gui-textarea-input")],bi);const jg=Object.freeze(Object.defineProperty({__proto__:null,get TextareaElement(){return bi}},Symbol.toStringTag,{value:"Module"}));var eb=Object.defineProperty,tb=Object.getOwnPropertyDescriptor,rt=(e,t,i,a)=>{for(var r=a>1?void 0:a?tb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&eb(t,i,r),r};let We=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.togglePosition="left",this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,togglePosition:this.togglePosition};return e.togglePosition==="right"?this.classList.add("gui-toggle--right"):this.classList.contains("gui-toggle--right")&&this.classList.remove("gui-toggle--right"),d.html`
2644
2644
  <label
2645
2645
  class="gui-label"
2646
2646
  for=${this.uid}
@@ -2664,14 +2664,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2664
2664
  </div>
2665
2665
 
2666
2666
  <span class="gui-label__container">
2667
- ${e.label}${Hi(e.required)}
2667
+ ${e.label}${Xi(e.required)}
2668
2668
  </span>
2669
2669
  </label>
2670
2670
 
2671
2671
  <div class="gui-widget-hint" id=${`${e.uid}_hint`}>
2672
- ${e.hint??l.nothing} ${j(this.uid,e)}
2672
+ ${e.hint??d.nothing} ${j(this.uid,e)}
2673
2673
  </div>
2674
- `}valueChanged(e){if(e?.stopPropagation(),!this.readOnly){const t=e?.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:t.checked},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};at([n.property({type:String})],We.prototype,"uid",2),at([n.property({type:String})],We.prototype,"label",2),at([n.property({type:String,attribute:"locale-id"})],We.prototype,"localeId",2),at([n.property({type:Array})],We.prototype,"errors",2),at([n.property({type:Boolean})],We.prototype,"touched",2),at([n.property({type:Boolean})],We.prototype,"required",2),at([n.property({type:Boolean})],We.prototype,"disabled",2),at([n.property({type:Boolean,attribute:"readonly"})],We.prototype,"readOnly",2),at([n.property({type:String})],We.prototype,"value",2),at([n.property({type:String})],We.prototype,"hint",2),at([n.property({type:String})],We.prototype,"togglePosition",2),We=at([n.customElement("gui-toggle")],We),typeof customElements<"u"&&!customElements.get("gui-toggle")&&customElements.define("gui-toggle",We);var tc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor,nr=(e,t,i,a)=>{for(var r=a>1?void 0:a?ic(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&tc(t,i,r),r};let ci=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-toggle","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2674
+ `}valueChanged(e){if(e?.stopPropagation(),!this.readOnly){const t=e?.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:t.checked},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};rt([n.property({type:String})],We.prototype,"uid",2),rt([n.property({type:String})],We.prototype,"label",2),rt([n.property({type:String,attribute:"locale-id"})],We.prototype,"localeId",2),rt([n.property({type:Array})],We.prototype,"errors",2),rt([n.property({type:Boolean})],We.prototype,"touched",2),rt([n.property({type:Boolean})],We.prototype,"required",2),rt([n.property({type:Boolean})],We.prototype,"disabled",2),rt([n.property({type:Boolean,attribute:"readonly"})],We.prototype,"readOnly",2),rt([n.property({type:String})],We.prototype,"value",2),rt([n.property({type:String})],We.prototype,"hint",2),rt([n.property({type:String})],We.prototype,"togglePosition",2),We=rt([n.customElement("gui-toggle")],We),typeof customElements<"u"&&!customElements.get("gui-toggle")&&customElements.define("gui-toggle",We);var ib=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,Jr=(e,t,i,a)=>{for(var r=a>1?void 0:a?ab(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ib(t,i,r),r};let fi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-toggle","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2675
2675
  <gui-toggle
2676
2676
  .uid=${this.widget.uid}
2677
2677
  .label=${this.adapter.templateData.label}
@@ -2686,7 +2686,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2686
2686
  @change=${this.valueChanged}
2687
2687
  @blur=${()=>this.adapter.onBlur()}
2688
2688
  ></gui-toggle>
2689
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};nr([f.consume({context:c.formContext}),n.property({attribute:!1})],ci.prototype,"formContext",2),nr([f.provide({context:c.inputContext})],ci.prototype,"adapter",2),ci=nr([n.customElement("gui-toggle-input")],ci);const ac=Object.freeze(Object.defineProperty({__proto__:null,get ToggleElement(){return ci}},Symbol.toStringTag,{value:"Module"}));var rc=Object.defineProperty,sc=Object.getOwnPropertyDescriptor,rt=(e,t,i,a)=>{for(var r=a>1?void 0:a?sc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&rc(t,i,r),r};let Ke=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=void 0,this.required=void 0,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.checkboxPosition="left",this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,checkboxPosition:this.checkboxPosition};return e.checkboxPosition==="right"?this.classList.add("gui-checkbox--right"):this.classList.contains("gui-checkbox--right")&&this.classList.remove("gui-checkbox--right"),l.html`
2689
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Jr([f.consume({context:m.formContext}),n.property({attribute:!1})],fi.prototype,"formContext",2),Jr([f.provide({context:m.inputContext})],fi.prototype,"adapter",2),fi=Jr([n.customElement("gui-toggle-input")],fi);const rb=Object.freeze(Object.defineProperty({__proto__:null,get ToggleElement(){return fi}},Symbol.toStringTag,{value:"Module"}));var sb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,st=(e,t,i,a)=>{for(var r=a>1?void 0:a?nb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&sb(t,i,r),r};let Ke=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=void 0,this.required=void 0,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.checkboxPosition="left",this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,checkboxPosition:this.checkboxPosition};return e.checkboxPosition==="right"?this.classList.add("gui-checkbox--right"):this.classList.contains("gui-checkbox--right")&&this.classList.remove("gui-checkbox--right"),d.html`
2690
2690
  <label
2691
2691
  class="gui-label"
2692
2692
  for=${this.uid}
@@ -2707,14 +2707,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2707
2707
  </div>
2708
2708
 
2709
2709
  <span class="gui-label__container">
2710
- ${e.label}${Hi(e.required)}
2710
+ ${e.label}${Xi(e.required)}
2711
2711
  </span>
2712
2712
  </label>
2713
2713
 
2714
2714
  <div class="gui-widget-hint" id=${`${e.uid}_hint`}>
2715
- ${e.hint??l.nothing} ${j(this.uid,e)}
2715
+ ${e.hint??d.nothing} ${j(this.uid,e)}
2716
2716
  </div>
2717
- `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:t.checked},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};rt([n.property({type:String})],Ke.prototype,"uid",2),rt([n.property({type:String})],Ke.prototype,"label",2),rt([n.property({type:String,attribute:"locale-id"})],Ke.prototype,"localeId",2),rt([n.property({type:Array})],Ke.prototype,"errors",2),rt([n.property({type:Boolean})],Ke.prototype,"touched",2),rt([n.property({type:Boolean})],Ke.prototype,"required",2),rt([n.property({type:Boolean})],Ke.prototype,"disabled",2),rt([n.property({type:Boolean,attribute:"readonly"})],Ke.prototype,"readOnly",2),rt([n.property({type:String})],Ke.prototype,"value",2),rt([n.property({type:String})],Ke.prototype,"hint",2),rt([n.property({type:String})],Ke.prototype,"checkboxPosition",2),Ke=rt([n.customElement("gui-checkbox")],Ke),typeof customElements<"u"&&!customElements.get("gui-checkbox")&&customElements.define("gui-checkbox",Ke);var nc=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,or=(e,t,i,a)=>{for(var r=a>1?void 0:a?oc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&nc(t,i,r),r};let yi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-checkbox","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2717
+ `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:t.checked},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};st([n.property({type:String})],Ke.prototype,"uid",2),st([n.property({type:String})],Ke.prototype,"label",2),st([n.property({type:String,attribute:"locale-id"})],Ke.prototype,"localeId",2),st([n.property({type:Array})],Ke.prototype,"errors",2),st([n.property({type:Boolean})],Ke.prototype,"touched",2),st([n.property({type:Boolean})],Ke.prototype,"required",2),st([n.property({type:Boolean})],Ke.prototype,"disabled",2),st([n.property({type:Boolean,attribute:"readonly"})],Ke.prototype,"readOnly",2),st([n.property({type:String})],Ke.prototype,"value",2),st([n.property({type:String})],Ke.prototype,"hint",2),st([n.property({type:String})],Ke.prototype,"checkboxPosition",2),Ke=st([n.customElement("gui-checkbox")],Ke),typeof customElements<"u"&&!customElements.get("gui-checkbox")&&customElements.define("gui-checkbox",Ke);var ob=Object.defineProperty,lb=Object.getOwnPropertyDescriptor,Xr=(e,t,i,a)=>{for(var r=a>1?void 0:a?lb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ob(t,i,r),r};let vi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-checkbox","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2718
2718
  <gui-checkbox
2719
2719
  .uid=${this.widget.uid}
2720
2720
  .label=${this.adapter.templateData.label}
@@ -2729,7 +2729,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2729
2729
  @change=${this.valueChanged}
2730
2730
  @blur=${()=>this.adapter.onBlur()}
2731
2731
  ></gui-checkbox>
2732
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};or([f.consume({context:c.formContext}),n.property({attribute:!1})],yi.prototype,"formContext",2),or([f.provide({context:c.inputContext})],yi.prototype,"adapter",2),yi=or([n.customElement("gui-checkbox-input")],yi);const lc=Object.freeze(Object.defineProperty({__proto__:null,get CheckboxElement(){return yi}},Symbol.toStringTag,{value:"Module"}));var dc=Object.defineProperty,pc=Object.getOwnPropertyDescriptor,Oe=(e,t,i,a)=>{for(var r=a>1?void 0:a?pc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&dc(t,i,r),r};let _e=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.step=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimum=void 0,this.maximum=void 0,this.autoGrow=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e=this.querySelector(`input[id="${this.uid}"]`),t={"min-width":"23px"};if(this.autoGrow)if(e){e.style.width="0px";const a=Math.max(23,e.scrollWidth);t.width=`${a}px`,t.maxWidth=`${a}px`,e.style.width=""}else t.width="47px";const i={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,step:this.step,placeholder:this.placeholder,autocomplete:this.autocomplete};return l.html`
2732
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Xr([f.consume({context:m.formContext}),n.property({attribute:!1})],vi.prototype,"formContext",2),Xr([f.provide({context:m.inputContext})],vi.prototype,"adapter",2),vi=Xr([n.customElement("gui-checkbox-input")],vi);const db=Object.freeze(Object.defineProperty({__proto__:null,get CheckboxElement(){return vi}},Symbol.toStringTag,{value:"Module"}));var ub=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,Me=(e,t,i,a)=>{for(var r=a>1?void 0:a?pb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ub(t,i,r),r};let Se=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.hint=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.step=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimum=void 0,this.maximum=void 0,this.autoGrow=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e=this.querySelector(`input[id="${this.uid}"]`),t={"min-width":"23px"};if(this.autoGrow)if(e){e.style.width="0px";const a=Math.max(23,e.scrollWidth);t.width=`${a}px`,t.maxWidth=`${a}px`,e.style.width=""}else t.width="47px";const i={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,step:this.step,placeholder:this.placeholder,autocomplete:this.autocomplete};return d.html`
2733
2733
  ${le(this.uid,i)}
2734
2734
 
2735
2735
  <div class="gui-widget">
@@ -2739,18 +2739,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2739
2739
  id=${this.uid}
2740
2740
  data-cy=${`${this.uid}_number`}
2741
2741
  class="gui-widget-input"
2742
- style=${vt.styleMap(t)}
2742
+ style=${wt.styleMap(t)}
2743
2743
  value=${this.value}
2744
2744
  ?required=${this.required}
2745
2745
  ?disabled=${this.disabled}
2746
2746
  ?readonly=${this.readOnly}
2747
- step=${typeof this.step=="number"?this.step:l.nothing}
2748
- min=${Number(this.minimum)?this.minimum:l.nothing}
2749
- max=${Number(this.maximum)?this.maximum:l.nothing}
2750
- placeholder=${this.placeholder||l.nothing}
2751
- autocomplete=${this.autocomplete||l.nothing}
2747
+ step=${typeof this.step=="number"?this.step:d.nothing}
2748
+ min=${Number(this.minimum)?this.minimum:d.nothing}
2749
+ max=${Number(this.maximum)?this.maximum:d.nothing}
2750
+ placeholder=${this.placeholder||d.nothing}
2751
+ autocomplete=${this.autocomplete||d.nothing}
2752
2752
  @input=${this.valueChanged}
2753
- @beforeinput=${pn}
2753
+ @beforeinput=${eo}
2754
2754
  @keydown=${this.keyDown}
2755
2755
  @blur=${this.onBlur}
2756
2756
  />
@@ -2781,7 +2781,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2781
2781
  </div>
2782
2782
 
2783
2783
  ${j(this.uid,i)}
2784
- `}keyDown(e){switch(e.stopPropagation(),un(e),e.key){case"ArrowUp":e.preventDefault(),this.plus();break;case"ArrowDown":e.preventDefault(),this.minus();break}}minus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber-t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}plus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber+t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const i=e.target.valueAsNumber;this.dispatchEvent(new CustomEvent("input",{detail:{value:Number.isNaN(i)?void 0:i},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Oe([n.property({type:String})],_e.prototype,"uid",2),Oe([n.property({type:String})],_e.prototype,"label",2),Oe([n.property({type:String})],_e.prototype,"hint",2),Oe([n.property({type:String,attribute:"locale-id"})],_e.prototype,"localeId",2),Oe([n.property({type:Array})],_e.prototype,"errors",2),Oe([n.property({type:Boolean})],_e.prototype,"touched",2),Oe([n.property({type:Boolean})],_e.prototype,"required",2),Oe([n.property({type:Boolean})],_e.prototype,"disabled",2),Oe([n.property({type:Boolean,attribute:"readonly"})],_e.prototype,"readOnly",2),Oe([n.property({type:Number})],_e.prototype,"value",2),Oe([n.property({type:Number})],_e.prototype,"step",2),Oe([n.property({type:String})],_e.prototype,"placeholder",2),Oe([n.property({type:String})],_e.prototype,"autocomplete",2),Oe([n.property({type:Number})],_e.prototype,"minimum",2),Oe([n.property({type:Number})],_e.prototype,"maximum",2),Oe([n.property({type:Number})],_e.prototype,"autoGrow",2),_e=Oe([n.customElement("gui-number")],_e),typeof customElements<"u"&&!customElements.get("gui-number")&&customElements.define("gui-number",_e);var uc=Object.defineProperty,hc=Object.getOwnPropertyDescriptor,lr=(e,t,i,a)=>{for(var r=a>1?void 0:a?hc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&uc(t,i,r),r};let gi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-number","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2784
+ `}keyDown(e){switch(e.stopPropagation(),to(e),e.key){case"ArrowUp":e.preventDefault(),this.plus();break;case"ArrowDown":e.preventDefault(),this.minus();break}}minus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber-t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}plus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber+t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const i=e.target.valueAsNumber;this.dispatchEvent(new CustomEvent("input",{detail:{value:Number.isNaN(i)?void 0:i},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Me([n.property({type:String})],Se.prototype,"uid",2),Me([n.property({type:String})],Se.prototype,"label",2),Me([n.property({type:String})],Se.prototype,"hint",2),Me([n.property({type:String,attribute:"locale-id"})],Se.prototype,"localeId",2),Me([n.property({type:Array})],Se.prototype,"errors",2),Me([n.property({type:Boolean})],Se.prototype,"touched",2),Me([n.property({type:Boolean})],Se.prototype,"required",2),Me([n.property({type:Boolean})],Se.prototype,"disabled",2),Me([n.property({type:Boolean,attribute:"readonly"})],Se.prototype,"readOnly",2),Me([n.property({type:Number})],Se.prototype,"value",2),Me([n.property({type:Number})],Se.prototype,"step",2),Me([n.property({type:String})],Se.prototype,"placeholder",2),Me([n.property({type:String})],Se.prototype,"autocomplete",2),Me([n.property({type:Number})],Se.prototype,"minimum",2),Me([n.property({type:Number})],Se.prototype,"maximum",2),Me([n.property({type:Number})],Se.prototype,"autoGrow",2),Se=Me([n.customElement("gui-number")],Se),typeof customElements<"u"&&!customElements.get("gui-number")&&customElements.define("gui-number",Se);var hb=Object.defineProperty,cb=Object.getOwnPropertyDescriptor,Qr=(e,t,i,a)=>{for(var r=a>1?void 0:a?cb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&hb(t,i,r),r};let Di=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-number","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2785
2785
  <gui-number
2786
2786
  .uid=${this.widget.uid}
2787
2787
  .label=${this.adapter.templateData.label}
@@ -2801,11 +2801,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2801
2801
  @input=${this.valueChanged}
2802
2802
  @blur=${()=>this.adapter.onBlur()}
2803
2803
  ></gui-number>
2804
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};lr([f.consume({context:c.formContext}),n.property({attribute:!1})],gi.prototype,"formContext",2),lr([f.provide({context:c.inputContext})],gi.prototype,"adapter",2),gi=lr([n.customElement("gui-number-input")],gi);const mc=Object.freeze(Object.defineProperty({__proto__:null,get NumberElement(){return gi}},Symbol.toStringTag,{value:"Module"}));function cc(e){const t=typeof e;return t==="string"||t==="number"}function mn(e,t){return t.find(i=>i.value.toString()===e)?.value}const cn=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!Up(e[0])){if(cc(e[0]))return e.map(i=>({label:i.toString(),value:i}));if(yc(e[0],t)){const i=gc(e[0],t);return e.map(i)}else throw new Error("Invalid option shape")}return e},yc=(e,{labelField:t,valueField:i})=>{if(e===null||typeof e!="object")return!1;const a=e,r=t?Object.prototype.hasOwnProperty.call(a,t):!1,s=i?Object.prototype.hasOwnProperty.call(a,i):!1;return t&&!r?!1:!(i&&!s)};function gc(e,{labelField:t,valueField:i}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const a=e,r=t&&Object.prototype.hasOwnProperty.call(a,t)?t:void 0,s=i&&Object.prototype.hasOwnProperty.call(a,i)?i:void 0;if(!r&&!s)throw new Error("Neither labelField nor valueField exists on the object");return o=>{if(o===null||typeof o!="object")throw new Error("Item is not an object");const d=o;return{label:r?d[r]:"",value:s?d[s]:""}}}var bc=Object.defineProperty,fc=Object.getOwnPropertyDescriptor,Ue=(e,t,i,a)=>{for(var r=a>1?void 0:a?fc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&bc(t,i,r),r};let Me=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.options=[],this.labelField=void 0,this.valueField=void 0,this.direction="column",this.optionsLoading=!1,this.hasMatchingValue=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[name="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,options:this.options,labelField:this.labelField,valueField:this.valueField,direction:this.direction};this.options=cn(this.options,{labelField:this.labelField,valueField:this.valueField});const t=this.value;this.hasMatchingValue=this.options?.length?this.options.find(({value:a})=>a===t)!==void 0:!1;const i=this.optionsLoading?l.html`<span>Loading...</span>`:l.html`
2805
- ${qe.repeat(this.options||[],a=>a?.value,(a,r)=>{const s=this.hasMatchingValue&&a.value===e.value,o=!this.hasMatchingValue&&r===0,d=s||o;return l.html`<label for=${`${this.uid}_${r}`}>
2804
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};Qr([f.consume({context:m.formContext}),n.property({attribute:!1})],Di.prototype,"formContext",2),Qr([f.provide({context:m.inputContext})],Di.prototype,"adapter",2),Di=Qr([n.customElement("gui-number-input")],Di);const mb=Object.freeze(Object.defineProperty({__proto__:null,get NumberElement(){return Di}},Symbol.toStringTag,{value:"Module"}));function yb(e){const t=typeof e;return t==="string"||t==="number"}function ao(e,t){return t.find(i=>i.value.toString()===e)?.value}const ro=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!Zc(e[0])){if(yb(e[0]))return e.map(i=>({label:i.toString(),value:i}));if(gb(e[0],t)){const i=bb(e[0],t);return e.map(i)}else throw new Error("Invalid option shape")}return e},gb=(e,{labelField:t,valueField:i})=>{if(e===null||typeof e!="object")return!1;const a=e,r=t?Object.prototype.hasOwnProperty.call(a,t):!1,s=i?Object.prototype.hasOwnProperty.call(a,i):!1;return t&&!r?!1:!(i&&!s)};function bb(e,{labelField:t,valueField:i}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const a=e,r=t&&Object.prototype.hasOwnProperty.call(a,t)?t:void 0,s=i&&Object.prototype.hasOwnProperty.call(a,i)?i:void 0;if(!r&&!s)throw new Error("Neither labelField nor valueField exists on the object");return o=>{if(o===null||typeof o!="object")throw new Error("Item is not an object");const l=o;return{label:r?l[r]:"",value:s?l[s]:""}}}var fb=Object.defineProperty,vb=Object.getOwnPropertyDescriptor,Ve=(e,t,i,a)=>{for(var r=a>1?void 0:a?vb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&fb(t,i,r),r};let Oe=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.options=[],this.labelField=void 0,this.valueField=void 0,this.direction="column",this.optionsLoading=!1,this.hasMatchingValue=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`input[name="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,options:this.options,labelField:this.labelField,valueField:this.valueField,direction:this.direction};this.options=ro(this.options,{labelField:this.labelField,valueField:this.valueField});const t=this.value;this.hasMatchingValue=this.options?.length?this.options.find(({value:a})=>a===t)!==void 0:!1;const i=this.optionsLoading?d.html`<span>Loading...</span>`:d.html`
2805
+ ${qe.repeat(this.options||[],a=>a?.value,(a,r)=>{const s=this.hasMatchingValue&&a.value===e.value,o=!this.hasMatchingValue&&r===0,l=s||o;return d.html`<label for=${`${this.uid}_${r}`}>
2806
2806
  <input
2807
2807
  type="radio"
2808
- tabindex=${d?"0":"-1"}
2808
+ tabindex=${l?"0":"-1"}
2809
2809
  id=${`${this.uid}_${r}`}
2810
2810
  data-cy=${`${this.uid}_radiogroup_${r}`}
2811
2811
  name=${this.uid}
@@ -2818,24 +2818,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2818
2818
  />
2819
2819
  ${a.label}
2820
2820
  </label>`})}
2821
- `;return l.html`
2821
+ `;return d.html`
2822
2822
  ${le(this.uid,e,!1,void 0,!1)}
2823
2823
 
2824
2824
  <div
2825
2825
  class="gui-widget${this.direction==="row"?" gui-widget--horizontal":""}"
2826
2826
  role="radiogroup"
2827
2827
  id=${this.uid}
2828
- aria-labelledby=${e.label?`${this.uid}_label`:l.nothing}
2829
- aria-describedby=${e.hint?`${this.uid}_hint`:l.nothing}
2830
- aria-required=${this.required?"true":l.nothing}
2831
- aria-invalid=${this.touched&&this.errors?.length?"true":l.nothing}
2832
- aria-errormessage=${this.touched&&this.errors?.length?`${this.uid}_errors`:l.nothing}
2828
+ aria-labelledby=${e.label?`${this.uid}_label`:d.nothing}
2829
+ aria-describedby=${e.hint?`${this.uid}_hint`:d.nothing}
2830
+ aria-required=${this.required?"true":d.nothing}
2831
+ aria-invalid=${this.touched&&this.errors?.length?"true":d.nothing}
2832
+ aria-errormessage=${this.touched&&this.errors?.length?`${this.uid}_errors`:d.nothing}
2833
2833
  >
2834
2834
  ${i}
2835
2835
  </div>
2836
2836
 
2837
2837
  ${j(this.uid,e)}
2838
- `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:mn(t.value,this.options)},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Ue([n.property({type:String})],Me.prototype,"uid",2),Ue([n.property({type:String})],Me.prototype,"label",2),Ue([n.property({type:String,attribute:"locale-id"})],Me.prototype,"localeId",2),Ue([n.property({type:Array})],Me.prototype,"errors",2),Ue([n.property({type:Boolean})],Me.prototype,"touched",2),Ue([n.property({type:Boolean})],Me.prototype,"required",2),Ue([n.property({type:Boolean})],Me.prototype,"disabled",2),Ue([n.property({type:Boolean,attribute:"readonly"})],Me.prototype,"readOnly",2),Ue([n.property({type:String})],Me.prototype,"value",2),Ue([n.property({type:String})],Me.prototype,"hint",2),Ue([n.property({type:Array})],Me.prototype,"options",2),Ue([n.property({type:String})],Me.prototype,"labelField",2),Ue([n.property({type:String})],Me.prototype,"valueField",2),Ue([n.property({type:String})],Me.prototype,"direction",2),Me=Ue([n.customElement("gui-radiogroup")],Me),typeof customElements<"u"&&!customElements.get("gui-radiogroup")&&customElements.define("gui-radiogroup",Me);var vc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,dr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Dc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&vc(t,i,r),r};let bi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-radiogroup","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2838
+ `}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:ao(t.value,this.options)},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Ve([n.property({type:String})],Oe.prototype,"uid",2),Ve([n.property({type:String})],Oe.prototype,"label",2),Ve([n.property({type:String,attribute:"locale-id"})],Oe.prototype,"localeId",2),Ve([n.property({type:Array})],Oe.prototype,"errors",2),Ve([n.property({type:Boolean})],Oe.prototype,"touched",2),Ve([n.property({type:Boolean})],Oe.prototype,"required",2),Ve([n.property({type:Boolean})],Oe.prototype,"disabled",2),Ve([n.property({type:Boolean,attribute:"readonly"})],Oe.prototype,"readOnly",2),Ve([n.property({type:String})],Oe.prototype,"value",2),Ve([n.property({type:String})],Oe.prototype,"hint",2),Ve([n.property({type:Array})],Oe.prototype,"options",2),Ve([n.property({type:String})],Oe.prototype,"labelField",2),Ve([n.property({type:String})],Oe.prototype,"valueField",2),Ve([n.property({type:String})],Oe.prototype,"direction",2),Oe=Ve([n.customElement("gui-radiogroup")],Oe),typeof customElements<"u"&&!customElements.get("gui-radiogroup")&&customElements.define("gui-radiogroup",Oe);var Db=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,jr=(e,t,i,a)=>{for(var r=a>1?void 0:a?wb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Db(t,i,r),r};let wi=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-radiogroup","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2839
2839
  <gui-radiogroup
2840
2840
  .uid=${this.widget.uid}
2841
2841
  .label=${this.adapter.templateData.label}
@@ -2853,27 +2853,27 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2853
2853
  @change=${this.valueChanged}
2854
2854
  @blur=${()=>this.adapter.onBlur()}
2855
2855
  ></gui-radiogroup>
2856
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};dr([f.consume({context:c.formContext}),n.property({attribute:!1})],bi.prototype,"formContext",2),dr([f.provide({context:c.inputContext})],bi.prototype,"adapter",2),bi=dr([n.customElement("gui-radiogroup-input")],bi);const wc=Object.freeze(Object.defineProperty({__proto__:null,get RadiogroupElement(){return bi}},Symbol.toStringTag,{value:"Module"}));var $c=Object.defineProperty,kc=Object.getOwnPropertyDescriptor,Ee=(e,t,i,a)=>{for(var r=a>1?void 0:a?kc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&$c(t,i,r),r};let we=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.autocomplete=void 0,this.options=[],this.placeholder=void 0,this.invalidOptionMessage=void 0,this.labelField=void 0,this.valueField=void 0,this.optionsLoading=!1,this.hasMatchingValue=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`select[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,icon:this.icon,autocomplete:this.autocomplete,options:this.options,placeholder:this.placeholder,labelField:this.labelField,valueField:this.valueField},t=Xe("select",e);this.options=cn(this.options,{labelField:this.labelField,valueField:this.valueField}),this.hasMatchingValue=this.options?.length?this.options.find(({value:a})=>a===this.value)!==void 0:!1;const i=this.optionsLoading?l.html`<span>Loading...</span>`:l.html`
2857
- <option value="" disabled selected=${this.hasMatchingValue?l.nothing:""}>
2856
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};jr([f.consume({context:m.formContext}),n.property({attribute:!1})],wi.prototype,"formContext",2),jr([f.provide({context:m.inputContext})],wi.prototype,"adapter",2),wi=jr([n.customElement("gui-radiogroup-input")],wi);const $b=Object.freeze(Object.defineProperty({__proto__:null,get RadiogroupElement(){return wi}},Symbol.toStringTag,{value:"Module"}));var kb=Object.defineProperty,Tb=Object.getOwnPropertyDescriptor,Ie=(e,t,i,a)=>{for(var r=a>1?void 0:a?Tb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&kb(t,i,r),r};let we=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.autocomplete=void 0,this.options=[],this.placeholder=void 0,this.invalidOptionMessage=void 0,this.labelField=void 0,this.valueField=void 0,this.optionsLoading=!1,this.hasMatchingValue=!1,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(`select[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,icon:this.icon,autocomplete:this.autocomplete,options:this.options,placeholder:this.placeholder,labelField:this.labelField,valueField:this.valueField},t=Qe("select",e);this.options=ro(this.options,{labelField:this.labelField,valueField:this.valueField}),this.hasMatchingValue=this.options?.length?this.options.find(({value:a})=>a===this.value)!==void 0:!1;const i=this.optionsLoading?d.html`<span>Loading...</span>`:d.html`
2857
+ <option value="" disabled selected=${this.hasMatchingValue?d.nothing:""}>
2858
2858
  ${this.placeholder??"Select an option"}
2859
2859
  </option>
2860
- ${qe.repeat(this.options||[],a=>a?.value,a=>l.html`<option
2860
+ ${qe.repeat(this.options||[],a=>a?.value,a=>d.html`<option
2861
2861
  value=${a.value}
2862
- selected=${this.hasMatchingValue&&a.value===this.value?"":l.nothing}
2862
+ selected=${this.hasMatchingValue&&a.value===this.value?"":d.nothing}
2863
2863
  >
2864
2864
  ${a.label}
2865
2865
  </option>`)}
2866
- `;return l.html`
2866
+ `;return d.html`
2867
2867
  ${le(this.uid,e)}
2868
2868
 
2869
2869
  <div class="gui-widget">
2870
2870
  <select
2871
2871
  id=${this.uid}
2872
2872
  data-cy=${`${this.uid}_select`}
2873
- class=${_.classMap({"gui-widget-input":!0,...t.widgetClasses})}
2873
+ class=${S.classMap({"gui-widget-input":!0,...t.widgetClasses})}
2874
2874
  ?required=${e.required}
2875
2875
  ?disabled=${e.disabled||e.readonly}
2876
- autocomplete=${this.autocomplete||l.nothing}
2876
+ autocomplete=${this.autocomplete||d.nothing}
2877
2877
  @change=${this.valueChanged}
2878
2878
  @blur=${this.onBlur}
2879
2879
  >
@@ -2895,7 +2895,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2895
2895
  </div>
2896
2896
 
2897
2897
  ${j(this.uid,e)}
2898
- `}updated(e){e.has("value")&&!this.hasMatchingValue&&this.value&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:(this.invalidOptionMessage??"Invalid selection: '{value}' is not a valid option.").replace("{value}",String(this.value))},bubbles:!0}))}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:mn(t.value,this.options)},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Ee([n.property({type:String})],we.prototype,"uid",2),Ee([n.property({type:String})],we.prototype,"label",2),Ee([n.property({type:String,attribute:"locale-id"})],we.prototype,"localeId",2),Ee([n.property({type:Array})],we.prototype,"errors",2),Ee([n.property({type:Boolean})],we.prototype,"touched",2),Ee([n.property({type:Boolean})],we.prototype,"required",2),Ee([n.property({type:Boolean})],we.prototype,"disabled",2),Ee([n.property({type:Boolean,attribute:"readonly"})],we.prototype,"readOnly",2),Ee([n.property({type:String})],we.prototype,"value",2),Ee([n.property({type:String})],we.prototype,"hint",2),Ee([n.property({type:String})],we.prototype,"icon",2),Ee([n.property({type:String})],we.prototype,"autocomplete",2),Ee([n.property({type:Array})],we.prototype,"options",2),Ee([n.property({type:String})],we.prototype,"placeholder",2),Ee([n.property({type:String,attribute:"invalid-option-message"})],we.prototype,"invalidOptionMessage",2),Ee([n.property({type:String})],we.prototype,"labelField",2),Ee([n.property({type:String})],we.prototype,"valueField",2),we=Ee([n.customElement("gui-select")],we),typeof customElements<"u"&&!customElements.get("gui-select")&&customElements.define("gui-select",we);var Sc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,pr=(e,t,i,a)=>{for(var r=a>1?void 0:a?_c(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Sc(t,i,r),r};let fi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-select","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2898
+ `}updated(e){e.has("value")&&!this.hasMatchingValue&&this.value&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:(this.invalidOptionMessage??"Invalid selection: '{value}' is not a valid option.").replace("{value}",String(this.value))},bubbles:!0}))}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:ao(t.value,this.options)},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Ie([n.property({type:String})],we.prototype,"uid",2),Ie([n.property({type:String})],we.prototype,"label",2),Ie([n.property({type:String,attribute:"locale-id"})],we.prototype,"localeId",2),Ie([n.property({type:Array})],we.prototype,"errors",2),Ie([n.property({type:Boolean})],we.prototype,"touched",2),Ie([n.property({type:Boolean})],we.prototype,"required",2),Ie([n.property({type:Boolean})],we.prototype,"disabled",2),Ie([n.property({type:Boolean,attribute:"readonly"})],we.prototype,"readOnly",2),Ie([n.property({type:String})],we.prototype,"value",2),Ie([n.property({type:String})],we.prototype,"hint",2),Ie([n.property({type:String})],we.prototype,"icon",2),Ie([n.property({type:String})],we.prototype,"autocomplete",2),Ie([n.property({type:Array})],we.prototype,"options",2),Ie([n.property({type:String})],we.prototype,"placeholder",2),Ie([n.property({type:String,attribute:"invalid-option-message"})],we.prototype,"invalidOptionMessage",2),Ie([n.property({type:String})],we.prototype,"labelField",2),Ie([n.property({type:String})],we.prototype,"valueField",2),we=Ie([n.customElement("gui-select")],we),typeof customElements<"u"&&!customElements.get("gui-select")&&customElements.define("gui-select",we);var Sb=Object.defineProperty,_b=Object.getOwnPropertyDescriptor,es=(e,t,i,a)=>{for(var r=a>1?void 0:a?_b(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Sb(t,i,r),r};let $i=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-select","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2899
2899
  <gui-select
2900
2900
  .uid=${this.widget.uid}
2901
2901
  .label=${this.adapter.templateData.label}
@@ -2917,24 +2917,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2917
2917
  @inputError=${this.onInputError}
2918
2918
  @blur=${()=>this.adapter.onBlur()}
2919
2919
  ></gui-select>
2920
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};pr([f.consume({context:c.formContext}),n.property({attribute:!1})],fi.prototype,"formContext",2),pr([f.provide({context:c.inputContext})],fi.prototype,"adapter",2),fi=pr([n.customElement("gui-select-input")],fi);const Tc=Object.freeze(Object.defineProperty({__proto__:null,get SelectElement(){return fi}},Symbol.toStringTag,{value:"Module"}));var Ac=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,Te=(e,t,i,a)=>{for(var r=a>1?void 0:a?Cc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ac(t,i,r),r};const Lc=["Enter",",","Tab","blur"];let fe=class extends l.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=[],this.hint=void 0,this.placeholder=void 0,this.icon=void 0,this.separators=void 0,this.allowDuplicates=!0,this.trim=!0,this.limit=void 0,this.removeAriaLabel=void 0,this.removeIcon=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-tags-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemove=e=>{if(this.disabled||this.readOnly)return;const t=this.getValue(),i=t.findIndex((r,s)=>this.pillKey(r,s)===e.detail.key);if(i<0)return;const a=t.filter((r,s)=>s!==i);this.emitChange(a),a.length===0&&requestAnimationFrame(()=>this.focusInput())},this.onPillKeydown=e=>{e.detail.event.key==="ArrowRight"&&!this.isDropdownOpen()&&this.focusInput()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}getSeparators(){return this.separators&&this.separators.length>0?this.separators:Lc}getValue(){return Array.isArray(this.value)?this.value:[]}getRemoveAriaLabel(){return this.removeAriaLabel??"Remove tag"}pillKey(e,t){return`${t}-${e}`}render(){const e=this.getValue(),t={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,placeholder:this.placeholder,icon:this.icon},i={"gui-widget-icon":!0,[this.icon]:!!this.icon},a=e.map((r,s)=>({key:this.pillKey(r,s),label:r}));return l.html`
2921
- ${this.label?le(this.uid,t,!1,void 0,!1):l.nothing}
2920
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}onInputError(e){this.adapter.injectValidationIssues([e.detail.message])}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};es([f.consume({context:m.formContext}),n.property({attribute:!1})],$i.prototype,"formContext",2),es([f.provide({context:m.inputContext})],$i.prototype,"adapter",2),$i=es([n.customElement("gui-select-input")],$i);const Ab=Object.freeze(Object.defineProperty({__proto__:null,get SelectElement(){return $i}},Symbol.toStringTag,{value:"Module"}));var Eb=Object.defineProperty,Cb=Object.getOwnPropertyDescriptor,_e=(e,t,i,a)=>{for(var r=a>1?void 0:a?Cb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Eb(t,i,r),r};const Lb=["Enter",",","Tab","blur"];let fe=class extends d.LitElement{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=[],this.hint=void 0,this.placeholder=void 0,this.icon=void 0,this.separators=void 0,this.allowDuplicates=!0,this.trim=!0,this.limit=void 0,this.removeAriaLabel=void 0,this.removeIcon=void 0,this.ariaController=new he(this,{getTargets:()=>this.querySelectorAll(".gui-tags-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched,required:this.required}})}),this.onPillRemove=e=>{if(this.disabled||this.readOnly)return;const t=this.getValue(),i=t.findIndex((r,s)=>this.pillKey(r,s)===e.detail.key);if(i<0)return;const a=t.filter((r,s)=>s!==i);this.emitChange(a),a.length===0&&requestAnimationFrame(()=>this.focusInput())},this.onPillKeydown=e=>{e.detail.event.key==="ArrowRight"&&!this.isDropdownOpen()&&this.focusInput()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}getSeparators(){return this.separators&&this.separators.length>0?this.separators:Lb}getValue(){return Array.isArray(this.value)?this.value:[]}getRemoveAriaLabel(){return this.removeAriaLabel??"Remove tag"}pillKey(e,t){return`${t}-${e}`}render(){const e=this.getValue(),t={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,placeholder:this.placeholder,icon:this.icon},i={"gui-widget-icon":!0,[this.icon]:!!this.icon},a=e.map((r,s)=>({key:this.pillKey(r,s),label:r}));return d.html`
2921
+ ${this.label?le(this.uid,t,!1,void 0,!1):d.nothing}
2922
2922
 
2923
2923
  <div class="gui-widget">
2924
2924
  <div
2925
- class=${_.classMap({"gui-widget-input":!0,"gui-tags-input":!0,"gui-tags-input--icon":!!this.icon})}
2925
+ class=${S.classMap({"gui-widget-input":!0,"gui-tags-input":!0,"gui-tags-input--icon":!!this.icon})}
2926
2926
  role="group"
2927
2927
  aria-label=${this.label??"Tags input"}
2928
2928
  >
2929
- ${this.icon?l.html`<span
2930
- class=${_.classMap(i)}
2929
+ ${this.icon?d.html`<span
2930
+ class=${S.classMap(i)}
2931
2931
  data-icon=${this.icon}
2932
2932
  aria-hidden="true"
2933
- ></span>`:l.nothing}
2933
+ ></span>`:d.nothing}
2934
2934
 
2935
2935
  <gui-pills
2936
2936
  class="gui-tags__pills"
2937
- style=${vt.styleMap(a.length?{}:{"min-width":0})}
2937
+ style=${wt.styleMap(a.length?{}:{"min-width":0})}
2938
2938
  .uid=${this.uid}
2939
2939
  .toolbarAriaLabel=${"Selected tags"}
2940
2940
  .items=${a}
@@ -2958,7 +2958,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2958
2958
  class="gui-tags__input"
2959
2959
  ?disabled=${this.disabled}
2960
2960
  ?readonly=${this.readOnly}
2961
- placeholder=${this.placeholder||l.nothing}
2961
+ placeholder=${this.placeholder||d.nothing}
2962
2962
  @keydown=${this.onInputKeydown}
2963
2963
  @blur=${this.onInputBlur}
2964
2964
  @paste=${this.onPaste}
@@ -2969,7 +2969,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2969
2969
  ${j(this.uid,t)}
2970
2970
  </div>
2971
2971
  `}onInputKeydown(e){if(this.disabled||this.readOnly)return;const t=e.target,i=this.getSeparators(),a=t.value,r=t.selectionStart===0&&t.selectionEnd===0;if(e.key==="Enter"&&i.includes("Enter")){e.preventDefault(),this.commitDraft(a)&&(t.value="");return}if(e.key===","&&i.includes(",")){e.preventDefault(),this.commitDraft(a)&&(t.value="");return}if(e.key==="Tab"&&i.includes("Tab")&&a.length>0){this.commitDraft(a)&&(t.value="");return}if(e.key==="Escape"){e.preventDefault(),t.value="";return}const s=this.getValue(),o=this.isCompactMode();if(e.key==="ArrowDown"&&o&&s.length>0){e.preventDefault(),this.enterPillList(0);return}if(e.key==="ArrowLeft"&&!o&&r&&s.length>0){e.preventDefault(),this.enterPillList(s.length-1);return}if(e.key==="Backspace"&&a===""&&s.length>0){e.preventDefault(),this.enterPillList(s.length-1);return}}onInputBlur(e){const t=e.target,i=this.getSeparators(),a=t.value;a.length>0&&i.includes("blur")&&!this.disabled&&!this.readOnly&&this.commitDraft(a)&&(t.value=""),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}onPaste(e){if(this.disabled||this.readOnly)return;const t=e.clipboardData?.getData("text")??"";if(!t)return;const a=this.getSeparators().filter(h=>h!=="Enter"&&h!=="Tab"&&h!=="blur");if(a.length===0)return;const r=new RegExp(`[${a.map(h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("")}
2972
- ]`);if(!r.test(t))return;e.preventDefault();const s=e.target instanceof HTMLInputElement?e.target:null,d=((s?.value??"")+t).split(r),p=d.slice(0,-1),u=d[d.length-1]??"";this.commitDraftBatch(p)&&s&&(s.value=u)}commitDraft(e){const t=this.trim?e.trim():e;if(t.length===0)return!1;const i=this.getValue();return this.allowDuplicates===!1&&i.includes(t)?!0:this.limit!==void 0&&i.length>=this.limit?!1:(this.emitChange([...i,t]),!0)}commitDraftBatch(e){const t=this.getValue(),i=[...t];for(const a of e){const r=this.trim?a.trim():a;if(r.length!==0&&!(this.allowDuplicates===!1&&i.includes(r))){if(this.limit!==void 0&&i.length>=this.limit)break;i.push(r)}}return i.length===t.length?!1:(this.emitChange(i),!0)}emitChange(e){this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}focusInput(){this.querySelector(`input[id="${this.uid}"]`)?.focus()}getPills(){return this.querySelector("gui-pills")}isDropdownOpen(){return!!this.getPills()?.querySelector(".gui-pills__dropdown")}isCompactMode(){const e=this.getPills();if(!e)return!1;const t=e.querySelector(".gui-pills__strip-wrapper");return t?getComputedStyle(t).display==="none":!1}enterPillList(e){const t=this.getPills();t&&(this.isCompactMode()?(t.openDropdown(),requestAnimationFrame(()=>t.focusPillAt(e))):t.focusPillAt(e))}};Te([n.property({type:String})],fe.prototype,"uid",2),Te([n.property({type:String})],fe.prototype,"label",2),Te([n.property({type:String,attribute:"locale-id"})],fe.prototype,"localeId",2),Te([n.property({type:Array})],fe.prototype,"errors",2),Te([n.property({type:Boolean})],fe.prototype,"touched",2),Te([n.property({type:Boolean})],fe.prototype,"required",2),Te([n.property({type:Boolean})],fe.prototype,"disabled",2),Te([n.property({type:Boolean,attribute:"readonly"})],fe.prototype,"readOnly",2),Te([n.property({type:Array})],fe.prototype,"value",2),Te([n.property({type:String})],fe.prototype,"hint",2),Te([n.property({type:String})],fe.prototype,"placeholder",2),Te([n.property({type:String})],fe.prototype,"icon",2),Te([n.property({type:Array})],fe.prototype,"separators",2),Te([n.property({type:Boolean})],fe.prototype,"allowDuplicates",2),Te([n.property({type:Boolean})],fe.prototype,"trim",2),Te([n.property({type:Number})],fe.prototype,"limit",2),Te([n.property({type:String,attribute:"remove-aria-label"})],fe.prototype,"removeAriaLabel",2),Te([n.property({type:String,attribute:"remove-icon"})],fe.prototype,"removeIcon",2),fe=Te([n.customElement("gui-tags")],fe),typeof customElements<"u"&&!customElements.get("gui-tags")&&customElements.define("gui-tags",fe);var Ec=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,ur=(e,t,i,a)=>{for(var r=a>1?void 0:a?xc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ec(t,i,r),r};let vi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-tags","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),l.html`
2972
+ ]`);if(!r.test(t))return;e.preventDefault();const s=e.target instanceof HTMLInputElement?e.target:null,l=((s?.value??"")+t).split(r),u=l.slice(0,-1),p=l[l.length-1]??"";this.commitDraftBatch(u)&&s&&(s.value=p)}commitDraft(e){const t=this.trim?e.trim():e;if(t.length===0)return!1;const i=this.getValue();return this.allowDuplicates===!1&&i.includes(t)?!0:this.limit!==void 0&&i.length>=this.limit?!1:(this.emitChange([...i,t]),!0)}commitDraftBatch(e){const t=this.getValue(),i=[...t];for(const a of e){const r=this.trim?a.trim():a;if(r.length!==0&&!(this.allowDuplicates===!1&&i.includes(r))){if(this.limit!==void 0&&i.length>=this.limit)break;i.push(r)}}return i.length===t.length?!1:(this.emitChange(i),!0)}emitChange(e){this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}focusInput(){this.querySelector(`input[id="${this.uid}"]`)?.focus()}getPills(){return this.querySelector("gui-pills")}isDropdownOpen(){return!!this.getPills()?.querySelector(".gui-pills__dropdown")}isCompactMode(){const e=this.getPills();if(!e)return!1;const t=e.querySelector(".gui-pills__strip-wrapper");return t?getComputedStyle(t).display==="none":!1}enterPillList(e){const t=this.getPills();t&&(this.isCompactMode()?(t.openDropdown(),requestAnimationFrame(()=>t.focusPillAt(e))):t.focusPillAt(e))}};_e([n.property({type:String})],fe.prototype,"uid",2),_e([n.property({type:String})],fe.prototype,"label",2),_e([n.property({type:String,attribute:"locale-id"})],fe.prototype,"localeId",2),_e([n.property({type:Array})],fe.prototype,"errors",2),_e([n.property({type:Boolean})],fe.prototype,"touched",2),_e([n.property({type:Boolean})],fe.prototype,"required",2),_e([n.property({type:Boolean})],fe.prototype,"disabled",2),_e([n.property({type:Boolean,attribute:"readonly"})],fe.prototype,"readOnly",2),_e([n.property({type:Array})],fe.prototype,"value",2),_e([n.property({type:String})],fe.prototype,"hint",2),_e([n.property({type:String})],fe.prototype,"placeholder",2),_e([n.property({type:String})],fe.prototype,"icon",2),_e([n.property({type:Array})],fe.prototype,"separators",2),_e([n.property({type:Boolean})],fe.prototype,"allowDuplicates",2),_e([n.property({type:Boolean})],fe.prototype,"trim",2),_e([n.property({type:Number})],fe.prototype,"limit",2),_e([n.property({type:String,attribute:"remove-aria-label"})],fe.prototype,"removeAriaLabel",2),_e([n.property({type:String,attribute:"remove-icon"})],fe.prototype,"removeIcon",2),fe=_e([n.customElement("gui-tags")],fe),typeof customElements<"u"&&!customElements.get("gui-tags")&&customElements.define("gui-tags",fe);var Ib=Object.defineProperty,xb=Object.getOwnPropertyDescriptor,ts=(e,t,i,a)=>{for(var r=a>1?void 0:a?xb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ib(t,i,r),r};let ki=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-tags","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return super.render(),d.html`
2973
2973
  <gui-tags
2974
2974
  .uid=${this.widget.uid}
2975
2975
  .label=${this.adapter.templateData.label}
@@ -2991,7 +2991,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2991
2991
  @change=${this.valueChanged}
2992
2992
  @blur=${()=>this.adapter.onBlur()}
2993
2993
  ></gui-tags>
2994
- `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ur([f.consume({context:c.formContext}),n.property({attribute:!1})],vi.prototype,"formContext",2),ur([f.provide({context:c.inputContext})],vi.prototype,"adapter",2),vi=ur([n.customElement("gui-tags-input")],vi);const Pc=Object.freeze(Object.defineProperty({__proto__:null,get TagsElement(){return vi}},Symbol.toStringTag,{value:"Module"}));var Oc=Object.defineProperty,Mc=Object.getOwnPropertyDescriptor,Di=(e,t,i,a)=>{for(var r=a>1?void 0:a?Mc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Oc(t,i,r),r};let Ic=0;const Rc=()=>Ic++;let Tt=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.InputWidgetAdapter,this.isFocused=!1,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-repeater","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}onFocusIn(e){e.stopPropagation(),this.isFocused=!0}onFocusOut(e){e.stopPropagation(),this.adapter.onBlur(),this.isFocused=!1}render(){const e=this.adapter.templateData,t=e.touched&&e.errors&&e.errors.length>0;return l.html`
2994
+ `}valueChanged(e){const t=e.detail.value;this.adapter.valueChanged(t)}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ts([f.consume({context:m.formContext}),n.property({attribute:!1})],ki.prototype,"formContext",2),ts([f.provide({context:m.inputContext})],ki.prototype,"adapter",2),ki=ts([n.customElement("gui-tags-input")],ki);const Pb=Object.freeze(Object.defineProperty({__proto__:null,get TagsElement(){return ki}},Symbol.toStringTag,{value:"Module"}));var Mb=Object.defineProperty,Ob=Object.getOwnPropertyDescriptor,Ti=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ob(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Mb(t,i,r),r};let Rb=0;const Fb=()=>Rb++;let Et=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.InputWidgetAdapter,this.isFocused=!1,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-repeater","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}onFocusIn(e){e.stopPropagation(),this.isFocused=!0}onFocusOut(e){e.stopPropagation(),this.adapter.onBlur(),this.isFocused=!1}render(){const e=this.adapter.templateData,t=e.touched&&e.errors&&e.errors.length>0;return d.html`
2995
2995
  <div
2996
2996
  id=${this.widget.uid}
2997
2997
  class=${`gui-repeater__main-card gui-repeater__card ${this.isFocused?"gui-repeater__card--focused":""}`}
@@ -3007,22 +3007,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3007
3007
  .required=${e.validator?.required}
3008
3008
  .native=${!1}
3009
3009
  ></gui-label>
3010
- ${e.value?qe.repeat(e.value,i=>Zp(i,Rc),(i,a)=>l.html`
3010
+ ${e.value?qe.repeat(e.value,i=>Yc(i,Fb),(i,a)=>d.html`
3011
3011
  <div class="gui-repeater__card">
3012
3012
  <div class="gui-repeater__card-header">
3013
- ${e.title?l.html`<span class="gui-repeater__card-title"
3013
+ ${e.title?d.html`<span class="gui-repeater__card-title"
3014
3014
  >${e.title} ${a+1}</span
3015
- >`:l.nothing}
3015
+ >`:d.nothing}
3016
3016
  <button
3017
3017
  type="button"
3018
3018
  tabindex="0"
3019
3019
  class="gui-button gui-button--sm gui-repeater__remove-btn"
3020
3020
  @click=${()=>this.removeItem(a)}
3021
3021
  >
3022
- ${e.removeButtonIcon?l.html`<span
3022
+ ${e.removeButtonIcon?d.html`<span
3023
3023
  class="gui-widget-icon gui-button-icon ${e.removeButtonIcon}"
3024
3024
  data-icon=${e.removeButtonIcon}
3025
- ></span>`:l.nothing}
3025
+ ></span>`:d.nothing}
3026
3026
  ${e.removeLabel??"Remove"}
3027
3027
  </button>
3028
3028
  </div>
@@ -3031,7 +3031,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3031
3031
  .widget=${e.template}
3032
3032
  ></gui-repeater-widget>
3033
3033
  </div>
3034
- `):l.nothing}
3034
+ `):d.nothing}
3035
3035
 
3036
3036
  <button
3037
3037
  type="button"
@@ -3040,36 +3040,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3040
3040
  @click=${()=>this.addItem()}
3041
3041
  ?disabled=${!!(e.limit&&e.limit===e.value?.length)}
3042
3042
  >
3043
- ${e.addButtonIcon?l.html`<span
3043
+ ${e.addButtonIcon?d.html`<span
3044
3044
  class="gui-widget-icon gui-button-icon ${e.addButtonIcon}"
3045
3045
  data-icon=${e.addButtonIcon}
3046
- ></span>`:l.nothing}
3046
+ ></span>`:d.nothing}
3047
3047
  ${e.addLabel??"Add"}
3048
3048
  </button>
3049
3049
  </div>
3050
- ${t?l.html`<gui-errors
3050
+ ${t?d.html`<gui-errors
3051
3051
  .uid=${this.widget.uid}
3052
3052
  .errors=${e.errors}
3053
3053
  .touched=${e.touched}
3054
- ></gui-errors>`:l.nothing}
3055
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}addItem(){const e=[...this.adapter.templateData.value??[],{}];this.adapter.valueChanged(e),this.requestUpdate()}removeItem(e){const t=(this.adapter.templateData.value??[]).filter((i,a)=>e!==a);"structuredClone"in window?this.adapter.valueChanged(structuredClone(t)):this.adapter.valueChanged(JSON.parse(JSON.stringify(t))),this.requestUpdate()}};Di([f.consume({context:c.formContext}),n.property({attribute:!1})],Tt.prototype,"formContext",2),Di([f.provide({context:c.inputContext})],Tt.prototype,"adapter",2),Di([n.state()],Tt.prototype,"isFocused",2),Di([n.query(".gui-repeater__main-card")],Tt.prototype,"_repeaterRef",2),Tt=Di([n.customElement("gui-repeater-input")],Tt);const Fc=Object.freeze(Object.defineProperty({__proto__:null,get RepeaterElement(){return Tt}},Symbol.toStringTag,{value:"Module"}));var Bc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,hr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Nc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Bc(t,i,r),r};let wi=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-flex","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){const e={"gui-flex__widget":!0,"gui-flex__widget--row":this.adapter.templateData.direction==="row","gui-flex__widget--row-reverse":this.adapter.templateData.direction==="row-reverse","gui-flex__widget--column":!this.adapter.templateData.direction||this.adapter.templateData.direction==="column","gui-flex__widget--column-reverse":this.adapter.templateData.direction==="column-reverse","gui-flex__widget--justify-center":this.adapter.templateData.justify==="center","gui-flex__widget--justify-start":this.adapter.templateData.justify==="start","gui-flex__widget--justify-end":this.adapter.templateData.justify==="end","gui-flex__widget--justify-stretch":!this.adapter.templateData.justify||this.adapter.templateData.justify==="stretch","gui-flex__widget--align-start":!this.adapter.templateData.align||this.adapter.templateData.align==="start","gui-flex__widget--align-end":this.adapter.templateData.align==="end","gui-flex__widget--align-center":this.adapter.templateData.align==="center","gui-flex__widget--align-space-between":this.adapter.templateData.align==="space-between","gui-flex__widget--align-space-around":this.adapter.templateData.align==="space-around","gui-flex__widget--align-space-evenly":this.adapter.templateData.align==="space-evenly"};return l.html`
3054
+ ></gui-errors>`:d.nothing}
3055
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}addItem(){const e=[...this.adapter.templateData.value??[],{}];this.adapter.valueChanged(e),this.requestUpdate()}removeItem(e){const t=(this.adapter.templateData.value??[]).filter((i,a)=>e!==a);"structuredClone"in window?this.adapter.valueChanged(structuredClone(t)):this.adapter.valueChanged(JSON.parse(JSON.stringify(t))),this.requestUpdate()}};Ti([f.consume({context:m.formContext}),n.property({attribute:!1})],Et.prototype,"formContext",2),Ti([f.provide({context:m.inputContext})],Et.prototype,"adapter",2),Ti([n.state()],Et.prototype,"isFocused",2),Ti([n.query(".gui-repeater__main-card")],Et.prototype,"_repeaterRef",2),Et=Ti([n.customElement("gui-repeater-input")],Et);const Bb=Object.freeze(Object.defineProperty({__proto__:null,get RepeaterElement(){return Et}},Symbol.toStringTag,{value:"Module"}));var Nb=Object.defineProperty,qb=Object.getOwnPropertyDescriptor,is=(e,t,i,a)=>{for(var r=a>1?void 0:a?qb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Nb(t,i,r),r};let Si=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-flex","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){const e={"gui-flex__widget":!0,"gui-flex__widget--row":this.adapter.templateData.direction==="row","gui-flex__widget--row-reverse":this.adapter.templateData.direction==="row-reverse","gui-flex__widget--column":!this.adapter.templateData.direction||this.adapter.templateData.direction==="column","gui-flex__widget--column-reverse":this.adapter.templateData.direction==="column-reverse","gui-flex__widget--justify-center":this.adapter.templateData.justify==="center","gui-flex__widget--justify-start":this.adapter.templateData.justify==="start","gui-flex__widget--justify-end":this.adapter.templateData.justify==="end","gui-flex__widget--justify-stretch":!this.adapter.templateData.justify||this.adapter.templateData.justify==="stretch","gui-flex__widget--align-start":!this.adapter.templateData.align||this.adapter.templateData.align==="start","gui-flex__widget--align-end":this.adapter.templateData.align==="end","gui-flex__widget--align-center":this.adapter.templateData.align==="center","gui-flex__widget--align-space-between":this.adapter.templateData.align==="space-between","gui-flex__widget--align-space-around":this.adapter.templateData.align==="space-around","gui-flex__widget--align-space-evenly":this.adapter.templateData.align==="space-evenly"};return d.html`
3056
3056
  <div
3057
- class=${_.classMap(e)}
3057
+ class=${S.classMap(e)}
3058
3058
  id=${this.widget?.uid}
3059
3059
  style=${this.adapter.templateData.gap?`gap: ${this.adapter.templateData.gap}px`:""}
3060
3060
  >
3061
- ${qe.repeat(this.adapter.templateData.children||[],t=>t?.uid,t=>l.html`<gui-widget .widget=${t}></gui-widget>`)}
3061
+ ${qe.repeat(this.adapter.templateData.children||[],t=>t?.uid,t=>d.html`<gui-widget .widget=${t}></gui-widget>`)}
3062
3062
  </div>
3063
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};hr([f.consume({context:c.formContext}),n.property({attribute:!1})],wi.prototype,"formContext",2),hr([f.provide({context:c.layoutContext})],wi.prototype,"adapter",2),wi=hr([n.customElement("gui-flex-layout")],wi);const qc=Object.freeze(Object.defineProperty({__proto__:null,get FlexElement(){return wi}},Symbol.toStringTag,{value:"Module"}));var zc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,mr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Gc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&zc(t,i,r),r};let $i=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-grid","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){const e=this.adapter.templateData.direction==="column",t=!e,i=this.adapter.templateData.autoFit??!0,a={"gui-grid__widget":!0,"gui-grid__widget--row":t,"gui-grid__widget--row--auto-fit":t&&i,"gui-grid__widget--column":e,"gui-grid__widget--align-center":this.adapter.templateData.align==="center","gui-grid__widget--align-start":this.adapter.templateData.align==="start","gui-grid__widget--align-end":this.adapter.templateData.align==="end","gui-grid__widget--align-space-between":this.adapter.templateData.align==="space-between","gui-grid__widget--align-space-around":this.adapter.templateData.align==="space-around","gui-grid__widget--align-space-evenly":this.adapter.templateData.align==="space-evenly","gui-grid__widget--align-stretch":!this.adapter.templateData.align||this.adapter.templateData.align==="stretch","gui-grid__widget--justify-center":this.adapter.templateData.justify==="center","gui-grid__widget--justify-start":this.adapter.templateData.justify==="start","gui-grid__widget--justify-end":this.adapter.templateData.justify==="end","gui-grid__widget--justify-stretch":this.adapter.templateData.justify==="stretch"},r=[];return this.adapter.templateData.columnGap!==void 0&&r.push(`column-gap: ${this.adapter.templateData.columnGap}px`),this.adapter.templateData.rowGap!==void 0&&r.push(`row-gap: ${this.adapter.templateData.rowGap}px`),l.html`
3064
- <div class=${_.classMap(a)} id=${this.widget?.uid} style=${r.join("; ")}>
3065
- ${qe.repeat(this.adapter.templateData.children||[],s=>s?.uid,s=>l.html`<div class="gui-grid__cell" style="grid-column: span ${s.size||1}">
3063
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};is([f.consume({context:m.formContext}),n.property({attribute:!1})],Si.prototype,"formContext",2),is([f.provide({context:m.layoutContext})],Si.prototype,"adapter",2),Si=is([n.customElement("gui-flex-layout")],Si);const zb=Object.freeze(Object.defineProperty({__proto__:null,get FlexElement(){return Si}},Symbol.toStringTag,{value:"Module"}));var Ub=Object.defineProperty,Gb=Object.getOwnPropertyDescriptor,as=(e,t,i,a)=>{for(var r=a>1?void 0:a?Gb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Ub(t,i,r),r};let _i=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-grid","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){const e=this.adapter.templateData.direction==="column",t=!e,i=this.adapter.templateData.autoFit??!0,a={"gui-grid__widget":!0,"gui-grid__widget--row":t,"gui-grid__widget--row--auto-fit":t&&i,"gui-grid__widget--column":e,"gui-grid__widget--align-center":this.adapter.templateData.align==="center","gui-grid__widget--align-start":this.adapter.templateData.align==="start","gui-grid__widget--align-end":this.adapter.templateData.align==="end","gui-grid__widget--align-space-between":this.adapter.templateData.align==="space-between","gui-grid__widget--align-space-around":this.adapter.templateData.align==="space-around","gui-grid__widget--align-space-evenly":this.adapter.templateData.align==="space-evenly","gui-grid__widget--align-stretch":!this.adapter.templateData.align||this.adapter.templateData.align==="stretch","gui-grid__widget--justify-center":this.adapter.templateData.justify==="center","gui-grid__widget--justify-start":this.adapter.templateData.justify==="start","gui-grid__widget--justify-end":this.adapter.templateData.justify==="end","gui-grid__widget--justify-stretch":this.adapter.templateData.justify==="stretch"},r=[];return this.adapter.templateData.columnGap!==void 0&&r.push(`column-gap: ${this.adapter.templateData.columnGap}px`),this.adapter.templateData.rowGap!==void 0&&r.push(`row-gap: ${this.adapter.templateData.rowGap}px`),d.html`
3064
+ <div class=${S.classMap(a)} id=${this.widget?.uid} style=${r.join("; ")}>
3065
+ ${qe.repeat(this.adapter.templateData.children||[],s=>s?.uid,s=>d.html`<div class="gui-grid__cell" style="grid-column: span ${s.size||1}">
3066
3066
  <gui-widget .widget=${s}></gui-widget>
3067
3067
  </div>`)}
3068
3068
  </div>
3069
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};mr([f.consume({context:c.formContext}),n.property({attribute:!1})],$i.prototype,"formContext",2),mr([f.provide({context:c.layoutContext})],$i.prototype,"adapter",2),$i=mr([n.customElement("gui-grid-layout")],$i);const Vc=Object.freeze(Object.defineProperty({__proto__:null,get GridElement(){return $i}},Symbol.toStringTag,{value:"Module"}));var Uc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,bt=(e,t,i,a)=>{for(var r=a>1?void 0:a?Zc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Uc(t,i,r),r};let lt=class extends l.LitElement{constructor(){super(...arguments),this.activeTab="",this.adapter=new c.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-tabs","gui-field");const e=this.widget.props;this.adapter.context=this.formContext,this.adapter.init(this.widget),this.activeTab=e.defaultOpen??e.tabs[0].uid,this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>{this.requestUpdate()}))}firstUpdated(e){this.startObserver=la(this.startSentinel,a=>this.isStartVisible=a),this.endObserver=la(this.endSentinel,a=>this.isEndVisible=a);const i=this.widget.props.tabs.findIndex(a=>a.uid===this.activeTab);this.tabButtons[i].scrollIntoView({block:"nearest",inline:"nearest"})}render(){if(!this.adapter.templateData)return l.html``;const e=this.widget.children.filter(i=>i.uid===this.activeTab||this.adapter.templateData.renderMode!=="activeOnly"),t={"gui-widget":!0,"gui-widget--horizontal":!0,"gui-tabs--start-shadow":!this.isStartVisible,"gui-tabs--end-shadow":!this.isEndVisible};return l.html`<nav class=${_.classMap(t)} id=${this.widget.uid}>
3069
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};as([f.consume({context:m.formContext}),n.property({attribute:!1})],_i.prototype,"formContext",2),as([f.provide({context:m.layoutContext})],_i.prototype,"adapter",2),_i=as([n.customElement("gui-grid-layout")],_i);const Vb=Object.freeze(Object.defineProperty({__proto__:null,get GridElement(){return _i}},Symbol.toStringTag,{value:"Module"}));var Zb=Object.defineProperty,Yb=Object.getOwnPropertyDescriptor,vt=(e,t,i,a)=>{for(var r=a>1?void 0:a?Yb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Zb(t,i,r),r};let dt=class extends d.LitElement{constructor(){super(...arguments),this.activeTab="",this.adapter=new m.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-tabs","gui-field");const e=this.widget.props;this.adapter.context=this.formContext,this.adapter.init(this.widget),this.activeTab=e.defaultOpen??e.tabs[0].uid,this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>{this.requestUpdate()}))}firstUpdated(e){this.startObserver=ha(this.startSentinel,a=>this.isStartVisible=a),this.endObserver=ha(this.endSentinel,a=>this.isEndVisible=a);const i=this.widget.props.tabs.findIndex(a=>a.uid===this.activeTab);this.tabButtons[i].scrollIntoView({block:"nearest",inline:"nearest"})}render(){if(!this.adapter.templateData)return d.html``;const e=this.widget.children.filter(i=>i.uid===this.activeTab||this.adapter.templateData.renderMode!=="activeOnly"),t={"gui-widget":!0,"gui-widget--horizontal":!0,"gui-tabs--start-shadow":!this.isStartVisible,"gui-tabs--end-shadow":!this.isEndVisible};return d.html`<nav class=${S.classMap(t)} id=${this.widget.uid}>
3070
3070
  <ul role="tablist">
3071
3071
  <li role="presentation" id="start-sentinel" class="gui-sentinel"></li>
3072
- ${this.adapter.templateData.tabs?qe.repeat(this.adapter.templateData.tabs,(i,a)=>l.html`
3072
+ ${this.adapter.templateData.tabs?qe.repeat(this.adapter.templateData.tabs,(i,a)=>d.html`
3073
3073
  <li role="presentation">
3074
3074
  <button
3075
3075
  type="button"
@@ -3079,7 +3079,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3079
3079
  id=${`tab_${this.widget.uid}_${a}`}
3080
3080
  aria-controls=${`tabpanel_${this.widget.uid}_${a}`}
3081
3081
  aria-selected=${i.uid===this.activeTab?"true":"false"}
3082
- class=${_.classMap({active:i.uid===this.activeTab})}
3082
+ class=${S.classMap({active:i.uid===this.activeTab})}
3083
3083
  @click=${()=>this.onClickTab(i.uid)}
3084
3084
  @keydown=${this.onKeyDown}
3085
3085
  @focus=${r=>r.target.scrollIntoView({block:"nearest",inline:"nearest"})}
@@ -3087,11 +3087,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3087
3087
  ${i.label}
3088
3088
  </button>
3089
3089
  </li>
3090
- `):l.nothing}
3090
+ `):d.nothing}
3091
3091
  <li role="presentation" id="end-sentinel" class="gui-sentinel gui-sentinel__end"></li>
3092
3092
  </ul>
3093
3093
  </nav>
3094
- ${qe.repeat(e,i=>i?.uid,(i,a)=>l.html`<section
3094
+ ${qe.repeat(e,i=>i?.uid,(i,a)=>d.html`<section
3095
3095
  role="tabpanel"
3096
3096
  tabindex="0"
3097
3097
  data-cy=${`tabpanel_${this.widget.uid}_${a}`}
@@ -3100,9 +3100,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3100
3100
  aria-labelledby=${`tab_${this.widget.uid}_${a}`}
3101
3101
  >
3102
3102
  <gui-widget .widget=${i}></gui-widget>
3103
- </section>`)}`}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe()),this.startObserver?.disconnect(),this.endObserver?.disconnect()}onClickTab(e){this.activeTab=e,this.adapter.change(e),this.requestUpdate()}onKeyDown(e){const t=this.widget.props.tabs,i=t.findIndex(s=>s.uid===this.activeTab),a=Array.from(this.tabButtons),r=window.getComputedStyle(this).direction==="rtl";switch(e.key){case"ArrowLeft":{const s=i+(r?1:-1);s>=0&&s<t.length&&(this.activeTab=t[s].uid,a[s].focus());break}case"ArrowRight":{const s=i+(r?-1:1);s>=0&&s<t.length&&(this.activeTab=t[s].uid,a[s].focus());break}case"Home":this.activeTab=t[0].uid,a[0].focus();break;case"End":this.activeTab=t[t.length-1].uid,a[t.length-1].focus();break;default:return}}};bt([n.query("#start-sentinel")],lt.prototype,"startSentinel",2),bt([n.query("#end-sentinel")],lt.prototype,"endSentinel",2),bt([n.state()],lt.prototype,"isStartVisible",2),bt([n.state()],lt.prototype,"isEndVisible",2),bt([n.queryAll('button[role="tab"]')],lt.prototype,"tabButtons",2),bt([n.property({type:String})],lt.prototype,"activeTab",2),bt([f.consume({context:c.formContext}),n.property({attribute:!1})],lt.prototype,"formContext",2),bt([f.provide({context:c.layoutContext})],lt.prototype,"adapter",2),lt=bt([n.customElement("gui-tabs-layout")],lt);const Yc=Object.freeze(Object.defineProperty({__proto__:null,get TabsElement(){return lt}},Symbol.toStringTag,{value:"Module"}));var Hc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,cr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Wc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Hc(t,i,r),r};let ki=class extends l.LitElement{constructor(){super(...arguments),this.activeSections={},this.adapter=new c.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-accordion","gui-field");const e=this.widget.props;this.adapter.context=this.formContext,this.adapter.init(this.widget),this.activeSections=e.defaultOpen??{},this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}onClickButton(e){this.widget.props.singleOpen&&Object.keys(this.activeSections).filter(i=>i!==e).forEach(i=>{this.activeSections[i]=!1}),this.activeSections[e]=!this.activeSections[e],this.adapter.change(this.activeSections),this.requestUpdate()}getChild(e){return this.widget.children.find(t=>t.uid===e)}render(){return this.adapter.templateData?l.html`
3103
+ </section>`)}`}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe()),this.startObserver?.disconnect(),this.endObserver?.disconnect()}onClickTab(e){this.activeTab=e,this.adapter.change(e),this.requestUpdate()}onKeyDown(e){const t=this.widget.props.tabs,i=t.findIndex(s=>s.uid===this.activeTab),a=Array.from(this.tabButtons),r=window.getComputedStyle(this).direction==="rtl";switch(e.key){case"ArrowLeft":{const s=i+(r?1:-1);s>=0&&s<t.length&&(this.activeTab=t[s].uid,a[s].focus());break}case"ArrowRight":{const s=i+(r?-1:1);s>=0&&s<t.length&&(this.activeTab=t[s].uid,a[s].focus());break}case"Home":this.activeTab=t[0].uid,a[0].focus();break;case"End":this.activeTab=t[t.length-1].uid,a[t.length-1].focus();break;default:return}}};vt([n.query("#start-sentinel")],dt.prototype,"startSentinel",2),vt([n.query("#end-sentinel")],dt.prototype,"endSentinel",2),vt([n.state()],dt.prototype,"isStartVisible",2),vt([n.state()],dt.prototype,"isEndVisible",2),vt([n.queryAll('button[role="tab"]')],dt.prototype,"tabButtons",2),vt([n.property({type:String})],dt.prototype,"activeTab",2),vt([f.consume({context:m.formContext}),n.property({attribute:!1})],dt.prototype,"formContext",2),vt([f.provide({context:m.layoutContext})],dt.prototype,"adapter",2),dt=vt([n.customElement("gui-tabs-layout")],dt);const Hb=Object.freeze(Object.defineProperty({__proto__:null,get TabsElement(){return dt}},Symbol.toStringTag,{value:"Module"}));var Wb=Object.defineProperty,Kb=Object.getOwnPropertyDescriptor,rs=(e,t,i,a)=>{for(var r=a>1?void 0:a?Kb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Wb(t,i,r),r};let Ai=class extends d.LitElement{constructor(){super(...arguments),this.activeSections={},this.adapter=new m.LayoutWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-accordion","gui-field");const e=this.widget.props;this.adapter.context=this.formContext,this.adapter.init(this.widget),this.activeSections=e.defaultOpen??{},this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}onClickButton(e){this.widget.props.singleOpen&&Object.keys(this.activeSections).filter(i=>i!==e).forEach(i=>{this.activeSections[i]=!1}),this.activeSections[e]=!this.activeSections[e],this.adapter.change(this.activeSections),this.requestUpdate()}getChild(e){return this.widget.children.find(t=>t.uid===e)}render(){return this.adapter.templateData?d.html`
3104
3104
  <div class="gui-widget" id=${this.widget.uid}>
3105
- ${this.adapter.templateData.sections?qe.repeat(this.adapter.templateData.sections,e=>e.uid,e=>{const t=this.activeSections[e.uid]||this.adapter.templateData.renderMode!=="activeOnly"?l.html`<section
3105
+ ${this.adapter.templateData.sections?qe.repeat(this.adapter.templateData.sections,e=>e.uid,e=>{const t=this.activeSections[e.uid]||this.adapter.templateData.renderMode!=="activeOnly"?d.html`<section
3106
3106
  class="gui-widget"
3107
3107
  role="region"
3108
3108
  id=${`accordion_section_${e.uid}`}
@@ -3110,11 +3110,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3110
3110
  aria-labelledby=${`accordion_button_${e.uid}`}
3111
3111
  >
3112
3112
  <gui-widget .widget=${this.getChild(e.uid)}></gui-widget>
3113
- </section>`:l.nothing;return l.html`<div class="gui-accordion__section">
3113
+ </section>`:d.nothing;return d.html`<div class="gui-accordion__section">
3114
3114
  <button
3115
3115
  type="button"
3116
3116
  tabindex="0"
3117
- class=${_.classMap({active:this.activeSections[e.uid]})}
3117
+ class=${S.classMap({active:this.activeSections[e.uid]})}
3118
3118
  id=${`accordion_button_${e.uid}`}
3119
3119
  aria-controls=${`accordion_section_${e.uid}`}
3120
3120
  aria-expanded=${this.activeSections[e.uid]?"true":"false"}
@@ -3134,9 +3134,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3134
3134
  </button>
3135
3135
 
3136
3136
  ${t}
3137
- </div>`}):l.nothing}
3137
+ </div>`}):d.nothing}
3138
3138
  </div>
3139
- `:l.html``}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};cr([f.consume({context:c.formContext}),n.property({attribute:!1})],ki.prototype,"formContext",2),cr([f.provide({context:c.layoutContext})],ki.prototype,"adapter",2),ki=cr([n.customElement("gui-accordion-layout")],ki);const Kc=Object.freeze(Object.defineProperty({__proto__:null,get AccordionElement(){return ki}},Symbol.toStringTag,{value:"Module"}));var Jc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,yr=(e,t,i,a)=>{for(var r=a>1?void 0:a?Xc(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Jc(t,i,r),r};let Si=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.DisplayWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-alert","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return l.html`
3139
+ `:d.html``}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};rs([f.consume({context:m.formContext}),n.property({attribute:!1})],Ai.prototype,"formContext",2),rs([f.provide({context:m.layoutContext})],Ai.prototype,"adapter",2),Ai=rs([n.customElement("gui-accordion-layout")],Ai);const Jb=Object.freeze(Object.defineProperty({__proto__:null,get AccordionElement(){return Ai}},Symbol.toStringTag,{value:"Module"}));var Xb=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,ss=(e,t,i,a)=>{for(var r=a>1?void 0:a?Qb(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&Xb(t,i,r),r};let Ei=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.DisplayWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-alert","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return d.html`
3140
3140
  <div class="gui-widget" id=${this.widget.uid}>
3141
3141
  <div
3142
3142
  role="alert"
@@ -3145,13 +3145,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
3145
3145
  ${this.adapter.templateData.text}
3146
3146
  </div>
3147
3147
  </div>
3148
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};yr([f.consume({context:c.formContext}),n.property({attribute:!1})],Si.prototype,"formContext",2),yr([f.provide({context:c.displayWidgetContext})],Si.prototype,"adapter",2),Si=yr([n.customElement("gui-alert-display")],Si);const Qc=Object.freeze(Object.defineProperty({__proto__:null,get AlertElement(){return Si}},Symbol.toStringTag,{value:"Module"}));var jc=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,gr=(e,t,i,a)=>{for(var r=a>1?void 0:a?ey(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&jc(t,i,r),r};let _i=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.DisplayWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-markdown-text","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return l.html`
3148
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ss([f.consume({context:m.formContext}),n.property({attribute:!1})],Ei.prototype,"formContext",2),ss([f.provide({context:m.displayWidgetContext})],Ei.prototype,"adapter",2),Ei=ss([n.customElement("gui-alert-display")],Ei);const jb=Object.freeze(Object.defineProperty({__proto__:null,get AlertElement(){return Ei}},Symbol.toStringTag,{value:"Module"}));var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,ns=(e,t,i,a)=>{for(var r=a>1?void 0:a?tf(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&ef(t,i,r),r};let Ci=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.DisplayWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-markdown-text","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return d.html`
3149
3149
  <div class="gui-widget" id=${this.widget.uid}>
3150
3150
  <gui-markdown-text
3151
3151
  .md=${this.adapter.templateData.md}
3152
3152
  .dependencies=${this.adapter.templateData.deps}
3153
3153
  ></gui-markdown-text>
3154
3154
  </div>
3155
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};gr([f.consume({context:c.formContext}),n.property({attribute:!1})],_i.prototype,"formContext",2),gr([f.provide({context:c.displayWidgetContext})],_i.prototype,"adapter",2),_i=gr([n.customElement("gui-markdown-text-display")],_i);const ty=Object.freeze(Object.defineProperty({__proto__:null,get MarkdownTextElement(){return _i}},Symbol.toStringTag,{value:"Module"}));var iy=Object.defineProperty,ay=Object.getOwnPropertyDescriptor,br=(e,t,i,a)=>{for(var r=a>1?void 0:a?ay(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&iy(t,i,r),r};let Ti=class extends l.LitElement{constructor(){super(...arguments),this.adapter=new c.DisplayWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-renderer","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return l.html`
3155
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};ns([f.consume({context:m.formContext}),n.property({attribute:!1})],Ci.prototype,"formContext",2),ns([f.provide({context:m.displayWidgetContext})],Ci.prototype,"adapter",2),Ci=ns([n.customElement("gui-markdown-text-display")],Ci);const af=Object.freeze(Object.defineProperty({__proto__:null,get MarkdownTextElement(){return Ci}},Symbol.toStringTag,{value:"Module"}));var rf=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,os=(e,t,i,a)=>{for(var r=a>1?void 0:a?sf(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&rf(t,i,r),r};let Li=class extends d.LitElement{constructor(){super(...arguments),this.adapter=new m.DisplayWidgetAdapter,this.subscriptions=[]}createRenderRoot(){return this}updated(e){super.updated(e);const t=this.adapter.templateData.size;t?this.style.flex=String(t):this.style.removeProperty("flex")}connectedCallback(){super.connectedCallback(),this.classList.add("gui-renderer","gui-field"),this.adapter.context=this.formContext,this.adapter.init(this.widget),this.subscriptions.push(this.adapter.templateDataChanged$.subscribe(()=>this.requestUpdate()))}render(){return d.html`
3156
3156
  <div class="gui-widget" id=${this.widget.uid}>${this.adapter.templateData.render}</div>
3157
- `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};br([f.consume({context:c.formContext}),n.property({attribute:!1})],Ti.prototype,"formContext",2),br([f.provide({context:c.displayWidgetContext})],Ti.prototype,"adapter",2),Ti=br([n.customElement("gui-renderer-component")],Ti);const ry=Object.freeze(Object.defineProperty({__proto__:null,get RendererElement(){return Ti}},Symbol.toStringTag,{value:"Module"}));te.widgetLoaders=ks,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})}));
3157
+ `}disconnectedCallback(){super.disconnectedCallback(),this.adapter.destroy(),this.subscriptions.forEach(e=>e.unsubscribe())}};os([f.consume({context:m.formContext}),n.property({attribute:!1})],Li.prototype,"formContext",2),os([f.provide({context:m.displayWidgetContext})],Li.prototype,"adapter",2),Li=os([n.customElement("gui-renderer-component")],Li);const nf=Object.freeze(Object.defineProperty({__proto__:null,get RendererElement(){return Li}},Symbol.toStringTag,{value:"Module"}));te.widgetLoaders=mn,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})}));