@genesislcap/foundation-rapid-cdn 15.66.0 → 15.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -248,9 +248,9 @@ function vv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r
248
248
  `)}}let e=c((o+a.decode()).trim());if(e)return e;throw Error(`${n} proxy stream ended without a terminal frame`)}finally{i.cancel().catch(()=>{})}})}let Ox=12e4,kx=1e3;function Ax(e){let t=(e?.get)?.call(e,`x-should-retry`);return typeof t==`string`&&t.trim().toLowerCase()===`false`}function jx(e){let t=(e?.get)?.call(e,`retry-after`);if(typeof t!=`string`||t.trim()===``)return;let n=Number(t.trim());if(Number.isFinite(n))return Math.max(0,n*kx);let r=Date.parse(t);if(!Number.isNaN(r))return Math.max(0,r-Date.now())}function Mx(e){let t=typeof e==`object`&&e?e:{},n=typeof t.details==`object`&&t.details!==null?t.details:void 0;for(let e of[t.error,n?.error]){let t=e?.details;if(Array.isArray(t))for(let e of t){let t=e?.[`@type`];if(typeof t!=`string`||!t.endsWith(`google.rpc.RetryInfo`))continue;let n=e?.retryDelay;if(typeof n!=`string`)continue;let r=Number(n.replace(/s$/,``));if(Number.isFinite(r)&&r>=0)return r*kx}}}function Nx(e,t,n,r=1/0){let i=t*2**e;return n==null||!Number.isFinite(n)?i:Math.max(i,Math.min(n,6e4,Math.max(0,r)))}function Px(e,t){return Math.max(0,e-t)}function Fx(e){return J(this,void 0,void 0,function*(){var t;let{url:n,headers:r,body:i,credentials:a,vendorLabel:o,retryableStatuses:s,timeout:c,stallTimeout:l,backoffBaseMs:u,signal:d}=e,f=Mb(o),p=(e,t,n)=>(db.error(`${o}Transport: the AI service refused the request (${t} ${e})${n?`: ${n}`:``}`),new bx(o,e,t,n)),m=0,h=(e,t)=>{let n=u*2**e,r=Ox-m,i=Nx(e,u,t,r);return m+=Px(i,n),t!=null&&i>n?db.warn(`${o}Transport: honouring the server's requested retry delay (${Math.round(i)}ms, asked ${Math.round(t)}ms)`):t!=null&&t>n&&db.warn(`${o}Transport: declining the server's requested retry delay (asked ${Math.round(t)}ms; the ${Ox}ms sequence allowance is spent) — using the ladder's ${Math.round(i)}ms`),cx(i,d)};for(let e=0;e<=5;e+=1){let u=new AbortController,m=performance.now(),g,_,v=()=>{let e=Math.round(performance.now()-m);return g===void 0?`${o} request timed out after ${e}ms — no response headers (the service never answered; nothing was received to stall on)`:`${o} request timed out after ${e}ms — headers arrived in ${Math.round(g-m)}ms (content-type: ${_??`unknown`}) but no body followed`},y=setTimeout(()=>u.abort(new DOMException(v(),`TimeoutError`)),c),b=()=>{l<=0||(clearTimeout(y),y=setTimeout(()=>u.abort(new DOMException(`${o} request stalled (no data for ${l}ms)`,`TimeoutError`)),l))},{signal:ee,dispose:x}=cb([d,u.signal]);try{let c=yield fetch(n,{method:`POST`,headers:r,body:JSON.stringify(i),signal:ee,credentials:a});if(g=performance.now(),_=((t=c.headers)?.get)?.call(t,`content-type`)??void 0,!c.ok){let t=yield c.text(),n=vb(t),r=Ab(f,yb(n),n);if(r)throw jb(o,r,c.status,n,t||void 0);let i=Ex(f,c.status,n);if(i)throw new wx(o,i.promptTokens,i.limitTokens,i.message??(t||void 0));if(_b(c.status,yb(n)))throw Cb(o,n,t||void 0);let a=dx(yb(n));if(a&&a!==lx.VENDOR_UNREACHABLE)throw p(a,c.status,xx(n));let l=hx(c.status,n,t);if(l)throw p(l,c.status,_x(n)??(t||void 0));if(gx(c.status,n))throw p(lx.REQUEST_TOO_LARGE,c.status,t||void 0);let u=Ax(c.headers);if(s.includes(c.status)&&!u&&e<5){db.warn(`${o}Transport: retryable status ${c.status}, retrying (attempt ${e+1}/5)`),clearTimeout(y),yield h(e,jx(c.headers)||Mx(n));continue}throw a?p(a,c.status,xx(n)):Error(`${o} request error ${c.status}: ${t}`)}if((c.headers?.get(`content-type`))?.toLowerCase().includes(`application/x-ndjson`)&&c.body){b();let t=yield Dx(c.body,b,o,l);if(t.t===`ok`)return t.body;if(t.code===`UPSTREAM_STALLED`)throw new DOMException(`${o} request stalled: ${t.error??`no upstream data`}`,`TimeoutError`);let n=Ab(f,t.code,t);if(n)throw jb(o,n,t.status,t,t.error);let r=Ex(f,t.status,t);if(r)throw new wx(o,r.promptTokens,r.limitTokens,r.message??t.error);if(_b(t.status,t.code))throw Cb(o,t);let i=dx(t.code);if(i&&i!==lx.VENDOR_UNREACHABLE)throw p(i,t.status,xx(t));if(s.includes(t.status)&&e<5){db.warn(`${o}Transport: retryable status ${t.status} (err frame), retrying (attempt ${e+1}/5)`),clearTimeout(y),yield h(e,Mx(t));continue}throw i?p(i,t.status,xx(t)):Error(`${o} request error ${t.status}: ${t.error??JSON.stringify(t.details)}`)}return yield c.json()}catch(e){throw sx(e,u.signal,d)}finally{clearTimeout(y),x()}}throw Error(`${o} request failed: max retries exceeded`)})}function Ix(e){if(e&&e!==`auto`)return e===`required`?{type:`any`}:e===`none`?{type:`none`}:{type:`tool`,name:e.tool}}let Lx={"claude-fable-5":1e6,"claude-opus-4-8":1e6,"claude-opus-4-7":1e6,"claude-sonnet-5":1e6,"claude-sonnet-4-6":1e6,"claude-haiku-4-5-20251001":2e5},Rx=`emit_structured_response`;function zx(e){if(!Pb.includes(e))throw Error(`AnthropicTransport: unsupported model "${e}". Use one of: ${Pb.join(`, `)}.`)}function Bx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-opus-4-7`||e===`claude-sonnet-5`}function Vx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-sonnet-5`||e===`claude-haiku-4-5-20251001`}function Hx(e){return e!==`claude-haiku-4-5-20251001`}function Ux(e){return e===`claude-fable-5`}function Wx(e,t){let n=e===`claude-sonnet-5`||Ux(e),r={type:`adaptive`,display:`summarized`};return t===`off`?Ux(e)?r:n?{type:`disabled`}:void 0:t===`auto`||t!==void 0?Hx(e)?r:void 0:n?r:void 0}function Gx(e){return e===`claude-fable-5`||e===`claude-opus-4-8`||e===`claude-sonnet-5`}let Kx={minimal:`low`,low:`low`,medium:`medium`,high:`high`,max:`max`};function qx(e,t){if(t!==void 0&&t!==`auto`&&t!==`off`&&Gx(e)&&Hx(e))return Kx[t]}let Jx=`anthropic`;var Yx=class extends Error{constructor(e,t,n,r){super(`Response truncated at ${t==null?`the model's output-token limit`:`the max_tokens cap (${t})`} for model ${e}`+(r.length>0?` while emitting tool call(s): ${r.join(`, `)}`:``)+`. The output exceeds the per-response limit — raise the provider maxTokens (where configurable) or split the work into smaller outputs.`),this.model=e,this.maxTokens=t,this.outputTokens=n,this.toolNames=r,this.name=`ResponseTruncatedError`}},Xx=class e{warnIfThinkingUnclampable(e){if(this.warnedThinkingClamped)return;let t=this.clampWarning(e);t&&(this.warnedThinkingClamped=!0,db.warn(t))}clampWarning(e){switch(e){case void 0:return;case`off`:return Ux(this.model)?`AnthropicTransport: thinkingPolicy 'off' ignored — ${this.model} always thinks and rejects an explicit disable. Reasoning tokens are still billed as output; switch model if you need them gone.`:void 0;case`auto`:return Hx(this.model)?void 0:`AnthropicTransport: thinkingPolicy 'auto' ignored — ${this.model} does not support adaptive thinking, so this turn runs without reasoning. Use a Sonnet or Opus tier if the agent needs it.`;case`minimal`:case`low`:case`medium`:case`high`:case`max`:return!Hx(this.model)||!Gx(this.model)?`AnthropicTransport: thinkingPolicy '${e}' ignored — ${this.model} predates output_config.effort, so this turn runs at its default posture. Use Opus 4.8, Sonnet 5, or Fable 5 to set reasoning depth.`:void 0;default:return e}}constructor(e={}){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0,this.warnedThinkingClamped=!1,this.warnedUnknownServingModels=/* @__PURE__ */ new Set;let t=e.model??`claude-haiku-4-5-20251001`;zx(t),this.model=t,t===`claude-sonnet-5`?db.warn(`AnthropicTransport: using claude-sonnet-5 — standard Sonnet tier, higher cost than Haiku, and adaptive thinking runs by default so reasoning tokens add to output cost. Use for stronger reasoning or agent tasks.`):t===`claude-sonnet-4-6`?db.warn(`AnthropicTransport: using claude-sonnet-4-6 — higher cost than Haiku; use for stronger reasoning or agent tasks.`):t===`claude-opus-4-7`||t===`claude-opus-4-8`?db.warn(`AnthropicTransport: using ${t} — significantly higher cost; reserve for tasks where Sonnet reliability is insufficient.`):t===`claude-fable-5`&&db.warn(`AnthropicTransport: using claude-fable-5 — Anthropic's most capable model, priced above Opus tier ($10 / $50 per MTok) with thinking always on. Reserve for the hardest reasoning/long-horizon work. Requires ≥30-day data retention (unavailable under ZDR) and may return stop_reason "refusal"; pair with an Opus 4.8 fallback.`),this.timeout=e.timeout??3e5,this.stallTimeout=e.stallTimeout??3e4,this.apiKey=e.apiKey,this.serverEndpoint=e.serverEndpoint,this.maxTokens=e.maxTokens??4096}getConfig(){return{provider:`anthropic`,model:this.model,contextLimit:Lx[this.model]}}getLifetimeCost(){return this.lifetimeCostUsd}getLifetimeSavings(){return this.lifetimeSavingsUsd}resetLifetimeCost(){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0}sendStructuredPrompt(e){return J(this,void 0,void 0,function*(){let{systemPrompt:t,userPrompt:n,responseSchema:r}=e,i=[{role:`user`,content:n}],a={model:this.model,max_tokens:this.maxTokens,messages:i};t&&(a.system=t);let o=r!=null&&Vx(this.model),s=r!=null&&!o;o?a.output_config=Object.assign(Object.assign({},a.output_config),{format:{type:`json_schema`,schema:r}}):s&&(a.tools=[{name:Rx,description:`Emit the structured response that matches the required schema.`,input_schema:r}],a.tool_choice={type:`tool`,name:Rx}),this.model===`claude-sonnet-5`&&(a.thinking={type:`disabled`});let c=yield this.post(a);if(s){let e=(c.content??[]).find(e=>e.type===`tool_use`&&e.name===Rx);return e?JSON.stringify(e.input??{}):``}return(c.content??[]).filter(e=>e.type===`text`).map(e=>e.text).join(``)})}sendChatMessage(e,t,n){return J(this,void 0,void 0,function*(){let r=/* @__PURE__ */ new Set([this.model,...(n?.fallbacks??[]).map(e=>e.model)]),i=this.toAnthropicMessages(e,t,n?.attachments,r),a={model:this.model,max_tokens:n?.maxTokens??this.maxTokens,messages:i};if(n?.systemPrompt&&(a.system=n.systemPrompt),n?.tools?.length&&(a.tools=n.tools.map(e=>Object.assign({name:e.name,description:e.description,input_schema:e.enforceSchema?nx(e.parameters,e.name):e.parameters},e.enforceSchema?{strict:!0}:{}))),a.tools?.length){let e=Ix(n?.toolChoice);e&&(a.tool_choice=e)}this.warnIfThinkingUnclampable(n?.thinkingPolicy);let o=Wx(this.model,n?.thinkingPolicy);o&&(a.thinking=o);let s=qx(this.model,n?.thinkingPolicy);s&&(a.output_config=Object.assign(Object.assign({},a.output_config),{effort:s}));let c=o?.type===`adaptive`;n?.temperature!=null&&!Bx(this.model)&&!c&&(a.temperature=Rb(n.temperature,{defaultTemp:1,maxTemp:1})),n?.responseSchema&&Vx(this.model)&&(a.output_config=Object.assign(Object.assign({},a.output_config),{format:{type:`json_schema`,schema:n.responseSchema}})),n?.fallbacks?.length&&(a.fallbacks=n.fallbacks.map(e=>e.maxTokens==null?{model:e.model}:{model:e.model,max_tokens:e.maxTokens})),n?.cachePolicy&&this.applyCacheControl(a,n.cachePolicy),n?.tailContext&&this.appendTailContext(a,n.tailContext);let l=yield this.post(a,n?.signal);return this.fromAnthropicResponse(l,a.max_tokens)})}applyCacheControl(e,t){if(t.scope==="default")return;let n=t.ttl===`1h`?{type:`ephemeral`,ttl:`1h`}:{type:`ephemeral`};if(t.scope===`tools`){e.tools?.length&&(e.tools[e.tools.length-1].cache_control=n);return}if(typeof e.system==`string`&&e.system.length>0?e.system=[{type:`text`,text:e.system,cache_control:n}]:e.tools?.length&&(e.tools[e.tools.length-1].cache_control=n),t.scope===`history`){let t=e.messages[e.messages.length-1];t&&Array.isArray(t.content)&&t.content.length>0&&(t.content[t.content.length-1].cache_control=n)}}appendTailContext(e,t){let n={type:`text`,text:t},r=e.messages[e.messages.length-1];r?.role===`user`&&Array.isArray(r.content)?r.content.push(n):e.messages.push({role:`user`,content:[n]})}logTokenUsage(t,n,r,i,a,o){let{costUsd:s,savedUsd:c,breakdown:l}=Hb(t,{uncachedInputTokens:n,outputTokens:r,cacheReadTokens:i,cacheWriteTokens:a,cacheWrite1hTokens:o});this.lifetimeCostUsd+=s,this.lifetimeSavingsUsd+=c;let u=e.COST_DECIMAL_PLACES;return console.log(`--- Anthropic Token Usage (${t}) ---`),console.log(`Prompt Tokens: ${n} ($${l.promptUsd.toFixed(u)})`),console.log(`Cache Read: ${i} ($${l.cacheReadUsd.toFixed(u)})`),console.log(`Cache Write: ${a} ($${l.cacheWriteUsd.toFixed(u)})`),console.log(`Candidate Tokens: ${r} ($${l.candidateUsd.toFixed(u)})`),console.log(`Total Cost: $${s.toFixed(u)}`),console.log(`Cache Saved: $${c.toFixed(u)} (lifetime $${this.lifetimeSavingsUsd.toFixed(u)})`),console.log(`Lifetime Cost: $${this.lifetimeCostUsd.toFixed(u)}`),console.log(`--------------------------`),s}toAnthropicMessages(e,t,n,r=/* @__PURE__ */ new Set([this.model])){let i=[],a=(e,t)=>{let n=i[i.length-1];if(n&&n.role===e&&Array.isArray(n.content)){n.content.push(t);return}i.push({role:e,content:[t]})},o=e=>{let t=[],n=[];for(let r of e)r.kind===`image`?t.push({type:`image`,source:{type:`base64`,media_type:Fb(r.mimeType),data:Ib(r.data)}}):n.push({type:`text`,text:`[File: ${r.name}]\n${r.content}`});return{images:t,texts:n}};for(let t of e){if(t.role===`system`||t.role===`system-event`||t.role===`synthetic-user`||t.role===`compacted-summary`||t.category===`reasoning`||t.category===`narration`||t.excludeFromProvider||t.thinking)continue;if(t.toolResult){let e=t.toolResult.attachments??[];a(`user`,{type:`tool_result`,tool_use_id:t.toolResult.toolCallId,content:e.length?[...t.toolResult.content?[{type:`text`,text:t.toolResult.content}]:[],...e.map(e=>({type:`image`,source:{type:`base64`,media_type:Fb(e.mimeType),data:Ib(e.data)}}))]:t.toolResult.content});continue}if(t.toolCalls?.length){for(let e of this.reasoningToReplay(t.toolCalls[0],r))a(`assistant`,e);t.content&&a(`assistant`,{type:`text`,text:t.content});for(let e of t.toolCalls)a(`assistant`,{type:`tool_use`,id:e.id,name:e.name,input:e.args??{}});continue}let e=t.role===`user`?`user`:`assistant`;if(e===`user`&&t.attachments?.length){let{images:n,texts:r}=o(t.attachments);for(let t of n)a(e,t);t.content&&a(e,{type:`text`,text:t.content});for(let t of r)a(e,t)}else t.content&&a(e,{type:`text`,text:t.content})}if(t||n?.length){let{images:e,texts:r}=o(n??[]);for(let t of e)a(`user`,t);t&&a(`user`,{type:`text`,text:t});for(let e of r)a(`user`,e)}return i}reasoningToReplay(e,t){let n=e.providerMetadata?.[Jx];if(!n)return[];let r=n.fallbacks??[],i=n.requestedModel===this.model&&t.has(n.model),a=n.model===this.model||i;return[...r,...a?n.reasoning??[]:[]]}servingModel(e){let t=e.model;return!t||t===this.model?this.model:Pb.includes(t)?t:(this.warnedUnknownServingModels.has(t)||(this.warnedUnknownServingModels.add(t),db.warn(`AnthropicTransport: response was served by "${t}", which is not a known model — pricing it at the configured "${this.model}" rate instead of guessing. The reported cost for this request may be wrong; add the model to SUPPORTED_ANTHROPIC_MODEL_IDS.`)),this.model)}isUnbilledRefusal(e,t,n){return(t.output_tokens??0)>0?!1:e.type===`message`||n}costAttempt(e,t){let n=t.cache_read_input_tokens??0,r=t.cache_creation,i=r?.ephemeral_1h_input_tokens??0,a=t.cache_creation_input_tokens??(r?(r.ephemeral_5m_input_tokens??0)+i:0);return this.logTokenUsage(e,t.input_tokens??0,t.output_tokens??0,n,a,i)}fromAnthropicResponse(e,t=this.maxTokens){let n,r,i,a,o,s=this.servingModel(e);if(e.usage){let t=e.usage.input_tokens??0,c=e.usage.cache_read_input_tokens??0,l=e.usage.cache_creation,u=l?.ephemeral_1h_input_tokens??0,d=e.usage.cache_creation_input_tokens??(l?(l.ephemeral_5m_input_tokens??0)+u:0),f=e.usage.iterations;if(f?.length){let t=e.stop_reason===`refusal`;o=f.reduce((e,n,r)=>{let i=n.usage??n;if(this.isUnbilledRefusal(n,i,r===f.length-1&&t))return e;let a=n.model?this.servingModel({model:n.model}):this.model;return e+this.costAttempt(a,i)},0)}else o=this.isUnbilledRefusal({},e.usage,e.stop_reason===`refusal`)?0:this.costAttempt(s,e.usage);n=t+c+d,i=c,a=d,e.usage.output_tokens!=null&&(r=e.usage.output_tokens)}let c=e.content??[],l=[],u=[],d=[],f=[],p=c.map(e=>e.type).lastIndexOf(`fallback`),m=c.filter(e=>e.type===`fallback`);for(let[e,t]of c.entries()){let n=e>p;t.type===`tool_use`?n&&l.push({id:t.id,name:t.name,args:t.input??{}}):t.type===`thinking`?(n&&f.push(t),u.push(t.thinking)):t.type===`redacted_thinking`?n&&f.push(t):t.type===`text`&&d.push(t.text)}if(l.length>0&&(f.length>0||m.length>0)){let e={reasoning:f,model:s,requestedModel:this.model};m.length>0&&(e.fallbacks=m),l[0].providerMetadata=Object.assign(Object.assign({},l[0].providerMetadata),{[Jx]:e})}if(e.stop_reason===`max_tokens`&&l.length>0)throw new Yx(this.model,t,r,l.map(e=>e.name));let h=u.join(``)||void 0,g=l.length>0?{role:`assistant`,content:d.join(``),reasoning:h,toolCalls:l}:{role:`assistant`,content:d.join(``),reasoning:h};n!=null&&(g.inputTokens=n),r!=null&&(g.outputTokens=r),i!=null&&(g.cacheReadTokens=i),a!=null&&(g.cacheWriteTokens=a),o!=null&&(g.cost=o),g.model=s;let _={parts:{functionCall:c.filter(e=>e.type===`tool_use`).length,thought:c.filter(e=>e.type===`thinking`||e.type===`redacted_thinking`).length,text:c.filter(e=>e.type===`text`).length}};return e.stop_reason&&(_.finishReason=e.stop_reason),g.responseMeta=_,g}buildEndpoint(){if(this.apiKey)return{url:`https://api.anthropic.com/v1/messages`,headers:{"Content-Type":`application/json`,"x-api-key":this.apiKey,"anthropic-version":`2023-06-01`,"anthropic-dangerous-direct-browser-access":`true`},credentials:`omit`};if(this.serverEndpoint)return{url:this.serverEndpoint,headers:{"Content-Type":`application/json`,Accept:`application/x-ndjson`},credentials:`include`};throw Error(`AnthropicTransport: no API key or server endpoint configured. Set ANTHROPIC_API_KEY in your .env or pass apiKey/serverEndpoint in AnthropicAIConfig.`)}post(t,n){return J(this,void 0,void 0,function*(){let{url:r,headers:i,credentials:a}=this.buildEndpoint();return yield Fx({url:r,headers:t.fallbacks?.length?Object.assign(Object.assign({},i),{"anthropic-beta":[i[`anthropic-beta`],`server-side-fallback-2026-06-01`].filter(Boolean).join(`,`)}):i,body:t,credentials:a,vendorLabel:hb.anthropic,retryableStatuses:e.RETRYABLE_STATUSES,timeout:this.timeout,stallTimeout:this.stallTimeout,backoffBaseMs:e.BACKOFF_BASE_MS,signal:n})})}};Xx.TOKENS_PER_MILLION=1e6,Xx.COST_DECIMAL_PLACES=6,Xx.RATE_LIMIT_STATUS=429,Xx.SERVICE_UNAVAILABLE_STATUS=503,Xx.OVERLOADED_STATUS=529,Xx.RETRYABLE_STATUSES=[Xx.RATE_LIMIT_STATUS,Xx.SERVICE_UNAVAILABLE_STATUS,Xx.OVERLOADED_STATUS],Xx.BACKOFF_BASE_MS=1e3;let Zx=`default_api.`,Qx=/print\(\s*$/;var $x=class{constructor(e){this.src=e,this.pos=0}parse(){let e=this.src.indexOf(Zx);e===-1&&this.bail();let t=Qx.test(this.src.slice(0,e));this.pos=e;let n=this.parseCall();return this.skipWhitespace(),t&&(this.expect(`)`),this.skipWhitespace()),this.pos!==this.src.length&&this.bail(),n}parseCall(){this.expectLiteral(Zx);let e=this.readIdentifier();this.expect(`(`);let t=this.parseKwargs();return this.expect(`)`),{name:e,args:t}}parseKwargs(){let e={};for(;this.skipWhitespace(),this.peek()!==`)`;){let t=this.readIdentifier();this.skipWhitespace(),this.expect(`=`),this.skipWhitespace();let n=this.parseValue();Object.prototype.hasOwnProperty.call(e,t)&&this.bail(),e[t]=n,this.skipWhitespace();let r=this.peek();if(r===`,`){this.pos+=1;continue}if(r===`)`)break;this.bail()}return e}parseValue(){let e=this.peek();return e===`"`||e===`'`?this.readString():e===`-`||e===`+`||this.isDigit(e)?this.readNumber():/[A-Za-z]/.test(e)?this.readBareword():this.bail()}readString(){let e=this.src[this.pos];this.pos+=1;let t=``;for(;;){this.pos>=this.src.length&&this.bail();let n=this.src[this.pos];if(this.pos+=1,n===e)return t;if(n===`\\`){t+=this.readEscape();continue}t+=n}}readEscape(){this.pos>=this.src.length&&this.bail();let e=this.src[this.pos];switch(this.pos+=1,e){case`n`:return`
249
249
  `;case`t`:return` `;case`r`:return`\r`;case`b`:return`\b`;case`f`:return`\f`;case`\\`:return`\\`;case`"`:return`"`;case`'`:return`'`;case`/`:return`/`;case`u`:return this.readHexCodepoint(4);case`x`:return this.readHexCodepoint(2);default:return this.bail()}}readHexCodepoint(e){let t=this.src.slice(this.pos,this.pos+e);return(t.length!==e||!/^[0-9a-fA-F]+$/.test(t))&&this.bail(),this.pos+=e,String.fromCharCode(parseInt(t,16))}readNumber(){let e=this.pos;for((this.peek()===`-`||this.peek()===`+`)&&(this.pos+=1);this.pos<this.src.length&&/[0-9.eE+-]/.test(this.src[this.pos]);)this.pos+=1;let t=Number(this.src.slice(e,this.pos));return Number.isFinite(t)||this.bail(),t}readBareword(){switch(this.readIdentifier()){case`true`:case`True`:return!0;case`false`:case`False`:return!1;case`null`:case`None`:return null;default:return this.bail()}}readIdentifier(){let e=this.pos;for(/[A-Za-z_]/.test(this.peek())||this.bail();this.pos<this.src.length&&/[A-Za-z0-9_]/.test(this.src[this.pos]);)this.pos+=1;return this.src.slice(e,this.pos)}isDigit(e){return e>=`0`&&e<=`9`}peek(){return this.pos<this.src.length?this.src[this.pos]:``}skipWhitespace(){for(;this.pos<this.src.length&&/\s/.test(this.src[this.pos]);)this.pos+=1}expect(e){this.src[this.pos]!==e&&this.bail(),this.pos+=1}expectLiteral(e){this.src.slice(this.pos,this.pos+e.length)!==e&&this.bail(),this.pos+=e.length}bail(){throw Error(`MalformedFunctionCallParser: unexpected token`)}};function eS(e,t){if(!e)return null;let n;try{n=new $x(e).parse()}catch{return null}return t.has(n.name)?n:null}let tS=e=>`https://generativelanguage.googleapis.com/v1beta/models/${e}:generateContent`,nS={"gemini-2.5-pro":1048576,"gemini-2.5-flash":1048576,"gemini-2.5-flash-lite":1048576,"gemini-3.8-flash":1048576,"gemini-3.5-flash":1048576,"gemini-3.1-flash-lite":1048576,"gemini-3.1-pro-preview":1048576};function rS(e){if(e&&e!==`auto`)return e===`required`?{functionCallingConfig:{mode:`ANY`}}:e===`none`?{functionCallingConfig:{mode:`NONE`}}:{functionCallingConfig:{mode:`ANY`,allowedFunctionNames:[e.tool]}}}function iS(e){if(!Nb.includes(e))throw Error(`GeminiTransport: unsupported model "${e}". Use one of: ${Nb.join(`, `)}.`)}let aS={"gemini-2.5-flash":`GeminiTransport: using gemini-2.5-flash — higher cost than flash-lite; use for harder reasoning or agent tasks.`,"gemini-2.5-pro":`GeminiTransport: using gemini-2.5-pro — significantly higher, prompt-size-tiered cost; reserve for tasks where flash reliability is insufficient.`,"gemini-3.5-flash":`GeminiTransport: using gemini-3.5-flash — frontier model, materially higher cost than flash-lite; use for harder reasoning or agent tasks.`,"gemini-3.8-flash":`GeminiTransport: using gemini-3.8-flash — frontier model, materially higher cost than flash-lite. Its $0.75/$3.75 per-MTok rate is introductory and DOUBLES to $1.50/$7.50 on 2027-01-01; re-check this tier choice before then.`,"gemini-3.1-pro-preview":`GeminiTransport: using gemini-3.1-pro-preview — PREVIEW model (no stability guarantee, may be withdrawn) with significantly higher, prompt-size-tiered cost; reserve for tasks where flash reliability is insufficient.`},oS=[`gemini-2.5-flash`,`gemini-2.5-flash-lite`],sS=[`gemini-3.8-flash`,`gemini-3.5-flash`,`gemini-3.1-flash-lite`,`gemini-3.1-pro-preview`],cS=[`minimal`,`low`,`medium`,`high`],lS={"gemini-3.8-flash":[`low`,`medium`,`high`],"gemini-3.5-flash":[`minimal`,`low`,`medium`,`high`],"gemini-3.1-flash-lite":[`minimal`,`low`,`medium`,`high`],"gemini-3.1-pro-preview":[`low`,`medium`,`high`]};function uS(e,t){if(!e?.length||e.includes(t))return t;let n=cS.indexOf(t),r=e=>Math.abs(cS.indexOf(e)-n),i=e[0];for(let t of e)r(t)<=r(i)&&(i=t);return i}let dS={minimal:`minimal`,low:`low`,medium:`medium`,high:`high`,max:`high`},fS=e=>e!==void 0&&e!==`auto`&&e!==`off`;function pS(e,t){if(fS(t)){let n=lS[e];if(n)return{includeThoughts:!0,thinkingLevel:uS(n,dS[t])}}return t===`off`&&oS.includes(e)?{includeThoughts:!1,thinkingBudget:0}:t===`auto`&&oS.includes(e)?{includeThoughts:!0,thinkingBudget:-1}:{includeThoughts:!0}}let mS=`gemini`;function hS(e){let t=[],n=[];for(let r of e)r.kind===`image`?t.push({inlineData:{mimeType:Fb(r.mimeType),data:Ib(r.data)}}):n.push({text:`[File: ${r.name}]\n${r.content}`});return{imageParts:t,textParts:n}}var gS=class extends Error{constructor(e){super(`Gemini returned MALFORMED_FUNCTION_CALL`),this.finishMessage=e,this.name=`MalformedFunctionCallError`}},_S=class e{warnIfThinkingUnclampable(e){if(!this.warnedThinkingClamped){if(e===`off`&&!oS.includes(this.model)){this.warnedThinkingClamped=!0,db.warn(`GeminiTransport: thinkingPolicy 'off' ignored — ${this.model} runs its default thinking posture and takes no budget we can safely set. Reasoning tokens are still billed at the candidate rate; use a flash tier if you need them gone.`);return}if(fS(e)){let t=lS[this.model];if(!t){this.warnedThinkingClamped=!0,db.warn(`GeminiTransport: thinkingPolicy '${e}' ignored — ${this.model} takes a numeric thinking budget, not the graded 'thinkingLevel' the Gemini 3 tiers use, so this turn runs at its default reasoning posture. Use a Gemini 3 tier to set reasoning depth.`);return}let n=dS[e],r=uS(t,n);r!==n&&(this.warnedThinkingClamped=!0,db.warn(`GeminiTransport: thinkingPolicy '${e}' sent as thinkingLevel '${r}' — ${this.model} does not accept '${n}' (it takes ${t.join(`/`)}). Reasoning bills at the candidate rate, so an upward clamp costs more than you asked for.`))}}}constructor(e={}){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0,this.warnedThinkingClamped=!1;let t=e.model??`gemini-2.5-flash-lite`;iS(t),this.model=t;let n=aS[t];n&&db.warn(n),this.timeout=e.timeout??3e5,this.stallTimeout=e.stallTimeout??3e4,this.apiKey=e.apiKey,this.serverEndpoint=e.serverEndpoint}getConfig(){return{provider:`gemini`,model:this.model,contextLimit:nS[this.model]}}getLifetimeCost(){return this.lifetimeCostUsd}getLifetimeSavings(){return this.lifetimeSavingsUsd}resetLifetimeCost(){this.lifetimeCostUsd=0,this.lifetimeSavingsUsd=0}sendStructuredPrompt(e){return J(this,void 0,void 0,function*(){let{systemPrompt:t,userPrompt:n,responseSchema:r}=e,i=[];return t&&(i.push({role:`user`,parts:[{text:t}]}),i.push({role:`model`,parts:[{text:`Understood.`}]})),i.push({role:`user`,parts:[{text:n}]}),(yield this.post({model:this.model,contents:i,responseSchema:r}))?.content??``})}sendChatMessage(e,t,n){return J(this,void 0,void 0,function*(){let r=this.toGeminiContents(e,t,n?.attachments);n?.tailContext&&r.push({role:`user`,parts:[{text:n.tailContext}]});let i=n?.tools?.length?[{functionDeclarations:n.tools.map(e=>({name:e.name,description:e.description,parameters:ox(e.parameters)}))}]:void 0,a=n?.systemPrompt?{role:`system`,parts:[{text:n.systemPrompt}]}:void 0,o=i?rS(n?.toolChoice):void 0;this.warnIfThinkingUnclampable(n?.thinkingPolicy);let s={thinkingConfig:pS(this.model,n?.thinkingPolicy)};n?.maxTokens!=null&&(s.maxOutputTokens=n.maxTokens);let c=[...n?.attachments??[],...e.flatMap(e=>e.attachments??[]),...e.flatMap(e=>e.toolResult?.attachments??[])].find(e=>e.kind===`image`&&e.detail);c?.kind===`image`&&c.detail&&sS.includes(this.model)&&(s.mediaResolution=`MEDIA_RESOLUTION_${c.detail.toUpperCase()}`),n?.temperature!=null&&(s.temperature=Rb(n.temperature,{defaultTemp:1,maxTemp:2}));let l=new Set((n?.tools??[]).map(e=>e.name)),u=this.model.startsWith(`gemini-3`),d=n?.responseSchema!=null&&(!i||u),f=yield this.post(Object.assign({model:this.model,contents:r,tools:i,systemInstruction:a,toolConfig:o,generationConfig:s},d?{responseSchema:ox(n.responseSchema)}:{}),n?.signal);return this.fromGeminiResponse(f,l,s.maxOutputTokens)})}logTokenUsage(t,n,r,i){let{costUsd:a,savedUsd:o,breakdown:s}=Gb(this.model,{promptTokens:t,candidateTokens:n,thoughtTokens:r,cachedTokens:i});this.lifetimeCostUsd+=a,this.lifetimeSavingsUsd+=o;let c=e.COST_DECIMAL_PLACES;return console.log(`--- Gemini Token Usage (${this.model}) ---`),console.log(`Prompt Tokens: ${t} (${i} cached) ($${s.promptUsd.toFixed(c)} + $${s.cacheReadUsd.toFixed(c)})`),console.log(`Candidate Tokens: ${n} (+${r} thinking) ($${s.candidateUsd.toFixed(c)})`),console.log(`Total Cost: $${a.toFixed(c)}`),console.log(`Cache Saved: $${o.toFixed(c)} (lifetime $${this.lifetimeSavingsUsd.toFixed(c)})`),console.log(`Lifetime Cost: $${this.lifetimeCostUsd.toFixed(c)}`),console.log(`--------------------------`),a}toGeminiContents(e,t,n){let r=[],i=/* @__PURE__ */ new Map;for(let t of e){if(t.role===`system`||t.role===`system-event`||t.role===`synthetic-user`||t.role===`compacted-summary`||t.category===`reasoning`||t.category===`narration`||t.excludeFromProvider||t.thinking)continue;let e=t.role===`user`?`user`:`model`;if(t.toolResult){let e=i.get(t.toolResult.toolCallId)??t.toolResult.toolCallId;r.push({role:`user`,parts:[{functionResponse:{name:e,response:{content:t.toolResult.content}}}]});let n=t.toolResult.attachments??[];n.length&&r.push({role:`user`,parts:n.map(e=>({inlineData:{mimeType:Fb(e.mimeType),data:e.data}}))})}else if(t.toolCalls?.length){for(let e of t.toolCalls)i.set(e.id,e.name);r.push({role:`model`,parts:t.toolCalls.map((e,t)=>{let n={functionCall:{name:e.name,args:e.args}},r=e.providerMetadata?.[mS],i=r?.model===this.model?r.thoughtSignature:void 0;return i?n.thoughtSignature=i:t===0&&(n.thoughtSignature=`skip_thought_signature_validator`),n})})}else if(e===`user`&&t.attachments?.length){let{imageParts:e,textParts:n}=hS(t.attachments);r.push({role:`user`,parts:[...e,...t.content?[{text:t.content}]:[],...n]})}else r.push({role:e,parts:[{text:t.content}]})}let{imageParts:a,textParts:o}=hS(n??[]);return(t||a.length||o.length)&&r.push({role:`user`,parts:[...a,...t?[{text:t}]:[],...o]}),r}usageFromGemini(e){if(!e)return{};let t=e,n=this.logTokenUsage(t.promptTokenCount??0,t.candidatesTokenCount??0,t.thoughtsTokenCount??0,t.cachedContentTokenCount??0);return{inputTokens:t.promptTokenCount,outputTokens:t.candidatesTokenCount!=null||t.thoughtsTokenCount!=null?(t.candidatesTokenCount??0)+(t.thoughtsTokenCount??0):void 0,thoughtsTokens:t.thoughtsTokenCount,cacheReadTokens:t.cachedContentTokenCount,cost:n}}fromGeminiResponse(e,t=/* @__PURE__ */ new Set,n){let{inputTokens:r,outputTokens:i,thoughtsTokens:a,cacheReadTokens:o,cost:s}=this.usageFromGemini(e.usageMetadata),c=e?.candidates?.[0],l=c?.content?.parts??[],u=[],d=[],f=[];for(let e of l)if(e.functionCall){let t={model:this.model};e.thoughtSignature&&(t.thoughtSignature=e.thoughtSignature),u.push({id:crypto.randomUUID(),name:e.functionCall.name,args:e.functionCall.args??{},providerMetadata:{[mS]:t}})}else e.thought&&e.text?d.push(e.text):e.text&&f.push(e.text);if(c?.finishReason===`MALFORMED_FUNCTION_CALL`){let e=eS(c.finishMessage,t);if(!e)throw new gS(c.finishMessage);u.push({id:crypto.randomUUID(),name:e.name,args:e.args})}let p=d.join(``),m=f.join(``),h=u.length>0?{role:`assistant`,content:m,reasoning:p||void 0,toolCalls:u}:{role:`assistant`,content:m,reasoning:p||void 0},g=c?.finishReason;(u.length===0&&!p&&!m||g&&g!==`STOP`&&g!==`MALFORMED_FUNCTION_CALL`)&&this.logAbnormalResponse(e,{finishReason:g,functionCallParts:u.length,thoughtParts:d.length,textParts:f.length}),this.guardMaxTokensTruncation(g,u,m,i,n),r!=null&&(h.inputTokens=r),i!=null&&(h.outputTokens=i),o!=null&&(h.cacheReadTokens=o),s!=null&&(h.cost=s);let _=e.promptFeedback?.blockReason;return(g!=null||a!=null||_!=null)&&(h.responseMeta={finishReason:g,thoughtsTokens:a,parts:{functionCall:u.length,thought:d.length,text:f.length},blockReason:_}),h}guardMaxTokensTruncation(e,t,n,r,i){if(e===`MAX_TOKENS`&&(t.length!==0||n.trim()===``))throw new Yx(this.model,i,r,t.map(e=>e.name))}logAbnormalResponse(e,t){let n=e.usageMetadata??{},r=e.candidates?.[0]??{};db.warn(`GeminiTransport: blank/non-STOP response`,{model:this.model,finishReason:t.finishReason,finishMessage:r.finishMessage,parts:{total:t.functionCallParts+t.thoughtParts+t.textParts,functionCall:t.functionCallParts,thought:t.thoughtParts,text:t.textParts},usage:{promptTokenCount:n.promptTokenCount,candidatesTokenCount:n.candidatesTokenCount,thoughtsTokenCount:n.thoughtsTokenCount,totalTokenCount:n.totalTokenCount},promptFeedback:e.promptFeedback,safetyRatings:r.safetyRatings,citationMetadata:r.citationMetadata})}buildEndpoint(e){if(this.apiKey)return{url:`${tS(this.model)}?key=${this.apiKey}`,payload:this.toDirectPayload(e),headers:{"Content-Type":`application/json`},credentials:`omit`};if(this.serverEndpoint)return{url:this.serverEndpoint,payload:e,headers:{"Content-Type":`application/json`,Accept:`application/x-ndjson`},credentials:`include`};throw Error(`GeminiTransport: no API key or server endpoint configured. Set GEMINI_API_KEY in your .env or pass apiKey/serverEndpoint in GeminiAIConfig.`)}post(t,n){return J(this,void 0,void 0,function*(){let{url:r,payload:i,headers:a,credentials:o}=this.buildEndpoint(t);return yield Fx({url:r,headers:a,body:i,credentials:o,vendorLabel:hb.gemini,retryableStatuses:e.RETRYABLE_STATUSES,timeout:this.timeout,stallTimeout:this.stallTimeout,backoffBaseMs:e.BACKOFF_BASE_MS,signal:n})})}toDirectPayload(e){let t=Object.assign({},e);return delete t.model,t.responseSchema&&(t.generationConfig=Object.assign(Object.assign({},t.generationConfig),{responseMimeType:`application/json`,responseSchema:t.responseSchema}),delete t.responseSchema),t}};_S.TOKENS_PER_MILLION=1e6,_S.COST_DECIMAL_PLACES=6,_S.RATE_LIMIT_STATUS=429,_S.SERVICE_UNAVAILABLE_STATUS=503,_S.BAD_GATEWAY_STATUS=502,_S.RETRYABLE_STATUSES=[_S.RATE_LIMIT_STATUS,_S.SERVICE_UNAVAILABLE_STATUS,_S.BAD_GATEWAY_STATUS],_S.BACKOFF_BASE_MS=1e3;var vS=class e{constructor(){this.noopProvider=new mb}get(t){return t===e.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return e.DEFAULT_NAME}names(){return[e.DEFAULT_NAME]}getStatus(t){return J(this,void 0,void 0,function*(){var n;return t!==void 0&&t!==e.DEFAULT_NAME?null:(yield(n=this.noopProvider).getStatus?.call(n))??null})}listStatuses(){return J(this,void 0,void 0,function*(){var t;let n=(yield(t=this.noopProvider).getStatus?.call(t))??null;return[{name:e.DEFAULT_NAME,isDefault:!0,status:n}]})}};vS.DEFAULT_NAME=`default`;let yS=N.createInterface(e=>e.singleton(vS)),bS=6e4,xS=3e5;Object.freeze({anthropic:Object.freeze({low:Object.freeze({model:`claude-haiku-4-5-20251001`,maxTokens:16e3,stallTimeoutMs:bS,timeoutMs:xS}),high:Object.freeze({model:`claude-sonnet-5`,maxTokens:128e3,stallTimeoutMs:bS,timeoutMs:xS}),reasoning:Object.freeze({model:`claude-opus-4-8`,maxTokens:32e3,stallTimeoutMs:bS,timeoutMs:xS})}),gemini:Object.freeze({low:Object.freeze({model:`gemini-3.1-flash-lite`,stallTimeoutMs:bS,timeoutMs:xS}),high:Object.freeze({model:`gemini-3.8-flash`,stallTimeoutMs:bS,timeoutMs:xS}),reasoning:Object.freeze({model:`gemini-3.1-pro-preview`,stallTimeoutMs:bS,timeoutMs:xS})})});let SS=O` :host{display: block;width: 800px}.ai-criteria-search{display: flex;flex-direction: column;gap: calc(${B} * 2px)}.ai-criteria-search-row{display: flex;flex-direction: row;gap: calc(${B} * 2px);align-items: center}.criteria-input{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0}.criteria-chips-inline{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);flex: 1;min-width: 0;display: flex;align-items: center;gap: calc(${B} * 1px);overflow-x: auto;padding: 0 calc(${B} * 2px);background: var(--neutral-fill-input-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px);scrollbar-width: none}.criteria-chips-inline::-webkit-scrollbar{display: none}.mic-icon{color: var(--neutral-foreground-rest);fill: currentColor}.criteria-toggle-button, .criteria-clear-button{flex-shrink: 0}.criteria-chip{display: inline-flex;align-items: center;flex-shrink: 0;gap: calc(${B} * 1px);padding: calc(${B} * 0.5px) calc(${B} * 2px);background: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(${B} * 4px);font-size: var(--type-ramp-minus-1-font-size);color: var(--neutral-foreground-rest);white-space: nowrap}.criteria-chip-field{font-weight: 600}.criteria-chip-operator{color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-style: italic}.criteria-chip-remove{display: inline-flex;align-items: center;justify-content: center;width: 14px;height: 14px;padding: 0;margin-left: calc(${B} * 0.5px);background: none;border: none;cursor: pointer;color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));font-size: 10px;border-radius: 50%;line-height: 1}.criteria-chip-remove:hover{background: var(--neutral-fill-hover);color: var(--neutral-foreground-rest)}`,CS=e=>T` ${A(()=>ub(),T`<div class="ai-criteria-search"><div class="ai-criteria-search-row">${A(e=>!e.showingChips,T`<${e}-text-area ${k(`textAreaRef`)}class="criteria-input" placeholder="${e=>e.placeholder}" ?disabled=${e=>e.disabled||e.isInterpreting}:value=${Af(e=>e.inputValue,`string`,`input`)}@blur=${e=>e.handleBlur()}rows="1"></${e}-text-area>`)} ${A(e=>e.showingChips,T`<div class="criteria-chips-inline">${j(e=>e.criteriaChips,T`<span class="criteria-chip"><span class="criteria-chip-field">${e=>e.fieldLabel}</span><span class="criteria-chip-operator">${e=>e.operatorLabel}</span>${A(e=>!!e.valueLabel,T`<span class="criteria-chip-value">${e=>e.valueLabel}</span>`)}<button class="criteria-chip-remove" aria-label="Remove filter" @click=${(e,t)=>t.parent.removeChip(e.groupIndex,e.clauseIndex)}>
250
250
  &#x2715;
251
- </button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?`Add more criteria`:`View active filters`}?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${A(e=>e.speechAvailable,T`<${e}-button class="mic-button" appearance="${e=>e.isRecording?`accent`:`outline`}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?`Stop recording`:`Start voice input`}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `,wS=T` ${e=>CS(Fy(e))} `,TS={contains:Ky.containsIgnoreCase,equals:Ky.EQ,startsWith:Ky.startsWith,endsWith:Ky.endsWith,greaterThan:Ky.GT,lessThan:Ky.LT,greaterThanOrEqual:Ky.GE,lessThanOrEqual:Ky.LE,notEqual:Ky.NE,dateIsToday:Ky.dateIsToday,dateIsAfter:Ky.dateIsGreaterEqual,dateIsGreaterEqual:Ky.dateIsGreaterEqual,dateIsBefore:Ky.dateIsLessEqual,dateIsLessEqual:Ky.dateIsLessEqual,dateIsEqual:Ky.dateIsEqual,dateTimeIsAfter:Ky.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:Ky.dateTimeIsGreaterEqual,dateTimeIsBefore:Ky.dateTimeIsLessEqual,dateTimeIsLessEqual:Ky.dateTimeIsLessEqual};function ES(e){let t=TS[e.operator];if(!t)throw Error(`Unknown criteria operator '${e.operator}'`);return new Zy().withField(e.field).withValue(e.value??null).withSerialiser(t).withGroup(`default`).build()}function DS(e,t){return e.length===1?e[0]:e.reduce((e,n,r)=>r===0?[n]:[...e,t,n],[])}function OS(e){let t=new Xy,n=!1;for(let r of e){if(!r.clauses?.length)continue;let e=r.clauses.map(ES),i=r.logic===`or`?zy.Or():zy.And(),a=DS(e,i),o=e.length>1?{join:i}:{};r.negated?t.And([zy.Not(),a]):t.And(e.length===1?e[0]:e,o),n=!0}return n?t.build():``}let kS=[`contains`,`equals`,`startsWith`,`notEqual`],AS=[`equals`,`greaterThan`,`lessThan`,`greaterThanOrEqual`,`lessThanOrEqual`,`notEqual`],jS=[`dateIsToday`,`dateIsAfter`,`dateIsBefore`,`dateIsEqual`,`dateIsGreaterEqual`,`dateIsLessEqual`],MS=[`dateTimeIsAfter`,`dateTimeIsBefore`,`dateTimeIsGreaterEqual`,`dateTimeIsLessEqual`],NS={contains:`contains`,equals:`=`,startsWith:`starts with`,endsWith:`ends with`,notEqual:`≠`,greaterThan:`>`,lessThan:`<`,greaterThanOrEqual:`≥`,lessThanOrEqual:`≤`,dateIsToday:`is today`,dateIsAfter:`after`,dateIsBefore:`before`,dateIsEqual:`=`,dateIsGreaterEqual:`≥`,dateIsLessEqual:`≤`,dateTimeIsAfter:`after`,dateTimeIsBefore:`before`,dateTimeIsGreaterEqual:`≥`,dateTimeIsLessEqual:`≤`},PS=/* @__PURE__ */ new Set([`DATE`,`LOCALDATE`]),FS=/* @__PURE__ */ new Set([`DATETIME`,`NANO_TIMESTAMP`,`LOCALDATETIME`,`TIMESTAMP`]),IS=/* @__PURE__ */ new Set([`INT`,`INTEGER`,`LONG`,`SHORT`,`DOUBLE`,`BIGDECIMAL`,`DECIMAL`]);function LS(e){return(e||``).toUpperCase().trim().split(`(`)[0].trim()}function lae(e){let t=LS(e);return PS.has(t)?jS:FS.has(t)?MS:IS.has(t)?AS:kS}function uae(e){return IS.has(LS(e))}function dae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e)&&e>0:typeof e==`string`?/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e):!1}function fae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e):typeof e==`string`&&!Number.isNaN(Number(e))}function pae(e,t){let n=[],r=[],i=/* @__PURE__ */ new Map;Array.isArray(t)&&t.length>0&&(typeof t[0]==`string`?t.forEach(e=>i.set(e,void 0)):t.forEach(e=>i.set(e.NAME,e)));for(let t of e){let{field:e,operator:a,value:o}=t;if(!e||typeof e!=`string`){r.push({field:String(e),message:`Field name is required`});continue}let s=i.get(e),c=s&&`TYPE`in s?s.TYPE:`STRING`;if(!lae(c).includes(a)){r.push({field:e,operator:a,value:o,message:`Operator '${a}' is not allowed for field type ${c}`});continue}if((jS.includes(a)||MS.includes(a))&&a!==`dateIsToday`&&!dae(o)){r.push({field:e,operator:a,value:o,message:`Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch`});continue}if(uae(c)&&AS.includes(a)&&!fae(o)){r.push({field:e,operator:a,value:o,message:`Invalid numeric value`});continue}if(i.size>0&&!i.has(e)){r.push({field:e,operator:a,value:o,message:`Unknown field '${e}'`});continue}n.push(t)}return{valid:n,invalid:r}}function mae(e,t){let n=[],r=[];for(let i of e){if(!i?.clauses||!Array.isArray(i.clauses)){r.push({field:``,message:`Group must have a clauses array`});continue}let{valid:e,invalid:a}=pae(i.clauses,t);r.push(...a),e.length>0&&n.push({logic:i.logic??`and`,negated:i.negated,clauses:e})}return{valid:n,invalid:r}}let RS=Xd(`foundation-notifications`),zS=null,BS=/* @__PURE__ */ new Map,VS=e=>`${e?.title??`Error`}: ${e?.body??`Something went wrong`}`,hae=e=>e?.logLevel||e?.config?.logLevel||kd.debug,HS=e=>{RS.log({message:VS(e),level:hae(e)})},US=(e,t)=>{let n=document.querySelector(`#${e}`);if(!n){if(BS.has(e))n=BS.get(e);else{let t=df(document).find(t=>t.id===e);t&&(n=t,BS.set(e,t))}}if(!n){n=document.createElement(`div`),n.setAttribute(`id`,e),n.style.zIndex=`9999`;let{element:t,prefix:r}=mf(document.body,`rapid`);if(t)t.appendChild(n),zS=t;else if(zS)zS.appendChild(n);else{let e=document.createElement(`${r}-design-system-provider`);e.appendChild(n),document.body.appendChild(e),zS=e}}return n},gae=e=>{for(;e&&!(e instanceof ShadowRoot);){let t=(e?.getRootNode())?.getElementById(`banner-anchor`);if(t)return t.style.position=`relative`,t;e=e?.getRootNode()?.host}return _ae()},_ae=()=>{let e=document.createElement(`div`);return e.setAttribute(`id`,`banner-anchor`),e.style.position=`relative`,document.body.insertBefore(e,document.body.firstChild),e},vae=e=>{HS(e),alert(VS(e))},yae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-banner`),a=gae(n);a?.children?.length>0&&(i.style.position=`absolute`,i.style.top=`0`,i.style.left=`0`,i.style.width=`100%`),a.appendChild(i),i.notification=e},bae=e=>{let t=e.querySelector(`#dialog-container`);return t||(t=document.createElement(`div`),t.setAttribute(`id`,`dialog-container`),t.style.position=`relative`,e.appendChild(t)),t},xae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-dialog`);(n?bae(n):US(`dialog-container`,t)).appendChild(i),i.notification=e,i.show()};var WS;(function(e){e.NOTIFICATION_EVENT=`notification-event`})(WS||(WS={}));var GS;(function(e){e.Top=`top`,e.Bottom=`bottom`})(GS||(GS={}));var KS;(function(e){e.Left=`left`,e.Right=`right`})(KS||(KS={}));let qS=`12px`,Sae=(e,t,n)=>{e.style.position=`fixed`,e.style.top=t===GS.Top?qS:``,e.style.bottom=t===GS.Bottom?qS:``,e.style.left=n===KS.Left?qS:``,e.style.right=n===KS.Right?qS:``},Cae=(e,t)=>{HS(e);let n=t.split(`-`)[0],r=document.createElement(`${n}-snackbar`),i=e.config?.snackbar?.verticalEdge??GS.Bottom,a=e.config?.snackbar?.horizontalEdge??KS.Left,o=US(`snack-container-${i}-${a}`,t);o&&Sae(o,i,a),o.appendChild(r),r.notification=e},wae=e=>df(document.body).find(t=>t.tagName.toLowerCase()===`notify-container`&&t.position===e);function Tae(e,t){switch(t.style.position=`fixed`,e?.config?.toast?.position){case`top-left`:t.style.top=`var(--nav-height, 0)`,t.style.left=`0`;break;case`bottom-left`:t.style.bottom=`0`,t.style.left=`0`;break;case`bottom-right`:t.style.bottom=`0`,t.style.right=`0`;break;default:t.style.top=`var(--nav-height, 0)`,t.style.right=`0`}}let JS=(e,t,n)=>{var r,i;HS(e);let a=t.split(`-`)[0],o=e?.config?.toast?.position||`top-right`,s=n??wae(o)??US(`notify-container`,t);s&&s.tagName.toLowerCase()!==`notify-container`&&Tae(e,s);let c=document.createElement(`${a}-toast`),l=document.createElement(`div`);l.setAttribute(`slot`,`top`),l.textContent=e.title;let u=document.createElement(`div`);u.setAttribute(`slot`,`content`),u.textContent=e?.body||``;let d=document.createElement(`div`);d.setAttribute(`slot`,`date`),d.textContent=(e?.createdAt)?.toLocaleTimeString()||``;let f;e?.config?.toast?.buttons&&e?.config?.toast?.buttons?.length&&(f=document.createElement(`div`),f.setAttribute(`slot`,`bottom`),e.config.toast.buttons.forEach(t=>{let n=document.createElement(`${a}-button`);n.textContent=t.placeholder||`example placeholder`,n.addEventListener(`click`,()=>{let{details:r}=e.config.toast;if(t.action)return t.action({details:r,buttonElement:n,toastElement:c})}),t.appearance&&n.setAttribute(`appearance`,t.appearance),f.appendChild(n)})),c.setAttribute(`notify`,e?.config?.toast?.type||``),e.iconName&&c.setAttribute(`notification-icon`,e.iconName),(r=e?.config?.toast)!=null&&r.autoClose&&c.setAttribute(`auto-close`,`${e?.config?.toast?.autoClose}`),(i=e?.config?.toast)!=null&&i.closeTimeout&&c.setAttribute(`close-timeout`,`${e?.config?.toast?.closeTimeout}`),c.appendChild(l),c.appendChild(u),c.appendChild(d),f&&c.appendChild(f),s.prepend(c)},YS=(e,t,n)=>{if(!e.title)throw Error(`Title is required`);if(!e.body)throw Error(`Missing required param 'body'`);let r={title:e.title,body:e.body,iconName:e.iconName},i={};e.createdAt&&(r=Object.assign({createdAt:e.createdAt},r)),e.logLevel!=null&&(r=Object.assign({logLevel:e.logLevel},r)),e.toast&&(i=Object.assign({toast:e.toast},i),r=Object.assign({config:i},r)),JS(r,t,n)},Eae=O` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow-y: auto;overflow-x: hidden;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;align-items: end;/* Default to bottom-up stacking */ justify-items: center;/* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,Dae=e=>T`<div class="header ${e=>pn([`visible`,e.slottedNodes.length>1])}">${A(e=>e.showCount,T`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${A(e=>e.allowManualCollapse,T`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?`Expand`:`Collapse`}<${e}-icon class="chevron-up ${e=>pn([`collapse`,e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${A(e=>e.allowCloseAll,T`<${e}-button @click=${e=>e.handleCloseAll()}>
251
+ </button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?`Add more criteria`:`View active filters`}?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>e.activeGroups.length===0||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${A(e=>e.speechAvailable,T`<${e}-button class="mic-button" appearance="${e=>e.isRecording?`accent`:`outline`}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?`Stop recording`:`Start voice input`}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `,wS=T` ${e=>CS(Fy(e))} `,TS={contains:Ky.containsIgnoreCase,equals:Ky.EQ,startsWith:Ky.startsWith,endsWith:Ky.endsWith,greaterThan:Ky.GT,lessThan:Ky.LT,greaterThanOrEqual:Ky.GE,lessThanOrEqual:Ky.LE,notEqual:Ky.NE,dateIsToday:Ky.dateIsToday,dateIsAfter:Ky.dateIsGreaterEqual,dateIsGreaterEqual:Ky.dateIsGreaterEqual,dateIsBefore:Ky.dateIsLessEqual,dateIsLessEqual:Ky.dateIsLessEqual,dateIsEqual:Ky.dateIsEqual,dateTimeIsAfter:Ky.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:Ky.dateTimeIsGreaterEqual,dateTimeIsBefore:Ky.dateTimeIsLessEqual,dateTimeIsLessEqual:Ky.dateTimeIsLessEqual};function ES(e){let t=TS[e.operator];if(!t)throw Error(`Unknown criteria operator '${e.operator}'`);return new Zy().withField(e.field).withValue(e.value??null).withSerialiser(t).withGroup(`default`).build()}function DS(e,t){return e.length===1?e[0]:e.reduce((e,n,r)=>r===0?[n]:[...e,t,n],[])}function OS(e){let t=new Xy,n=!1;for(let r of e){if(!r.clauses?.length)continue;let e=r.clauses.map(ES),i=r.logic===`or`?zy.Or():zy.And(),a=DS(e,i),o=e.length>1?{join:i}:{};r.negated?t.And([zy.Not(),a]):t.And(e.length===1?e[0]:e,o),n=!0}return n?t.build():``}let kS=[`contains`,`equals`,`startsWith`,`notEqual`],AS=[`equals`,`greaterThan`,`lessThan`,`greaterThanOrEqual`,`lessThanOrEqual`,`notEqual`],jS=[`dateIsToday`,`dateIsAfter`,`dateIsBefore`,`dateIsEqual`,`dateIsGreaterEqual`,`dateIsLessEqual`],MS=[`dateTimeIsAfter`,`dateTimeIsBefore`,`dateTimeIsGreaterEqual`,`dateTimeIsLessEqual`],NS={contains:`contains`,equals:`=`,startsWith:`starts with`,endsWith:`ends with`,notEqual:`≠`,greaterThan:`>`,lessThan:`<`,greaterThanOrEqual:`≥`,lessThanOrEqual:`≤`,dateIsToday:`is today`,dateIsAfter:`after`,dateIsBefore:`before`,dateIsEqual:`=`,dateIsGreaterEqual:`≥`,dateIsLessEqual:`≤`,dateTimeIsAfter:`after`,dateTimeIsBefore:`before`,dateTimeIsGreaterEqual:`≥`,dateTimeIsLessEqual:`≤`},PS=/* @__PURE__ */ new Set([`DATE`,`LOCALDATE`]),FS=/* @__PURE__ */ new Set([`DATETIME`,`NANO_TIMESTAMP`,`LOCALDATETIME`,`TIMESTAMP`]),IS=/* @__PURE__ */ new Set([`INT`,`INTEGER`,`LONG`,`SHORT`,`DOUBLE`,`BIGDECIMAL`,`DECIMAL`]);function LS(e){return(e||``).toUpperCase().trim().split(`(`)[0].trim()}function lae(e){let t=LS(e);return PS.has(t)?jS:FS.has(t)?MS:IS.has(t)?AS:kS}function uae(e){return IS.has(LS(e))}function dae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e)&&e>0:typeof e==`string`?/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e):!1}function fae(e){return e==null?!1:typeof e==`number`?!Number.isNaN(e):typeof e==`string`&&!Number.isNaN(Number(e))}function pae(e,t){let n=[],r=[],i=/* @__PURE__ */ new Map;Array.isArray(t)&&t.length>0&&(typeof t[0]==`string`?t.forEach(e=>i.set(e,void 0)):t.forEach(e=>i.set(e.NAME,e)));for(let t of e){let{field:e,operator:a,value:o}=t;if(!e||typeof e!=`string`){r.push({field:String(e),message:`Field name is required`});continue}let s=i.get(e),c=s&&`TYPE`in s?s.TYPE:`STRING`;if(!lae(c).includes(a)){r.push({field:e,operator:a,value:o,message:`Operator '${a}' is not allowed for field type ${c}`});continue}if((jS.includes(a)||MS.includes(a))&&a!==`dateIsToday`&&!dae(o)){r.push({field:e,operator:a,value:o,message:`Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch`});continue}if(uae(c)&&AS.includes(a)&&!fae(o)){r.push({field:e,operator:a,value:o,message:`Invalid numeric value`});continue}if(i.size>0&&!i.has(e)){r.push({field:e,operator:a,value:o,message:`Unknown field '${e}'`});continue}n.push(t)}return{valid:n,invalid:r}}function mae(e,t){let n=[],r=[];for(let i of e){if(!i?.clauses||!Array.isArray(i.clauses)){r.push({field:``,message:`Group must have a clauses array`});continue}let{valid:e,invalid:a}=pae(i.clauses,t);r.push(...a),e.length>0&&n.push({logic:i.logic??`and`,negated:i.negated,clauses:e})}return{valid:n,invalid:r}}let RS=Xd(`foundation-notifications`),zS=null,BS=/* @__PURE__ */ new Map,VS=e=>`${e?.title??`Error`}: ${e?.body??`Something went wrong`}`,hae=e=>e?.logLevel||e?.config?.logLevel||kd.debug,HS=e=>{RS.log({message:VS(e),level:hae(e)})},US=(e,t)=>{let n=document.querySelector(`#${e}`);if(!n){if(BS.has(e))n=BS.get(e);else{let t=df(document).find(t=>t.id===e);t&&(n=t,BS.set(e,t))}}if(!n){n=document.createElement(`div`),n.setAttribute(`id`,e),n.style.zIndex=`9999`;let{element:t,prefix:r}=mf(document.body,`rapid`);if(t)t.appendChild(n),zS=t;else if(zS)zS.appendChild(n);else{let e=document.createElement(`${r}-design-system-provider`);e.appendChild(n),document.body.appendChild(e),zS=e}}return n},gae=e=>{for(;e&&!(e instanceof ShadowRoot);){let t=(e?.getRootNode())?.getElementById(`banner-anchor`);if(t)return t.style.position=`relative`,t;e=e?.getRootNode()?.host}return _ae()},_ae=()=>{let e=document.createElement(`div`);return e.setAttribute(`id`,`banner-anchor`),e.style.position=`relative`,document.body.insertBefore(e,document.body.firstChild),e},vae=e=>{HS(e),alert(VS(e))},yae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-banner`),a=gae(n);a?.children?.length>0&&(i.style.position=`absolute`,i.style.top=`0`,i.style.left=`0`,i.style.width=`100%`),a.appendChild(i),i.notification=e},bae=e=>{let t=e.querySelector(`#dialog-container`);return t||(t=document.createElement(`div`),t.setAttribute(`id`,`dialog-container`),t.style.position=`relative`,e.appendChild(t)),t},xae=(e,t,n)=>{HS(e);let r=t.split(`-`)[0],i=document.createElement(`${r}-dialog`);(n?bae(n):US(`dialog-container`,t)).appendChild(i),i.notification=e,i.show()};var WS;(function(e){e.NOTIFICATION_EVENT=`notification-event`})(WS||(WS={}));var GS;(function(e){e.Top=`top`,e.Bottom=`bottom`})(GS||(GS={}));var KS;(function(e){e.Left=`left`,e.Right=`right`})(KS||(KS={}));let qS=`12px`,Sae=(e,t,n)=>{e.style.position=`fixed`,e.style.top=t===GS.Top?qS:``,e.style.bottom=t===GS.Bottom?qS:``,e.style.left=n===KS.Left?qS:``,e.style.right=n===KS.Right?qS:``},Cae=(e,t)=>{HS(e);let n=t.split(`-`)[0],r=document.createElement(`${n}-snackbar`),i=e.config?.snackbar?.verticalEdge??GS.Bottom,a=e.config?.snackbar?.horizontalEdge??KS.Left,o=US(`snack-container-${i}-${a}`,t);o&&Sae(o,i,a),o.appendChild(r),r.notification=e},wae=e=>df(document.body).find(t=>t.tagName.toLowerCase()===`notify-container`&&t.position===e);function Tae(e,t){switch(t.style.position=`fixed`,e?.config?.toast?.position){case`top-left`:t.style.top=`var(--nav-height, 0)`,t.style.left=`0`;break;case`bottom-left`:t.style.bottom=`0`,t.style.left=`0`;break;case`bottom-right`:t.style.bottom=`0`,t.style.right=`0`;break;default:t.style.top=`var(--nav-height, 0)`,t.style.right=`0`}}let JS=(e,t,n)=>{var r,i;HS(e);let a=t.split(`-`)[0],o=e?.config?.toast?.position||`top-right`,s=n??wae(o)??US(`notify-container`,t);s&&s.tagName.toLowerCase()!==`notify-container`&&Tae(e,s);let c=document.createElement(`${a}-toast`),l=document.createElement(`div`);l.setAttribute(`slot`,`top`),l.textContent=e.title;let u=document.createElement(`div`);u.setAttribute(`slot`,`content`),u.textContent=e?.body||``;let d=document.createElement(`div`);d.setAttribute(`slot`,`date`),d.textContent=(e?.createdAt)?.toLocaleTimeString()||``;let f;e?.config?.toast?.buttons&&e?.config?.toast?.buttons?.length&&(f=document.createElement(`div`),f.setAttribute(`slot`,`bottom`),e.config.toast.buttons.forEach(t=>{let n=document.createElement(`${a}-button`);n.textContent=t.placeholder||`example placeholder`,n.addEventListener(`click`,()=>{let{details:r}=e.config.toast;if(t.action)return t.action({details:r,buttonElement:n,toastElement:c})}),t.appearance&&n.setAttribute(`appearance`,t.appearance),f.appendChild(n)})),c.setAttribute(`notify`,e?.config?.toast?.type||``),e.iconName&&c.setAttribute(`notification-icon`,e.iconName),(r=e?.config?.toast)!=null&&r.autoClose&&c.setAttribute(`auto-close`,`${e?.config?.toast?.autoClose}`),(i=e?.config?.toast)!=null&&i.closeTimeout&&c.setAttribute(`close-timeout`,`${e?.config?.toast?.closeTimeout}`),c.appendChild(l),c.appendChild(u),c.appendChild(d),f&&c.appendChild(f),s.prepend(c)},YS=(e,t,n)=>{if(!e.title)throw Error(`Title is required`);if(!e.body)throw Error(`Missing required param 'body'`);let r={title:e.title,body:e.body,iconName:e.iconName},i={};e.createdAt&&(r=Object.assign({createdAt:e.createdAt},r)),e.logLevel!=null&&(r=Object.assign({logLevel:e.logLevel},r)),e.toast&&(i=Object.assign({toast:e.toast},i),r=Object.assign({config:i},r)),JS(r,t,n)},Eae=O` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow: hidden auto;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;place-items: end center;/* Default to bottom-up stacking */ /* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,Dae=e=>T`<div class="header ${e=>pn([`visible`,e.slottedNodes.length>1])}">${A(e=>e.showCount,T`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${A(e=>e.allowManualCollapse,T`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?`Expand`:`Collapse`}<${e}-icon class="chevron-up ${e=>pn([`collapse`,e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${A(e=>e.allowCloseAll,T`<${e}-button @click=${e=>e.handleCloseAll()}>
252
252
  Close All <${e}-icon name="xmark"></${e}-icon></${e}-button>`)}</div></div>`,Oae=T` ${A(e=>e.allowCloseAll||e.allowManualCollapse,T` ${e=>Dae(e.designSystemPrefix)} `)}<div class="toast-container"><slot ${xt(`slottedNodes`)}@click="${e=>e.handleContainerClick()}"></slot></div>`,XS=class extends Qe{constructor(){super(...arguments),this.position=`top-right`,this.stackThreshold=5,this.allowManualCollapse=!0,this.allowCloseAll=!0,this.designSystemPrefix=`rapid`,this.showCount=!0,this.stackCollapsed=!1,this.notificationInterval=0,this.manuallyExpanded=!1,this.pendingQueue=[],this.queueTimer=null,this.queuedNodes=/* @__PURE__ */ new Set,this.mutationObserver=null,this.knownNodes=/* @__PURE__ */ new Set,this.peekingNode=null,this.peekTimer=null,this.routeSubscriber={handleChange:()=>this.checkRoute(cp.shared.pathName)},this.slottedNodes=[]}connectedCallback(){super.connectedCallback(),(this.position===`bottom-left`||this.position===`bottom-right`)&&RS.error(`NotifyContainer doesn't currently support bottom corner placements`),S.getNotifier(cp.shared).subscribe(this.routeSubscriber,`pathName`),this.checkRoute(cp.shared.pathName),this.mutationObserver=new MutationObserver(e=>this.handleMutation(e)),this.mutationObserver.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),S.getNotifier(cp.shared).unsubscribe(this.routeSubscriber,`pathName`),(e=this.mutationObserver)==null||e.disconnect(),this.mutationObserver=null}checkRoute(e){(e.includes(`/login`)||e.includes(`/logout`))&&(this.pendingQueue=[],this.queuedNodes.clear(),clearTimeout(this.queueTimer),this.queueTimer=null,this.handleCloseAll())}slottedNodesChanged(){if(!this.manuallyExpanded&&!this.stackCollapsed&&this.slottedNodes.length>this.stackThreshold&&(this.stackCollapsed=!0),this.stackCollapsed&&this.slottedNodes.length<=1&&(this.stackCollapsed=!1,this.manuallyExpanded=!1,this.cancelPeek()),this.stackCollapsed){let e=this.slottedNodes.filter(e=>e instanceof HTMLElement&&!this.knownNodes.has(e)).shift();e&&this.maybePeek(e)}this.knownNodes=new Set(this.slottedNodes),this.applySort()}handleContainerClick(){this.stackCollapsed&&(this.stackCollapsed=!1,this.manuallyExpanded=!0,this.cancelPeek())}handleToggleCollapse(){this.stackCollapsed=!this.stackCollapsed,this.manuallyExpanded=!this.stackCollapsed,this.stackCollapsed||this.cancelPeek()}handleCloseAll(){for(this.cancelPeek();this.firstChild;)this.removeChild(this.firstChild);this.stackCollapsed=!1,this.manuallyExpanded=!1}notificationIntervalChanged(e,t){!t&&this.pendingQueue&&this.flushQueue()}handleMutation(e){this.notificationInterval&&(e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(this.queuedNodes.has(e)?this.queuedNodes.delete(e):(this.removeChild(e),this.pendingQueue.push(e)))})}),this.queueTimer||this.processQueue())}processQueue(){if(!this.pendingQueue.length){this.queueTimer=null;return}let e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e),this.queueTimer=setTimeout(()=>{this.queueTimer=null,this.processQueue()},this.notificationInterval)}flushQueue(){for(clearTimeout(this.queueTimer),this.queueTimer=null;this.pendingQueue.length;){let e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e)}}sortFnChanged(){this.applySort()}applySort(){let e=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(!e.length)return;let t=this.sortFn&&e.length>1?[...e].sort(this.sortFn):e;this.peekingNode&&t.includes(this.peekingNode)?this.handlePosition([this.peekingNode,...t.filter(e=>e!==this.peekingNode)]):this.handlePosition(t)}maybePeek(e){let t=this.slottedNodes.filter(e=>e instanceof HTMLElement);if((this.sortFn&&t.length>1?[...t].sort(this.sortFn):t).indexOf(e)===0)return;this.cancelPeek(),this.peekingNode=e;let n=this.notificationInterval?this.notificationInterval/2:1500;this.peekTimer=setTimeout(()=>{this.peekingNode=null,this.peekTimer=null,this.applySort()},n)}cancelPeek(){clearTimeout(this.peekTimer),this.peekTimer=null,this.peekingNode=null}handlePosition(e){if(!e.length)return;e.forEach((t,n)=>{t.style.position=`absolute`,t.style.transition=`all 0.3s ease-in`,t.style.right=`0px`,t.style.zIndex=(e.length-n).toString(),t.dataset.stackIndex=n.toString()});let t=e.map(e=>e.offsetHeight);e.reduce((e,n,r)=>(n.style.top=`${e}px`,e+t[r]),0)}};q([D],XS.prototype,`position`,void 0),q([D({attribute:`stack-threshold`})],XS.prototype,`stackThreshold`,void 0),q([D({attribute:`allow-manual-collapse`,mode:`boolean`})],XS.prototype,`allowManualCollapse`,void 0),q([D({attribute:`allow-close-all`,mode:`boolean`})],XS.prototype,`allowCloseAll`,void 0),q([D({attribute:`design-system-prefix`})],XS.prototype,`designSystemPrefix`,void 0),q([D({attribute:`show-count`,mode:`boolean`})],XS.prototype,`showCount`,void 0),q([D({attribute:`stack-collapsed`,mode:`boolean`})],XS.prototype,`stackCollapsed`,void 0),q([D({attribute:`notification-interval`})],XS.prototype,`notificationInterval`,void 0),q([C],XS.prototype,`sortFn`,void 0),q([C],XS.prototype,`slottedNodes`,void 0),XS=q([$e({name:`notify-container`,template:Oae,styles:Eae})],XS);let ZS={alert:vae,toast:JS,dialog:xae,snackbar:Cae,banner:yae},QS=(e,t,n)=>{Object.keys(e?.config||{}).forEach(r=>{ZS[r]&&ZS[r](e,t,n)})};function kae(e){return e.length===0?``:e.length===1?e[0].message:e.map(e=>e.message).join(`; `)}function $S(e,t,n){t?.trim()&&QS({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:`error`}}},n)}var eC=class extends P{constructor(){super(...arguments),this.placeholder=`Describe your search criteria in natural language...`,this.inputValue=``,this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return fb()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,n)=>({groupIndex:t,clauseIndex:n,fieldLabel:this.getFieldLabel(e.field),operatorLabel:NS[e.operator]??e.operator,valueLabel:e.operator===`dateIsToday`?``:String(e.value??``)})))}getFieldLabel(e){if(!Array.isArray(this.fieldMetadata)||this.fieldMetadata.length===0||typeof this.fieldMetadata[0]==`string`)return e;let t=this.fieldMetadata.find(t=>t.NAME===e);return t?.UI_LABEL??t?.NAME??e}toggleCriteriaView(){this.showingChips?(this.inputValue=``,this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var n;let r=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));(n=r[e])==null||n.clauses.splice(t,1);let i=r.filter(e=>e.clauses.length>0);if(this.activeGroups=i,i.length===0)this.showingChips=!1,this.lastValidCriteria=null,this.$emit(`criteria-changed`,null);else{let e=OS(i);this.lastValidCriteria=e,this.$emit(`criteria-changed`,e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit(`criteria-changed`,null)}handleSubmit(){return J(this,void 0,void 0,function*(){let e=this.inputValue?.trim();if(!e||this.isInterpreting)return;let t=this.providerRegistry?.default();if(!t?.interpretCriteria){$S(`AI criteria search`,`AI provider not configured`,Fy(this));return}this.isInterpreting=!0;try{let n=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],r=yield t.interpretCriteria(e,{fields:n});if(!(r?.groups)?.some(e=>e.clauses?.length)){$S(`AI criteria search`,`AI could not interpret the criteria`,Fy(this)),this.isInterpreting=!1;return}let{valid:i,invalid:a}=mae(r.groups,this.fieldMetadata);if(a.length>0&&($S(`Criteria validation error`,kae(a),Fy(this)),this.$emit(`validation-errors`,a)),i.length>0){let e=[...this.activeGroups,...i],t=OS(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue=``,this.showingChips=!0,this.$emit(`criteria-changed`,t)}}catch(e){$S(`AI criteria search`,e instanceof Error?e.message:`Interpretation failed`,Fy(this))}finally{this.isInterpreting=!1}})}handleBlur(){this.isRecording||(this.inputValue?.trim()?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0))}clear(){this.inputValue=``,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit(`criteria-changed`,null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording){this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,this.isRecording=!1;return}this.inputValue=``,this.showingChips=!1,this.stopRecording=pb((e,t)=>{this.inputValue=e,t&&e?.trim()&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}};q([yS],eC.prototype,`providerRegistry`,void 0),q([D],eC.prototype,`placeholder`,void 0),q([D({mode:`boolean`})],eC.prototype,`disabled`,void 0),q([C],eC.prototype,`inputValue`,void 0),q([C],eC.prototype,`isInterpreting`,void 0),q([C],eC.prototype,`lastValidCriteria`,void 0),q([C],eC.prototype,`activeGroups`,void 0),q([C],eC.prototype,`showingChips`,void 0),q([C],eC.prototype,`fieldMetadata`,void 0),q([C],eC.prototype,`isRecording`,void 0),q([w],eC.prototype,`speechAvailable`,null),q([w],eC.prototype,`criteriaChips`,null);let tC={};eC.compose(Object.assign({baseName:`ai-criteria-search`,template:wS,styles:SS,shadowOptions:void 0},tC));let nC=(e,t)=>O` :host{display: flex;justify-content: center;align-items: center;width: 100%;margin: calc(var(--design-unit) * 2px) 0;position: relative;/* Same as connection indicator */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--red: 187 30 16;--trafic-light-red: rgb(var(--red));--amber: 230 160 20;--trafic-light-amber: rgb(var(--amber))}.ai-indicator-container{display: flex;flex-direction: column;align-items: center;position: relative}.ai-indicator-badge{display: inline-flex;align-items: center;gap: calc(var(--design-unit) * 1.4px);font-size: 12px;line-height: 1;font-weight: 600;text-transform: uppercase;height: calc(var(--design-unit) * 6px);padding: calc(var(--design-unit) * 0.5px) calc(var(--design-unit) * 2px);border-radius: calc(var(--design-unit) * 1px);cursor: pointer;color: #fff}.ai-indicator-badge:hover{opacity: 90%}.ai-indicator-badge.green{background: var(--trafic-light-green)}.ai-indicator-badge.amber{background: var(--trafic-light-amber)}.ai-indicator-badge.red{background: var(--trafic-light-red)}.ai-indicator-badge .ai-indicator-icon{flex-shrink: 0;color: inherit}.ai-indicator-badge.pulsing{animation: ai-indicator-pulse 1.5s ease-in-out infinite}@keyframes ai-indicator-pulse{0%, 100%{opacity: 100%}50%{opacity: 50%}}.ai-indicator-dropdown{position: absolute;top: 100%;right: 0;margin-top: calc(var(--design-unit) * 2px);min-width: 200px;padding: calc(var(--design-unit) * 4px);background: var(--neutral-layer-floating, #fff);border: 1px solid var(--neutral-stroke-rest, #e0e0e0);border-radius: calc(var(--design-unit) * 2px);box-shadow: 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * 4px) rgb(0 0 0 / 12%);z-index: 1000}.ai-indicator-info{display: flex;flex-direction: column;gap: 0;margin: 0;padding: 0}.ai-indicator-info .info-row{display: grid;grid-template-columns: 72px 1fr;gap: calc(var(--design-unit) * 4px);align-items: baseline;padding: calc(var(--design-unit) * 1.5px) 0;border-bottom: 1px solid var(--neutral-stroke-subtle, #eee)}.ai-indicator-info .info-row:last-child{border-bottom: none}.ai-indicator-info .info-label{margin: 0;font-size: var(--type-ramp-base-font-size);font-weight: 500;color: var(--neutral-foreground-hint, #666)}.ai-indicator-info .info-value{margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest, #333);text-transform: capitalize;word-break: break-word}.install-button{margin-top: calc(var(--design-unit) * 3px);width: 100%}`,Aae=e=>T` ${A(()=>ub(),T`<div class="ai-indicator-container" part="ai-indicator-container"><div class=${e=>pn(`ai-indicator-badge`,[`green`,e.state===`available`||e.state===`server`],[`amber`,e.state===`downloading`||e.state===`downloadable`],[`red`,e.state===`unavailable`||e.state===`none`],[`pulsing`,e.state===`downloading`||e.isInstalling])}data-test-id="ai-indicator-badge" part="ai-indicator-badge" role="button" tabindex="0" aria-label="AI status" aria-haspopup="true" aria-expanded="${e=>e.open}" @click=${e=>e.toggleDropdown()}@keydown=${(e,t)=>{let n=t.event;(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.toggleDropdown())}}><${e}-icon class="ai-indicator-icon" name="wand-magic-sparkles" size="xs" variant="solid" part="ai-indicator-icon"></${e}-icon><span class="ai-indicator-text" data-test-id="ai-indicator-text" part="ai-indicator-text">AI</span></div>${A(e=>e.open,T`<div class="ai-indicator-dropdown" part="ai-indicator-dropdown"><dl class="ai-indicator-info"><div class="info-row"><dt class="info-label">Provider</dt><dd class="info-value">${e=>e.status?.provider??`none`}</dd></div><div class="info-row"><dt class="info-label">Model</dt><dd class="info-value">${e=>e.status?.model||`—`}</dd></div>${A(e=>e.chromeStatusLabel,T`<div class="info-row"><dt class="info-label">Status</dt><dd class="info-value">${e=>e.chromeStatusLabel}</dd></div>`)}</dl>${A(e=>e.canInstall,T`<${e}-button class="install-button" appearance="accent" @click=${(e,t)=>{t.event.preventDefault(),e.onInstall()}}>
253
- Install model </${e}-button>`)}</div>`)}</div>`)} `,rC=T` ${e=>Aae(Fy(e))} `;var iC=class extends P{constructor(){super(...arguments),this.status=null,this.open=!1,this.state=`none`,this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){return this.providerRegistry?.default()}get chromeStatusLabel(){if(this.status?.provider!==`chrome`)return null;let e=this.status?.chromeAvailability;return e===`available`?`Installed`:e===`downloading`||this.isInstalling?`Downloading…`:e===`downloadable`?`Downloadable`:e===`unavailable`?`Unavailable`:null}get canInstall(){return!!this.aiProvider?.triggerDownload&&this.status?.provider===`chrome`&&this.status?.chromeAvailability===`downloadable`&&!this.isInstalling}get isDownloading(){return this.status?.chromeAvailability===`downloading`||this.isInstalling}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener(`mousedown`,this.clickOutside)}openChanged(){this.open?(document.addEventListener(`mousedown`,this.clickOutside),this.refreshStatus()):document.removeEventListener(`mousedown`,this.clickOutside)}handleClickOutside(e){Ny(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return J(this,void 0,void 0,function*(){if(!this.aiProvider?.getStatus){this.status=null,this.state=`none`;return}try{let e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),this.state===`available`&&(this.isInstalling=!1)}catch{this.status=null,this.state=`none`,this.isInstalling=!1}})}deriveState(e){if(!e||e.provider===`none`)return`none`;if(e.provider===`chrome`){let t=e.chromeAvailability;return t===`available`?`available`:t===`downloading`?`downloading`:t===`downloadable`?`downloadable`:`unavailable`}return`server`}maybeStartPolling(){this.status?.chromeAvailability===`downloading`||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return J(this,void 0,void 0,function*(){if(this.canInstall&&this.aiProvider?.triggerDownload){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch{this.isInstalling=!1}finally{yield this.refreshStatus()}}})}};q([yS],iC.prototype,`providerRegistry`,void 0),q([C],iC.prototype,`status`,void 0),q([C],iC.prototype,`open`,void 0),q([C],iC.prototype,`state`,void 0),q([C],iC.prototype,`isInstalling`,void 0),q([w],iC.prototype,`chromeStatusLabel`,null),q([w],iC.prototype,`canInstall`,null),q([w],iC.prototype,`isDownloading`,null),iC.compose({baseName:`ai-indicator`,template:rC,styles:nC});let aC=(e,t)=>Un(e,t),oC=(e,t)=>O` ${ql(e,t)}`;var sC=class extends Jl{};let cC={delegatesFocus:!0,mode:`open`},lC={};sC.compose(Object.assign({baseName:`anchor`,template:aC,styles:oC,shadowOptions:cC},lC));let uC=(e,t)=>qn(e,t),dC=(e,t)=>O` ${Yl(e,t)}`;var fC=class extends Yn{};let pC={delegatesFocus:!0,mode:`open`},mC={};fC.compose(Object.assign({baseName:`anchored-region`,template:uC,styles:dC,shadowOptions:pC},mC));let hC=(e,t)=>rr(e,t),jae=T` ${A(e=>e.imgSrc,T`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,gC=(e,t)=>O` ${Xl(e,t)}`;var _C=class extends Zl{};let vC={delegatesFocus:!0,mode:`open`},yC={media:jae};_C.compose(Object.assign({baseName:`avatar`,template:hC,styles:gC,shadowOptions:vC},yC));let bC=(e,t)=>ar(e,t),xC=(e,t)=>O` ${Ql(e,t)}`;var SC=class extends or{};let CC={};SC.compose(Object.assign({baseName:`badge`,template:bC,styles:xC,shadowOptions:void 0},CC));let wC=O` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,Mae=e=>T`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${k(`banner`)}><div part="content" class="content"><slot name="content">${A(e=>e.notification,T`<div><div>${e=>e.notification?.body||`Place holder for notification message`}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${A(e=>e.notification,T`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>e.notification?.config?.banner?.dismissingAction?.label||`Ignore`}</${e}-button>`)} ${j(e=>(e.notification?.config)?.banner.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`,TC=T` ${e=>Mae(Fy(e))} `,EC={mode:`open`,delegatesFocus:!0};var DC=class extends P{constructor(){super(...arguments),this.dismissAnimation=``}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation=`banner-delete`,new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return J(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){jy.error(e)}})}};q([C],DC.prototype,`dismissAnimation`,void 0),q([C],DC.prototype,`notification`,void 0),DC.compose({baseName:`banner`,styles:wC,template:TC,shadowOptions:EC});let OC=(e,t)=>lr(e,t),kC=(e,t)=>O` ${eu(e,t)}`;var AC=class extends ur{};AC.compose(Object.assign({baseName:`breadcrumb`,template:OC,styles:kC,shadowOptions:void 0},{}));let jC=(e,t)=>sr(e,t),MC=(e,t)=>O` ${$l(e,t)}`;var NC=class extends cr{};let PC={separator:`/`};NC.compose(Object.assign({baseName:`breadcrumb-item`,template:jC,styles:MC,shadowOptions:void 0},PC));let FC=(e,t)=>dr(e,t),IC=(e,t)=>O` ${tu(e,t)}`;var LC=class extends nu{};let RC={delegatesFocus:!0,mode:`open`},zC={};LC.compose(Object.assign({baseName:`button`,template:FC,styles:IC,shadowOptions:RC},zC));let BC=()=>O` ${ru}`,VC=(e,t)=>Nr(e,t);var HC=class extends Cr{};let UC={delegatesFocus:!0,mode:`open`},WC={};HC.compose(Object.assign({baseName:`calendar`,template:VC,styles:BC,shadowOptions:UC},WC));let GC=(e,t)=>Pr(e,t),KC=(e,t)=>O` ${iu(e,t)} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;var qC=class extends au{};let JC={};qC.compose(Object.assign({baseName:`card`,template:GC,styles:KC,shadowOptions:void 0},JC));var YC;(function(e){e.BELOW=`below`,e.ABOVE=`above`})(YC||(YC={}));var XC=/* @__PURE__ */ u((/* @__PURE__ */ s(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(x,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function ee(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function x(){var e=m();if(ee(e))return te(e);s=setTimeout(x,b(e))}function te(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function ne(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function S(){return s===void 0?o:te(m())}function C(){var e=m(),n=ee(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(x,t),_(c)}return s===void 0&&(s=setTimeout(x,t)),o}return C.cancel=ne,C.flush=S,C}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h})))());let ZC=O` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${`230`}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var QC;let $C=QC=class extends My{constructor(){super(...arguments),this.emptyDataLabel=`No matching records`,this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=QC.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria=``,this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{e.detail?.open&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{let e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{let t=e.target.value,n=this.options?.find(e=>String(e.label)===t);!n&&this.allowCustomOptions&&this.select instanceof uu?this.select.$emit(`value-change`,{label:t,value:t}):this.select.$emit(`value-change`,n)}}initialSelectedValueChanged(e,t){if(t!==e){if(!t){this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData());return}this.select&&this.getDisplayForValue(t)===String(this.select.value||``)||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData())}}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=this.optionElement??`${Fy(this.select)}-option`,this.select.addEventListener(`change`,this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:QC.defaultPageSize,this.select.addEventListener(`open-change`,this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;x.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||jy.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")`)})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),(e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener(`open-change`,this.selectOpenChangeHandler),this.select.removeEventListener(`change`,this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return J(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{let e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==xg.DATASERVER}catch(e){jy.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e;if(this.isConnected){if((e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=this.select?.scrollableListbox??this.select?.listbox??(this.select?.shadowRoot)?.querySelector(`.listbox`),!this.listboxElement){jy.warn(`Unable to locate listbox element, infinite scroll will not be available.`);return}this.listboxElement.addEventListener(`scroll`,this.listboxScrollHandler)}}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-QC.scrollLoadThresholdPx}loadNextPage(){return J(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;let e=this.datasource.resourceType===xg.REQUEST_SERVER;try{yield this.requestMoreRows()}catch{this.loadingMoreRows=!1;return}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;let e=this.listboxElement;e&&e.clientHeight!==0&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof uu&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return J(this,void 0,void 0,function*(){if(!(yield this.datasource.init(this.datasourceOptions(),!0))){this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:`error`});return}tb(this,this.initialSelectedValue)})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof QC||this.select.removeChild(e)}),this.select.value=``,this.select.initialValue=``)}checkOverflow(e){let t=e.shadowRoot.querySelector(`.content`);t&&(t.scrollWidth>t.clientWidth?e.setAttribute(`title`,e.textContent):e.removeAttribute(`title`))}rowToOption(e){return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{let n=document.createElement(this.optionElement);n.textContent=t||e,n.value=e,this.select.appendChild(n),this.resizeObserver.observe(n)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;let t=e??Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));let e=this.renderedOptionsCount===0;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof uu&&!this.select.async&&e){this.resetCombobox();let e=this.getInitialLabel();x.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof uu&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof uu&&!this.select.async)&&(this.resetCombobox(),x.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){let e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value=``,e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){if(e==null||e!==0&&!e)return``;let t=this.options?.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof uu?String(t?t.label:e):t?String(t.label):``}resetCombobox(){this.select&&this.select instanceof uu&&this.select.resetCombobox()}handleStreamInserts(e){if(this.loadingMoreRows=!1,!e?.length)return;this.removeEmptyDataOption();let t=new Set((this.options??[]).map(e=>String(e.value))),n=e.filter(e=>!t.has(String(e[this.valueField])));if(!n.length){jy.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),this.moreRowsAvailable=!1;return}let r=n.map(e=>this.rowToOption(e));this.options=[...this.options??[],...r],this.renderListboxOptions(r),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){jy.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){jy.debug(`handleStreamUpdates - Method not implemented.`)}};$C.defaultPageSize=20,$C.scrollLoadThresholdPx=32,q([oy],$C.prototype,`resources`,void 0),q([D({attribute:`label-field`})],$C.prototype,`labelField`,void 0),q([D({attribute:`option-element`})],$C.prototype,`optionElement`,void 0),q([D({attribute:`value-field`})],$C.prototype,`valueField`,void 0),q([D({attribute:`empty-data-label`})],$C.prototype,`emptyDataLabel`,void 0),q([D({mode:`boolean`,attribute:`allow-custom-options`})],$C.prototype,`allowCustomOptions`,void 0),q([D({mode:`boolean`,attribute:`infinite-scroll`})],$C.prototype,`infiniteScroll`,void 0),q([D({attribute:`page-size`,converter:E})],$C.prototype,`pageSize`,void 0),q([C],$C.prototype,`labelFormatter`,void 0),q([C],$C.prototype,`labelRowFormatter`,void 0),q([C],$C.prototype,`initialSelectedValue`,void 0),$C=QC=q([$e({name:`options-datasource`})],$C);let ew=class extends My{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=``}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||jy.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")`)})}clearData(){this.select.options=[]}syncComponentData(e){let t=(e??Array.from(this.rowsSyncedWithStream.values())).map(e=>({value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}));this.select?.async&&(this.select.loading=!1),this.select.options=t}handleStreamInserts(e){jy.debug(`handleStreamInserts - Method not implemented.`)}handleStreamDeletes(e){jy.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){jy.debug(`handleStreamUpdates - Method not implemented.`)}};q([D({attribute:`value-field`})],ew.prototype,`valueField`,void 0),q([D({attribute:`label-field`})],ew.prototype,`labelField`,void 0),ew=q([$e({name:`multiselect-datasource`})],ew);let tw=(e=`foundation`)=>T`<label part="label" for="display-field" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot name="label" ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?`true`:`false`}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${k(`filterSearchInput`)}value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${k(`arrowIcon`)}id="arrow-icon" class="${e=>pn([`disabled-svg`,e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${`M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z`}" /></svg></div>${A(e=>e.filterSearchValue&&e.selectedOptions.length,T`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${A(e=>e.loading,T`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>pn(`multiselect-dropdown`,[`resizable`,e.resizable])} ${k(`multiselectDropdown`)}part="multiselect-dropdown">${A(e=>e.resizable,T`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${A(e=>e.all,T`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?`Deselect All`:`Select All`} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>pn(`options-header-item`,[`options-header-item-hidden`,!e.optionsHeaderSlottedNodes?.length])}><slot name="options-header" ${xt({property:`optionsHeaderSlottedNodes`,filter:xa})}></slot></li>${j(e=>e.filteredAvailableOptions,T`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var n;return((n=t.parent)?.itemRenderer)?.call(n,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${A(e=>e.showCreatable,T`<${e}-button @click=${e=>e.addOption()}>Create&nbsp;"${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${xt({property:`slottedDatasource`,filter:e=>e instanceof ew})}></slot>`,Nae=T` ${tw()} `,nw={};var rw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue=``,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=YC.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add(`is-resizing`),document.addEventListener(`mousemove`,this.handleResizeMove),document.addEventListener(`mouseup`,this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();let t=e.clientX-this.startX,n=e.clientY-this.startY,r=Math.max(250,this.startWidth+t),i=Math.max(100,this.startHeight+n);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${r}px`,this.multiselectDropdown.style.maxHeight=`${i}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove(`is-resizing`),this.multiselectDropdown.style.setProperty(`--custom-max-height`,this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty(`max-height`))}}debounceChanged(e,t){this.debouncedInputHandler=(0,XC.default)(this.asyncSetFilter,t)}openChanged(e,t){var n,r,i,a;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.arrowIcon)==null||n.classList.add(`flipped`),(r=this.multiselectDropdown)==null||r.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(i=this.arrowIcon)==null||i.classList.remove(`flipped`),(a=this.multiselectDropdown)==null||a.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.multiselectDropdown)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside),document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd)}defaultItemRenderer(e,t){return T` ${typeof e==`string`?T`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:T`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){if(this.$fastController.isConnected){this.initialisedOptions=!0;return}}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<230&&r>i?YC.ABOVE:YC.BELOW}this.multiselectDropdown.classList.toggle(`position-above`,e===YC.ABOVE),this.multiselectDropdown.classList.toggle(`position-below`,e===YC.BELOW)}optionValueGetter(e){return typeof e==`string`?e:e.value}optionLabelGetter(e){return typeof e==`string`?e:e.label}getItemLabel(e){let t;return e?(t=typeof e==`string`?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||``,this.valueFormatter?this.valueFormatter(t):t):``}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getDisplayValue(){let e=``;switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{let t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){let e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&this.findExactMatchOptions().length===0}isOptionSelected(e){let t=this.optionValueGetter(e);return this.selectedOptions.some(n=>{if(typeof e==`object`&&typeof e.value==`object`)try{return JSON.stringify(n)===JSON.stringify(t)}catch{return n===t}return n===t})}selectCheckboxOne(e){let t=this.optionValueGetter(e);this.selectedOptions=this.selectedOptions.includes(t)?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}checkboxKeyDown(e,t){return t.key===` `&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){let e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){let e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>((typeof t==`string`?t:this.optionLabelGetter(t)??this.optionValueGetter(t))?.toLowerCase()??``)===e)}setFilter(){let e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if(typeof t==`string`)return t.toLowerCase().includes(e);let n=t.label.toLowerCase(),r=typeof t.value==`object`?(t=>Object.values(t).some(t=>t.toLowerCase().includes(e)))(t.value):String(t.value).toLowerCase().includes(e);return n.includes(e)||r})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?eb(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,jy.warn(`Multiselect-datasource is not connected. Please add a datasource to use this functionality.`))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){Ny(e,this)&&(this.open=!1)}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Escape`:if(this.open){this.open=!1;break}break;case`ArrowUp`:case`ArrowDown`:if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){let{clearSelectedValues:t=!0,clearFilterText:n=!0}=e;t&&(this.selectedOptions=[],this.$emit(`selectionChange`,this.selectedOptions)),n&&(this.filterSearchValue=``,this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value=``)),this.$emit(`clear`,{clearSelectedValues:t,clearFilterText:n})}};q([D],rw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],rw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],rw.prototype,`all`,void 0),q([D({mode:`boolean`})],rw.prototype,`allSelected`,void 0),q([D({mode:`boolean`})],rw.prototype,`search`,void 0),q([D({mode:`boolean`})],rw.prototype,`disabled`,void 0),q([D({mode:`boolean`})],rw.prototype,`creatable`,void 0),q([D({mode:`boolean`})],rw.prototype,`async`,void 0),q([D],rw.prototype,`debounce`,void 0),q([D({mode:`boolean`})],rw.prototype,`resizable`,void 0),q([D],rw.prototype,`tabindex`,void 0),q([D({mode:`boolean`,attribute:`filter-by-contains`})],rw.prototype,`filterByContains`,void 0),q([C],rw.prototype,`defaultSlottedNodes`,void 0),q([C],rw.prototype,`slottedDatasource`,void 0),q([C],rw.prototype,`valueFormatter`,void 0),q([C],rw.prototype,`loading`,void 0),q([C],rw.prototype,`filterSearchValue`,void 0),q([C],rw.prototype,`open`,void 0),q([C],rw.prototype,`options`,void 0),q([C],rw.prototype,`selectedOptions`,void 0),q([C],rw.prototype,`filteredAvailableOptions`,void 0),q([C],rw.prototype,`scrollContainer`,void 0),q([D],rw.prototype,`position`,void 0),q([C],rw.prototype,`onAllSelectedCallback`,void 0),q([C],rw.prototype,`itemRenderer`,void 0),q([w],rw.prototype,`getDisplayValue`,null),q([w],rw.prototype,`getPlaceholder`,null),q([w],rw.prototype,`isAllOptionsDisabled`,null),q([w],rw.prototype,`areAllOptionsSelected`,null),q([w],rw.prototype,`showCreatable`,null),q([C],rw.prototype,`optionsHeaderSlottedNodes`,void 0),rw.compose(Object.assign({baseName:`multiselect`,template:Nae,styles:ZC,shadowOptions:void 0},nw));let iw=O` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit) ) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${`450`}px}`,aw=(e=`foundation`)=>T`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${k(`optionsElement`)}class="options" part="options">${A(e=>e.search,T`<${e}-text-field id="filter-search" part="filter-search" value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${j(e=>e.filteredAvailableOptions,T`<span>${e=>e.type}</span>${j(e=>e.options,T`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${A(e=>e.icon||e.svg,T`<div class="icon-container">${A(e=>e.icon,T`<${e}-icon style="color:${e=>e.iconColor||`#fff`}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${A(e=>e.svg,T`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${A(e=>e.description,T`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,Pae=T` ${aw()} `,ow={};var sw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=YC.BELOW}openChanged(e,t){var n,r;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.optionsElement)==null||n.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(r=this.optionsElement)==null||r.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.optionsElement)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){let t=(e??this.options).reduce((e,t)=>{let n=t.type||`Other`;return e[n]?e[n].options.push(t):e[n]={type:n,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains(`content-wrapper`);)t=t.parentElement;if(t){let n=t.getBoundingClientRect(),r=this.getBoundingClientRect(),i=n.top+n.height/2;e=r.top<i?YC.BELOW:YC.ABOVE}else{let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<t.height&&r>i?YC.ABOVE:YC.BELOW}}e===YC.ABOVE?(this.optionsElement.classList.add(`position-above`),this.optionsElement.classList.remove(`position-below`)):e===YC.BELOW&&(this.optionsElement.classList.add(`position-below`),this.optionsElement.classList.remove(`position-above`))}optionGetter(e){return e.value}getItemLabel(e){let t;if(e)t=e.label||e.value||``;else return``;return this.valueFormatter?this.valueFormatter(t):t}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){let t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}setFilter(){let e=this.options.filter(e=>{let t=e.description,n=e.label??e.value;if(t?.toLowerCase().includes(this.filterSearchValue.toLowerCase())||n.toLowerCase().includes(this.filterSearchValue.toLowerCase()))return e});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){Ny(e,this)&&(this.open=!1)}};q([D],sw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],sw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],sw.prototype,`search`,void 0),q([D({mode:`boolean`})],sw.prototype,`disabled`,void 0),q([C],sw.prototype,`defaultSlottedNodes`,void 0),q([C],sw.prototype,`valueFormatter`,void 0),q([C],sw.prototype,`filterSearchValue`,void 0),q([C],sw.prototype,`open`,void 0),q([C],sw.prototype,`options`,void 0),q([C],sw.prototype,`selectedOptions`,void 0),q([C],sw.prototype,`filteredAvailableOptions`,void 0),q([C],sw.prototype,`position`,void 0),q([w],sw.prototype,`getPlaceholder`,null),sw.compose(Object.assign({baseName:`categorized-multiselect`,template:Pae,styles:iw,shadowOptions:void 0},ow));let cw=(e,t)=>Ir(e,t),lw=(e,t)=>O` ${ou(e,t)}`;var uw=class extends Lr{};let dw={checkedIndicator:`
253
+ Install model </${e}-button>`)}</div>`)}</div>`)} `,rC=T` ${e=>Aae(Fy(e))} `;var iC=class extends P{constructor(){super(...arguments),this.status=null,this.open=!1,this.state=`none`,this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){return this.providerRegistry?.default()}get chromeStatusLabel(){if(this.status?.provider!==`chrome`)return null;let e=this.status?.chromeAvailability;return e===`available`?`Installed`:e===`downloading`||this.isInstalling?`Downloading…`:e===`downloadable`?`Downloadable`:e===`unavailable`?`Unavailable`:null}get canInstall(){return!!this.aiProvider?.triggerDownload&&this.status?.provider===`chrome`&&this.status?.chromeAvailability===`downloadable`&&!this.isInstalling}get isDownloading(){return this.status?.chromeAvailability===`downloading`||this.isInstalling}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener(`mousedown`,this.clickOutside)}openChanged(){this.open?(document.addEventListener(`mousedown`,this.clickOutside),this.refreshStatus()):document.removeEventListener(`mousedown`,this.clickOutside)}handleClickOutside(e){Ny(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return J(this,void 0,void 0,function*(){if(!this.aiProvider?.getStatus){this.status=null,this.state=`none`;return}try{let e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),this.state===`available`&&(this.isInstalling=!1)}catch{this.status=null,this.state=`none`,this.isInstalling=!1}})}deriveState(e){if(!e||e.provider===`none`)return`none`;if(e.provider===`chrome`){let t=e.chromeAvailability;return t===`available`?`available`:t===`downloading`?`downloading`:t===`downloadable`?`downloadable`:`unavailable`}return`server`}maybeStartPolling(){this.status?.chromeAvailability===`downloading`||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return J(this,void 0,void 0,function*(){if(this.canInstall&&this.aiProvider?.triggerDownload){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch{this.isInstalling=!1}finally{yield this.refreshStatus()}}})}};q([yS],iC.prototype,`providerRegistry`,void 0),q([C],iC.prototype,`status`,void 0),q([C],iC.prototype,`open`,void 0),q([C],iC.prototype,`state`,void 0),q([C],iC.prototype,`isInstalling`,void 0),q([w],iC.prototype,`chromeStatusLabel`,null),q([w],iC.prototype,`canInstall`,null),q([w],iC.prototype,`isDownloading`,null),iC.compose({baseName:`ai-indicator`,template:rC,styles:nC});let aC=(e,t)=>Un(e,t),oC=(e,t)=>O` ${ql(e,t)}`;var sC=class extends Jl{};let cC={delegatesFocus:!0,mode:`open`},lC={};sC.compose(Object.assign({baseName:`anchor`,template:aC,styles:oC,shadowOptions:cC},lC));let uC=(e,t)=>qn(e,t),dC=(e,t)=>O` ${Yl(e,t)}`;var fC=class extends Yn{};let pC={delegatesFocus:!0,mode:`open`},mC={};fC.compose(Object.assign({baseName:`anchored-region`,template:uC,styles:dC,shadowOptions:pC},mC));let hC=(e,t)=>rr(e,t),jae=T` ${A(e=>e.imgSrc,T`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,gC=(e,t)=>O` ${Xl(e,t)}`;var _C=class extends Zl{};let vC={delegatesFocus:!0,mode:`open`},yC={media:jae};_C.compose(Object.assign({baseName:`avatar`,template:hC,styles:gC,shadowOptions:vC},yC));let bC=(e,t)=>ar(e,t),xC=(e,t)=>O` ${Ql(e,t)}`;var SC=class extends or{};let CC={};SC.compose(Object.assign({baseName:`badge`,template:bC,styles:xC,shadowOptions:void 0},CC));let wC=O` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,Mae=e=>T`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${k(`banner`)}><div part="content" class="content"><slot name="content">${A(e=>e.notification,T`<div><div>${e=>e.notification?.body||`Place holder for notification message`}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${A(e=>e.notification,T`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>e.notification?.config?.banner?.dismissingAction?.label||`Ignore`}</${e}-button>`)} ${j(e=>(e.notification?.config)?.banner.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`,TC=T` ${e=>Mae(Fy(e))} `,EC={mode:`open`,delegatesFocus:!0};var DC=class extends P{constructor(){super(...arguments),this.dismissAnimation=``}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation=`banner-delete`,new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return J(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){jy.error(e)}})}};q([C],DC.prototype,`dismissAnimation`,void 0),q([C],DC.prototype,`notification`,void 0),DC.compose({baseName:`banner`,styles:wC,template:TC,shadowOptions:EC});let OC=(e,t)=>lr(e,t),kC=(e,t)=>O` ${eu(e,t)}`;var AC=class extends ur{};AC.compose(Object.assign({baseName:`breadcrumb`,template:OC,styles:kC,shadowOptions:void 0},{}));let jC=(e,t)=>sr(e,t),MC=(e,t)=>O` ${$l(e,t)}`;var NC=class extends cr{};let PC={separator:`/`};NC.compose(Object.assign({baseName:`breadcrumb-item`,template:jC,styles:MC,shadowOptions:void 0},PC));let FC=(e,t)=>dr(e,t),IC=(e,t)=>O` ${tu(e,t)}`;var LC=class extends nu{};let RC={delegatesFocus:!0,mode:`open`},zC={};LC.compose(Object.assign({baseName:`button`,template:FC,styles:IC,shadowOptions:RC},zC));let BC=()=>O` ${ru}`,VC=(e,t)=>Nr(e,t);var HC=class extends Cr{};let UC={delegatesFocus:!0,mode:`open`},WC={};HC.compose(Object.assign({baseName:`calendar`,template:VC,styles:BC,shadowOptions:UC},WC));let GC=(e,t)=>Pr(e,t),KC=(e,t)=>O` ${iu(e,t)} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;var qC=class extends au{};let JC={};qC.compose(Object.assign({baseName:`card`,template:GC,styles:KC,shadowOptions:void 0},JC));var YC;(function(e){e.BELOW=`below`,e.ABOVE=`above`})(YC||(YC={}));var XC=/* @__PURE__ */ u((/* @__PURE__ */ s(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(x,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function ee(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function x(){var e=m();if(ee(e))return te(e);s=setTimeout(x,b(e))}function te(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function ne(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function S(){return s===void 0?o:te(m())}function C(){var e=m(),n=ee(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(x,t),_(c)}return s===void 0&&(s=setTimeout(x,t)),o}return C.cancel=ne,C.flush=S,C}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h})))());let ZC=O` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${`230`}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var QC;let $C=QC=class extends My{constructor(){super(...arguments),this.emptyDataLabel=`No matching records`,this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=QC.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria=``,this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{e.detail?.open&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{let e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{let t=e.target.value,n=this.options?.find(e=>String(e.label)===t);!n&&this.allowCustomOptions&&this.select instanceof uu?this.select.$emit(`value-change`,{label:t,value:t}):this.select.$emit(`value-change`,n)}}initialSelectedValueChanged(e,t){if(t!==e){if(!t){this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData());return}this.select&&this.getDisplayForValue(t)===String(this.select.value||``)||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData())}}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=this.optionElement??`${Fy(this.select)}-option`,this.select.addEventListener(`change`,this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:QC.defaultPageSize,this.select.addEventListener(`open-change`,this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;x.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||jy.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")`)})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),(e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener(`open-change`,this.selectOpenChangeHandler),this.select.removeEventListener(`change`,this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return J(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{let e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==xg.DATASERVER}catch(e){jy.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e;if(this.isConnected){if((e=this.listboxElement)==null||e.removeEventListener(`scroll`,this.listboxScrollHandler),this.listboxElement=this.select?.scrollableListbox??this.select?.listbox??(this.select?.shadowRoot)?.querySelector(`.listbox`),!this.listboxElement){jy.warn(`Unable to locate listbox element, infinite scroll will not be available.`);return}this.listboxElement.addEventListener(`scroll`,this.listboxScrollHandler)}}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-QC.scrollLoadThresholdPx}loadNextPage(){return J(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;let e=this.datasource.resourceType===xg.REQUEST_SERVER;try{yield this.requestMoreRows()}catch{this.loadingMoreRows=!1;return}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;let e=this.listboxElement;e&&e.clientHeight!==0&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof uu&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return J(this,void 0,void 0,function*(){if(!(yield this.datasource.init(this.datasourceOptions(),!0))){this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:`error`});return}tb(this,this.initialSelectedValue)})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof QC||this.select.removeChild(e)}),this.select.value=``,this.select.initialValue=``)}checkOverflow(e){let t=e.shadowRoot.querySelector(`.content`);t&&(t.scrollWidth>t.clientWidth?e.setAttribute(`title`,e.textContent):e.removeAttribute(`title`))}rowToOption(e){return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{let n=document.createElement(this.optionElement);n.textContent=t||e,n.value=e,this.select.appendChild(n),this.resizeObserver.observe(n)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;let t=e??Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));let e=this.renderedOptionsCount===0;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof uu&&!this.select.async&&e){this.resetCombobox();let e=this.getInitialLabel();x.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof uu&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof uu&&!this.select.async)&&(this.resetCombobox(),x.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){let e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value=``,e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){if(e==null||e!==0&&!e)return``;let t=this.options?.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof uu?String(t?t.label:e):t?String(t.label):``}resetCombobox(){this.select&&this.select instanceof uu&&this.select.resetCombobox()}handleStreamInserts(e){if(this.loadingMoreRows=!1,!e?.length)return;this.removeEmptyDataOption();let t=new Set((this.options??[]).map(e=>String(e.value))),n=e.filter(e=>!t.has(String(e[this.valueField])));if(!n.length){jy.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),this.moreRowsAvailable=!1;return}let r=n.map(e=>this.rowToOption(e));this.options=[...this.options??[],...r],this.renderListboxOptions(r),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){jy.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){jy.debug(`handleStreamUpdates - Method not implemented.`)}};$C.defaultPageSize=20,$C.scrollLoadThresholdPx=32,q([oy],$C.prototype,`resources`,void 0),q([D({attribute:`label-field`})],$C.prototype,`labelField`,void 0),q([D({attribute:`option-element`})],$C.prototype,`optionElement`,void 0),q([D({attribute:`value-field`})],$C.prototype,`valueField`,void 0),q([D({attribute:`empty-data-label`})],$C.prototype,`emptyDataLabel`,void 0),q([D({mode:`boolean`,attribute:`allow-custom-options`})],$C.prototype,`allowCustomOptions`,void 0),q([D({mode:`boolean`,attribute:`infinite-scroll`})],$C.prototype,`infiniteScroll`,void 0),q([D({attribute:`page-size`,converter:E})],$C.prototype,`pageSize`,void 0),q([C],$C.prototype,`labelFormatter`,void 0),q([C],$C.prototype,`labelRowFormatter`,void 0),q([C],$C.prototype,`initialSelectedValue`,void 0),$C=QC=q([$e({name:`options-datasource`})],$C);let ew=class extends My{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=``}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?this.valueField?.concat(` `,this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||jy.warn(`Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")`)})}clearData(){this.select.options=[]}syncComponentData(e){let t=(e??Array.from(this.rowsSyncedWithStream.values())).map(e=>({value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],this.getFieldMetadata(this.labelField)?.type)}));this.select?.async&&(this.select.loading=!1),this.select.options=t}handleStreamInserts(e){jy.debug(`handleStreamInserts - Method not implemented.`)}handleStreamDeletes(e){jy.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){jy.debug(`handleStreamUpdates - Method not implemented.`)}};q([D({attribute:`value-field`})],ew.prototype,`valueField`,void 0),q([D({attribute:`label-field`})],ew.prototype,`labelField`,void 0),ew=q([$e({name:`multiselect-datasource`})],ew);let tw=(e=`foundation`)=>T`<label part="label" for="display-field" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot name="label" ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?`true`:`false`}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${k(`filterSearchInput`)}value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${k(`arrowIcon`)}id="arrow-icon" class="${e=>pn([`disabled-svg`,e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${`M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z`}" /></svg></div>${A(e=>e.filterSearchValue&&e.selectedOptions.length,T`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${A(e=>e.loading,T`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>pn(`multiselect-dropdown`,[`resizable`,e.resizable])} ${k(`multiselectDropdown`)}part="multiselect-dropdown">${A(e=>e.resizable,T`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${A(e=>e.all,T`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?`Deselect All`:`Select All`} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>pn(`options-header-item`,[`options-header-item-hidden`,!e.optionsHeaderSlottedNodes?.length])}><slot name="options-header" ${xt({property:`optionsHeaderSlottedNodes`,filter:xa})}></slot></li>${j(e=>e.filteredAvailableOptions,T`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var n;return((n=t.parent)?.itemRenderer)?.call(n,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${A(e=>e.showCreatable,T`<${e}-button @click=${e=>e.addOption()}>Create&nbsp;"${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${xt({property:`slottedDatasource`,filter:e=>e instanceof ew})}></slot>`,Nae=T` ${tw()} `,nw={};var rw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue=``,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=YC.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add(`is-resizing`),document.addEventListener(`mousemove`,this.handleResizeMove),document.addEventListener(`mouseup`,this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();let t=e.clientX-this.startX,n=e.clientY-this.startY,r=Math.max(250,this.startWidth+t),i=Math.max(100,this.startHeight+n);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${r}px`,this.multiselectDropdown.style.maxHeight=`${i}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove(`is-resizing`),this.multiselectDropdown.style.setProperty(`--custom-max-height`,this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty(`max-height`))}}debounceChanged(e,t){this.debouncedInputHandler=(0,XC.default)(this.asyncSetFilter,t)}openChanged(e,t){var n,r,i,a;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.arrowIcon)==null||n.classList.add(`flipped`),(r=this.multiselectDropdown)==null||r.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(i=this.arrowIcon)==null||i.classList.remove(`flipped`),(a=this.multiselectDropdown)==null||a.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.multiselectDropdown)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside),document.removeEventListener(`mousemove`,this.handleResizeMove),document.removeEventListener(`mouseup`,this.handleResizeEnd)}defaultItemRenderer(e,t){return T` ${typeof e==`string`?T`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:T`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){if(this.$fastController.isConnected){this.initialisedOptions=!0;return}}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<230&&r>i?YC.ABOVE:YC.BELOW}this.multiselectDropdown.classList.toggle(`position-above`,e===YC.ABOVE),this.multiselectDropdown.classList.toggle(`position-below`,e===YC.BELOW)}optionValueGetter(e){return typeof e==`string`?e:e.value}optionLabelGetter(e){return typeof e==`string`?e:e.label}getItemLabel(e){let t;return e?(t=typeof e==`string`?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||``,this.valueFormatter?this.valueFormatter(t):t):``}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getDisplayValue(){let e=``;switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{let t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){let e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&this.findExactMatchOptions().length===0}isOptionSelected(e){let t=this.optionValueGetter(e);return this.selectedOptions.some(n=>{if(typeof e==`object`&&typeof e.value==`object`)try{return JSON.stringify(n)===JSON.stringify(t)}catch{return n===t}return n===t})}selectCheckboxOne(e){let t=this.optionValueGetter(e);this.selectedOptions=this.selectedOptions.includes(t)?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}checkboxKeyDown(e,t){return t.key===` `&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){let e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){let e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>((typeof t==`string`?t:this.optionLabelGetter(t)??this.optionValueGetter(t))?.toLowerCase()??``)===e)}setFilter(){let e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if(typeof t==`string`)return t.toLowerCase().includes(e);let n=t.label.toLowerCase(),r=typeof t.value==`object`?(t=>Object.values(t).some(t=>t.toLowerCase().includes(e)))(t.value):String(t.value).toLowerCase().includes(e);return n.includes(e)||r})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?eb(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,jy.warn(`Multiselect-datasource is not connected. Please add a datasource to use this functionality.`))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){Ny(e,this)&&(this.open=!1)}keydownHandler(e){let t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case`Escape`:if(this.open){this.open=!1;break}break;case`ArrowUp`:case`ArrowDown`:if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){let{clearSelectedValues:t=!0,clearFilterText:n=!0}=e;t&&(this.selectedOptions=[],this.$emit(`selectionChange`,this.selectedOptions)),n&&(this.filterSearchValue=``,this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value=``)),this.$emit(`clear`,{clearSelectedValues:t,clearFilterText:n})}};q([D],rw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],rw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],rw.prototype,`all`,void 0),q([D({mode:`boolean`})],rw.prototype,`allSelected`,void 0),q([D({mode:`boolean`})],rw.prototype,`search`,void 0),q([D({mode:`boolean`})],rw.prototype,`disabled`,void 0),q([D({mode:`boolean`})],rw.prototype,`creatable`,void 0),q([D({mode:`boolean`})],rw.prototype,`async`,void 0),q([D],rw.prototype,`debounce`,void 0),q([D({mode:`boolean`})],rw.prototype,`resizable`,void 0),q([D],rw.prototype,`tabindex`,void 0),q([D({mode:`boolean`,attribute:`filter-by-contains`})],rw.prototype,`filterByContains`,void 0),q([C],rw.prototype,`defaultSlottedNodes`,void 0),q([C],rw.prototype,`slottedDatasource`,void 0),q([C],rw.prototype,`valueFormatter`,void 0),q([C],rw.prototype,`loading`,void 0),q([C],rw.prototype,`filterSearchValue`,void 0),q([C],rw.prototype,`open`,void 0),q([C],rw.prototype,`options`,void 0),q([C],rw.prototype,`selectedOptions`,void 0),q([C],rw.prototype,`filteredAvailableOptions`,void 0),q([C],rw.prototype,`scrollContainer`,void 0),q([D],rw.prototype,`position`,void 0),q([C],rw.prototype,`onAllSelectedCallback`,void 0),q([C],rw.prototype,`itemRenderer`,void 0),q([w],rw.prototype,`getDisplayValue`,null),q([w],rw.prototype,`getPlaceholder`,null),q([w],rw.prototype,`isAllOptionsDisabled`,null),q([w],rw.prototype,`areAllOptionsSelected`,null),q([w],rw.prototype,`showCreatable`,null),q([C],rw.prototype,`optionsHeaderSlottedNodes`,void 0),rw.compose(Object.assign({baseName:`multiselect`,template:Nae,styles:ZC,shadowOptions:void 0},nw));let iw=O` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ((var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit)) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${`450`}px}`,aw=(e=`foundation`)=>T`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${k(`optionsElement`)}class="options" part="options">${A(e=>e.search,T`<${e}-text-field id="filter-search" part="filter-search" value=${Af(e=>e.filterSearchValue,`string`,`input`)}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${j(e=>e.filteredAvailableOptions,T`<span>${e=>e.type}</span>${j(e=>e.options,T`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${A(e=>e.icon||e.svg,T`<div class="icon-container">${A(e=>e.icon,T`<${e}-icon style="color:${e=>e.iconColor||`#fff`}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${A(e=>e.svg,T`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${A(e=>e.description,T`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,Pae=T` ${aw()} `,ow={};var sw=class extends P{constructor(){super(...arguments),this.name=``,this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=YC.BELOW}openChanged(e,t){var n,r;t?(document.addEventListener(`mousedown`,this.clickOutside),(n=this.optionsElement)==null||n.classList.add(`visible`)):(document.removeEventListener(`mousedown`,this.clickOutside),(r=this.optionsElement)==null||r.classList.remove(`visible`))}connectedCallback(){var e;super.connectedCallback(),this.position===YC.ABOVE&&((e=this.optionsElement)==null||e.classList.add(`position-above`))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`mousedown`,this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){let t=(e??this.options).reduce((e,t)=>{let n=t.type||`Other`;return e[n]?e[n].options.push(t):e[n]={type:n,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains(`content-wrapper`);)t=t.parentElement;if(t){let n=t.getBoundingClientRect(),r=this.getBoundingClientRect(),i=n.top+n.height/2;e=r.top<i?YC.BELOW:YC.ABOVE}else{let t=this.getBoundingClientRect(),n=window.innerHeight,r=t.top,i=n-t.bottom;e=i<t.height&&r>i?YC.ABOVE:YC.BELOW}}e===YC.ABOVE?(this.optionsElement.classList.add(`position-above`),this.optionsElement.classList.remove(`position-below`)):e===YC.BELOW&&(this.optionsElement.classList.add(`position-below`),this.optionsElement.classList.remove(`position-above`))}optionGetter(e){return e.value}getItemLabel(e){let t;if(e)t=e.label||e.value||``;else return``;return this.valueFormatter?this.valueFormatter(t):t}isOptionDisabled(e){return!e||typeof e==`string`?!1:e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat(`...`)}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){let t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit(`selectionChange`,this.selectedOptions)}setFilter(){let e=this.options.filter(e=>{let t=e.description,n=e.label??e.value;if(t?.toLowerCase().includes(this.filterSearchValue.toLowerCase())||n.toLowerCase().includes(this.filterSearchValue.toLowerCase()))return e});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){Ny(e,this)&&(this.open=!1)}};q([D],sw.prototype,`name`,void 0),q([D({mode:`boolean`,attribute:`auto-position`})],sw.prototype,`autoPosition`,void 0),q([D({mode:`boolean`})],sw.prototype,`search`,void 0),q([D({mode:`boolean`})],sw.prototype,`disabled`,void 0),q([C],sw.prototype,`defaultSlottedNodes`,void 0),q([C],sw.prototype,`valueFormatter`,void 0),q([C],sw.prototype,`filterSearchValue`,void 0),q([C],sw.prototype,`open`,void 0),q([C],sw.prototype,`options`,void 0),q([C],sw.prototype,`selectedOptions`,void 0),q([C],sw.prototype,`filteredAvailableOptions`,void 0),q([C],sw.prototype,`position`,void 0),q([w],sw.prototype,`getPlaceholder`,null),sw.compose(Object.assign({baseName:`categorized-multiselect`,template:Pae,styles:iw,shadowOptions:void 0},ow));let cw=(e,t)=>Ir(e,t),lw=(e,t)=>O` ${ou(e,t)}`;var uw=class extends Lr{};let dw={checkedIndicator:`
254
254
  <svg
255
255
  aria-hidden="true"
256
256
  part="checked-indicator"
@@ -882,9 +882,9 @@ let iF={prefix:`fas`,iconName:`0`,icon:[320,512,[],`30`,`M0 192C0 103.6 71.6 32
882
882
  <path d="M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z " fill-rule="nonzero" fill="${t}" stroke="none" transform="matrix(1 0 0 1 1865 3576 )" />
883
883
  </g>
884
884
  </svg>
885
- `,jje=(e,t,n)=>O` /* Host */ :host{display: flex;flex-direction: column;width: 100%;height: 100%;position: relative}.file-reader{display: flex;align-items: end;justify-content: start;position: relative}.file-reader > *:not(.processing-overlay){margin: 0}.file-reader > *:not(.processing-overlay):not(:last-child){margin-right: calc(var(--design-unit) * 2px)}input[type='file']{display: none}.file-name-input{flex: 1}.clear-icon{cursor: pointer}.processing-overlay{position: absolute;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0 0 0 / 20%);display: flex;flex-direction: column;align-items: center;justify-content: center;z-index: 2}`,Mje=(e,t)=>O` ${jje(`foundation`,e,t)}`,Nje=e=>T`<template><div class="file-reader">${A(e=>e.isProcessing,T`<div class="processing-overlay" part="processing-overlay"><${e}-progress-ring class="processing-spinner"></${e}-progress-ring></div>`)}<input type="file" ${k(`fileInput`)}@change=${(e,t)=>e.onInputChange(t.event)}:accept="${e=>e.accept}"/><${e}-text-field readOnly type="text" id="fileName" class="file-name-input" :value="${e=>e.fileName}" part="file-name-input">${e=>e.label} ${A(e=>e.fileName,T`<${e}-icon slot="end" class="clear-icon" name="xmark" part="clear-icon" @click=${e=>e.clearSelection()}></${e}-icon>`)}</${e}-text-field><${e}-button @click=${e=>e.handleClick()}part="select-file-button">
885
+ `,jje=(e,t,n)=>O` /* Host */ :host{display: flex;flex-direction: column;width: 100%;height: 100%;position: relative}.file-reader{display: flex;align-items: end;justify-content: start;position: relative}.file-reader > *:not(.processing-overlay){margin: 0}.file-reader > *:not(.processing-overlay):not(:last-child){margin-right: calc(var(--design-unit) * 2px)}input[type='file']{display: none}.file-name-input{flex: 1}.clear-icon{cursor: pointer}.processing-overlay{position: absolute;inset: 0;background-color: rgba(0 0 0 / 20%);display: flex;flex-direction: column;align-items: center;justify-content: center;z-index: 2}`,Mje=(e,t)=>O` ${jje(`foundation`,e,t)}`,Nje=e=>T`<template><div class="file-reader">${A(e=>e.isProcessing,T`<div class="processing-overlay" part="processing-overlay"><${e}-progress-ring class="processing-spinner"></${e}-progress-ring></div>`)}<input type="file" ${k(`fileInput`)}@change=${(e,t)=>e.onInputChange(t.event)}:accept="${e=>e.accept}"/><${e}-text-field readOnly type="text" id="fileName" class="file-name-input" :value="${e=>e.fileName}" part="file-name-input">${e=>e.label} ${A(e=>e.fileName,T`<${e}-icon slot="end" class="clear-icon" name="xmark" part="clear-icon" @click=${e=>e.clearSelection()}></${e}-icon>`)}</${e}-text-field><${e}-button @click=${e=>e.handleClick()}part="select-file-button">
886
886
  Browse </${e}-button>${A(e=>e.fileName&&!e.autoProcess,T`<${e}-button @click=${e=>e.handleFileProcessing()}part="process-file-button" :disabled="${e=>!e.fileName}">Process file</${e}-button>`)}</div></template>`,Pje=T` ${e=>Nje(Fy(e))} `;var Q0=class extends X0{constructor(){super(),this.processingTimeout=null,this.autoProcess=!1,this.processingDelayMs=1e3,this.fileContent=null,this.accept=`.json,application/json`}onFileSelected(e){let t=e[0];if(t&&this.accept.includes(`json`)&&!((t?.name)?.toLowerCase())?.endsWith(`.json`)){let e=`Selected file is not a JSON file`;this.showError(`File Type Error`,e),this.$emit(`error`,/* @__PURE__ */ Error(e));return}this.selectedFile=t,this.fileName=t.name,this.autoProcess&&this.handleFileProcessing()}onFileCleared(){this.fileContent=null,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}handleFileProcessing(){return J(this,void 0,void 0,function*(){var e;if(!this.getSelectedFile()){this.showError(`No File Selected`,`Please select a file to process`);return}this.processingTimeout&&clearTimeout(this.processingTimeout),this.isProcessing=!0;try{let t=yield this.getSelectedFile().text(),n;try{n=JSON.parse(t)}catch(e){this.showError(`Invalid JSON Format`,`The selected file contains invalid JSON`),this.$emit(`error`,e);return}this.fileContent=n,this.$emit(`file-read`,{fileName:this.fileName,content:this.fileContent,file:this.getSelectedFile()}),(e=this.onFileRead)==null||e.call(this,this.fileContent)}catch(e){this.showError(`File Processing Error`,`An error occurred while processing the file`),this.$emit(`error`,e)}finally{this.processingTimeout=window.setTimeout(()=>{this.isProcessing=!1,this.processingTimeout=null},this.processingDelayMs)}})}getFileContent(){return this.fileContent}disconnectedCallback(){super.disconnectedCallback(),this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}};q([D({attribute:`auto-process`,mode:`boolean`})],Q0.prototype,`autoProcess`,void 0),q([D({attribute:`processing-delay-ms`})],Q0.prototype,`processingDelayMs`,void 0),q([C],Q0.prototype,`fileContent`,void 0),q([C],Q0.prototype,`onFileRead`,void 0),Q0.compose({baseName:`file-reader`,styles:Mje,template:Pje});let $0=O` /* Host */ :host{display: flex;flex-direction: column;width: 100%;height: 100%}.file-selection{display: flex;align-items: end;justify-content: start;padding-bottom: 10px}.file-selection :nth-last-child(-n + 2){margin: 0;margin-left: 10px}input[type='file']{display: none}.clear-icon{cursor: pointer}.uploader-grid{overflow-y: auto}.file-name-input{flex: 1}.download-button-container{display: flex}.download-button{height: 22px}fast-data-grid-row{align-items: center}`,e2=e=>T`<template><div class="file-selection"><input type="file" multiple ${k(`fileInput`)}@change=${(e,t)=>e.onInputChange(t.event)}:accept="${e=>e.accept}"/><${e}-text-field readOnly type="text" id="fileName" part="file-name-input" class="file-name-input" :label="${e=>e.label}" :value="${e=>e.fileName}">${e=>e.label} ${A(e=>e.fileName,T`<${e}-icon slot="end" class="clear-icon" name="xmark" @click=${e=>e.clearSelection()}></${e}-icon>`)}</${e}-text-field><${e}-button @click=${e=>e.handleClick()}part="select-file-button">Browse</${e}-button><${e}-button @click=${e=>e.handleFileUpload()}part="upload-file-button" :disabled="${e=>!e.fileName}">Upload</${e}-button></div><div class="uploader-grid"><${e}-data-grid generate-header="sticky" part="uploaded-files-grid" :rowsData="${e=>e.uploadedFilesList}" :columnDefinitions="${e=>e.filesGridColumnDefinitions}"></${e}-data-grid></div></template>`,Fje=T` ${e=>e2(Fy(e))} `,Ije=e=>{let t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Lje=(e,t,n,r)=>{let i=new Headers;return i.append(`SESSION_AUTH_TOKEN`,n),r.post(e,{body:t,headers:i})},Rje=(e,t,n,r=`GET`,i,a,o=`zero`)=>{let s=new Headers;s.append(`SESSION_AUTH_TOKEN`,n),fetch(e,{method:r,body:a,headers:s,credentials:`include`}).then(e=>J(void 0,void 0,void 0,function*(){if(e.ok)return e.blob();{let t=yield e.json();i&&QS({title:t?.MESSAGE_TYPE,body:t?.DETAILS?.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:`warning`}}},o),jy.error(t||`An error occurred while downloading the file.`)}})).then(e=>{if(e){let n=window.URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),i&&QS({title:`Success`,body:`File downloaded successfully`,config:{toast:{autoClose:!0,closeTimeout:5e3,type:`success`}}},o),jy.info(`File downloaded successfully`)}}).catch(e=>{jy.error(e)})},zje=[`image/png`,`image/bmp`,`image/gif`,`image/jpeg`,`image/jpg`],Bje=[`text/plain`,`text/csv`],Vje=[`application/vnd.ms-excel`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/vnd.ms-powerpoint`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`,`application/msword`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/pdf`],Hje=T` ${A(e=>e.rowData,T` ${e=>e.columnDefinition.type===`DATETIME`?Xf(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]} `)} `;var t2=class extends X0{constructor(){super(...arguments),this.acceptedFormats=[],this.selectedFiles=[],this.uploadedFilesResourceName=`ALL_FILE_ATTACHMENTS`,this.uploadEventName=`gwf/attachment-handler/upload`,this.gridFields=``,this.fileName=``,this.uploadedFilesList=[],this.filesGridColumnDefinitions=[]}acceptChanged(){let e=[];this.accept.length>0&&this.accept.split(`,`).forEach(t=>{t===`image/*`?e=[...e,...zje]:t===`office/*`?e=[...e,...Vje]:t===`text/*`?e=[...e,...Bje]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.filesGridColumnDefinitions?.length||this.setColumnDefs()})}setupGrid(){this.entityId!==void 0&&this.fieldName!==void 0&&(this.gridCriteria=new Xy().withExpression(new Zy().withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(let n of e.ROW)if(n.DETAILS)switch(n.DETAILS.OPERATION){case`INSERT`:this.uploadedFilesList.unshift(n);break;case`MODIFY`:t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===n.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,n);break;case`DELETE`:t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===n.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Y.error(`Unsupported operation type: ${n.DETAILS.OPERATION}`)}}setRowData(){return J(this,void 0,void 0,function*(){yield this.connect.stream(this.uploadedFilesResourceName,e=>{e.SEQUENCE_ID===1?this.uploadedFilesList=e.ROW??[]:this.handleStreamRowOperation(e)},e=>{Y.error(e)},{CRITERIA_MATCH:this.gridCriteria})})}setColumnDefs(){return J(this,void 0,void 0,function*(){var e;let t=yield this.connect.getMetadata(this.uploadedFilesResourceName),n=[];this.gridFields.length>0?this.gridFields.split(` `).forEach(e=>{let r=t.FIELD?.find(t=>t.NAME===e);r?n.push(this.getColumnObject(r)):e===`DOWNLOAD`&&this.downloadEventName&&n.push(this.getDownloadColumn())}):((e=t.FIELD)==null||e.forEach(e=>{n.push(this.getColumnObject(e))}),this.downloadEventName&&n.push(this.getDownloadColumn())),this.filesGridColumnDefinitions=n})}getDownloadColumn(){let e=this.tagName.toLowerCase().split(`-`)[0];return{columnDataKey:`FILE_NAME`,title:`File`,cellTemplate:T`<template><div class="download-button-container"><${e}-button class="download-button" @click="${e=>this.handleFileDownload(e.rowData)}">
887
- DOWNLOAD </${e}-button></div></template>`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),type:e.TYPE,cellTemplate:Hje}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){let t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0){for(let e of t)if(!(this.accept.split(`,`).includes(`.msg`)&&e.name&&e.name.endsWith(`msg`))&&!this.acceptedFormats.includes(e.type)){this.showError(`File Type Error`,`Not a valid file type. Accepted Formats are ${this.accept}`);return}}this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit(`file-selected`,{files:this.selectedFiles})}onFileCleared(){this.fileName=``,this.selectedFiles=[]}handleFileUpload(){return J(this,void 0,void 0,function*(){try{let e=Ije(this.selectedFiles);e.append(this.uploadKey,this.entityId);let t=yield Lje(this.uploadEventName,e,this.session.getItem(`authToken`,`session`),this.http);if(t.ERROR){Y.error(t.ERROR),this.$emit(`errorOut`,t.ERROR);return}Y.info(t),this.$emit(`success`,t),this.clearSelection()}catch(e){this.$emit(`errorOut`,e),Y.error(e)}})}handleFileDownload(e){let t=this.tagName.toLowerCase().split(`-`)[0];Rje(this.downloadEventName(e),e.FILE_NAME,this.session.getItem(`authToken`,`session`),`GET`,!0,void 0,t)}};q([C],t2.prototype,`gridCriteria`,void 0),q([hv],t2.prototype,`connect`,void 0),q([Ng],t2.prototype,`http`,void 0),q([jg],t2.prototype,`session`,void 0),q([D({attribute:`uploaded-files-resource-name`})],t2.prototype,`uploadedFilesResourceName`,void 0),q([D({attribute:`upload-event-name`})],t2.prototype,`uploadEventName`,void 0),q([D({attribute:`field-name`})],t2.prototype,`fieldName`,void 0),q([D({attribute:`entity-id`})],t2.prototype,`entityId`,void 0),q([D({attribute:`upload-key`})],t2.prototype,`uploadKey`,void 0),q([D({attribute:`grid-fields`})],t2.prototype,`gridFields`,void 0),q([C],t2.prototype,`fileName`,void 0),q([C],t2.prototype,`uploadedFilesList`,void 0),q([C],t2.prototype,`filesGridColumnDefinitions`,void 0);let n2={};t2.compose(Object.assign({baseName:`file-upload`,styles:$0,template:Fje,shadowOptions:void 0},n2));let r2=O` .filter-wrapper{border: 1px solid gray;border-radius: calc(var(--design-unit) * 2px);padding: calc(var(--design-unit) * 1px)}.close-icon{display: flex;place-content: center;align-items: center;flex-direction: column;align-content: center;justify-content: center;margin: calc(var(--design-unit) * 1px);padding: calc(var(--design-unit) * 1px);border: 1px solid transparent;border-radius: calc(var(--design-unit) * 2px);cursor: pointer}.close-icon, .cloase-icon svg path{transition-property: all;transition-timing-function: linear;transition-duration: 300ms}.close-icon:hover{border-color: red;background: rgb(255 0 0 / 25%)}.close-icon:hover svg path{fill: red}.flex-row{display: flex;flex-direction: row;align-content: center;justify-content: space-between;align-items: center}.flex-row zero-text-field, .flex-row zero-select, .flex-row foundation-text-field, .flex-row foundation-select{flex: 1}`,i2=T`<div class="close-icon" @click=${e=>e.clear()}>${Aje()}</div>`,Uje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-text-field ${k(`textFilterField`)}type="text" :value=${Af(e=>e.textFilter)}/></div>`,Wje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-text-field ${k(`numFilterFieldMin`)}type="number" :value=${Af(e=>e.numFilterMin)}placeholder="min"></${e}-text-field><${e}-text-field ${k(`numFilterFieldMax`)}type="number" :value=${Af(e=>e.numFilterMax)}placeholder="max"></${e}-text-field></div>`,Gje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-text-field ${k(`dateFilterFieldMin`)}type="date" :value=${Af(e=>e.dateFilterMin)}></${e}-text-field><${e}-text-field ${k(`dateFilterFieldMax`)}type="date" :value=${Af(e=>e.dateFilterMax)}></${e}-text-field></div>`;function a2(e){return e?.event?.target?.value??`all`}let Kje=[{name:`All`,value:`all`,selected:!0},{name:`True`,value:`true`},{name:`False`,value:`false`},{name:`N/A`,value:`null`}],qje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(a2(t))}}">${j(()=>Kje,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,Jje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onEnumFilterSelection(a2(t))}}">${j(e=>e.enumFilterOptions,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,Yje=(e,t)=>{switch(e.type){case`number`:return Wje(t);case`date`:return Gje(t);case`boolean`:return qje(t);case`enum`:return Jje(t);default:return Uje(t)}},o2=e=>T`<div class="filter-wrapper">${t=>Yje(t,e)}</div>`,Xje=T` ${e=>o2(Fy(e))}</div>`;var s2;(function(e){e.change=`filter-changed`,e.clear=`filter-cleared`})(s2||(s2={}));var c2=class extends P{constructor(){super(...arguments),this.type=`text`,this.textFilter=``,this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0}]}textFilterChanged(e,t){if(!t?.length){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}let n=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(s2.change,{fieldName:this.fieldName,filter:n,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}let n=`${this.fieldName} >= ${e}`,r=`${this.fieldName} <= ${t}`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(s2.change,{fieldName:this.fieldName,filter:i,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,``).replace(`T`,`-`)}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(s2.clear,{fieldName:this.fieldName});return}let n=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,r=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(s2.change,{fieldName:this.fieldName,filter:i,target:this.target})}connectedCallback(){if(super.connectedCallback(),this.enumOptions?.length){let e=this.enumOptions.includes(`|`)?`|`:`,`,t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0},...t]}}clear(){switch(this.type){case`number`:this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case`date`:this.dateFilterFieldMin.value=``,this.dateFilterFieldMax.value=``,this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case`text`:this.textFilterField.value=``}this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){if(!e||e===`all`){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(s2.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target})}onEnumFilterSelection(e){if(!e||e===`all`){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(s2.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target})}};q([D],c2.prototype,`fieldName`,void 0),q([D],c2.prototype,`type`,void 0),q([D],c2.prototype,`label`,void 0),q([D],c2.prototype,`target`,void 0),q([C],c2.prototype,`textFilter`,void 0),q([C],c2.prototype,`numFilterMin`,void 0),q([C],c2.prototype,`numFilterMax`,void 0),q([C],c2.prototype,`dateFilterMin`,void 0),q([C],c2.prototype,`dateFilterMax`,void 0),q([D],c2.prototype,`enumOptions`,void 0),q([C],c2.prototype,`enumFilterOptions`,void 0),c2.compose({baseName:`filter`,template:Xje,styles:r2});let l2=(e,t)=>O` .filter-bar{background-color: #2c2f33;padding: calc(var(--design-unit) * 2px);transition: all 0.5s ease-out}.filter-grid{display: grid;grid-template-columns: repeat(3, 1fr);grid-auto-rows: minmax(64px, auto);gap: calc(var(--design-unit) * 1px);align-items: end;justify-items: stretch}.toggle{display: flex;justify-content: center;min-height: 20px;cursor: pointer;border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0 0;border-top: 2px solid;color: #f44378}.collapsed{max-height: 0;padding: 0;overflow: hidden}.toggle-collapsed{color: #48ed9c}`,Zje=e=>{switch(e){case`INT`:case`DOUBLE`:case`LONG`:return`number`;case`DATETIME`:return`date`;case`BOOLEAN`:return`boolean`;case`ENUM`:return`enum`;default:return`text`}},Qje=T`<p>Fetching metadata for ${e=>e.resource}...</p>`,$je=e=>T` ${A(e=>e.collapsed,T`<${e}-icon name="chevron-up"></${e}-icon>`)} ${A(e=>!e.collapsed,T`<${e}-icon name="chevron-down"></${e}-icon>`)} `,u2=e=>T`<div class=${e=>pn([`toggle`,!0],[`toggle-collapsed`,e.collapsed])}@click="${e=>e.toggle()}">${$je(e)}</div><div class=${e=>pn([`filter-bar`,!0],[`collapsed`,e.collapsed])}><div class="filter-grid" ${k(`filterGrid`)}>${j(e=>e.fields,T`<${e}-filter label="${e=>e.UI_LABEL}" target="${(e,t)=>t.parent?.target}" type="${e=>Zje(e.TYPE)}" fieldName="${e=>e.NAME}" enumOptions="${e=>e.VALID_VALUES}"></${e}-filter>`)}</div></div>`,eMe=T` ${e=>e.ready?u2(Fy(e)):Qje} `;var d2=class extends P{constructor(){super(...arguments),this.columns=5,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){let e=!1,t=[];(this===null||this===void 0?void 0:this.labels)?.length&&(t=this.labels.split(`,`)?.map(e=>e.trim()),e=this.fields?.length===t?.length);for(let n=0;n<(this.fields?.length||0);n+=1){let r=e?t[n]:this.camelCasePreserveWhitespace(this.fields[n].NAME.replace(/_/g,` `));this.fields[n].UI_LABEL=r}}camelCasePreserveWhitespace(e){return e.split(` `).map(e=>zn(e)).join(` `)}resourceChanged(e,t){e!==t&&e?.length&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{if(this.fields=e.FIELD,this.only?.length){let e=this.only.split(`,`).map(e=>e.trim()),t=(t,n)=>e.indexOf(t.NAME)>e.indexOf(n.NAME)?1:-1;this.fields=this.fields?.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>jy.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style[`grid-template-columns`]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}};q([D],d2.prototype,`resource`,void 0),q([D],d2.prototype,`only`,void 0),q([D],d2.prototype,`labels`,void 0),q([D],d2.prototype,`target`,void 0),q([D],d2.prototype,`columns`,void 0),q([C],d2.prototype,`ready`,void 0),q([C],d2.prototype,`fields`,void 0),q([hv],d2.prototype,`connect`,void 0),q([C],d2.prototype,`collapsed`,void 0),d2.compose({baseName:`filter-bar`,template:eMe,styles:l2});let tMe=T`<template><slot></slot></template>`;var f2;(function(e){e.sm=`(max-width: 640px)`,e.md=`(min-width: 641px) and (max-width: 1023px)`,e.lg=`(min-width: 1024px)`})(f2||(f2={}));let p2=e=>{let t=e?`-${e}`:``;return O` ${t&&`@media only screen and ${f2[e]} {`} :host(.spacing${t}-1x) slot{gap: calc(var(--design-unit) * 2px)}:host(.spacing${t}-2x) slot{gap: calc(var(--design-unit) * 4px)}:host(.spacing${t}-3x) slot{gap: calc(var(--design-unit) * 6px)}:host(.spacing${t}-4x) slot{gap: calc(var(--design-unit) * 8px)}:host(.spacing${t}-5x) slot{gap: calc(var(--design-unit) * 10px)}:host(.spacing${t}-6x) slot{gap: calc(var(--design-unit) * 12px)}:host(.flex${t}-column) slot{flex-direction: column}:host(.flex${t}-column-reverse) slot{flex-direction: column-reverse}:host(.flex${t}-row) slot{flex-direction: row}:host(.flex${t}-row-reverse) slot{flex-direction: row-reverse}:host(.flex${t}-wrap) slot{flex-wrap: wrap}:host(.flex${t}-wrap-reverse) slot{flex-wrap: wrap-reverse}:host(.justify${t}-start) slot{justify-content: flex-start}:host(.justify${t}-end) slot{justify-content: flex-end}:host(.justify${t}-center) slot{justify-content: center}:host(.justify${t}-between) slot{justify-content: space-between}:host(.justify${t}-around) slot{justify-content: space-around}:host(.justify${t}-evenly) slot{justify-content: space-evenly}:host(.items${t}-start) slot{align-items: flex-start}:host(.items${t}-end) slot{align-items: flex-end}:host(.items${t}-center) slot{align-items: center}:host(.items${t}-stretch) slot{align-items: stretch}:host(.items${t}-baseline) slot{align-items: baseline}:host(.content${t}-start) slot{align-content: flex-start}:host(.content${t}-end) slot{align-content: flex-end}:host(.content${t}-center) slot{align-content: center}:host(.content${t}-between) slot{align-content: space-between}:host(.content${t}-around) slot{align-content: space-around}:host(.content${t}-evenly) slot{align-content: space-evenly}${t&&`}`} `},nMe=O` :host{width: 100%;height: 100%}slot{width: 100%;height: 100%;display: flex}${p2()} ${p2(`lg`)} ${p2(`md`)} ${p2(`sm`)}`;(class extends P{}).compose(Object.assign({baseName:`flex-layout`,styles:nMe,template:tMe,shadowOptions:void 0},{}));let m2=(e,t)=>Ji(e,t),h2=(e,t)=>O` ${yu(e,t)}`;var g2=class extends Yi{};let _2={next:`
887
+ DOWNLOAD </${e}-button></div></template>`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),type:e.TYPE,cellTemplate:Hje}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){let t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0){for(let e of t)if(!(this.accept.split(`,`).includes(`.msg`)&&e.name&&e.name.endsWith(`msg`))&&!this.acceptedFormats.includes(e.type)){this.showError(`File Type Error`,`Not a valid file type. Accepted Formats are ${this.accept}`);return}}this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit(`file-selected`,{files:this.selectedFiles})}onFileCleared(){this.fileName=``,this.selectedFiles=[]}handleFileUpload(){return J(this,void 0,void 0,function*(){try{let e=Ije(this.selectedFiles);e.append(this.uploadKey,this.entityId);let t=yield Lje(this.uploadEventName,e,this.session.getItem(`authToken`,`session`),this.http);if(t.ERROR){Y.error(t.ERROR),this.$emit(`errorOut`,t.ERROR);return}Y.info(t),this.$emit(`success`,t),this.clearSelection()}catch(e){this.$emit(`errorOut`,e),Y.error(e)}})}handleFileDownload(e){let t=this.tagName.toLowerCase().split(`-`)[0];Rje(this.downloadEventName(e),e.FILE_NAME,this.session.getItem(`authToken`,`session`),`GET`,!0,void 0,t)}};q([C],t2.prototype,`gridCriteria`,void 0),q([hv],t2.prototype,`connect`,void 0),q([Ng],t2.prototype,`http`,void 0),q([jg],t2.prototype,`session`,void 0),q([D({attribute:`uploaded-files-resource-name`})],t2.prototype,`uploadedFilesResourceName`,void 0),q([D({attribute:`upload-event-name`})],t2.prototype,`uploadEventName`,void 0),q([D({attribute:`field-name`})],t2.prototype,`fieldName`,void 0),q([D({attribute:`entity-id`})],t2.prototype,`entityId`,void 0),q([D({attribute:`upload-key`})],t2.prototype,`uploadKey`,void 0),q([D({attribute:`grid-fields`})],t2.prototype,`gridFields`,void 0),q([C],t2.prototype,`fileName`,void 0),q([C],t2.prototype,`uploadedFilesList`,void 0),q([C],t2.prototype,`filesGridColumnDefinitions`,void 0);let n2={};t2.compose(Object.assign({baseName:`file-upload`,styles:$0,template:Fje,shadowOptions:void 0},n2));let r2=O` .filter-wrapper{border: 1px solid gray;border-radius: calc(var(--design-unit) * 2px);padding: calc(var(--design-unit) * 1px)}.close-icon{display: flex;place-content: center;align-items: center;flex-direction: column;margin: calc(var(--design-unit) * 1px);padding: calc(var(--design-unit) * 1px);border: 1px solid transparent;border-radius: calc(var(--design-unit) * 2px);cursor: pointer}.close-icon, .cloase-icon svg path{transition-property: all;transition-timing-function: linear;transition-duration: 300ms}.close-icon:hover{border-color: red;background: rgb(255 0 0 / 25%)}.close-icon:hover svg path{fill: red}.flex-row{display: flex;flex-direction: row;place-content: center space-between;align-items: center}.flex-row zero-text-field, .flex-row zero-select, .flex-row foundation-text-field, .flex-row foundation-select{flex: 1}`,i2=T`<div class="close-icon" @click=${e=>e.clear()}>${Aje()}</div>`,Uje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-text-field ${k(`textFilterField`)}type="text" :value=${Af(e=>e.textFilter)}/></div>`,Wje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-text-field ${k(`numFilterFieldMin`)}type="number" :value=${Af(e=>e.numFilterMin)}placeholder="min"></${e}-text-field><${e}-text-field ${k(`numFilterFieldMax`)}type="number" :value=${Af(e=>e.numFilterMax)}placeholder="max"></${e}-text-field></div>`,Gje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-text-field ${k(`dateFilterFieldMin`)}type="date" :value=${Af(e=>e.dateFilterMin)}></${e}-text-field><${e}-text-field ${k(`dateFilterFieldMax`)}type="date" :value=${Af(e=>e.dateFilterMax)}></${e}-text-field></div>`;function a2(e){return e?.event?.target?.value??`all`}let Kje=[{name:`All`,value:`all`,selected:!0},{name:`True`,value:`true`},{name:`False`,value:`false`},{name:`N/A`,value:`null`}],qje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(a2(t))}}">${j(()=>Kje,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,Jje=e=>T`<div class="flex-row"><div>${e=>e.label}</div>${i2}</div><div class="flex-row"><${e}-select @change="${(e,t)=>e.onEnumFilterSelection(a2(t))}}">${j(e=>e.enumFilterOptions,T`<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">${e=>e.name}</${e}-option>`)}</${e}-select></div>`,Yje=(e,t)=>{switch(e.type){case`number`:return Wje(t);case`date`:return Gje(t);case`boolean`:return qje(t);case`enum`:return Jje(t);default:return Uje(t)}},o2=e=>T`<div class="filter-wrapper">${t=>Yje(t,e)}</div>`,Xje=T` ${e=>o2(Fy(e))}</div>`;var s2;(function(e){e.change=`filter-changed`,e.clear=`filter-cleared`})(s2||(s2={}));var c2=class extends P{constructor(){super(...arguments),this.type=`text`,this.textFilter=``,this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0}]}textFilterChanged(e,t){if(!t?.length){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}let n=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(s2.change,{fieldName:this.fieldName,filter:n,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}let n=`${this.fieldName} >= ${e}`,r=`${this.fieldName} <= ${t}`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(s2.change,{fieldName:this.fieldName,filter:i,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,``).replace(`T`,`-`)}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t)){this.$emit(s2.clear,{fieldName:this.fieldName});return}let n=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,r=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,i=Number.isFinite(e)?Number.isFinite(t)?`(${n} && ${r})`:n:r;this.$emit(s2.change,{fieldName:this.fieldName,filter:i,target:this.target})}connectedCallback(){if(super.connectedCallback(),this.enumOptions?.length){let e=this.enumOptions.includes(`|`)?`|`:`,`,t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:`All`,value:`all`,selected:!0},...t]}}clear(){switch(this.type){case`number`:this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case`date`:this.dateFilterFieldMin.value=``,this.dateFilterFieldMax.value=``,this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case`text`:this.textFilterField.value=``}this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){if(!e||e===`all`){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(s2.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target})}onEnumFilterSelection(e){if(!e||e===`all`){this.$emit(s2.clear,{fieldName:this.fieldName,target:this.target});return}this.$emit(s2.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target})}};q([D],c2.prototype,`fieldName`,void 0),q([D],c2.prototype,`type`,void 0),q([D],c2.prototype,`label`,void 0),q([D],c2.prototype,`target`,void 0),q([C],c2.prototype,`textFilter`,void 0),q([C],c2.prototype,`numFilterMin`,void 0),q([C],c2.prototype,`numFilterMax`,void 0),q([C],c2.prototype,`dateFilterMin`,void 0),q([C],c2.prototype,`dateFilterMax`,void 0),q([D],c2.prototype,`enumOptions`,void 0),q([C],c2.prototype,`enumFilterOptions`,void 0),c2.compose({baseName:`filter`,template:Xje,styles:r2});let l2=(e,t)=>O` .filter-bar{background-color: #2c2f33;padding: calc(var(--design-unit) * 2px);transition: all 0.5s ease-out}.filter-grid{display: grid;grid-template-columns: repeat(3, 1fr);grid-auto-rows: minmax(64px, auto);gap: calc(var(--design-unit) * 1px);place-items: end stretch}.toggle{display: flex;justify-content: center;min-height: 20px;cursor: pointer;border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0 0;border-top: 2px solid;color: #f44378}.collapsed{max-height: 0;padding: 0;overflow: hidden}.toggle-collapsed{color: #48ed9c}`,Zje=e=>{switch(e){case`INT`:case`DOUBLE`:case`LONG`:return`number`;case`DATETIME`:return`date`;case`BOOLEAN`:return`boolean`;case`ENUM`:return`enum`;default:return`text`}},Qje=T`<p>Fetching metadata for ${e=>e.resource}...</p>`,$je=e=>T` ${A(e=>e.collapsed,T`<${e}-icon name="chevron-up"></${e}-icon>`)} ${A(e=>!e.collapsed,T`<${e}-icon name="chevron-down"></${e}-icon>`)} `,u2=e=>T`<div class=${e=>pn([`toggle`,!0],[`toggle-collapsed`,e.collapsed])}@click="${e=>e.toggle()}">${$je(e)}</div><div class=${e=>pn([`filter-bar`,!0],[`collapsed`,e.collapsed])}><div class="filter-grid" ${k(`filterGrid`)}>${j(e=>e.fields,T`<${e}-filter label="${e=>e.UI_LABEL}" target="${(e,t)=>t.parent?.target}" type="${e=>Zje(e.TYPE)}" fieldName="${e=>e.NAME}" enumOptions="${e=>e.VALID_VALUES}"></${e}-filter>`)}</div></div>`,eMe=T` ${e=>e.ready?u2(Fy(e)):Qje} `;var d2=class extends P{constructor(){super(...arguments),this.columns=5,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){let e=!1,t=[];(this===null||this===void 0?void 0:this.labels)?.length&&(t=this.labels.split(`,`)?.map(e=>e.trim()),e=this.fields?.length===t?.length);for(let n=0;n<(this.fields?.length||0);n+=1){let r=e?t[n]:this.camelCasePreserveWhitespace(this.fields[n].NAME.replace(/_/g,` `));this.fields[n].UI_LABEL=r}}camelCasePreserveWhitespace(e){return e.split(` `).map(e=>zn(e)).join(` `)}resourceChanged(e,t){e!==t&&e?.length&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{if(this.fields=e.FIELD,this.only?.length){let e=this.only.split(`,`).map(e=>e.trim()),t=(t,n)=>e.indexOf(t.NAME)>e.indexOf(n.NAME)?1:-1;this.fields=this.fields?.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>jy.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style[`grid-template-columns`]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}};q([D],d2.prototype,`resource`,void 0),q([D],d2.prototype,`only`,void 0),q([D],d2.prototype,`labels`,void 0),q([D],d2.prototype,`target`,void 0),q([D],d2.prototype,`columns`,void 0),q([C],d2.prototype,`ready`,void 0),q([C],d2.prototype,`fields`,void 0),q([hv],d2.prototype,`connect`,void 0),q([C],d2.prototype,`collapsed`,void 0),d2.compose({baseName:`filter-bar`,template:eMe,styles:l2});let tMe=T`<template><slot></slot></template>`;var f2;(function(e){e.sm=`(max-width: 640px)`,e.md=`(min-width: 641px) and (max-width: 1023px)`,e.lg=`(min-width: 1024px)`})(f2||(f2={}));let p2=e=>{let t=e?`-${e}`:``;return O` ${t&&`@media only screen and ${f2[e]} {`} :host(.spacing${t}-1x) slot{gap: calc(var(--design-unit) * 2px)}:host(.spacing${t}-2x) slot{gap: calc(var(--design-unit) * 4px)}:host(.spacing${t}-3x) slot{gap: calc(var(--design-unit) * 6px)}:host(.spacing${t}-4x) slot{gap: calc(var(--design-unit) * 8px)}:host(.spacing${t}-5x) slot{gap: calc(var(--design-unit) * 10px)}:host(.spacing${t}-6x) slot{gap: calc(var(--design-unit) * 12px)}:host(.flex${t}-column) slot{flex-direction: column}:host(.flex${t}-column-reverse) slot{flex-direction: column-reverse}:host(.flex${t}-row) slot{flex-direction: row}:host(.flex${t}-row-reverse) slot{flex-direction: row-reverse}:host(.flex${t}-wrap) slot{flex-wrap: wrap}:host(.flex${t}-wrap-reverse) slot{flex-wrap: wrap-reverse}:host(.justify${t}-start) slot{justify-content: flex-start}:host(.justify${t}-end) slot{justify-content: flex-end}:host(.justify${t}-center) slot{justify-content: center}:host(.justify${t}-between) slot{justify-content: space-between}:host(.justify${t}-around) slot{justify-content: space-around}:host(.justify${t}-evenly) slot{justify-content: space-evenly}:host(.items${t}-start) slot{align-items: flex-start}:host(.items${t}-end) slot{align-items: flex-end}:host(.items${t}-center) slot{align-items: center}:host(.items${t}-stretch) slot{align-items: stretch}:host(.items${t}-baseline) slot{align-items: baseline}:host(.content${t}-start) slot{align-content: flex-start}:host(.content${t}-end) slot{align-content: flex-end}:host(.content${t}-center) slot{align-content: center}:host(.content${t}-between) slot{align-content: space-between}:host(.content${t}-around) slot{align-content: space-around}:host(.content${t}-evenly) slot{align-content: space-evenly}${t&&`}`} `},nMe=O` :host{width: 100%;height: 100%}slot{width: 100%;height: 100%;display: flex}${p2()} ${p2(`lg`)} ${p2(`md`)} ${p2(`sm`)}`;(class extends P{}).compose(Object.assign({baseName:`flex-layout`,styles:nMe,template:tMe,shadowOptions:void 0},{}));let m2=(e,t)=>Ji(e,t),h2=(e,t)=>O` ${yu(e,t)}`;var g2=class extends Yi{};let _2={next:`
888
888
  <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
889
889
  <path
890
890
  d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"
@@ -973,7 +973,7 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
973
973
  <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>
974
974
  </ul>
975
975
  `,t)}</label><${t}-select data-test-id="hourly-during-select" :value=${Af(()=>n.during)}@change="${()=>n.handleDuringChange()}"><${t}-option value="every_hour">Interval</${t}-option><${t}-option value="specific_hours">Selected Hours</${t}-option></${t}-select></div>${A(()=>n.during===`every_hour`,p6(t,n,`Every`))} ${A(()=>n.isSpecificHours,T`<div class="break"></div><div class="input-container"><label class="label">
976
- Hours ${nb(s6,t)}</label><${t}-multiselect class="time-select" data-test-id="hours-multiselect" name="Hours" :options=${()=>n.hourOptions}:selectedOptions=${()=>n.selectedHours}@selectionChange="${(e,t)=>n.handleHoursChange(t.event)}"></${t}-multiselect></div>`)} ${m6(t,n,!1,!0)}</div>`;case Q.DAILY:return T` ${uPe(t,n)}<div class="row">${p6(t,n,`Every`)} ${m6(t,n,!0,!0)}</div>`;case Q.WEEKLY:return T`<div class="row">${dPe(t,n)} ${m6(t,n,!0,!0)}</div>`;case Q.MONTHLY:return T`<div class="row">${p6(t,n,`Every`)} ${m6(t,n,!0,!0)}</div>${f6(t,n)} `;case Q.YEARLY:return T`<div class="row">${m6(t,n,!0,!0)}</div>${f6(t,n)} `;default:return T``}},h6=e=>T`<template><div class="container"><div class="input-container"><label class="label">Recurrence ${A(e=>!e.disableTooltips,T` ${t=>nb(QNe(!t.minMinuteInterval||t.minMinuteInterval<30),e)} `)}</label><${e}-select data-test-id="select-recurrence" :value=${Af(e=>e.recurrence)}@change="${e=>e.handleRecurrenceChange()}">${A(e=>e.isMinutesRecurrenceEnabled,T`<${e}-option data-test-id="${Q.MINUTES}">${Q.MINUTES}</${e}-option>`)}<${e}-option data-test-id="${Q.HOURLY}">${Q.HOURLY}</${e}-option><${e}-option data-test-id="${Q.DAILY}">${Q.DAILY}</${e}-option><${e}-option data-test-id="${Q.WEEKLY}">${Q.WEEKLY}</${e}-option><${e}-option data-test-id="${Q.MONTHLY}">${Q.MONTHLY}</${e}-option><${e}-option data-test-id="${Q.YEARLY}">${Q.YEARLY}</${e}-option></${e}-select></div>${j(e=>[`${e.recurrence}-${e.during}`],T` ${(t,n)=>fPe(n.parent.recurrence,e,n.parent)} `,{recycle:!1})}</div></template>`,pPe=T` ${e=>h6(Fy(e))} `;var g6=class extends P{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:WNe,buildConfigForHourlyRecurrence:UNe,buildConfigForDailyRecurrence:HNe,buildConfigForWeeklyRecurrence:GNe,buildConfigForMonthlyRecurrence:qNe,buildConfigForYearlyRecurrence:KNe},this.recurrence=Q.DAILY,this.cron=``,this.value=this.cron,this.cronConfig={type:Q.DAILY,weekType:X3.WEEK,hours:`0`,minutes:`0`,seconds:`0`},this.frequency=`1`,this.during=`every_hour`,this.hours=`0`,this.minutes=`0`,this.seconds=`0`,this.disableTooltips=!1,this.timezone=``}cronChanged(){if(this.cron)try{if(!VNe(this.cron)){YS({title:`Cron Scheduler`,body:`Invalid Cron Expression`,toast:{type:`critical`}},Fy(this));return}this.setsFieldsFromCronEx()}catch(e){console.error(`Error:`,e),YS({title:`Cron Scheduler`,body:e,toast:{type:`critical`}},Fy(this));return}}get duringOptions(){return[{label:`Every hour`,value:`every_hour`},{label:`Specific hours`,value:`specific_hours`}]}get frequencySuffix(){switch(this.cronConfig.type){case Q.MINUTES:return`Minute(s)`;case Q.HOURLY:return`Hour(s)`;case Q.DAILY:return`Day(s)`;case Q.MONTHLY:return`Month(s)`;default:return``}}get frequencyList(){switch(this.cronConfig.type){case Q.MINUTES:let e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Q.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Q.DAILY:return Array.from({length:31},(e,t)=>t+1);case Q.MONTHLY:return Array.from({length:12},(e,t)=>t+1);case Q.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Q.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return!this.hours||this.hours===`*`||this.hours===`0`?this.hours===`*`?this.hourOptions.map(e=>e.value):[this.hours]:this.hours.split(`,`)}handleHoursChange(e){let t=e.detail;t.length===24?(this.hours=`*`,this.frequency=`1`,this.cronConfig.frequency=`1`):this.hours=!t||t.length===0?`0`:t.sort((e,t)=>Number(e)-Number(t)).join(`,`),this.handleChange(`hours`)}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return this.during===`specific_hours`}get isDailyFrequencyDisabled(){return this.cronConfig.type===Q.DAILY&&this.cronConfig.weekType===X3.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn(`Minimum minute interval has no effect on schedules with an hourly or longer recurrance`)}connectedCallback(){super.connectedCallback(),this.addEventListener($3.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener($3.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Q.MINUTES:let e=this.getBaseConfigFields(),{minutes:t}=e,n=md(e,[`minutes`]);this.during=`every_hour`,this.hours=`*`;let r=[1,2,3,4,5,6,10,12,15,20,30],i=this.minMinuteInterval?Number(this.minMinuteInterval):1,a=r.find(e=>e>=i)||1;this.cronConfig=Object.assign(Object.assign({type:Q.MINUTES},n),{frequency:a.toString(),during:`every_hour`,hours:`*`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.HOURLY:let o=this.getBaseConfigFields(),{hours:s}=o,c=md(o,[`hours`]);this.during=`every_hour`,this.hours=`0`,this.cronConfig=Object.assign(Object.assign({type:Q.HOURLY},c),{frequency:`1`,during:`every_hour`,hours:`0`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.DAILY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.DAILY},this.getBaseConfigFields()),{frequency:`1`,weekType:X3.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.WEEKLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.WEEKLY},this.getBaseConfigFields()),{frequency:`1`,selectedDays:/* @__PURE__ */ new Set([`2`])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.MONTHLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.MONTHLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:Z3.DATE,dayDate:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.YEARLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.YEARLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:Z3.DATE,dayDate:`1`,month:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Fy(this))}}handleChange(e){if(e===`frequency`&&Number(this.frequency)===0)throw Error(`Frequency must be greater than 0`);this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){this.during===`every_hour`?this.hours=`*`:this.hours===`*`&&(this.hours=`0`),(this.cronConfig.type===Q.MINUTES||this.cronConfig.type===Q.HOURLY)&&(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Q.MINUTES:this.cron=FNe(e);break;case Q.HOURLY:this.cron=PNe(e);break;case Q.DAILY:this.cron=INe(e,e6);break;case Q.WEEKLY:this.cron=LNe(e);break;case Q.MONTHLY:this.cron=RNe(e,e6);break;case Q.YEARLY:this.cron=zNe(e);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Fy(this))}this.value=this.cron,this.$emit(`change`)}setsFieldsFromCronEx(){this.cronConfig=JNe(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;let e=this.cronConfig;`minutes`in e&&(this.minutes=e.minutes),(e.type===Q.MINUTES||e.type===Q.HOURLY)&&(this.during=e.during||`every_hour`,e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Q.HOURLY&&e.type!==Q.MINUTES&&(this.hours=e.hours)}};q([C],g6.prototype,`recurrence`,void 0),q([C],g6.prototype,`cron`,void 0),q([C],g6.prototype,`cronConfig`,void 0),q([C],g6.prototype,`frequency`,void 0),q([C],g6.prototype,`during`,void 0),q([w],g6.prototype,`duringOptions`,null),q([C],g6.prototype,`hours`,void 0),q([C],g6.prototype,`minutes`,void 0),q([C],g6.prototype,`seconds`,void 0),q([w],g6.prototype,`frequencySuffix`,null),q([w],g6.prototype,`frequencyList`,null),q([w],g6.prototype,`hourOptions`,null),q([w],g6.prototype,`selectedHours`,null),q([D({attribute:`min-minute-interval`})],g6.prototype,`minMinuteInterval`,void 0),q([D({mode:`boolean`,attribute:`disable-tooltips`})],g6.prototype,`disableTooltips`,void 0),q([w],g6.prototype,`isMinutesRecurrenceEnabled`,null),q([w],g6.prototype,`isSpecificHours`,null),q([w],g6.prototype,`isDailyFrequencyDisabled`,null),q([D],g6.prototype,`timezone`,void 0);let _6={};g6.compose(Object.assign({baseName:`scheduler-cron-builder`,styles:i6,template:pPe,shadowOptions:void 0},_6));let v6=O` /* Host */ :host{display: flex;flex-direction: column;width: 100%}.container{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);display: flex;flex-direction: column;gap: calc(var(--design-unit) * 2px)}.label{color: var(--neutral-foreground-hint);display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal}.timezone-combobox::part(listbox){max-height: 20vh}`,y6=e=>T`<template><div class="container"><label class="label">Time Zone</label><${e}-combobox data-test-id="cron-scheduler-timezone" autocomplete="both" class="timezone-combobox" value="${Af(e=>e.timezone)}">${j(e=>e.timeZones,T`<${e}-option value="${e=>e}">${e=>e}</${e}-option>`)}</${e}-combobox></div></template>`,mPe=T` ${e=>y6(Fy(e))} `;var b6=class extends P{constructor(){super(...arguments),this.timezone=``,this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit(`change`)}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return J(this,void 0,void 0,function*(){let e=[`Europe/London`,`America/New_York`];try{let t=yield this.connect.request(`VALID_TIME_ZONE`,{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw Error(`Invalid data returned for Timezones`);this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,n)=>e.includes(t)&&!e.includes(n)?-1:!e.includes(t)&&e.includes(n)?1:t.localeCompare(n))}catch(e){YS({title:`Cron Scheduler`,body:`Unable to fetch timezones data.`,toast:{type:`critical`}},`rapid`),Y.error(e)}})}};q([C],b6.prototype,`timezone`,void 0),q([hv],b6.prototype,`connect`,void 0),q([C],b6.prototype,`timeZones`,void 0);let x6={};b6.compose(Object.assign({baseName:`scheduler-timezone`,styles:v6,template:mPe,shadowOptions:void 0},x6));let S6=O` .search-bar-combobox{width: 100%;min-width: auto}.padding{padding-left: calc(${B} * 1px)}.selected-options{display: flex;align-items: center;overflow: hidden;gap: calc(${B} * 1px);padding-right: calc(${B} * 1px)}.selected-options:hover{overflow-x: overlay}.selected-options::-webkit-scrollbar{height: 7px}.selected-options::-webkit-scrollbar-thumb{border-radius: 10px;box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);background-color: #484848;border: 1px solid #7e7e7e}.selected-options-divider{border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}.options-button{height: fit-content;min-width: fit-content}.label{display: block;font-size: var(--type-ramp-base-font-size);margin: calc(${B} * 2px) 2px}.label-hidden{display: none}.search-clear-button{min-width: 28px;min-height: 28px;height: 28px;margin: 0}.search-clear-button svg{rotate: 45deg}.search-clear-button::part(control){padding: 0}.search-clear-button .svg-container{display: flex;align-items: center;justify-content: center}.close-icon{color: var(--accent-fill-rest)}`,C6=e=>T`<label part="label" for="control" data-test-id="label" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-search-bar-combobox ${k(`combobox`)}position="${e=>e.position}" placeholder=${e=>e.placeholder}disabled=${e=>e.disabled}:inputLocked="${e=>e.allSearchFieldsUsed}" autocomplete="none" minlength=${e=>e.minlength}@inputdeleted=${e=>e.inputdeleted()}@change=${e=>e.changeHandler()}@input=${e=>e.inputHandler()}@paste=${(e,t)=>e.pasteHandler(t.event)}class="search-bar-combobox ${e=>e.selectedOptions.length>0?`padding`:null}" data-test-id="search-bar"><div ${k(`selectedOptionsDiv`)}slot="selectedOptions" class="selected-options ${e=>e.selectedOptions.length>0?`selected-options-divider`:null}">${j(e=>e.selectedOptions,T`<${e}-button class="options-button" appearance=${(e,t)=>t.parent.appearance}disabled=${(e,t)=>t.parent.disabled}@click=${(e,t)=>t.parent.unselectOption(e)}>${e=>e.label}<${e}-icon class="close-icon" slot="end" name="circle-xmark" variant="regular"></${e}-icon></${e}-button>`)}</div>${j(e=>e.filteredOptions,T`<${e}-option value="${e=>e.field}" :disabled=${(e,t)=>!t.parent.isOptionEnabled(e)}>${(e,t)=>e.label(t.parent.searchTerm)}</${e}-option>`)} ${A(e=>e.showClearAffordance,T`<${e}-button class="search-clear-button" @click=${e=>e.clearSearch()}slot="end" data-test-id="clear-search" aria-label="Clear search terms" title="Clear search terms"><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="26px" height="26px" class="bi bi-plus" viewBox="0 0 16 16"><path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /></svg></div></${e}-button>`)}</${e}-search-bar-combobox>`,hPe=T` ${e=>C6(Fy(e))} `;var w6=class extends P{constructor(){super(...arguments),this.searchTerm=``,this.appearance=`neutral`,this.minlength=3,this.position=YC.BELOW,this.placeholder=`Start typing to search`,this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g,` `),this.addOrReplaceSelectedText=(e,t,n)=>t?.length>0?e.replace(t,n):e.concat(n)}clear(){this.selectedOptions=[],this.searchTerm=``,this.combobox&&(this.combobox.currentValue=``,this.combobox.value=``),this.$emit(`selectionChange`,[])}clearSearch(){this.clear()}get showClearAffordance(){if(!this.clearButton)return!1;let e=(this.searchTerm??this.combobox?.value??``).trim();return this.selectedOptions.length>0||e.length>0}get allSearchFieldsUsed(){return this.options?.length?this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field)):!1}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm=``,this.combobox.value=``,this.combobox.currentValue=``,this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){let e=[];this.combobox.selectedOptions.forEach(t=>{let n=t.value,r=this.searchTerm.trim();e.push({field:n,term:r,label:this.options.find(e=>e.field===n)?.label(r)||t.text,createCriteria:this.options.find(e=>e.field===n)?.createCriteria,resourceType:this.options.find(e=>e.field===n)?.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,n)=>t===n.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value=``,this.combobox.open=!1,this.$emit(`selectionChange`,this.selectedOptions),x.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},10)})}pasteHandler(e){if(this.allSearchFieldsUsed){e.preventDefault();return}this.loading=!0;let t=e.clipboardData.getData(`text/plain`),n=this.normalizeDelimiter(t),r=window.getSelection()?.toString(),i=this.addOrReplaceSelectedText(this.combobox.value,r,n);i?.length>=this.minlength&&(this.combobox.value=i,this.searchTerm=i,this.options&&this.filterSelectedOptions(i),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(n=>n.term===e&&n.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){return J(this,void 0,void 0,function*(){if(this.allSearchFieldsUsed){this.applySearchInputLock();return}this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(n=>n.field===t.field&&n.term.trim()===e.trim()))}};q([C],w6.prototype,`defaultSlottedNodes`,void 0),q([C],w6.prototype,`options`,void 0),q([C],w6.prototype,`searchTerm`,void 0),q([D],w6.prototype,`appearance`,void 0),q([D],w6.prototype,`minlength`,void 0),q([D],w6.prototype,`position`,void 0),q([D],w6.prototype,`placeholder`,void 0),q([D],w6.prototype,`disabled`,void 0),q([D({attribute:`clear-button`,mode:`boolean`})],w6.prototype,`clearButton`,void 0),q([C],w6.prototype,`loading`,void 0),q([C],w6.prototype,`selectedOptions`,void 0),q([C],w6.prototype,`filteredOptions`,void 0);let T6={};w6.compose(Object.assign({baseName:`search-bar`,template:hPe,styles:S6,shadowOptions:void 0},T6));let E6=(e,t)=>O` ${fw(e,t)} .control{width: auto;padding-left: calc(${B} * 1px);padding-right: 0}.end{height: 100%;min-width: 36px;max-width: 36px;padding-right: 2px;display: flex;justify-content: flex-end;align-items: center}.selected-value{min-width: 150px;max-width: 169px}.input-locked .control, :host(.input-locked) .control{width: 0;min-width: 0;padding: 0;margin: 0;overflow: hidden;flex: 0}.input-locked .selected-value, :host(.input-locked) .selected-value{display: none}`,D6=(e,t)=>T`<template aria-disabled="${e=>e.ariaDisabled}" autocomplete="${e=>e.autocomplete}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position} ${e=>e.inputLocked?`input-locked`:``}body" ?open="${e=>e.open}" tabindex="${e=>e.disabled?null:`0`}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" data-test-id="combobox"><slot name="selectedOptions" data-test-id="options"></slot><div class="control" part="control"><slot name="control"><input aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}" aria-autocomplete="${e=>e.ariaAutoComplete}" aria-controls="${e=>e.ariaControls}" aria-disabled="${e=>e.ariaDisabled}" aria-expanded="${e=>e.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}data-test-id="selected-value" /></slot></div>${wt(e,t)}<div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}data-test-id="listbox"><slot ${xt({filter:Vr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`,gPe=/* @__PURE__ */ new Set([`Backspace`,`Delete`,`Tab`,`Escape`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);var O6=class extends uu{constructor(){super(...arguments),this.minlength=1,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener(`change`,this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`change`,this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){let t=e.target.closest(`option,[role=option]`);if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit(`change`)}this.control.focus()}}keyupHandler(e){switch(e.key){case`Backspace`:case`Delete`:this.previousLength<0?this.$emit(`inputdeleted`):--this.previousLength;break;case`Enter`:if(this.open&&this.selectedIndex!==-1){let e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit(`change`)}}super.keyupHandler(e)}keydownHandler(e){let t=e.key;if(this.inputLocked){let n=e.ctrlKey||e.metaKey||e.altKey;if(!(gPe.has(t)||n))return e.preventDefault(),!1}switch(t){case`ArrowUp`:case`ArrowDown`:return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case`Enter`:return this.selectedIndex!==-1&&super.keydownHandler(e);case`Tab`:if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked){this.control.value=``,this.value=``,this.open=!1,e.stopImmediatePropagation();return}this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView();return}this.ariaControls=``,this.ariaExpanded=`false`}};q([D],O6.prototype,`minlength`,void 0),q([C],O6.prototype,`inputLocked`,void 0);let k6={delegatesFocus:!0,mode:`open`},A6={};O6.compose(Object.assign({baseName:`search-bar-combobox`,template:D6,styles:E6,shadowOptions:k6},A6));let j6=O` :host{display: block;width: 100%;height: 100%;min-height: 400px;/* Section link marker CSS variables to allow customization of the marker */ --section-link-marker-width: 2px;--section-link-marker-height: 100%;--section-link-marker-left: 0;--section-link-marker-top: 0;--section-link-marker-transition: background-color 0.2s ease;--section-link-marker-background-color: transparent;--section-link-marker-background-color-hover: var(--neutral-layer-hover);--section-link-marker-background-color-active: var(--accent-fill-rest);/* Section link CSS variables to allow customization of the link */ --section-link-text-align: left;--section-link-text-white-space: initial}.section-navigator-container{display: flex;height: 100%;max-height: 100%;width: 100%}.section-navigation{background-color: var(--neutral-layer-2);border-right: 1px solid var(--neutral-stroke-divider);overflow-y: auto;height: 100%;min-width: 20%}.section-link{position: relative;display: block;width: 100%;color: var(--neutral-foreground-rest);text-decoration: none;border: none;background: none;text-align: left;transition: all 0.2s ease;cursor: pointer;font-family: inherit;font-size: inherit;margin: 0;border-radius: 0;vertical-align: top}.section-link.active:hover{color: var(--neutral-foreground-rest)}.section-link:hover{color: var(--accent-foreground-rest)}.section-link::part(control){vertical-align: top;white-space: inherit}.section-link::before{content: '';position: absolute;top: var(--section-link-marker-top);left: var(--section-link-marker-left);width: var(--section-link-marker-width);height: var(--section-link-marker-height);background-color: var(--section-link-marker-background-color);transition: var(--section-link-marker-transition);z-index: 1}.section-link:hover::before{background-color: var(--section-link-marker-background-color-hover)}.section-link.active::before{background-color: var(--section-link-marker-background-color-active)}.section-link::part(content){padding: 0;text-align: var(--section-link-text-align);white-space: var(--section-link-text-white-space)}.section-content-wrapper{flex: 1;height: 100%;overflow: hidden;display: flex;flex-direction: column}.section-content{flex: 1;overflow-y: auto;overflow-x: hidden;padding: calc(var(--design-unit) * 4px);background-color: var(--neutral-layer-1);min-height: 0}.section-content::-webkit-scrollbar{width: var(--scrollbar-width)}.section-content::-webkit-scrollbar-track{background: var(--neutral-layer-4)}.section-content::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);/* 8px */ border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}.content-section{background-color: var(--neutral-layer-1)}.state-icon{margin-left: calc(var(--design-unit) * 1px);width: 12px;height: 12px}.state-icon[data-state='active']{color: var(--accent-fill-rest)}.state-icon[data-state='inactive']{color: var(--neutral-foreground-rest)}.state-icon[data-state='pending']{color: var(--warning-fill-rest)}.state-icon[data-state='disabled']{color: var(--neutral-foreground-disabled)}.state-icon[data-state='error']{color: var(--error-fill-rest)}.state-icon[data-state='completed']{color: var(--success-fill-rest)}/* Section button state colors */ .section-link.state-active{color: var(--accent-foreground-rest)}.section-link.state-inactive{color: var(--neutral-foreground-hint)}.section-link.state-pending{color: var(--warning-color)}.section-link.state-disabled{color: var(--neutral-foreground-disabled)}.section-link.state-error{color: var(--error-color)}.section-link.state-completed{color: var(--success-color)}.section-link.state-multiple{color: var(--accent-foreground-rest)}.section-link.state-none{color: var(--neutral-foreground-rest)}`,_Pe=e=>T`<template><div class="section-navigator-container" part="section-navigator-container" ${k(`sectionNavigatorContainer`)}><nav class="section-navigation" part="section-navigator-navigation">${j(e=>e.sectionItems,T`<${e}-button class="section-link ${(e,t)=>t.parent.activeSection===e.name?`active`:``} ${(e,t)=>t.parent.getSectionStateClass(e)}" part="section-navigator-section-link ${(e,t)=>t.parent.getSectionStateClass(e)}" @click="${(e,t)=>t.parent.handleSectionClick(e.name)}">${e=>e.label} ${j(e=>e.states||[],T`<${e}-icon class="state-icon" part="section-navigator-state-icon" title="${(e,t)=>t.parentContext.parent.getStateTooltip(e)}" data-state="${e=>e}" name="${(e,t)=>t.parentContext.parent.getStateIcon(e).name}" variant="${(e,t)=>t.parentContext.parent.getStateIcon(e).variant}"></${e}-icon>`)}</${e}-button>`)}</nav><div class="section-content-wrapper" part="section-navigator-content-wrapper"><section class="section-content" part="section-navigator-content" ${k(`sectionContent`)}>${j(e=>e.sectionItems,T`<div class="content-section" part="section-navigator-content-section" data-section="${e=>e.name}"><slot name="${e=>e.name}"></slot></div>`)}</section></div></div></template>`,M6=T` ${e=>_Pe(Fy(e))} `,N6=Xd(`SectionNavigator`),P6=`section-navigator`,F6={setState:`${P6}-set-state`,setStates:`${P6}-set-states`,clearState:`${P6}-clear-state`,clearAllStates:`${P6}-clear-all-states`},vPe={active:`Active`,inactive:`Inactive`,pending:`Pending`,disabled:`Disabled`,error:`Error`,completed:`Completed`},I6={active:{name:`circle-dot`,variant:`solid`},inactive:{name:`times-circle`,variant:`regular`},pending:{name:`clock`,variant:`solid`},disabled:{name:`ban`,variant:`solid`},error:{name:`times`,variant:`solid`},completed:{name:`check`,variant:`solid`}};var L6=class e extends P{constructor(){super(...arguments),this.sections=[],this.scrollBehavior=`top`,this.stateTooltips=vPe,this.stateIcons=I6,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=``}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections)){N6.warn(`Sections must be an array`),this.sectionItems=[];return}this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(!this.sectionContent){N6.warn(`Section content element not found`);return}if((e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0,this.scrollBehavior===`top`)try{let e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(`.content-section:last-child`);if(t){let n=t.offsetHeight,r=Math.max(0,e-n-20);this.spacerElement=document.createElement(`div`),this.spacerElement.className=`scroll-spacer`,this.spacerElement.style.height=`${r}px`,this.spacerElement.style.pointerEvents=`none`,this.sectionContent.appendChild(this.spacerElement)}}catch(e){N6.error(`Error updating spacer:`,e)}}scrollToSection(e){if(!this.sectionContent){N6.warn(`Section content not available`);return}try{let t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t){N6.warn(`Section "${e}" not found`);return}let n=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:n,behavior:`smooth`}),this.setupScrollEndDetection()}catch(e){N6.error(`Error scrolling to section:`,e)}}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(!this.sectionContent){N6.warn(`Section content not available for scroll detection`);return}try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},e.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener(`scroll`,this.scrollCheckHandler,{passive:!0});let t=()=>{this.isUserScrolling=!0},n=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};this.sectionContent.addEventListener(`wheel`,t,{passive:!0}),this.sectionContent.addEventListener(`touchstart`,t,{passive:!0}),this.sectionContent.addEventListener(`mousedown`,t,{passive:!0}),this.sectionContent.addEventListener(`scrollend`,n,{passive:!0});let r;this.sectionContent.addEventListener(`scroll`,()=>{clearTimeout(r),r=window.setTimeout(n,e.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){N6.error(`Error setting up scroll detection:`,e)}}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;let e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2,t=null,n=1/0;this.sectionItems.forEach(r=>{let i=this.sectionContent.querySelector(`[data-section="${r.name}"]`);if(i){let a=i.offsetTop+i.clientHeight/2,o=Math.abs(a-e);o<n&&(n=o,t=r.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener(`scroll`,this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){if(!this.sectionContent){N6.warn(`Section content not available for event listeners`);return}this.handleSetStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.addState(t,n)}catch(e){N6.error(`Error handling set-state event:`,e)}},this.handleSetStatesRef=e=>{try{let{sectionName:t,stateNames:n}=e.detail;this.addStates(t,n)}catch(e){N6.error(`Error handling set-states event:`,e)}},this.handleClearStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.clearState(t,n)}catch(e){N6.error(`Error handling clear-state event:`,e)}},this.handleClearAllStatesRef=e=>{try{let{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){N6.error(`Error handling clear-all-states event:`,e)}},this.handleGenericStateEventRef=e=>{try{let t=e.type,n=e.detail;if(n?.sectionName)return;let r=e.target.closest(`[data-section]`)?.getAttribute(`data-section`);r||(r=e.target.closest(`[slot]`)?.getAttribute(`slot`)||this.activeSection),r||(r=this.activeSection),e.stopPropagation(),e.preventDefault();let i=Object.assign(Object.assign({},n),{sectionName:r}),a=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){N6.error(`Error handling generic state event:`,e)}},this.addEventListener(F6.setState,this.handleSetStateRef),this.addEventListener(F6.setStates,this.handleSetStatesRef),this.addEventListener(F6.clearState,this.handleClearStateRef),this.addEventListener(F6.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(F6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(F6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(F6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(F6.clearAllStates,this.handleGenericStateEventRef,!0)}updateSectionStates(e,t){let n=this.sectionItems.findIndex(t=>t.name===e);if(n!==-1){let e=Object.assign(Object.assign({},this.sectionItems[n]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,n),e,...this.sectionItems.slice(n+1)]}}addState(e,t){if(!e||!t){N6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){N6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[];if(!r.includes(t)){let n=[...r,t];this.updateSectionStates(e,n)}}addStates(e,t){if(!e||!Array.isArray(t)){N6.warn(`Section name and state names array are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){N6.warn(`Section "${e}" not found`);return}let r=[...this.sectionItems[n].states||[]];t.forEach(e=>{r.includes(e)||r.push(e)}),this.updateSectionStates(e,r)}clearState(e,t){if(!e||!t){N6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){N6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[],i=r.indexOf(t);if(i>-1){let t=r.filter((e,t)=>t!==i);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e){N6.warn(`Section name is required`);return}if(this.sectionItems.findIndex(t=>t.name===e)===-1){N6.warn(`Section "${e}" not found`);return}this.updateSectionStates(e,[])}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||``:(N6.warn(`State name is required`),``)}getSectionStateClass(e){if(!e)return N6.warn(`Section is required`),`state-none`;let t=e.states||[];return t.length===0?`state-none`:t.length>1?`state-multiple`:`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||I6[e]:(N6.warn(`State name is required`),I6.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(F6.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(F6.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(F6.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(F6.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(F6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(F6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(F6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(F6.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),(e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0}};L6.SCROLL_END_TIMEOUT=150,L6.SCROLL_DEBOUNCE_TIMEOUT=100,q([C],L6.prototype,`sections`,void 0),q([D({attribute:`scroll-behavior`})],L6.prototype,`scrollBehavior`,void 0),q([D({attribute:`state-tooltips`})],L6.prototype,`stateTooltips`,void 0),q([D({attribute:`state-icons`})],L6.prototype,`stateIcons`,void 0),q([D({attribute:`disable-auto-scroll-detection`,mode:`boolean`})],L6.prototype,`disableAutoScrollDetection`,void 0),q([C],L6.prototype,`sectionItems`,void 0),q([C],L6.prototype,`activeSection`,void 0);let R6={mode:`open`},z6={};L6.compose(Object.assign({baseName:`foundation-section-navigator`,template:M6,styles:j6,shadowOptions:R6},z6));let B6=(e,t)=>ha(e,t),V6=(e,t)=>O` ${ju(e,t)} ::slotted(foundation-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}::slotted(foundation-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}`;var H6=class extends ga{valueChanged(){this.value===void 0&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}};H6.compose(Object.assign({baseName:`segmented-control`,template:B6,styles:V6,shadowOptions:void 0},{}));let U6=(e,t)=>T`<template role="radio" aria-checked="${e=>e.checked}" aria-required="${e=>e.required}" aria-disabled="${e=>e.disabled}" aria-readonly="${e=>e.readOnly}" @keypress="${(e,t)=>e.keypressHandler(t.event)}" @click="${(e,t)=>e.clickHandler(t.event)}"><span><slot></slot></span></template>`,W6=(e,t)=>O` ${Mu(e,t)} :host{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);cursor: pointer}:host([aria-checked='true']){background: var(--accent-foreground-rest)}`;(class extends va{}).compose(Object.assign({baseName:`segmented-item`,template:U6,styles:W6,shadowOptions:void 0},{}));let G6=(e,t)=>Ea(e,t),K6=(e,t)=>O` ${cu(e,t)} :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible), .control:focus-visible{box-shadow: none;outline: none}`;var q6=class extends Pu{get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}slottedOptionsChanged(e,t){let n=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;let r=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{let t=e.nodeName.toLowerCase();if(t.endsWith(`-optgroup`)){let t=Array.from(e.children).filter(e=>{let t=e.nodeName.toLowerCase();return e.getAttribute(`role`)===`option`||t.endsWith(`-option`)});r.push(...t)}else(e.getAttribute(`role`)===`option`||t.endsWith(`-option`))&&r.push(e)}),this.options=r,n&&(this.value=n),this.selectedIndex===-1&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(Iy(this))&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}openChanged(e,t){if(this.collapsible){if(this.$emit(`open-change`,{open:this.open}),this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,x.queueUpdate(()=>this.focus());return}this.ariaControls=``,this.ariaExpanded=`false`}}keydownHandler(e){switch(e.key){case`ArrowDown`:case`ArrowUp`:this.open?this.options[this.selectedIndex]?.scrollIntoView({block:`center`,behavior:`auto`}):this.open=!0}return super.keydownHandler(e)}};let J6={indicator:`
976
+ Hours ${nb(s6,t)}</label><${t}-multiselect class="time-select" data-test-id="hours-multiselect" name="Hours" :options=${()=>n.hourOptions}:selectedOptions=${()=>n.selectedHours}@selectionChange="${(e,t)=>n.handleHoursChange(t.event)}"></${t}-multiselect></div>`)} ${m6(t,n,!1,!0)}</div>`;case Q.DAILY:return T` ${uPe(t,n)}<div class="row">${p6(t,n,`Every`)} ${m6(t,n,!0,!0)}</div>`;case Q.WEEKLY:return T`<div class="row">${dPe(t,n)} ${m6(t,n,!0,!0)}</div>`;case Q.MONTHLY:return T`<div class="row">${p6(t,n,`Every`)} ${m6(t,n,!0,!0)}</div>${f6(t,n)} `;case Q.YEARLY:return T`<div class="row">${m6(t,n,!0,!0)}</div>${f6(t,n)} `;default:return T``}},h6=e=>T`<template><div class="container"><div class="input-container"><label class="label">Recurrence ${A(e=>!e.disableTooltips,T` ${t=>nb(QNe(!t.minMinuteInterval||t.minMinuteInterval<30),e)} `)}</label><${e}-select data-test-id="select-recurrence" :value=${Af(e=>e.recurrence)}@change="${e=>e.handleRecurrenceChange()}">${A(e=>e.isMinutesRecurrenceEnabled,T`<${e}-option data-test-id="${Q.MINUTES}">${Q.MINUTES}</${e}-option>`)}<${e}-option data-test-id="${Q.HOURLY}">${Q.HOURLY}</${e}-option><${e}-option data-test-id="${Q.DAILY}">${Q.DAILY}</${e}-option><${e}-option data-test-id="${Q.WEEKLY}">${Q.WEEKLY}</${e}-option><${e}-option data-test-id="${Q.MONTHLY}">${Q.MONTHLY}</${e}-option><${e}-option data-test-id="${Q.YEARLY}">${Q.YEARLY}</${e}-option></${e}-select></div>${j(e=>[`${e.recurrence}-${e.during}`],T` ${(t,n)=>fPe(n.parent.recurrence,e,n.parent)} `,{recycle:!1})}</div></template>`,pPe=T` ${e=>h6(Fy(e))} `;var g6=class extends P{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:WNe,buildConfigForHourlyRecurrence:UNe,buildConfigForDailyRecurrence:HNe,buildConfigForWeeklyRecurrence:GNe,buildConfigForMonthlyRecurrence:qNe,buildConfigForYearlyRecurrence:KNe},this.recurrence=Q.DAILY,this.cron=``,this.value=this.cron,this.cronConfig={type:Q.DAILY,weekType:X3.WEEK,hours:`0`,minutes:`0`,seconds:`0`},this.frequency=`1`,this.during=`every_hour`,this.hours=`0`,this.minutes=`0`,this.seconds=`0`,this.disableTooltips=!1,this.timezone=``}cronChanged(){if(this.cron)try{if(!VNe(this.cron)){YS({title:`Cron Scheduler`,body:`Invalid Cron Expression`,toast:{type:`critical`}},Fy(this));return}this.setsFieldsFromCronEx()}catch(e){console.error(`Error:`,e),YS({title:`Cron Scheduler`,body:e,toast:{type:`critical`}},Fy(this));return}}get duringOptions(){return[{label:`Every hour`,value:`every_hour`},{label:`Specific hours`,value:`specific_hours`}]}get frequencySuffix(){switch(this.cronConfig.type){case Q.MINUTES:return`Minute(s)`;case Q.HOURLY:return`Hour(s)`;case Q.DAILY:return`Day(s)`;case Q.MONTHLY:return`Month(s)`;default:return``}}get frequencyList(){switch(this.cronConfig.type){case Q.MINUTES:let e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Q.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Q.DAILY:return Array.from({length:31},(e,t)=>t+1);case Q.MONTHLY:return Array.from({length:12},(e,t)=>t+1);case Q.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Q.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return!this.hours||this.hours===`*`||this.hours===`0`?this.hours===`*`?this.hourOptions.map(e=>e.value):[this.hours]:this.hours.split(`,`)}handleHoursChange(e){let t=e.detail;t.length===24?(this.hours=`*`,this.frequency=`1`,this.cronConfig.frequency=`1`):this.hours=!t||t.length===0?`0`:t.sort((e,t)=>Number(e)-Number(t)).join(`,`),this.handleChange(`hours`)}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return this.during===`specific_hours`}get isDailyFrequencyDisabled(){return this.cronConfig.type===Q.DAILY&&this.cronConfig.weekType===X3.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn(`Minimum minute interval has no effect on schedules with an hourly or longer recurrance`)}connectedCallback(){super.connectedCallback(),this.addEventListener($3.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener($3.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Q.MINUTES:let e=this.getBaseConfigFields(),{minutes:t}=e,n=md(e,[`minutes`]);this.during=`every_hour`,this.hours=`*`;let r=[1,2,3,4,5,6,10,12,15,20,30],i=this.minMinuteInterval?Number(this.minMinuteInterval):1,a=r.find(e=>e>=i)||1;this.cronConfig=Object.assign(Object.assign({type:Q.MINUTES},n),{frequency:a.toString(),during:`every_hour`,hours:`*`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.HOURLY:let o=this.getBaseConfigFields(),{hours:s}=o,c=md(o,[`hours`]);this.during=`every_hour`,this.hours=`0`,this.cronConfig=Object.assign(Object.assign({type:Q.HOURLY},c),{frequency:`1`,during:`every_hour`,hours:`0`}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.DAILY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.DAILY},this.getBaseConfigFields()),{frequency:`1`,weekType:X3.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.WEEKLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.WEEKLY},this.getBaseConfigFields()),{frequency:`1`,selectedDays:/* @__PURE__ */ new Set([`2`])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.MONTHLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.MONTHLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:Z3.DATE,dayDate:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Q.YEARLY:(this.hours===`*`||this.hours.includes(`,`))&&(this.hours=`0`),this.cronConfig=Object.assign(Object.assign({type:Q.YEARLY},this.getBaseConfigFields()),{frequency:`1`,dateOrDay:{type:Z3.DATE,dayDate:`1`,month:`1`}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Fy(this))}}handleChange(e){if(e===`frequency`&&Number(this.frequency)===0)throw Error(`Frequency must be greater than 0`);this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){this.during===`every_hour`?this.hours=`*`:this.hours===`*`&&(this.hours=`0`),(this.cronConfig.type===Q.MINUTES||this.cronConfig.type===Q.HOURLY)&&(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Q.MINUTES:this.cron=FNe(e);break;case Q.HOURLY:this.cron=PNe(e);break;case Q.DAILY:this.cron=INe(e,e6);break;case Q.WEEKLY:this.cron=LNe(e);break;case Q.MONTHLY:this.cron=RNe(e,e6);break;case Q.YEARLY:this.cron=zNe(e);break;default:YS({title:`Cron Scheduler`,body:`Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly`,toast:{type:`critical`}},Fy(this))}this.value=this.cron,this.$emit(`change`)}setsFieldsFromCronEx(){this.cronConfig=JNe(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;let e=this.cronConfig;`minutes`in e&&(this.minutes=e.minutes),(e.type===Q.MINUTES||e.type===Q.HOURLY)&&(this.during=e.during||`every_hour`,e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Q.HOURLY&&e.type!==Q.MINUTES&&(this.hours=e.hours)}};q([C],g6.prototype,`recurrence`,void 0),q([C],g6.prototype,`cron`,void 0),q([C],g6.prototype,`cronConfig`,void 0),q([C],g6.prototype,`frequency`,void 0),q([C],g6.prototype,`during`,void 0),q([w],g6.prototype,`duringOptions`,null),q([C],g6.prototype,`hours`,void 0),q([C],g6.prototype,`minutes`,void 0),q([C],g6.prototype,`seconds`,void 0),q([w],g6.prototype,`frequencySuffix`,null),q([w],g6.prototype,`frequencyList`,null),q([w],g6.prototype,`hourOptions`,null),q([w],g6.prototype,`selectedHours`,null),q([D({attribute:`min-minute-interval`})],g6.prototype,`minMinuteInterval`,void 0),q([D({mode:`boolean`,attribute:`disable-tooltips`})],g6.prototype,`disableTooltips`,void 0),q([w],g6.prototype,`isMinutesRecurrenceEnabled`,null),q([w],g6.prototype,`isSpecificHours`,null),q([w],g6.prototype,`isDailyFrequencyDisabled`,null),q([D],g6.prototype,`timezone`,void 0);let _6={};g6.compose(Object.assign({baseName:`scheduler-cron-builder`,styles:i6,template:pPe,shadowOptions:void 0},_6));let v6=O` /* Host */ :host{display: flex;flex-direction: column;width: 100%}.container{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);display: flex;flex-direction: column;gap: calc(var(--design-unit) * 2px)}.label{color: var(--neutral-foreground-hint);display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal}.timezone-combobox::part(listbox){max-height: 20vh}`,y6=e=>T`<template><div class="container"><label class="label">Time Zone</label><${e}-combobox data-test-id="cron-scheduler-timezone" autocomplete="both" class="timezone-combobox" value="${Af(e=>e.timezone)}">${j(e=>e.timeZones,T`<${e}-option value="${e=>e}">${e=>e}</${e}-option>`)}</${e}-combobox></div></template>`,mPe=T` ${e=>y6(Fy(e))} `;var b6=class extends P{constructor(){super(...arguments),this.timezone=``,this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit(`change`)}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return J(this,void 0,void 0,function*(){let e=[`Europe/London`,`America/New_York`];try{let t=yield this.connect.request(`VALID_TIME_ZONE`,{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw Error(`Invalid data returned for Timezones`);this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,n)=>e.includes(t)&&!e.includes(n)?-1:!e.includes(t)&&e.includes(n)?1:t.localeCompare(n))}catch(e){YS({title:`Cron Scheduler`,body:`Unable to fetch timezones data.`,toast:{type:`critical`}},`rapid`),Y.error(e)}})}};q([C],b6.prototype,`timezone`,void 0),q([hv],b6.prototype,`connect`,void 0),q([C],b6.prototype,`timeZones`,void 0);let x6={};b6.compose(Object.assign({baseName:`scheduler-timezone`,styles:v6,template:mPe,shadowOptions:void 0},x6));let S6=O` .search-bar-combobox{width: 100%;min-width: auto}.padding{padding-left: calc(${B} * 1px)}.selected-options{display: flex;align-items: center;overflow: hidden;gap: calc(${B} * 1px);padding-right: calc(${B} * 1px)}.selected-options:hover{overflow-x: overlay}.selected-options::-webkit-scrollbar{height: 7px}.selected-options::-webkit-scrollbar-thumb{border-radius: 10px;box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);background-color: #484848;border: 1px solid #7e7e7e}.selected-options-divider{border-right: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}.options-button{height: fit-content;min-width: fit-content}.label{display: block;font-size: var(--type-ramp-base-font-size);margin: calc(${B} * 2px) 2px}.label-hidden{display: none}.search-clear-button{min-width: 28px;min-height: 28px;height: 28px;margin: 0}.search-clear-button svg{rotate: 45deg}.search-clear-button::part(control){padding: 0}.search-clear-button .svg-container{display: flex;align-items: center;justify-content: center}.close-icon{color: var(--accent-fill-rest)}`,C6=e=>T`<label part="label" for="control" data-test-id="label" class=${e=>pn(`label`,[`label-hidden`,!e.defaultSlottedNodes?.length])}><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><${e}-search-bar-combobox ${k(`combobox`)}position="${e=>e.position}" placeholder=${e=>e.placeholder}disabled=${e=>e.disabled}:inputLocked="${e=>e.allSearchFieldsUsed}" autocomplete="none" minlength=${e=>e.minlength}@inputdeleted=${e=>e.inputdeleted()}@change=${e=>e.changeHandler()}@input=${e=>e.inputHandler()}@paste=${(e,t)=>e.pasteHandler(t.event)}class="search-bar-combobox ${e=>e.selectedOptions.length>0?`padding`:null}" data-test-id="search-bar"><div ${k(`selectedOptionsDiv`)}slot="selectedOptions" class="selected-options ${e=>e.selectedOptions.length>0?`selected-options-divider`:null}">${j(e=>e.selectedOptions,T`<${e}-button class="options-button" appearance=${(e,t)=>t.parent.appearance}disabled=${(e,t)=>t.parent.disabled}@click=${(e,t)=>t.parent.unselectOption(e)}>${e=>e.label}<${e}-icon class="close-icon" slot="end" name="circle-xmark" variant="regular"></${e}-icon></${e}-button>`)}</div>${j(e=>e.filteredOptions,T`<${e}-option value="${e=>e.field}" :disabled=${(e,t)=>!t.parent.isOptionEnabled(e)}>${(e,t)=>e.label(t.parent.searchTerm)}</${e}-option>`)} ${A(e=>e.showClearAffordance,T`<${e}-button class="search-clear-button" @click=${e=>e.clearSearch()}slot="end" data-test-id="clear-search" aria-label="Clear search terms" title="Clear search terms"><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="26px" height="26px" class="bi bi-plus" viewBox="0 0 16 16"><path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" /></svg></div></${e}-button>`)}</${e}-search-bar-combobox>`,hPe=T` ${e=>C6(Fy(e))} `;var w6=class extends P{constructor(){super(...arguments),this.searchTerm=``,this.appearance=`neutral`,this.minlength=3,this.position=YC.BELOW,this.placeholder=`Start typing to search`,this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g,` `),this.addOrReplaceSelectedText=(e,t,n)=>t?.length>0?e.replace(t,n):e.concat(n)}clear(){this.selectedOptions=[],this.searchTerm=``,this.combobox&&(this.combobox.currentValue=``,this.combobox.value=``),this.$emit(`selectionChange`,[])}clearSearch(){this.clear()}get showClearAffordance(){if(!this.clearButton)return!1;let e=(this.searchTerm??this.combobox?.value??``).trim();return this.selectedOptions.length>0||e.length>0}get allSearchFieldsUsed(){return this.options?.length?this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field)):!1}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm=``,this.combobox.value=``,this.combobox.currentValue=``,this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){let e=[];this.combobox.selectedOptions.forEach(t=>{let n=t.value,r=this.searchTerm.trim();e.push({field:n,term:r,label:this.options.find(e=>e.field===n)?.label(r)||t.text,createCriteria:this.options.find(e=>e.field===n)?.createCriteria,resourceType:this.options.find(e=>e.field===n)?.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,n)=>t===n.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value=``,this.combobox.open=!1,this.$emit(`selectionChange`,this.selectedOptions),x.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},10)})}pasteHandler(e){if(this.allSearchFieldsUsed){e.preventDefault();return}this.loading=!0;let t=e.clipboardData.getData(`text/plain`),n=this.normalizeDelimiter(t),r=window.getSelection()?.toString(),i=this.addOrReplaceSelectedText(this.combobox.value,r,n);i?.length>=this.minlength&&(this.combobox.value=i,this.searchTerm=i,this.options&&this.filterSelectedOptions(i),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(n=>n.term===e&&n.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit(`selectionChange`,this.selectedOptions)}inputHandler(){return J(this,void 0,void 0,function*(){if(this.allSearchFieldsUsed){this.applySearchInputLock();return}this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(n=>n.field===t.field&&n.term.trim()===e.trim()))}};q([C],w6.prototype,`defaultSlottedNodes`,void 0),q([C],w6.prototype,`options`,void 0),q([C],w6.prototype,`searchTerm`,void 0),q([D],w6.prototype,`appearance`,void 0),q([D],w6.prototype,`minlength`,void 0),q([D],w6.prototype,`position`,void 0),q([D],w6.prototype,`placeholder`,void 0),q([D],w6.prototype,`disabled`,void 0),q([D({attribute:`clear-button`,mode:`boolean`})],w6.prototype,`clearButton`,void 0),q([C],w6.prototype,`loading`,void 0),q([C],w6.prototype,`selectedOptions`,void 0),q([C],w6.prototype,`filteredOptions`,void 0);let T6={};w6.compose(Object.assign({baseName:`search-bar`,template:hPe,styles:S6,shadowOptions:void 0},T6));let E6=(e,t)=>O` ${fw(e,t)} .control{width: auto;padding-left: calc(${B} * 1px);padding-right: 0}.end{height: 100%;min-width: 36px;max-width: 36px;padding-right: 2px;display: flex;justify-content: flex-end;align-items: center}.selected-value{min-width: 150px;max-width: 169px}.input-locked .control, :host(.input-locked) .control{width: 0;min-width: 0;padding: 0;margin: 0;overflow: hidden;flex: 0}.input-locked .selected-value, :host(.input-locked) .selected-value{display: none}`,D6=(e,t)=>T`<template aria-disabled="${e=>e.ariaDisabled}" autocomplete="${e=>e.autocomplete}" class="${e=>e.open?`open`:``} ${e=>e.disabled?`disabled`:``} ${e=>e.position} ${e=>e.inputLocked?`input-locked`:``}body" ?open="${e=>e.open}" tabindex="${e=>e.disabled?null:`0`}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" data-test-id="combobox"><slot name="selectedOptions" data-test-id="options"></slot><div class="control" part="control"><slot name="control"><input aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}" aria-autocomplete="${e=>e.ariaAutoComplete}" aria-controls="${e=>e.ariaControls}" aria-disabled="${e=>e.ariaDisabled}" aria-expanded="${e=>e.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${k(`control`)}data-test-id="selected-value" /></slot></div>${wt(e,t)}<div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${k(`listbox`)}data-test-id="listbox"><slot ${xt({filter:Vr.slottedOptionFilter,flatten:!0,property:`slottedOptions`})}></slot></div></template>`,gPe=/* @__PURE__ */ new Set([`Backspace`,`Delete`,`Tab`,`Escape`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);var O6=class extends uu{constructor(){super(...arguments),this.minlength=1,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener(`change`,this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`change`,this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){let t=e.target.closest(`option,[role=option]`);if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit(`change`)}this.control.focus()}}keyupHandler(e){switch(e.key){case`Backspace`:case`Delete`:this.previousLength<0?this.$emit(`inputdeleted`):--this.previousLength;break;case`Enter`:if(this.open&&this.selectedIndex!==-1){let e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit(`change`)}}super.keyupHandler(e)}keydownHandler(e){let t=e.key;if(this.inputLocked){let n=e.ctrlKey||e.metaKey||e.altKey;if(!(gPe.has(t)||n))return e.preventDefault(),!1}switch(t){case`ArrowUp`:case`ArrowDown`:return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case`Enter`:return this.selectedIndex!==-1&&super.keydownHandler(e);case`Tab`:if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked){this.control.value=``,this.value=``,this.open=!1,e.stopImmediatePropagation();return}this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView();return}this.ariaControls=``,this.ariaExpanded=`false`}};q([D],O6.prototype,`minlength`,void 0),q([C],O6.prototype,`inputLocked`,void 0);let k6={delegatesFocus:!0,mode:`open`},A6={};O6.compose(Object.assign({baseName:`search-bar-combobox`,template:D6,styles:E6,shadowOptions:k6},A6));let j6=O` :host{display: block;width: 100%;height: 100%;min-height: 400px;/* Section link marker CSS variables to allow customization of the marker */ --section-link-marker-width: 2px;--section-link-marker-height: 100%;--section-link-marker-left: 0;--section-link-marker-top: 0;--section-link-marker-transition: background-color 0.2s ease;--section-link-marker-background-color: transparent;--section-link-marker-background-color-hover: var(--neutral-layer-hover);--section-link-marker-background-color-active: var(--accent-fill-rest);/* Section link CSS variables to allow customization of the link */ --section-link-text-align: left;--section-link-text-white-space: initial}.section-navigator-container{display: flex;height: 100%;max-height: 100%;width: 100%}.section-navigation{background-color: var(--neutral-layer-2);border-right: 1px solid var(--neutral-stroke-divider);overflow-y: auto;height: 100%;min-width: 20%}.section-link{position: relative;display: block;width: 100%;color: var(--neutral-foreground-rest);text-decoration: none;border: none;background: none;text-align: left;transition: all 0.2s ease;cursor: pointer;font-family: inherit;font-size: inherit;margin: 0;border-radius: 0;vertical-align: top}.section-link.active:hover{color: var(--neutral-foreground-rest)}.section-link:hover{color: var(--accent-foreground-rest)}.section-link::part(control){vertical-align: top;white-space: inherit}.section-link::before{content: '';position: absolute;top: var(--section-link-marker-top);left: var(--section-link-marker-left);width: var(--section-link-marker-width);height: var(--section-link-marker-height);background-color: var(--section-link-marker-background-color);transition: var(--section-link-marker-transition);z-index: 1}.section-link:hover::before{background-color: var(--section-link-marker-background-color-hover)}.section-link.active::before{background-color: var(--section-link-marker-background-color-active)}.section-link::part(content){padding: 0;text-align: var(--section-link-text-align);white-space: var(--section-link-text-white-space)}.section-content-wrapper{flex: 1;height: 100%;overflow: hidden;display: flex;flex-direction: column}.section-content{flex: 1;overflow: hidden auto;padding: calc(var(--design-unit) * 4px);background-color: var(--neutral-layer-1);min-height: 0}.section-content::-webkit-scrollbar{width: var(--scrollbar-width)}.section-content::-webkit-scrollbar-track{background: var(--neutral-layer-4)}.section-content::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);/* 8px */ border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}.content-section{background-color: var(--neutral-layer-1)}.state-icon{margin-left: calc(var(--design-unit) * 1px);width: 12px;height: 12px}.state-icon[data-state='active']{color: var(--accent-fill-rest)}.state-icon[data-state='inactive']{color: var(--neutral-foreground-rest)}.state-icon[data-state='pending']{color: var(--warning-fill-rest)}.state-icon[data-state='disabled']{color: var(--neutral-foreground-disabled)}.state-icon[data-state='error']{color: var(--error-fill-rest)}.state-icon[data-state='completed']{color: var(--success-fill-rest)}/* Section button state colors */ .section-link.state-active{color: var(--accent-foreground-rest)}.section-link.state-inactive{color: var(--neutral-foreground-hint)}.section-link.state-pending{color: var(--warning-color)}.section-link.state-disabled{color: var(--neutral-foreground-disabled)}.section-link.state-error{color: var(--error-color)}.section-link.state-completed{color: var(--success-color)}.section-link.state-multiple{color: var(--accent-foreground-rest)}.section-link.state-none{color: var(--neutral-foreground-rest)}`,_Pe=e=>T`<template><div class="section-navigator-container" part="section-navigator-container" ${k(`sectionNavigatorContainer`)}><nav class="section-navigation" part="section-navigator-navigation">${j(e=>e.sectionItems,T`<${e}-button class="section-link ${(e,t)=>t.parent.activeSection===e.name?`active`:``} ${(e,t)=>t.parent.getSectionStateClass(e)}" part="section-navigator-section-link ${(e,t)=>t.parent.getSectionStateClass(e)}" @click="${(e,t)=>t.parent.handleSectionClick(e.name)}">${e=>e.label} ${j(e=>e.states||[],T`<${e}-icon class="state-icon" part="section-navigator-state-icon" title="${(e,t)=>t.parentContext.parent.getStateTooltip(e)}" data-state="${e=>e}" name="${(e,t)=>t.parentContext.parent.getStateIcon(e).name}" variant="${(e,t)=>t.parentContext.parent.getStateIcon(e).variant}"></${e}-icon>`)}</${e}-button>`)}</nav><div class="section-content-wrapper" part="section-navigator-content-wrapper"><section class="section-content" part="section-navigator-content" ${k(`sectionContent`)}>${j(e=>e.sectionItems,T`<div class="content-section" part="section-navigator-content-section" data-section="${e=>e.name}"><slot name="${e=>e.name}"></slot></div>`)}</section></div></div></template>`,M6=T` ${e=>_Pe(Fy(e))} `,N6=Xd(`SectionNavigator`),P6=`section-navigator`,F6={setState:`${P6}-set-state`,setStates:`${P6}-set-states`,clearState:`${P6}-clear-state`,clearAllStates:`${P6}-clear-all-states`},vPe={active:`Active`,inactive:`Inactive`,pending:`Pending`,disabled:`Disabled`,error:`Error`,completed:`Completed`},I6={active:{name:`circle-dot`,variant:`solid`},inactive:{name:`times-circle`,variant:`regular`},pending:{name:`clock`,variant:`solid`},disabled:{name:`ban`,variant:`solid`},error:{name:`times`,variant:`solid`},completed:{name:`check`,variant:`solid`}};var L6=class e extends P{constructor(){super(...arguments),this.sections=[],this.scrollBehavior=`top`,this.stateTooltips=vPe,this.stateIcons=I6,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=``}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections)){N6.warn(`Sections must be an array`),this.sectionItems=[];return}this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(!this.sectionContent){N6.warn(`Section content element not found`);return}if((e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0,this.scrollBehavior===`top`)try{let e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(`.content-section:last-child`);if(t){let n=t.offsetHeight,r=Math.max(0,e-n-20);this.spacerElement=document.createElement(`div`),this.spacerElement.className=`scroll-spacer`,this.spacerElement.style.height=`${r}px`,this.spacerElement.style.pointerEvents=`none`,this.sectionContent.appendChild(this.spacerElement)}}catch(e){N6.error(`Error updating spacer:`,e)}}scrollToSection(e){if(!this.sectionContent){N6.warn(`Section content not available`);return}try{let t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t){N6.warn(`Section "${e}" not found`);return}let n=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:n,behavior:`smooth`}),this.setupScrollEndDetection()}catch(e){N6.error(`Error scrolling to section:`,e)}}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(!this.sectionContent){N6.warn(`Section content not available for scroll detection`);return}try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},e.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener(`scroll`,this.scrollCheckHandler,{passive:!0});let t=()=>{this.isUserScrolling=!0},n=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};this.sectionContent.addEventListener(`wheel`,t,{passive:!0}),this.sectionContent.addEventListener(`touchstart`,t,{passive:!0}),this.sectionContent.addEventListener(`mousedown`,t,{passive:!0}),this.sectionContent.addEventListener(`scrollend`,n,{passive:!0});let r;this.sectionContent.addEventListener(`scroll`,()=>{clearTimeout(r),r=window.setTimeout(n,e.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){N6.error(`Error setting up scroll detection:`,e)}}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;let e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2,t=null,n=1/0;this.sectionItems.forEach(r=>{let i=this.sectionContent.querySelector(`[data-section="${r.name}"]`);if(i){let a=i.offsetTop+i.clientHeight/2,o=Math.abs(a-e);o<n&&(n=o,t=r.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener(`scroll`,this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener(`scroll`,this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){if(!this.sectionContent){N6.warn(`Section content not available for event listeners`);return}this.handleSetStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.addState(t,n)}catch(e){N6.error(`Error handling set-state event:`,e)}},this.handleSetStatesRef=e=>{try{let{sectionName:t,stateNames:n}=e.detail;this.addStates(t,n)}catch(e){N6.error(`Error handling set-states event:`,e)}},this.handleClearStateRef=e=>{try{let{sectionName:t,stateName:n}=e.detail;this.clearState(t,n)}catch(e){N6.error(`Error handling clear-state event:`,e)}},this.handleClearAllStatesRef=e=>{try{let{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){N6.error(`Error handling clear-all-states event:`,e)}},this.handleGenericStateEventRef=e=>{try{let t=e.type,n=e.detail;if(n?.sectionName)return;let r=e.target.closest(`[data-section]`)?.getAttribute(`data-section`);r||(r=e.target.closest(`[slot]`)?.getAttribute(`slot`)||this.activeSection),r||(r=this.activeSection),e.stopPropagation(),e.preventDefault();let i=Object.assign(Object.assign({},n),{sectionName:r}),a=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){N6.error(`Error handling generic state event:`,e)}},this.addEventListener(F6.setState,this.handleSetStateRef),this.addEventListener(F6.setStates,this.handleSetStatesRef),this.addEventListener(F6.clearState,this.handleClearStateRef),this.addEventListener(F6.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(F6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(F6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(F6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(F6.clearAllStates,this.handleGenericStateEventRef,!0)}updateSectionStates(e,t){let n=this.sectionItems.findIndex(t=>t.name===e);if(n!==-1){let e=Object.assign(Object.assign({},this.sectionItems[n]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,n),e,...this.sectionItems.slice(n+1)]}}addState(e,t){if(!e||!t){N6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){N6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[];if(!r.includes(t)){let n=[...r,t];this.updateSectionStates(e,n)}}addStates(e,t){if(!e||!Array.isArray(t)){N6.warn(`Section name and state names array are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){N6.warn(`Section "${e}" not found`);return}let r=[...this.sectionItems[n].states||[]];t.forEach(e=>{r.includes(e)||r.push(e)}),this.updateSectionStates(e,r)}clearState(e,t){if(!e||!t){N6.warn(`Section name and state name are required`);return}let n=this.sectionItems.findIndex(t=>t.name===e);if(n===-1){N6.warn(`Section "${e}" not found`);return}let r=this.sectionItems[n].states||[],i=r.indexOf(t);if(i>-1){let t=r.filter((e,t)=>t!==i);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e){N6.warn(`Section name is required`);return}if(this.sectionItems.findIndex(t=>t.name===e)===-1){N6.warn(`Section "${e}" not found`);return}this.updateSectionStates(e,[])}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||``:(N6.warn(`State name is required`),``)}getSectionStateClass(e){if(!e)return N6.warn(`Section is required`),`state-none`;let t=e.states||[];return t.length===0?`state-none`:t.length>1?`state-multiple`:`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||I6[e]:(N6.warn(`State name is required`),I6.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(F6.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(F6.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(F6.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(F6.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(F6.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(F6.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(F6.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(F6.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),(e=this.spacerElement)==null||e.remove(),this.spacerElement=void 0}};L6.SCROLL_END_TIMEOUT=150,L6.SCROLL_DEBOUNCE_TIMEOUT=100,q([C],L6.prototype,`sections`,void 0),q([D({attribute:`scroll-behavior`})],L6.prototype,`scrollBehavior`,void 0),q([D({attribute:`state-tooltips`})],L6.prototype,`stateTooltips`,void 0),q([D({attribute:`state-icons`})],L6.prototype,`stateIcons`,void 0),q([D({attribute:`disable-auto-scroll-detection`,mode:`boolean`})],L6.prototype,`disableAutoScrollDetection`,void 0),q([C],L6.prototype,`sectionItems`,void 0),q([C],L6.prototype,`activeSection`,void 0);let R6={mode:`open`},z6={};L6.compose(Object.assign({baseName:`foundation-section-navigator`,template:M6,styles:j6,shadowOptions:R6},z6));let B6=(e,t)=>ha(e,t),V6=(e,t)=>O` ${ju(e,t)} ::slotted(foundation-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}::slotted(foundation-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}`;var H6=class extends ga{valueChanged(){this.value===void 0&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}};H6.compose(Object.assign({baseName:`segmented-control`,template:B6,styles:V6,shadowOptions:void 0},{}));let U6=(e,t)=>T`<template role="radio" aria-checked="${e=>e.checked}" aria-required="${e=>e.required}" aria-disabled="${e=>e.disabled}" aria-readonly="${e=>e.readOnly}" @keypress="${(e,t)=>e.keypressHandler(t.event)}" @click="${(e,t)=>e.clickHandler(t.event)}"><span><slot></slot></span></template>`,W6=(e,t)=>O` ${Mu(e,t)} :host{padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);cursor: pointer}:host([aria-checked='true']){background: var(--accent-foreground-rest)}`;(class extends va{}).compose(Object.assign({baseName:`segmented-item`,template:U6,styles:W6,shadowOptions:void 0},{}));let G6=(e,t)=>Ea(e,t),K6=(e,t)=>O` ${cu(e,t)} :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible), .control:focus-visible{box-shadow: none;outline: none}`;var q6=class extends Pu{get scrollableListbox(){return this.listbox??this.shadowRoot?.querySelector(`.listbox`)}slottedOptionsChanged(e,t){let n=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;let r=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{let t=e.nodeName.toLowerCase();if(t.endsWith(`-optgroup`)){let t=Array.from(e.children).filter(e=>{let t=e.nodeName.toLowerCase();return e.getAttribute(`role`)===`option`||t.endsWith(`-option`)});r.push(...t)}else(e.getAttribute(`role`)===`option`||t.endsWith(`-option`))&&r.push(e)}),this.options=r,n&&(this.value=n),this.selectedIndex===-1&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(Iy(this))&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}openChanged(e,t){if(this.collapsible){if(this.$emit(`open-change`,{open:this.open}),this.open){this.ariaControls=this.listboxId,this.ariaExpanded=`true`,this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,x.queueUpdate(()=>this.focus());return}this.ariaControls=``,this.ariaExpanded=`false`}}keydownHandler(e){switch(e.key){case`ArrowDown`:case`ArrowUp`:this.open?this.options[this.selectedIndex]?.scrollIntoView({block:`center`,behavior:`auto`}):this.open=!0}return super.keydownHandler(e)}};let J6={indicator:`
977
977
  <svg
978
978
  class="select-indicator"
979
979
  part="select-indicator"
@@ -986,7 +986,7 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
986
986
  </svg>
987
987
  `};q6.compose(Object.assign({baseName:`select`,template:G6,styles:K6,shadowOptions:void 0},J6));let Y6=(e,t)=>Da(e,t),X6=(e,t)=>O` ${Fu(e,t)}`;var Z6=class extends Oa{};let Q6={};Z6.compose(Object.assign({baseName:`skeleton`,template:Y6,styles:X6,shadowOptions:void 0},Q6));let $6=(e,t)=>T`<template role="slider" class="${e=>e.readOnly?`readonly`:``} ${e=>e.orientation||dn.horizontal}" tabindex="${e=>e.disabled?null:0}" aria-valuetext="${e=>e.valueTextFormatter(e.value)}" aria-valuenow="${e=>e.value}" aria-valuemin="${e=>e.min}" aria-valuemax="${e=>e.max}" aria-disabled="${e=>e.disabled?!0:void 0}" aria-readonly="${e=>e.readOnly?!0:void 0}" aria-orientation="${e=>e.orientation}" class="${e=>e.orientation}"><div part="positioning-region" class="positioning-region"><div ${k(`track`)}part="track-container" class="track"><div class="track-progress" style="${e=>{let t=1-In(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),n=Math.round((1-t)*100);return e.orientation===`horizontal`?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${n}%;`:`height: calc(var(--track-width) * 1px); width: ${n}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${n}%;`:`width: calc(var(--track-width) * 1px); height: ${n}%; transition: all 0.2s ease;`}}"></div></div><slot></slot><div ${k(`thumb`)}part="thumb-container" class="thumb-container" style="${e=>e.position}"><slot name="thumb">${t.thumb||``}</slot></div></div></template>`,e8=(e,t)=>O` ${Bu(e,t)} .track-progress{background-color: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px)}`;var t8=class extends Na{};let n8={thumb:`
988
988
  <div class="thumb-cursor"></div>
989
- `};t8.compose(Object.assign({baseName:`slider`,template:$6,styles:e8,shadowOptions:void 0},n8));let r8=(e,t)=>ka(e,t),i8=(e,t)=>O` ${Ru(e,t)}`;var a8=class extends zu{};let o8={};a8.compose(Object.assign({baseName:`slider-label`,template:r8,styles:i8,shadowOptions:void 0},o8));let s8=`default`,c8=1e4,l8={DISMISS:`dismiss`,AUTO_DISMISS:`autoDismiss`},u8=O` @keyframes append-from-left-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-from-left-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}@keyframes append-from-top-animate{from{transform: translateY(-100%);opacity: 0%}to{transform: translateY(0%);opacity: 100%}}@keyframes delete-from-top-animate{from{transform: translateY(0%);opacity: 100%}to{transform: translateY(-100%);opacity: 0%}}@keyframes delete-fade-animate{from{opacity: 100%}to{opacity: 0%}}:host{--snackbar-min-width: 356px;--snackbar-min-height: 55px;--snackbar-max-width: 496px;--snackbar-max-height: auto;--snackbar-animation-name: append-from-left-animate;--snackbar-animation-delete-name: delete-from-left-animate}.snackbar{animation: var(--snackbar-animation-name) 0.3s linear;max-width: var(--snackbar-max-width);min-width: var(--snackbar-min-width);min-height: var(--snackbar-min-height);max-height: var(--snackbar-max-height);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-fill-rest);box-shadow: 0 2px 5px 0 rgb(0 0 0 / 35%);box-sizing: border-box;display: flex;position: relative;bottom: 5px;flex-direction: row;padding: 2px 16px}.snackbar-delete{animation: var(--snackbar-animation-delete-name) 0.3s linear;opacity: 0%}.snackbar::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 0;height: calc(100% - 2px);width: 2px;border-radius: 2px}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;overflow-wrap: anywhere;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,d8=e=>T`<div role="alert" aria-live="polite" part="snackbar" class="snackbar ${e=>e.deleteAnimation}" ${k(`snackbar`)}><div part="content" class="content"><slot name="content">${e=>e.error?.errorDetails||e.notification?.body||`Place holder for error message`}</slot></div>${A(e=>e.error?.config?.snackbar?.confirmingActions?.length||e.notification?.config?.snackbar?.confirmingActions?.length,T`<div part="action" class="action"><slot name="action">${j(e=>e.error?.config?.snackbar?.confirmingActions||e.notification?.config?.snackbar?.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismiss()}}>${e=>e.label}</${e}-button>`)}</slot></div>`)}</div>`,yPe=T` ${e=>d8(Fy(e))} `,f8={mode:`open`,delegatesFocus:!0};var p8=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=c8,this.autoClose=!0,this.type=s8,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(l8.DISMISS,this.dismissEventListener)}errorChanged(e,t){this.type=t?.config?.snackbar?.type??s8}notificationChanged(e,t){this.type=t?.config?.snackbar?.type??s8,this.autoClose=t?.config?.snackbar?.autoClose??!0,this.closeTimeout=t?.config?.snackbar?.closeTimeout??c8}handleDissmis(e=!1){this.deleteAnimation=`snackbar-delete`,this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(l8.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(l8.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}};q([C],p8.prototype,`error`,void 0),q([C],p8.prototype,`notification`,void 0),q([C],p8.prototype,`deleteAnimation`,void 0),q([D({attribute:`identifier`})],p8.prototype,`identifier`,void 0),q([D({attribute:`close-timeout`})],p8.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`,mode:`boolean`})],p8.prototype,`autoClose`,void 0),q([D({attribute:`type`})],p8.prototype,`type`,void 0),p8.compose({baseName:`snackbar`,styles:u8,template:yPe,shadowOptions:f8});let m8=(e,t)=>O` ${Z1()} .fa-stack{display: inline-block;text-align: center;line-height: 2em;height: 2em;position: relative;width: 2em}.fa-stack-1x, .fa-stack-2x{left: 50%;position: absolute;transform: translateX(-50%)}.fa-stack-2x{font-size: 2em}.fa-stack-1x{z-index: 1}`,h8=T`<span class=${e=>`fa-stack fa-${e.size}`}style=${e=>`vertical-align: ${e[`vertical-align`]};`}><slot></slot></span>`;var g8=class extends P{constructor(){super(...arguments),this.size=`1x`,this[`vertical-align`]=`baseline`}};q([D],g8.prototype,`size`,void 0),q([D],g8.prototype,`vertical-align`,void 0),g8.compose({baseName:`stacking-icons`,template:h8,styles:m8});let _8=O` .status-pill{font-size: var(--ag-data-font-size);display: inline-flex;align-items: center;gap: 5px;border-radius: 30px;height: 16px;background: grey;color: var(--neutral-foreground-rest);padding: 2px 8px;line-height: 1;font-weight: 500}.status-pill.lg{height: 32px;border-radius: 16px;padding: 2px 12px}.status-pill-initial{height: 14px;width: 14px;border-radius: 7px;font-weight: bold;font-size: 12px;display: flex;justify-content: center;align-items: center}.status-pill-image{height: 14px}`,bPe=e=>T` ${A(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),T`<div data-test-id="status-pill" part="status-pill" class="status-pill" style="color:${e=>e.textColor||``}; background:${e=>e.backgroundColor||``};">${A(e=>e.iconName,T`<${e}-icon name="${e=>e.iconName}" size="${e=>e.iconSize}"></${e}-icon>`)} ${A(e=>e.iconSrc,T`<img alt="${e=>e.iconSrc}" class="status-pill-image" src="${e=>e.iconSrc}" />`)} ${A(e=>e.iconInitial,T`<div data-test-id="status-pill-initial" class="status-pill-initial" style="color:${e=>e.textColor}; background-color:${e=>e.iconInitialBackgroundColor}">${e=>e.iconInitial.substring(0,1)}</div>`)}<span data-test-id="status-pill-text">${e=>e.text}</span>${A(e=>e.countdown,T`<span data-test-id="status-pill-countdown">${e=>e.countdown}</span>`)}</div>`)} `,v8=T` ${e=>bPe(Fy(e))} `,y8=1e3,b8=86400,x8=3600,xPe=(e,t=`second`)=>{let n=e/y8,r=Math.floor(n/b8);n%=b8;let i=Math.floor(n/x8);n%=x8;let a=Math.floor(n/60),o=Math.floor(n%60),s=[];switch(r&&s.push(`${r}d`),t){case`minute`:i&&s.push(`${i}h`),a&&s.push(`${a}m`),!a&&o&&s.push(`< 1m`);break;case`hour`:i&&s.push(`${i}h`),!i&&(a||o)&&s.push(`< 1h`);break;default:i&&s.push(`${i}h`),a&&s.push(`${a}m`),o&&s.push(`${o}s`)}return s.length?s.join(` `):`0s`};var S8=class extends P{constructor(){super(...arguments),this.iconSize=`sm`,this.dateCountdownCompletedMessage=`Expired`,this.dateCountdownUnit=`second`,this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t){this.clearCountdownTimer();return}this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))jy.warn(`invalid date-countdown value passed. Must be a number`);else{e=parseInt(e);let t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),y8)}}updateCountdown(e){let t=(/* @__PURE__ */ new Date()).getTime(),n=Math.floor(e.getTime()-t),r=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(r!==void 0&&!isNaN(r)&&t<r){this.isCountdownVisible=!1,this.countdown=null,this.isCountdownExpired=!1;return}this.isCountdownVisible=!0,n<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=xPe(n,this.dateCountdownUnit)}updateVisibilityFromStartTime(){let e=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(e!==void 0&&!isNaN(e)){let t=Date.now();this.isCountdownVisible=t>=e}else this.isCountdownVisible=!0}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}};q([D({attribute:`background-color`})],S8.prototype,`backgroundColor`,void 0),q([D({attribute:`icon-name`})],S8.prototype,`iconName`,void 0),q([D({attribute:`icon-src`})],S8.prototype,`iconSrc`,void 0),q([D({attribute:`icon-initial`})],S8.prototype,`iconInitial`,void 0),q([D({attribute:`icon-initial-background-color`})],S8.prototype,`iconInitialBackgroundColor`,void 0),q([D({attribute:`icon-size`})],S8.prototype,`iconSize`,void 0),q([D({attribute:`text-color`})],S8.prototype,`textColor`,void 0),q([D],S8.prototype,`text`,void 0),q([D({attribute:`date-countdown`})],S8.prototype,`dateCountdown`,void 0),q([D({attribute:`date-countdown-completed-message`})],S8.prototype,`dateCountdownCompletedMessage`,void 0),q([D({attribute:`date-countdown-unit`})],S8.prototype,`dateCountdownUnit`,void 0),q([D({attribute:`date-countdown-visible-after`})],S8.prototype,`dateCountdownVisibleAfter`,void 0),q([D({mode:`boolean`,attribute:`hide-when-countdown-completed`})],S8.prototype,`hideWhenCountdownCompleted`,void 0),q([C],S8.prototype,`countdown`,void 0),q([C],S8.prototype,`isCountdownExpired`,void 0),q([C],S8.prototype,`isCountdownVisible`,void 0),S8.compose({baseName:`status-pill`,styles:_8,template:v8});let C8=(e,t)=>{let n=[`step`,`step-${t}`];return e.selected&&n.push(`step-selected`),e.completed&&n.push(`step-completed`),e.error&&n.push(`step-error`),n.join(` `)},SPe=[`positioning-region: step-positioning-region`,`content-region: step-content-region`,`expand-collapse-button: step-expand-collapse-button`,`items: step-items`].join(`, `),w8=e=>T` ${jf(e=>e.orientation===Va.vertical,T`<${e}-tree-item ${k(`treeItem`)}class=${e=>pn(`tree-item`,[`cursor-pointer`,e.showCursorPointer])}part="${e=>C8(e,`vertical`)}" exportparts="${SPe}" @click="${(e,t)=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>e.completed,T`<${e}-icon name="check-circle" variant="regular" size="lg" class="stepper-icon completed-icon" part="step-icon step-icon-completed"></${e}-icon>`)} ${A(e=>e.error,T`<${e}-icon name="times-circle" variant="regular" size="lg" class="stepper-icon error-icon" part="step-icon step-icon-error"></${e}-icon>`)}<slot></slot></${e}-tree-item>`,T`<div class=${e=>pn(`step-container`,[`selected`,e.selected])}part="${e=>C8(e,`horizontal`)}"><div class=${e=>pn(`step-number-container`,[`cursor-pointer`,e.showCursorPointer])}part="step-number-container" @click="${e=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>!e.hideStepNumber,T`<span class="step-number" part="step-number">${e=>e.tabPosition}</span>`)}<slot class="step-title"></slot></div>${A(e=>!e.isLast,T`<${e}-icon class="stepper-icon angle-icon" part="step-icon step-icon-angle" name="angle-right" variant="solid" size="lg"></${e}-icon>`)}</div>`)} `,CPe=T` ${e=>w8(Fy(e))} `,T8=(e,t)=>O` .tree-item{cursor: default}.tree-item::part(content-region){margin-inline-start: 0}.tree-item[selected]::part(positioning-region):hover{background: var(--neutral-fill-rest)}.tree-item::part(positioning-region):hover{background: var(--neutral-fill-stealth-rest)}.stepper-icon{margin-right: 5px}.completed-icon{color: #69cd70}.error-icon{color: #f14376}.step-number{display: flex;justify-content: center;align-items: center;margin: 0 5px 0 0;width: 24px;height: 24px;font-size: var(--type-ramp-minus-1-font-size);font-weight: 500;color: var(--focus-stroke-outer);background-color: var(--neutral-fill-input-rest);border-radius: 50%;border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-number-container{display: flex;flex-direction: row;align-items: center;justify-content: center;width: 75%}.angle-icon{color: var(--neutral-fill-input-rest);margin: 0 calc(var(--design-unit) * 4px)}.step-title{font-size: var(--type-ramp-base-font-size);color: var(--focus-stroke-outer);font-weight: 600}:host([completed]) .step-number{border-color: #69cd70;color: white;background-color: #69cd70}:host([completed]) .step-title{color: #69cd70}:host([error]) .step-number{border-color: #f14376;color: white;background-color: #f14376}:host([error]) .step-title{color: #f14376}:host([orientation='horizontal']){flex: 1 1 0;height: 100%}.cursor-pointer{cursor: pointer}.step-container{position: relative;display: flex;align-items: center;justify-content: space-between;height: 100%}.step-container.selected::after{content: '';position: absolute;bottom: 0;left: calc(var(--design-unit) * -3px);/* This matches the left padding */ right: 28px;/* This matches the icon width + right margin */ height: 2px;width: calc(100% - 28px);background-color: var(--accent-fill-rest);/* Choose a color */}`;var E8=class extends P{constructor(){super(...arguments),this.slot=`tab`,this.orientation=Va.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}};q([D],E8.prototype,`slot`,void 0),q([D({mode:`boolean`})],E8.prototype,`selected`,void 0),q([D({mode:`boolean`})],E8.prototype,`completed`,void 0),q([D({mode:`boolean`})],E8.prototype,`error`,void 0),q([D({mode:`boolean`})],E8.prototype,`isLast`,void 0),q([D({mode:`boolean`})],E8.prototype,`hideStepNumber`,void 0),q([D({mode:`boolean`})],E8.prototype,`showCursorPointer`,void 0),q([D({attribute:`tab-position`})],E8.prototype,`tabPosition`,void 0),q([D],E8.prototype,`orientation`,void 0);let D8={};E8.compose(Object.assign({baseName:`stepper-tab`,template:CPe,styles:T8,shadowOptions:void 0},D8));let O8=()=>T`<template slot="tab-panel" role="stepper-tab-panel"><slot></slot></template>`;var k8=class extends P{};let A8={};k8.compose(Object.assign({baseName:`stepper-tab-panel`,template:O8,shadowOptions:void 0},A8));let j8=(e,t)=>Pa(e,t),M8=(e,t)=>O` ${Vu(e,t)} .checked-indicator{transform: scale(1.3)}.switch{border-radius: calc(var(--control-corner-radius) * 3px)}.checked-indicator{border-radius: calc(var(--control-corner-radius) * 2px)}`;var N8=class extends Fa{};N8.compose(Object.assign({baseName:`switch`,template:j8,styles:M8,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`}));let P8=(e,t)=>Ra(e,t),F8=(e,t)=>O` ${Uu(e,t)} :host{user-select: none}`;var I8=class extends za{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&kje()}};q([D({mode:`boolean`})],I8.prototype,`alert`,void 0);let L8={};I8.compose(Object.assign({baseName:`tab`,template:P8,styles:F8,shadowOptions:void 0},L8));let R8=(e,t)=>Ia(e,t),z8=(e,t)=>O` ${Wu(e,t)} :host{height: 100%;padding: 0}`;var B8=class extends La{};let V8={};B8.compose(Object.assign({baseName:`tab-panel`,template:R8,styles:z8,shadowOptions:void 0},V8));let H8=(e,t)=>Ba(e,t),U8=(e,t)=>O` ${Hu(e,t)} :host{height: 100%;width: 100%}:host([scrollable]) [part='tablist']{overflow-x: auto;overflow-y: hidden;white-space: nowrap}:host([scrollable]) ::slotted([role='tab']){flex: 0 0 auto}`;var W8=class extends Ha{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}};q([D({mode:`boolean`})],W8.prototype,`scrollable`,void 0);let G8={};W8.compose(Object.assign({baseName:`tabs`,template:H8,styles:U8,shadowOptions:void 0},G8));let K8=(e,t)=>Ka(e,t),q8=(e,t)=>O` ${Gu(e,t)} :host .control{padding: calc(var(--design-unit) * 3px)}`;var J8=class extends Ku{};let Y8={};J8.compose(Object.assign({baseName:`text-area`,template:K8,styles:q8,shadowOptions:void 0},Y8));let X8=(e,t)=>T`<template class="${e=>pn([`readonly`,e.readOnly],[`has-prefix`,!!e.prefix],[`has-suffix`,!!e.suffix])}"><label part="label" for="${e=>e.id?e.id:`control`}" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?`label`:`label label-hidden`}"><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root">${Tt(e,t)}<div class="control-field">${A(e=>e.prefix,T`<span class="prefix" part="prefix" id="${e=>`${e.id||`control`}-prefix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.prefix}</span>`)}<input name="${e=>e.name}" autocomplete="${e=>e.autocomplete}" autocapitalize="${e=>e.autocapitalize}" id="${e=>e.id?e.id:`control`}" class="control" part="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" step="${e=>e.step}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="${e=>e.type}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.controlAriaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${k(`control`)}/>${A(e=>e.suffix,T`<span class="suffix" part="suffix" id="${e=>`${e.id||`control`}-suffix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.suffix}</span>`)}</div>${wt(e,t)}</div></template>`,Z8=(e,t)=>O` ${qu(e,t)} /* Override FAST .root align-items: baseline for this flex child so it still fills the row. */ ${Z0} input{color-scheme: ${Yh}}`;var Q8=class extends K0(Ju){constructor(){super(...arguments),this.autocomplete=`off`,this.autocapitalize=`off`}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}};q([D],Q8.prototype,`autocomplete`,void 0),q([D],Q8.prototype,`autocapitalize`,void 0),q([D],Q8.prototype,`step`,void 0);let $8={mode:`open`,delegatesFocus:!0},e5={};Q8.compose(Object.assign({baseName:`text-field`,template:X8,styles:Z8,shadowOptions:$8},e5));let t5=O` @keyframes append-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}:host{--toast-min-width: 356px;--toast-min-height: 128px;--toast-max-width: 356px;--toast-max-height: 272px}.toast{animation: append-animate 0.3s linear;max-width: var(--toast-max-width);min-width: var(--toast-min-width);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-stroke-rest);box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);display: flex;position: relative;flex-direction: row;padding: 8px 8px 8px 15px;margin: 5px}.toast-delete{animation: delete-animate 0.3s linear;opacity: 0%}.toast::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 5px;height: calc(100% - 10px);width: 4px;border-radius: 2px;background-color: red}.content-wrapper{height: fit-content;width: 100%;display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.bottom{width: 70%}.top{width: 100%;display: flex;flex-direction: row;justify-content: space-between;align-items: center}.content{width: 85%;font-size: 12px;overflow-wrap: break-word}::slotted(*){white-space: pre-line}.date{color: var(--neutral-foreground-hint);font-size: 12px;margin: 0 0 5px}.notification-icon{margin-right: 6px}.close-icon{cursor: pointer;margin-left: auto;color: #879ba6}`,wPe=(e=`zero`)=>T`<${e}-icon class="close-icon" size="lg" name="xmark"></prefix-icon>`,TPe=(e=`zero`)=>T`<div role="alert" part="root" aria-live="polite" class="toast ${e=>e.deleteAnimation}" ${k(`toast`)}><div class="content-wrapper"><div part="top" class="top">${A(e=>e.notificationIcon,T`<${e}-icon class="notification-icon" name="${e=>e.notificationIcon}" size="lg"></prefix-icon>`)}<slot name="top"></slot><div class="close-icon" @click=${e=>e.close()}>${wPe(e)}</div></div><div part="content" class="content"><slot name="content"></slot></div><div part="date" class="date"><slot name="date"></slot></div><div part="bottom" class="bottom"><slot name="bottom"></slot></div></div></div>`,n5=T` ${e=>TPe(Fy(e))} `,r5={mode:`open`,delegatesFocus:!0},i5={};var a5=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation=`toast-delete`,this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}};q([C],a5.prototype,`deleteAnimation`,void 0),q([D({attribute:`close-timeout`})],a5.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`})],a5.prototype,`autoClose`,void 0),q([D({attribute:`notification-icon`})],a5.prototype,`notificationIcon`,void 0),a5.compose(Object.assign({baseName:`toast`,styles:t5,template:n5,shadowOptions:r5},i5));let o5=(e,t)=>Ja(e,t),s5=(e,t)=>O` ${Yu(e,t)}`;var c5=class extends Xu{};let l5={};c5.compose(Object.assign({baseName:`toolbar`,template:o5,styles:s5,shadowOptions:void 0},l5));let u5=(e,t)=>$a(e,t),d5=(e,t)=>O` ${Zu(e,t)}`;var f5=class extends to{};let p5={};f5.compose(Object.assign({baseName:`tooltip`,template:u5,styles:d5,shadowOptions:void 0},p5));let m5=(e,t)=>no(e,t),h5=(e,t)=>O` ${$u(e,t)} :host{--focus-stroke-width: 0;--tree-item-nested-width: 1em}:host([selected])::after{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);width: 5px;top: 0;border-radius: 0}.positioning-region{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px)}`;var g5=class extends io{};g5.compose(Object.assign({baseName:`tree-item`,template:m5,styles:h5,shadowOptions:void 0},{expandCollapseGlyph:`
989
+ `};t8.compose(Object.assign({baseName:`slider`,template:$6,styles:e8,shadowOptions:void 0},n8));let r8=(e,t)=>ka(e,t),i8=(e,t)=>O` ${Ru(e,t)}`;var a8=class extends zu{};let o8={};a8.compose(Object.assign({baseName:`slider-label`,template:r8,styles:i8,shadowOptions:void 0},o8));let s8=`default`,c8=1e4,l8={DISMISS:`dismiss`,AUTO_DISMISS:`autoDismiss`},u8=O` @keyframes append-from-left-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-from-left-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}@keyframes append-from-top-animate{from{transform: translateY(-100%);opacity: 0%}to{transform: translateY(0%);opacity: 100%}}@keyframes delete-from-top-animate{from{transform: translateY(0%);opacity: 100%}to{transform: translateY(-100%);opacity: 0%}}@keyframes delete-fade-animate{from{opacity: 100%}to{opacity: 0%}}:host{--snackbar-min-width: 356px;--snackbar-min-height: 55px;--snackbar-max-width: 496px;--snackbar-max-height: auto;--snackbar-animation-name: append-from-left-animate;--snackbar-animation-delete-name: delete-from-left-animate}.snackbar{animation: var(--snackbar-animation-name) 0.3s linear;max-width: var(--snackbar-max-width);min-width: var(--snackbar-min-width);min-height: var(--snackbar-min-height);max-height: var(--snackbar-max-height);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-fill-rest);box-shadow: 0 2px 5px 0 rgb(0 0 0 / 35%);box-sizing: border-box;display: flex;position: relative;bottom: 5px;flex-direction: row;padding: 2px 16px}.snackbar-delete{animation: var(--snackbar-animation-delete-name) 0.3s linear;opacity: 0%}.snackbar::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 0;height: calc(100% - 2px);width: 2px;border-radius: 2px}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;overflow-wrap: anywhere;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,d8=e=>T`<div role="alert" aria-live="polite" part="snackbar" class="snackbar ${e=>e.deleteAnimation}" ${k(`snackbar`)}><div part="content" class="content"><slot name="content">${e=>e.error?.errorDetails||e.notification?.body||`Place holder for error message`}</slot></div>${A(e=>e.error?.config?.snackbar?.confirmingActions?.length||e.notification?.config?.snackbar?.confirmingActions?.length,T`<div part="action" class="action"><slot name="action">${j(e=>e.error?.config?.snackbar?.confirmingActions||e.notification?.config?.snackbar?.confirmingActions,T`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var n;e?.action(),(n=t.parent)==null||n.dismiss()}}>${e=>e.label}</${e}-button>`)}</slot></div>`)}</div>`,yPe=T` ${e=>d8(Fy(e))} `,f8={mode:`open`,delegatesFocus:!0};var p8=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=c8,this.autoClose=!0,this.type=s8,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(l8.DISMISS,this.dismissEventListener)}errorChanged(e,t){this.type=t?.config?.snackbar?.type??s8}notificationChanged(e,t){this.type=t?.config?.snackbar?.type??s8,this.autoClose=t?.config?.snackbar?.autoClose??!0,this.closeTimeout=t?.config?.snackbar?.closeTimeout??c8}handleDissmis(e=!1){this.deleteAnimation=`snackbar-delete`,this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(l8.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(l8.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}};q([C],p8.prototype,`error`,void 0),q([C],p8.prototype,`notification`,void 0),q([C],p8.prototype,`deleteAnimation`,void 0),q([D({attribute:`identifier`})],p8.prototype,`identifier`,void 0),q([D({attribute:`close-timeout`})],p8.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`,mode:`boolean`})],p8.prototype,`autoClose`,void 0),q([D({attribute:`type`})],p8.prototype,`type`,void 0),p8.compose({baseName:`snackbar`,styles:u8,template:yPe,shadowOptions:f8});let m8=(e,t)=>O` ${Z1()} .fa-stack{display: inline-block;text-align: center;line-height: 2em;height: 2em;position: relative;width: 2em}.fa-stack-1x, .fa-stack-2x{left: 50%;position: absolute;transform: translateX(-50%)}.fa-stack-2x{font-size: 2em}.fa-stack-1x{z-index: 1}`,h8=T`<span class=${e=>`fa-stack fa-${e.size}`}style=${e=>`vertical-align: ${e[`vertical-align`]};`}><slot></slot></span>`;var g8=class extends P{constructor(){super(...arguments),this.size=`1x`,this[`vertical-align`]=`baseline`}};q([D],g8.prototype,`size`,void 0),q([D],g8.prototype,`vertical-align`,void 0),g8.compose({baseName:`stacking-icons`,template:h8,styles:m8});let _8=O` .status-pill{font-size: var(--ag-data-font-size);display: inline-flex;align-items: center;gap: 5px;border-radius: 30px;height: 16px;background: grey;color: var(--neutral-foreground-rest);padding: 2px 8px;line-height: 1;font-weight: 500}.status-pill.lg{height: 32px;border-radius: 16px;padding: 2px 12px}.status-pill-initial{height: 14px;width: 14px;border-radius: 7px;font-weight: bold;font-size: 12px;display: flex;justify-content: center;align-items: center}.status-pill-image{height: 14px}`,bPe=e=>T` ${A(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),T`<div data-test-id="status-pill" part="status-pill" class="status-pill" style="color:${e=>e.textColor||``}; background:${e=>e.backgroundColor||``};">${A(e=>e.iconName,T`<${e}-icon name="${e=>e.iconName}" size="${e=>e.iconSize}"></${e}-icon>`)} ${A(e=>e.iconSrc,T`<img alt="${e=>e.iconSrc}" class="status-pill-image" src="${e=>e.iconSrc}" />`)} ${A(e=>e.iconInitial,T`<div data-test-id="status-pill-initial" class="status-pill-initial" style="color:${e=>e.textColor}; background-color:${e=>e.iconInitialBackgroundColor}">${e=>e.iconInitial.substring(0,1)}</div>`)}<span data-test-id="status-pill-text">${e=>e.text}</span>${A(e=>e.countdown,T`<span data-test-id="status-pill-countdown">${e=>e.countdown}</span>`)}</div>`)} `,v8=T` ${e=>bPe(Fy(e))} `,y8=1e3,b8=86400,x8=3600,xPe=(e,t=`second`)=>{let n=e/y8,r=Math.floor(n/b8);n%=b8;let i=Math.floor(n/x8);n%=x8;let a=Math.floor(n/60),o=Math.floor(n%60),s=[];switch(r&&s.push(`${r}d`),t){case`minute`:i&&s.push(`${i}h`),a&&s.push(`${a}m`),!a&&o&&s.push(`< 1m`);break;case`hour`:i&&s.push(`${i}h`),!i&&(a||o)&&s.push(`< 1h`);break;default:i&&s.push(`${i}h`),a&&s.push(`${a}m`),o&&s.push(`${o}s`)}return s.length?s.join(` `):`0s`};var S8=class extends P{constructor(){super(...arguments),this.iconSize=`sm`,this.dateCountdownCompletedMessage=`Expired`,this.dateCountdownUnit=`second`,this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t){this.clearCountdownTimer();return}this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))jy.warn(`invalid date-countdown value passed. Must be a number`);else{e=parseInt(e);let t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),y8)}}updateCountdown(e){let t=(/* @__PURE__ */ new Date()).getTime(),n=Math.floor(e.getTime()-t),r=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(r!==void 0&&!isNaN(r)&&t<r){this.isCountdownVisible=!1,this.countdown=null,this.isCountdownExpired=!1;return}this.isCountdownVisible=!0,n<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=xPe(n,this.dateCountdownUnit)}updateVisibilityFromStartTime(){let e=this.dateCountdownVisibleAfter!==void 0&&this.dateCountdownVisibleAfter!==null?Number(this.dateCountdownVisibleAfter):void 0;if(e!==void 0&&!isNaN(e)){let t=Date.now();this.isCountdownVisible=t>=e}else this.isCountdownVisible=!0}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}};q([D({attribute:`background-color`})],S8.prototype,`backgroundColor`,void 0),q([D({attribute:`icon-name`})],S8.prototype,`iconName`,void 0),q([D({attribute:`icon-src`})],S8.prototype,`iconSrc`,void 0),q([D({attribute:`icon-initial`})],S8.prototype,`iconInitial`,void 0),q([D({attribute:`icon-initial-background-color`})],S8.prototype,`iconInitialBackgroundColor`,void 0),q([D({attribute:`icon-size`})],S8.prototype,`iconSize`,void 0),q([D({attribute:`text-color`})],S8.prototype,`textColor`,void 0),q([D],S8.prototype,`text`,void 0),q([D({attribute:`date-countdown`})],S8.prototype,`dateCountdown`,void 0),q([D({attribute:`date-countdown-completed-message`})],S8.prototype,`dateCountdownCompletedMessage`,void 0),q([D({attribute:`date-countdown-unit`})],S8.prototype,`dateCountdownUnit`,void 0),q([D({attribute:`date-countdown-visible-after`})],S8.prototype,`dateCountdownVisibleAfter`,void 0),q([D({mode:`boolean`,attribute:`hide-when-countdown-completed`})],S8.prototype,`hideWhenCountdownCompleted`,void 0),q([C],S8.prototype,`countdown`,void 0),q([C],S8.prototype,`isCountdownExpired`,void 0),q([C],S8.prototype,`isCountdownVisible`,void 0),S8.compose({baseName:`status-pill`,styles:_8,template:v8});let C8=(e,t)=>{let n=[`step`,`step-${t}`];return e.selected&&n.push(`step-selected`),e.completed&&n.push(`step-completed`),e.error&&n.push(`step-error`),n.join(` `)},SPe=[`positioning-region: step-positioning-region`,`content-region: step-content-region`,`expand-collapse-button: step-expand-collapse-button`,`items: step-items`].join(`, `),w8=e=>T` ${jf(e=>e.orientation===Va.vertical,T`<${e}-tree-item ${k(`treeItem`)}class=${e=>pn(`tree-item`,[`cursor-pointer`,e.showCursorPointer])}part="${e=>C8(e,`vertical`)}" exportparts="${SPe}" @click="${(e,t)=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>e.completed,T`<${e}-icon name="check-circle" variant="regular" size="lg" class="stepper-icon completed-icon" part="step-icon step-icon-completed"></${e}-icon>`)} ${A(e=>e.error,T`<${e}-icon name="times-circle" variant="regular" size="lg" class="stepper-icon error-icon" part="step-icon step-icon-error"></${e}-icon>`)}<slot></slot></${e}-tree-item>`,T`<div class=${e=>pn(`step-container`,[`selected`,e.selected])}part="${e=>C8(e,`horizontal`)}"><div class=${e=>pn(`step-number-container`,[`cursor-pointer`,e.showCursorPointer])}part="step-number-container" @click="${e=>e.$emit(`tab-clicked`,e.tabPosition-1)}">${A(e=>!e.hideStepNumber,T`<span class="step-number" part="step-number">${e=>e.tabPosition}</span>`)}<slot class="step-title"></slot></div>${A(e=>!e.isLast,T`<${e}-icon class="stepper-icon angle-icon" part="step-icon step-icon-angle" name="angle-right" variant="solid" size="lg"></${e}-icon>`)}</div>`)} `,CPe=T` ${e=>w8(Fy(e))} `,T8=(e,t)=>O` .tree-item{cursor: default}.tree-item::part(content-region){margin-inline-start: 0}.tree-item[selected]::part(positioning-region):hover{background: var(--neutral-fill-rest)}.tree-item::part(positioning-region):hover{background: var(--neutral-fill-stealth-rest)}.stepper-icon{margin-right: 5px}.completed-icon{color: #69cd70}.error-icon{color: #f14376}.step-number{display: flex;justify-content: center;align-items: center;margin: 0 5px 0 0;width: 24px;height: 24px;font-size: var(--type-ramp-minus-1-font-size);font-weight: 500;color: var(--focus-stroke-outer);background-color: var(--neutral-fill-input-rest);border-radius: 50%;border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-number-container{display: flex;flex-direction: row;align-items: center;justify-content: center;width: 75%}.angle-icon{color: var(--neutral-fill-input-rest);margin: 0 calc(var(--design-unit) * 4px)}.step-title{font-size: var(--type-ramp-base-font-size);color: var(--focus-stroke-outer);font-weight: 600}:host([completed]) .step-number{border-color: #69cd70;color: white;background-color: #69cd70}:host([completed]) .step-title{color: #69cd70}:host([error]) .step-number{border-color: #f14376;color: white;background-color: #f14376}:host([error]) .step-title{color: #f14376}:host([orientation='horizontal']){flex: 1 1 0;height: 100%}.cursor-pointer{cursor: pointer}.step-container{position: relative;display: flex;align-items: center;justify-content: space-between;height: 100%}.step-container.selected::after{content: '';position: absolute;bottom: 0;left: calc(var(--design-unit) * -3px);/* This matches the left padding */ right: 28px;/* This matches the icon width + right margin */ height: 2px;width: calc(100% - 28px);background-color: var(--accent-fill-rest);/* Choose a color */}`;var E8=class extends P{constructor(){super(...arguments),this.slot=`tab`,this.orientation=Va.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}};q([D],E8.prototype,`slot`,void 0),q([D({mode:`boolean`})],E8.prototype,`selected`,void 0),q([D({mode:`boolean`})],E8.prototype,`completed`,void 0),q([D({mode:`boolean`})],E8.prototype,`error`,void 0),q([D({mode:`boolean`})],E8.prototype,`isLast`,void 0),q([D({mode:`boolean`})],E8.prototype,`hideStepNumber`,void 0),q([D({mode:`boolean`})],E8.prototype,`showCursorPointer`,void 0),q([D({attribute:`tab-position`})],E8.prototype,`tabPosition`,void 0),q([D],E8.prototype,`orientation`,void 0);let D8={};E8.compose(Object.assign({baseName:`stepper-tab`,template:CPe,styles:T8,shadowOptions:void 0},D8));let O8=()=>T`<template slot="tab-panel" role="stepper-tab-panel"><slot></slot></template>`;var k8=class extends P{};let A8={};k8.compose(Object.assign({baseName:`stepper-tab-panel`,template:O8,shadowOptions:void 0},A8));let j8=(e,t)=>Pa(e,t),M8=(e,t)=>O` ${Vu(e,t)} .checked-indicator{transform: scale(1.3);border-radius: calc(var(--control-corner-radius) * 2px)}.switch{border-radius: calc(var(--control-corner-radius) * 3px)}`;var N8=class extends Fa{};N8.compose(Object.assign({baseName:`switch`,template:j8,styles:M8,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`}));let P8=(e,t)=>Ra(e,t),F8=(e,t)=>O` ${Uu(e,t)} :host{user-select: none}`;var I8=class extends za{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&kje()}};q([D({mode:`boolean`})],I8.prototype,`alert`,void 0);let L8={};I8.compose(Object.assign({baseName:`tab`,template:P8,styles:F8,shadowOptions:void 0},L8));let R8=(e,t)=>Ia(e,t),z8=(e,t)=>O` ${Wu(e,t)} :host{height: 100%;padding: 0}`;var B8=class extends La{};let V8={};B8.compose(Object.assign({baseName:`tab-panel`,template:R8,styles:z8,shadowOptions:void 0},V8));let H8=(e,t)=>Ba(e,t),U8=(e,t)=>O` ${Hu(e,t)} :host{height: 100%;width: 100%}:host([scrollable]) [part='tablist']{overflow: auto hidden;white-space: nowrap}:host([scrollable]) ::slotted([role='tab']){flex: 0 0 auto}`;var W8=class extends Ha{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}};q([D({mode:`boolean`})],W8.prototype,`scrollable`,void 0);let G8={};W8.compose(Object.assign({baseName:`tabs`,template:H8,styles:U8,shadowOptions:void 0},G8));let K8=(e,t)=>Ka(e,t),q8=(e,t)=>O` ${Gu(e,t)} :host .control{padding: calc(var(--design-unit) * 3px)}`;var J8=class extends Ku{};let Y8={};J8.compose(Object.assign({baseName:`text-area`,template:K8,styles:q8,shadowOptions:void 0},Y8));let X8=(e,t)=>T`<template class="${e=>pn([`readonly`,e.readOnly],[`has-prefix`,!!e.prefix],[`has-suffix`,!!e.suffix])}"><label part="label" for="${e=>e.id?e.id:`control`}" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?`label`:`label label-hidden`}"><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="root" part="root">${Tt(e,t)}<div class="control-field">${A(e=>e.prefix,T`<span class="prefix" part="prefix" id="${e=>`${e.id||`control`}-prefix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.prefix}</span>`)}<input name="${e=>e.name}" autocomplete="${e=>e.autocomplete}" autocapitalize="${e=>e.autocapitalize}" id="${e=>e.id?e.id:`control`}" class="control" part="control" @input="${e=>e.handleTextInput()}" @change="${e=>e.handleChange()}" step="${e=>e.step}" ?autofocus="${e=>e.autofocus}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" ?spellcheck="${e=>e.spellcheck}" :value="${e=>e.value}" type="${e=>e.type}" aria-atomic="${e=>e.ariaAtomic}" aria-busy="${e=>e.ariaBusy}" aria-controls="${e=>e.ariaControls}" aria-current="${e=>e.ariaCurrent}" aria-describedby="${e=>e.controlAriaDescribedby}" aria-details="${e=>e.ariaDetails}" aria-disabled="${e=>e.ariaDisabled}" aria-errormessage="${e=>e.ariaErrormessage}" aria-flowto="${e=>e.ariaFlowto}" aria-haspopup="${e=>e.ariaHaspopup}" aria-hidden="${e=>e.ariaHidden}" aria-invalid="${e=>e.ariaInvalid}" aria-keyshortcuts="${e=>e.ariaKeyshortcuts}" aria-label="${e=>e.ariaLabel}" aria-labelledby="${e=>e.ariaLabelledby}" aria-live="${e=>e.ariaLive}" aria-owns="${e=>e.ariaOwns}" aria-relevant="${e=>e.ariaRelevant}" aria-roledescription="${e=>e.ariaRoledescription}" ${k(`control`)}/>${A(e=>e.suffix,T`<span class="suffix" part="suffix" id="${e=>`${e.id||`control`}-suffix`}" ?aria-hidden="${e=>e.hideAffixFromScreenReader}">${e=>e.suffix}</span>`)}</div>${wt(e,t)}</div></template>`,Z8=(e,t)=>O` ${qu(e,t)} /* Override FAST .root align-items: baseline for this flex child so it still fills the row. */ ${Z0} input{color-scheme: ${Yh}}`;var Q8=class extends K0(Ju){constructor(){super(...arguments),this.autocomplete=`off`,this.autocapitalize=`off`}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}};q([D],Q8.prototype,`autocomplete`,void 0),q([D],Q8.prototype,`autocapitalize`,void 0),q([D],Q8.prototype,`step`,void 0);let $8={mode:`open`,delegatesFocus:!0},e5={};Q8.compose(Object.assign({baseName:`text-field`,template:X8,styles:Z8,shadowOptions:$8},e5));let t5=O` @keyframes append-animate{from{transform: translateX(100%);opacity: 0%}to{transform: translateX(0%);opacity: 100%}}@keyframes delete-animate{from{transform: translateX(0%);opacity: 100%}to{transform: translateX(100%);opacity: 0%}}:host{--toast-min-width: 356px;--toast-min-height: 128px;--toast-max-width: 356px;--toast-max-height: 272px}.toast{animation: append-animate 0.3s linear;max-width: var(--toast-max-width);min-width: var(--toast-min-width);background-color: var(--fill-color);border-radius: calc(var(--control-corner-radius) * 1px);border-width: thin;border-color: var(--neutral-stroke-rest);box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);display: flex;position: relative;flex-direction: row;padding: 8px 8px 8px 15px;margin: 5px}.toast-delete{animation: delete-animate 0.3s linear;opacity: 0%}.toast::after{content: '';position: absolute;top: 50%;transform: translateY(-50%);left: 5px;height: calc(100% - 10px);width: 4px;border-radius: 2px;background-color: red}.content-wrapper{height: fit-content;width: 100%;display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.bottom{width: 70%}.top{width: 100%;display: flex;flex-direction: row;justify-content: space-between;align-items: center}.content{width: 85%;font-size: 12px;overflow-wrap: break-word}::slotted(*){white-space: pre-line}.date{color: var(--neutral-foreground-hint);font-size: 12px;margin: 0 0 5px}.notification-icon{margin-right: 6px}.close-icon{cursor: pointer;margin-left: auto;color: #879ba6}`,wPe=(e=`zero`)=>T`<${e}-icon class="close-icon" size="lg" name="xmark"></prefix-icon>`,TPe=(e=`zero`)=>T`<div role="alert" part="root" aria-live="polite" class="toast ${e=>e.deleteAnimation}" ${k(`toast`)}><div class="content-wrapper"><div part="top" class="top">${A(e=>e.notificationIcon,T`<${e}-icon class="notification-icon" name="${e=>e.notificationIcon}" size="lg"></prefix-icon>`)}<slot name="top"></slot><div class="close-icon" @click=${e=>e.close()}>${wPe(e)}</div></div><div part="content" class="content"><slot name="content"></slot></div><div part="date" class="date"><slot name="date"></slot></div><div part="bottom" class="bottom"><slot name="bottom"></slot></div></div></div>`,n5=T` ${e=>TPe(Fy(e))} `,r5={mode:`open`,delegatesFocus:!0},i5={};var a5=class extends P{constructor(){super(...arguments),this.deleteAnimation=``,this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation=`toast-delete`,this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}};q([C],a5.prototype,`deleteAnimation`,void 0),q([D({attribute:`close-timeout`})],a5.prototype,`closeTimeout`,void 0),q([D({attribute:`auto-close`})],a5.prototype,`autoClose`,void 0),q([D({attribute:`notification-icon`})],a5.prototype,`notificationIcon`,void 0),a5.compose(Object.assign({baseName:`toast`,styles:t5,template:n5,shadowOptions:r5},i5));let o5=(e,t)=>Ja(e,t),s5=(e,t)=>O` ${Yu(e,t)}`;var c5=class extends Xu{};let l5={};c5.compose(Object.assign({baseName:`toolbar`,template:o5,styles:s5,shadowOptions:void 0},l5));let u5=(e,t)=>$a(e,t),d5=(e,t)=>O` ${Zu(e,t)}`;var f5=class extends to{};let p5={};f5.compose(Object.assign({baseName:`tooltip`,template:u5,styles:d5,shadowOptions:void 0},p5));let m5=(e,t)=>no(e,t),h5=(e,t)=>O` ${$u(e,t)} :host{--focus-stroke-width: 0;--tree-item-nested-width: 1em}:host([selected])::after{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);width: 5px;top: 0;border-radius: 0}.positioning-region{height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px)}`;var g5=class extends io{};g5.compose(Object.assign({baseName:`tree-item`,template:m5,styles:h5,shadowOptions:void 0},{expandCollapseGlyph:`
990
990
  <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">
991
991
  <path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>
992
992
  </svg>`}));let _5=(e,t)=>ao(e,t),v5=(e,t)=>O` ${ed(e,t)}`;var y5=class extends oo{};let b5={};y5.compose(Object.assign({baseName:`tree-view`,template:_5,styles:v5,shadowOptions:void 0},b5));let x5=(e,t)=>O` .container{position: relative;width: 100%}.url-input{position: relative;width: 100%}.url-input-link{position: absolute;left: 10px;top: 24px;max-width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}`,S5=e=>T`<div class="container" value=${e=>e.value}><${e}-text-field class="url-input" required type="url" :value=${e=>e.focused&&!e.readOnly?e.value:``}@blur=${(e,t)=>e.readOnly?``:e.saveUrl(t.event?.target.value)}@focus=${e=>e.focus()}:readOnly=${e=>e.readOnly}></${e}-text-field>${A(e=>e.readOnly||!e.focused,T`<a class="url-input-link" href=${e=>e.value}target="_blank">${e=>e.value}</a>`)}</div>`,EPe=T` ${e=>S5(Fy(e))} `,C5={};var w5=class extends Ju{constructor(){super(...arguments),this.value=``}saveUrl(e){this.value=e.startsWith(`http`)?e:`https://`+e,this.focused=!1}focus(){this.focused=!0}};q([C],w5.prototype,`value`,void 0),q([C],w5.prototype,`focused`,void 0),w5.compose(Object.assign({baseName:`url-input`,template:EPe,styles:x5,shadowOptions:void 0},C5));let T5=O` :host{display: block;font-family: var(--body-font);outline: none}.label{display: block;color: var(--neutral-foreground-rest);cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);margin-bottom: 4px}.label-hidden{display: none}:host([readonly]) .label{cursor: var(--disabled-cursor)}.container{display: flex;gap: calc(var(--design-unit) * 1px);align-items: center}.digit{display: inline-block;box-sizing: border-box;outline: none;min-width: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}.digit .root{box-sizing: border-box;position: relative;display: flex;flex-direction: row;align-items: center;color: var(--neutral-foreground-rest);background: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}.digit .control{appearance: none;font: inherit;background: transparent;border: 0;color: inherit;height: calc(100% - 4px);width: 100%;margin-top: auto;margin-bottom: auto;padding: 0 calc(var(--design-unit) * 2px + 1px);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);text-align: center;outline: none;color-scheme: ${Yh}}.digit[appearance='filled'] .root{background: var(--neutral-fill-rest)}.digit.error .root{border-color: var(--error-fill-rest)}.digit.disabled{opacity: var(--disabled-opacity);cursor: var(--disabled-cursor)}.digit.disabled .control{cursor: var(--disabled-cursor)}.digit:hover:not(.disabled) .root{background: var(--neutral-fill-input-hover);border-color: var(--accent-fill-hover)}.digit:focus-within:not(.disabled) .root{border-color: var(--focus-stroke-outer);box-shadow: 0 0 0 calc(var(--focus-stroke-width) * 1px) var(--focus-stroke-outer) inset}.digit[appearance='filled']:hover:not(.disabled) .root{background: var(--neutral-fill-hover)}${Z0}`,E5=T`<label part="label" id="${e=>e.labelId}" for="${e=>e.getControlId(0)}" class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?`label`:`label label-hidden`}"><slot ${xt({property:`defaultSlottedNodes`,filter:xa})}></slot></label><div class="container" role="group" aria-labelledby="${e=>e.hasLabel?e.labelId:void 0}" aria-label="${e=>e.hasLabel?void 0:`Verification code`}">${j(e=>e.digitsIndexes,T`<div class="digit ${(e,t)=>t.parent.digitClassnames}" data-digit-index="${e=>e}" appearance="${(e,t)=>t.parent.appearance}"><div class="root" part="root"><div class="control-field"><input class="control" part="control" type="text" inputmode="numeric" pattern="[0-9]*" name="${(e,t)=>t.parent.getControlId(e)}" id="${(e,t)=>t.parent.getControlId(e)}" autocomplete="${e=>e===0?`one-time-code`:`off`}" data-test-id="${(e,t)=>t.parent.getControlId(e)}" title="Only numbers are allowed" maxlength="1" ?autofocus="${(e,t)=>t.parent.autofocus&&e===0}" ?readonly="${(e,t)=>t.parent.readOnly}" ?disabled="${(e,t)=>t.parent.disabled||t.parent.readOnly}" aria-required="${(e,t)=>t.parent.required}" aria-invalid="${(e,t)=>t.parent.error}" /></div></div></div>`)}</div>`,D5={mode:`open`,delegatesFocus:!0},O5={},k5=/^\d$/;var DPe=class extends P{},A5=class extends gr(DPe){constructor(){super(),this.values=[],this.controlListeners=/* @__PURE__ */ new Map,this.syncingFromDigits=!1,this.appearance=`outline`,this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement(`input`)}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||`verification-code`}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){return!!this.defaultSlottedNodes?.length}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value=``,this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){let n=this.sanitizeCode(t);if(this.syncingFromDigits||this.syncDigitsFromValue(n),String(t??``)!==n){this.value=n;return}super.valueChanged(e,n)}validate(e){if(!(this.proxy instanceof HTMLElement))return;let t=e??this.getControlElement(0)??void 0;if(String(this.value??``).length>0&&!this.isComplete()){this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,t);return}if(this.required&&!this.isComplete()){this.setValidity({valueMissing:!0},`Please fill out this field.`,t);return}this.setValidity({},``,t)}connectedCallback(){super.connectedCallback(),this.proxy.type=`text`,this.proxy.inputMode=`numeric`,x.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){this.syncDigitsFromValue(this.sanitizeCode(this.value));let e=(this.values??[]).join(``);this.value===e?this.validate():this.value=e,x.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&`error`,(this.disabled||this.readOnly)&&`disabled`].filter(Boolean).join(` `)}sanitizeCode(e){let t=Math.max(1,Number(this.digits)||6);return String(e??``).replace(/\D/g,``).slice(0,t)}bindControlListeners(){this.unbindControlListeners(),this.rootNode.querySelectorAll(`[data-digit-index] input.control`).forEach(e=>{let t=this.getIndexFromInput(e);if(t===null)return;let n={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener(`paste`,n.paste,!0),e.addEventListener(`keydown`,n.keydown),e.addEventListener(`input`,n.input),this.controlListeners.set(e,n)})}unbindControlListeners(){var e,t;(e=this.controlListeners)==null||e.forEach((e,t)=>{t.removeEventListener(`paste`,e.paste,!0),t.removeEventListener(`keydown`,e.keydown),t.removeEventListener(`input`,e.input)}),(t=this.controlListeners)==null||t.clear()}onKeyDown(e,t){if(!(this.readOnly||this.disabled)){if(k5.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault(),this.updateDigit(t,e.key),this.focusDigit(t+1);return}switch(e.key){case`Backspace`:e.preventDefault(),this.handleBackspace(t);break;case`Delete`:e.preventDefault(),this.handleDelete(t);break;case`ArrowLeft`:e.preventDefault(),this.focusDigit(t-1);break;case`ArrowRight`:e.preventDefault(),this.focusDigit(t+1);break;case`Tab`:case`Home`:case`End`:break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return e.ctrlKey||e.metaKey||e.altKey?!1:e.key.length===1&&!k5.test(e.key)}onInput(e,t){if(this.readOnly||this.disabled)return;let n=e.target,r=n.value.replace(/\D/g,``);if(r.length>1){this.applyDigits(r,t);return}let i=r.slice(-1);n.value!==i&&(n.value=i),i&&this.values[t]!==i?(this.updateDigit(t,i),this.focusDigit(t+1)):!i&&this.values[t]&&this.updateDigit(t,``)}onPaste(e,t){if(this.readOnly||this.disabled)return;e.preventDefault();let n=e.clipboardData?.getData(`text`)??``;n&&this.applyDigits(n,t)}handleBackspace(e){if(this.values[e]){this.updateDigit(e,``);return}e>0&&(this.updateDigit(e-1,``),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,``)}getIndexFromInput(e){let t=Number(e.closest(`[data-digit-index]`)?.getAttribute(`data-digit-index`));return Number.isNaN(t)?null:t}syncDigitsFromValue(e){let t=Math.max(1,Number(this.digits)||6),n=Array.from({length:t},(t,n)=>e[n]??``),r=this.values??[];n.length===r.length&&n.every((e,t)=>e===r[t])||(this.values=n,this.$fastController?.isConnected&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;let n=[...this.values];n[e]=t,this.values=n,this.syncFieldValue(e),this.commitValues(n)}applyDigits(e,t){let n=e.replace(/\D/g,``).slice(0,this.digits-t);if(!n.length)return;let r=[...this.values];for(let e=0;e<n.length;e+=1)r[t+e]=n[e];this.values=r,this.syncFieldValues(),this.commitValues(r),this.focusDigit(this.isComplete()?this.digits-1:t+n.length)}commitValues(e){let t=e.join(``);this.syncingFromDigits=!0;try{this.value===t?this.validate():this.value=t}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit(`complete`,{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){let t=this.getControlElement(e);t&&(t.value=this.values[e]??``)}focusDigit(e){var t;e<0||e>=this.digits||(t=this.getControlElement(e))==null||t.focus()}get rootNode(){return this.shadowRoot??this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){let e=this.values??[];return e.length===this.digits&&e.every(e=>k5.test(e))}emitChange(){this.$emit(`change`,{value:this.value})}};q([C],A5.prototype,`values`,void 0),q([C],A5.prototype,`defaultSlottedNodes`,void 0),q([D],A5.prototype,`id`,void 0),q([D],A5.prototype,`appearance`,void 0),q([D],A5.prototype,`digits`,void 0),q([D({attribute:`readonly`,mode:`boolean`})],A5.prototype,`readOnly`,void 0),q([D({mode:`boolean`})],A5.prototype,`autofocus`,void 0),q([D({mode:`boolean`})],A5.prototype,`error`,void 0),A5.compose(Object.assign({baseName:`verification-code-input`,template:E5,styles:T5,shadowOptions:D5},O5));let j5=class extends My{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return e?.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){jy.debug(`clearData - Method not implemented.`)}syncComponentData(e){let t=e??Array.from(this.rowsSyncedWithStream.values()),n=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=n,this.dataGrid.rowsData=t}handleStreamInserts(e){jy.debug(`handleStreamInserts - Method not implemented.`)}handleStreamDeletes(e){jy.debug(`handleStreamDeletes - Method not implemented.`)}handleStreamUpdates(e){jy.debug(`handleStreamUpdates - Method not implemented.`)}};j5=q([$e({name:`data-grid-datasource`})],j5);let M5={type:`NULL`,maxRules:1,invisible:!0},OPe=[`enum`],N5=[`int`,`short`,`long`,`bigdecimal`,`double`],kPe=[`string`],P5=[`date`,`date-time`],APe=[`boolean`],F5=[...OPe,...N5,...kPe,...P5,...APe];[...N5,...P5],[...N5,...P5],[...F5].filter(e=>e!==`boolean`),[...F5].filter(e=>e!==`boolean`),[...N5,...P5],[...N5,...P5],[...F5],[...F5];let jPe=(0,(/* @__PURE__ */ u((/* @__PURE__ */ s(((e,t)=>{t.exports=r;function n(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function r(e){if(e=e||{},e.circles)return i(e);let t=/* @__PURE__ */ new Map;if(t.set(Date,e=>new Date(e)),t.set(Map,(e,t)=>new Map(a(Array.from(e),t))),t.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(let n of e.constructorHandlers)t.set(n[0],n[1]);let r=null;return e.proto?s:o;function a(e,i){let a=Object.keys(e),o=Array(a.length);for(let s=0;s<a.length;s++){let c=a[s],l=e[c];o[c]=typeof l!=`object`||!l?l:l.constructor!==Object&&(r=t.get(l.constructor))?r(l,i):ArrayBuffer.isView(l)?n(l):i(l)}return o}function o(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return a(e,o);if(e.constructor!==Object&&(r=t.get(e.constructor)))return r(e,o);let i={};for(let a in e){if(Object.hasOwnProperty.call(e,a)===!1)continue;let s=e[a];i[a]=typeof s!=`object`||!s?s:s.constructor!==Object&&(r=t.get(s.constructor))?r(s,o):ArrayBuffer.isView(s)?n(s):o(s)}return i}function s(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return a(e,s);if(e.constructor!==Object&&(r=t.get(e.constructor)))return r(e,s);let i={};for(let a in e){let o=e[a];i[a]=typeof o!=`object`||!o?o:o.constructor!==Object&&(r=t.get(o.constructor))?r(o,s):ArrayBuffer.isView(o)?n(o):s(o)}return i}}function i(e){let t=[],r=[],i=/* @__PURE__ */ new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(o(Array.from(e),t))),i.set(Set,(e,t)=>new Set(o(Array.from(e),t))),e.constructorHandlers)for(let t of e.constructorHandlers)i.set(t[0],t[1]);let a=null;return e.proto?c:s;function o(e,o){let s=Object.keys(e),c=Array(s.length);for(let l=0;l<s.length;l++){let u=s[l],d=e[u];if(typeof d!=`object`||!d)c[u]=d;else if(d.constructor!==Object&&(a=i.get(d.constructor)))c[u]=a(d,o);else if(ArrayBuffer.isView(d))c[u]=n(d);else{let e=t.indexOf(d);c[u]=e===-1?o(d):r[e]}}return c}function s(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return o(e,s);if(e.constructor!==Object&&(a=i.get(e.constructor)))return a(e,s);let c={};t.push(e),r.push(c);for(let o in e){if(Object.hasOwnProperty.call(e,o)===!1)continue;let l=e[o];if(typeof l!=`object`||!l)c[o]=l;else if(l.constructor!==Object&&(a=i.get(l.constructor)))c[o]=a(l,s);else if(ArrayBuffer.isView(l))c[o]=n(l);else{let e=t.indexOf(l);c[o]=e===-1?s(l):r[e]}}return t.pop(),r.pop(),c}function c(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return o(e,c);if(e.constructor!==Object&&(a=i.get(e.constructor)))return a(e,c);let s={};t.push(e),r.push(s);for(let o in e){let l=e[o];if(typeof l!=`object`||!l)s[o]=l;else if(l.constructor!==Object&&(a=i.get(l.constructor)))s[o]=a(l,c);else if(ArrayBuffer.isView(l))s[o]=n(l);else{let e=t.indexOf(l);s[o]=e===-1?c(l):r[e]}}return t.pop(),r.pop(),s}}})))())).default)();function I5(e,t,n){function r(e){let i=jPe(e);if(i.groupId===t)return i.children=n(i.children),i;let a=[],o=!1;for(let e of i.children)if(`children`in e){let t=r(e);t?(a.push(t),o=!0):a.push(e)}else a.push(e);return i.children=a,o?i:null}let i=r(e);if(!i)throw Error(`Unable to find group with groupId ${t}`);return i}function L5(e,t,n){function r(e){for(let i of e.children){if(n(i,t))return e;if(`children`in i){let e=r(i);if(e)return e}}return null}return r(e)}function R5(e,t){let n=L5(e,t,(e,t)=>`children`in e&&e.groupId===t);if(!n)throw Error(`No parent group found for group with ID ${t}`);return n}function z5(e,t){let n=L5(e,t,(e,t)=>`ruleId`in e&&e.ruleId===t);if(!n)throw Error(`No parent group found for rule with ID ${t}`);return n}function B5(e,t,n){return I5(e,t,e=>[...e,n])}function MPe(e,t){return I5(e,R5(e,t).groupId,e=>e.filter(e=>`groupId`in e?e.groupId!==t:!0))}function NPe(e,t){return I5(e,z5(e,t).groupId,e=>e.filter(e=>`ruleId`in e?e.ruleId!==t:!0))}let V5=`group-root`;function PPe(e,t,n){return t===`group-root`?Object.assign(Object.assign({},e),n):I5(e,R5(e,t).groupId,e=>e.map(e=>`groupId`in e&&e.groupId===t?Object.assign(Object.assign({},e),n):e))}function FPe(e,t,n){return I5(e,z5(e,t).groupId,e=>e.map(e=>`ruleId`in e&&e.ruleId===t?Object.assign(Object.assign({},e),n):e))}function IPe(e,t){let n=(e,t)=>`children`in e?r(e,t):i(e);function r(e,r){return Object.assign(Object.assign({},e),{level:r,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>n(e,r+1))})}function i(e){return Object.assign(Object.assign({},e),{ruleId:t.getRuleId(),config:t.getConfig()})}return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:V5,children:e.children.map(e=>n(e,2))})}function H5(e){let t=e.children.map(e=>`children`in e?H5(e):LPe(e));return{combinator:e.combinator,children:t}}function LPe(e){let{operator:t,field:n,value:r}=e;return{operator:t,field:n,value:r}}let U5=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,`0`)}-${String(e.getUTCDate()).padStart(2,`0`)}`,W5=e=>`${U5(e)}T${String(e.getUTCHours()).padStart(2,`0`)}:${String(e.getUTCMinutes()).padStart(2,`0`)}:${String(e.getUTCSeconds()).padStart(2,`0`)}`,G5=e=>e.operator?.valueType?.input??e.field.input,K5=e=>e.operator?.valueType?.type??e.field.type,q5=e=>{let t={},n=[],r=e=>[...e].sort((e,t)=>`fieldId`in e&&`fieldId`in t?e.fieldId.localeCompare(t.fieldId):`type`in e&&`type`in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){let n=e.optgroup;t[n]||(t[n]=[]),t[n].push(e)}else n.push(e)});let i=[];return Object.keys(t).sort().forEach(e=>{i.push({optgroup:e,xs:r(t[e])})}),[...i,...r(n)]};function J5(e,t,n){if(!e.shadowRoot||!t?.customStyles)return;let r=t.customStyles[n];if(r){let t=document.createElement(`style`);t.textContent=r,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var Y5;(function(e){e.AddGroup=`add-group`,e.DelGroup=`del-group`,e.AddRule=`add-rule`,e.DelRule=`del-rule`,e.UpdateGroup=`update-group`,e.UpdateRule=`update-rule`,e.FieldSelected=`field-selected`,e.OperatorSelected=`operator-selected`,e.ValueUpdated=`value-updated`,e.RemoveVarArg=`remove-variadic-operand`})(Y5||(Y5={}));let X5=O` :host{--item-vertical-spacing: 4px;--item-border-radius: 5px;--group-background-color: rgb(250 240 210 / 50%);--group-border-color: #dcc896;--group-border: 1px solid var(--group-border-color);--group-padding: 10px;--rule-background-color: rgb(255 255 255 / 90%);--rule-border-color: #eee;--rule-border: 1px solid var(--rule-border-color);--rule-padding: 5px;--rule-value-separator: 1px solid #ddd;--error-icon-color: #f00;--error-border-color: #f99;--error-background-color: #fdd;--ticks-width: 2px;--ticks-color: #ccc}p.test{color: black}.query-builder{font-family: sans-serif}.rules-group-container{position: relative;margin: var(--item-vertical-spacing) 0;border-radius: var(--item-border-radius);padding: var(--group-padding);border: var(--group-border);background: var(--group-background-color)}.rules-group-header{margin-bottom: var(--group-padding)}.group-conditions{display: inline-block}.group-conditions .btn{padding: 0.25rem 0.5rem;font-size: 0.875rem;line-height: 1.5;border-radius: 0.2rem;border: 1px solid #007bff;color: #007bff;background-color: transparent;cursor: pointer}.group-conditions .btn:hover{background-color: #007bff;color: #fff}.group-conditions .btn.active{background-color: #007bff;color: #fff}.group-actions{display: inline-block;float: right}.rules-list{list-style: none;padding: 0 0 0 20px;/* Adjusted ticks position */ margin: 0}.rule-container{position: relative;margin: var(--item-vertical-spacing) 0;border-radius: var(--item-border-radius);padding: var(--rule-padding);border: var(--rule-border);background: var(--rule-background-color)}.rule-header{margin-bottom: 5px}.rule-actions{display: inline-block;float: right}.rule-field-container, .rule-operator-container, .rule-value-container{display: inline-block;margin: 0 5px 0 0;vertical-align: middle}.rule-value-container{border-left: var(--rule-value-separator);padding-left: 5px}.rule-value-container label{margin-bottom: 0;font-weight: normal}.rule-value-container label.block{display: block}.error-container{display: none;cursor: help;color: var(--error-icon-color);margin-left: 5px}.rule-container.has-error, .rules-group-container.has-error{background-color: var(--error-background-color);border-color: var(--error-border-color)}.rule-container.has-error .error-container, .rules-group-container.has-error .error-container{display: inline-block !important}/* Ticks */ .rules-list > *{position: relative}.rules-list > *::before, .rules-list > *::after{content: '';position: absolute;left: -10px;/* Adjusted ticks position */ width: 10px;/* Adjusted ticks position */ border-color: var(--ticks-color);border-style: solid}.rules-list > *::before{top: -2px;/* Adjusted ticks position */ height: calc(50% + var(--item-vertical-spacing));border-width: 0 0 var(--ticks-width) var(--ticks-width)}.rules-list > *::after{top: 50%;border-width: 0 0 0 var(--ticks-width);height: 50%}.rules-list > *:first-child::before{top: calc(-1 * var(--group-padding) - var(--ticks-width));height: calc(50% + var(--group-padding) + var(--item-vertical-spacing))}.rules-list > *:last-child::before{border-radius: 0 0 0 calc(2 * var(--ticks-width))}.rules-list > *:last-child::after{display: none}`,RPe=O` .rules-group-container{border: 1px solid #ccc;margin-bottom: 10px;padding: 10px}.rules-group-header{margin-bottom: 5px}.btn-group{margin-right: 5px}.btn{padding: 0.25rem 0.5rem;font-size: 0.875rem;line-height: 1.5;border-radius: 0.2rem;cursor: pointer}.btn-success{color: #fff;background-color: #28a745;border-color: #28a745}.btn-danger{color: #fff;background-color: #dc3545;border-color: #dc3545}.radio-group-container{display: flex}.rules-list{list-style: none;padding-left: 0}`,zPe=T` ${e=>{let t=e.styles?.customElements?.radio,{radioTag:n,radioGroupTag:r}=t?{radioTag:t.input,radioGroupTag:t.group}:{radioTag:`input`,radioGroupTag:`div`};return T`<div class="btn-group group-conditions">${qg(e=>n!==`input`,T`<${r}class="radio-group-container" name="combinator" @change="${(e,t)=>e.handleCombinatorChange(t.event)}" value="${e=>e.model?.combinator?.type}">${j(e=>e.config?.combinators??[],T` ${A(e=>!e.invisible,T`<${n}value="${e=>e.type}" ?checked=${(e,t)=>t.parent.model?.combinator?.type===e.type}>${e=>e.label??e.type}</${n}>`)} `)}</${r}>`,T`<div class="radio-group-container">${j(e=>e.config.combinators,T` ${A(e=>!e.invisible,T`<label class="btn btn-sm btn-primary"><input type="radio" name="combinator" value="${e=>e.type}" @change="${(e,t)=>t.parent.handleCombinatorChange(t.event)}" ?checked=${(e,t)=>t.parent.model?.combinator?.type===e.type}/>${e=>e.label??e.type}</label>`)} `)}</div>`)}</div>`}} `,BPe=T`<div class="rules-group-container"><div class="rules-group-header">${T` ${e=>{let t=e.styles?.customElements?.button||`button`,n=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${e.config?.combinators?.[0]?.type})`,r=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${e.config?.combinators?.[0]?.type})`;return T`<div class="btn-group float-end group-actions">${A(e=>e.allowAddRule,T`<${t}type="button" class="btn btn-sm btn-success" data-add="rule" @click="${(e,t)=>e.dispatchAddRule(t.event)}" title=${e=>n}>
@@ -999,7 +999,7 @@ ${e?`<li><strong>Minutes:</strong> Runs at every interval of minutes from the ho
999
999
  +
1000
1000
  </${t}>`)}</div><div class="rule-header"><div class="btn-group rule-actions"><${t}type="button" class="btn btn-sm btn-danger" data-delete="rule" @click="${(e,t)=>e.dispatchDeleteRule(t.event)}">
1001
1001
  Delete Rule </${t}></div></div></div>`}} `,a7=class extends Qe{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),J5(this,this.styles,`rule`),this.config.partialRuleValidationWarning&&(this.error=nFe(this.model))}variadicRule(e){return e.operator.nbInputs===`many`&&`value`in e&&Array.isArray(e.value)}get operandIterator(){if(this.model.operator?.nbInputs===`many`){if(!this.variadicRule(this.model))throw Error(`Varargs disabled for many nbInputs`);return Array(this.model.value.length).fill(!0)}return Array(this.model.operator?.nbInputs??0).fill(!0)}operandValue(e){if(this.model.operator){if(this.model.operator.nbInputs===1&&`value`in this.model)return this.model.value;if((this.model.operator.nbInputs===2||this.model.operator.nbInputs===`many`)&&`value`in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw Error(`Invalid operand lookup`)}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw Error(`Cannot add inputs for non-variadic operator, or invalid format`);let e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,i7(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Y5.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){let{index:t}=e.detail;if(!this.variadicRule(this.model))throw Error(`Cannot remove inputs for non-variadic operator, or invalid format`);let n={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,n)=>n!==t)}};this.dispatchEvent(new CustomEvent(Y5.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();let t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Y5.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){e.stopPropagation();let{fieldId:t}=e.detail,n=this.config.fields.find(e=>e.fieldId===t)??null,r={ruleId:this.model.ruleId,newData:{field:n,value:null,operator:null}};this.dispatchEvent(new CustomEvent(Y5.UpdateRule,{detail:r,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();let{value:t,index:n}=e.detail,r={ruleId:this.model.ruleId,newData:eFe(this.model,t,n)};this.dispatchEvent(new CustomEvent(Y5.UpdateRule,{detail:r,bubbles:!0,composed:!0}))}handleOperatorSelected(e){e.stopPropagation();let{operatorId:t}=e.detail;if(!t)return;let n=this.config.operators.find(e=>e.type===t)??null;if(!n)throw Error(`Unable to find operator of type ${t}`);this.dispatchEvent(new CustomEvent(Y5.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:$Pe(n,this.model)},bubbles:!0,composed:!0}))}};q([C],a7.prototype,`config`,void 0),q([C],a7.prototype,`styles`,void 0),q([C],a7.prototype,`model`,void 0),q([C],a7.prototype,`index`,void 0),q([D({mode:`boolean`})],a7.prototype,`error`,void 0),q([w],a7.prototype,`operandIterator`,null),a7=q([$e({name:`expression-rule`,template:iFe,styles:rFe,shadowOptions:{delegatesFocus:!0}})],a7);let o7=class extends Qe{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){if(!this.isValidConfig(t)){console.warn(`Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.`);return}t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=IPe(t.model,this),this.userUpdatingModel=!1):this.model===null&&this.initBaseModel()}modelChanged(e,t){if(!t||this.userUpdatingModel)return;let n=H5(t);this.dispatchChangeEvent(n)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(Y5.AddGroup,this.handleAddGroup),this.addEventListener(Y5.DelGroup,this.handleDeleteGroup),this.addEventListener(Y5.AddRule,this.handleAddRule),this.addEventListener(Y5.DelRule,this.handleDeleteRule),this.addEventListener(Y5.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Y5.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config)){this.config&&console.warn(`Config detected during connectedCallback but it isn't valid`),this.config=null;return}this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Y5.AddGroup,this.handleAddGroup),this.removeEventListener(Y5.DelGroup,this.handleDeleteGroup),this.removeEventListener(Y5.AddRule,this.handleAddRule),this.removeEventListener(Y5.DelRule,this.handleDeleteRule),this.removeEventListener(Y5.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Y5.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){return!!(e&&e.combinators?.length&&e.operators?.length&&e.fields?.length)}initBaseModel(){if(!this.isValidConfig(this.config))throw Error(`Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.`);this.model={children:[],level:1,groupId:V5,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){let{parentGroupId:t,newGroup:n}=e.detail,r={groupId:this.getGroupId(),level:n.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=B5(this.model,t,r)}_handleAddRule(e){let{parentGroupId:t}=e.detail,n={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=B5(this.model,t,n)}_handleDeleteGroup(e){let{groupId:t}=e.detail;this.model=MPe(this.model,t)}_handleDeleteRule(e){let{ruleId:t}=e.detail;this.model=NPe(this.model,t)}_handleUpdateGroupData(e){let{groupId:t,newData:n}=e.detail;this.model=PPe(this.model,t,n)}_handleUpdateRuleData(e){let{ruleId:t,newData:n}=e.detail;this.model=FPe(this.model,t,n)}};q([C],o7.prototype,`config`,void 0),q([C],o7.prototype,`styles`,void 0),q([C],o7.prototype,`model`,void 0),o7=q([$e({name:`expression-builder`,template:Q5,styles:X5})],o7);let s7=class extends o7{};s7=q([$e({name:`foundation-expression-builder`,styles:X5,template:Q5})],s7);let c7=[`int`,`short`,`long`],l7=[`double`,`bigdecimal`],u7=[...c7,...l7],d7=[`date`,`date-time`],f7=[`string`,`enum`],p7=[`boolean`],m7=e=>e.operator?.valueType?.type??e.field.type;function h7(e){switch(m7(e)){case`int`:case`long`:case`double`:case`bigdecimal`:case`date`:case`date-time`:case`short`:return`NUMBER`;case`string`:case`enum`:return`STRING`;case`boolean`:return`BOOLEAN`}}function g7(e,t,n){return`value`in e?{TYPE:`BINARY_EXPRESSION`,LEFT:{TYPE:`FIELD`,NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:n,VALUE:e.value}}:null}function _7(e,t,n){return{TYPE:`BINARY_EXPRESSION`,LEFT:{TYPE:`FIELD`,NAME:e.field.fieldId},OPERATION:t,RIGHT:n}}function v7(e,t,n=[]){return`value`in e?{TYPE:`METHOD_EXPRESSION`,PARAMETERS:[{TYPE:`FIELD`,NAME:e.field.fieldId},...n],METHOD:t}:null}function y7(e){let t=t=>{let n=m7(e);if(f7.includes(n))return t;if(u7.includes(n))return t.toString();if(p7.includes(n))return t;if(Array.isArray(t))throw Error(`Not implemented TernararyOperator or VariadicOperator args in rule value transformer`);if(d7.includes(n))return new Date(t).getTime().toString();throw Error(`Unhandled transformRuleValue case`)},n=!(!(`value`in e)||e.value===void 0||e.value===null);return Object.assign(Object.assign({},e),n?{value:t(e.value)}:{})}function b7(e,t){return{TYPE:`PREDICATE_EXPRESSION`,OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>`children`in e?b7(e,t):t(e)).filter(Boolean)}}function x7(e,t){let n=t=>{let n=m7(e);if(f7.includes(n))return t;if(c7.includes(n))return parseInt(t);if(l7.includes(n))return parseFloat(t);if(p7.includes(n))return t;if(d7.includes(n)){let e=new Date(parseInt(t));return n===`date`?U5(e):W5(e)}throw Error(`Unhandled rebuildRuleValue case`)},r=e.operator.nbInputs;if(r===`many`||r===2)throw Error(`Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue`);return Object.assign(Object.assign({},e),r===0?{}:{value:n(t.VALUE)})}let S7={template:Q5,styles:X5};var C7;(function(e){e.methodCall={CONTAINS_IGNORE_CASE:`CONTAINS_IGNORE_CASE`,CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:`CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE`,IS_NULL_OR_BLANK:`IS_NULL_OR_BLANK`,NOT_NULL_OR_BLANK:`NOT_NULL_OR_BLANK`,TRIM:`TRIM`,LONG_TO_DATE:`LONG_TO_DATE`,LONG_TO_DATE_TIME:`LONG_TO_DATE_TIME`,DATE_TIME_IS_IN_RANGE:`DATE_TIME_IS_IN_RANGE`},e.logicalOperations={AND:`AND`,OR:`OR`},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:`GREATER_THAN`,LESS_THAN:`LESS_THAN`,GREATER_THAN_OR_EQUAL:`GREATER_THAN_OR_EQUAL`,LESS_THAN_OR_EQUAL:`LESS_THAN_OR_EQUAL`,EQUALS:`EQUALS`,NOT_EQUALS:`NOT_EQUALS`,PLUS:`PLUS`,MINUS:`MINUS`,MULTIPLY:`MULTIPLY`,DIVIDE:`DIVIDE`,BITWISE_AND:`BITWISE_AND`,BITWISE_OR:`BITWISE_OR`,ASSIGNMENT:`ASSIGNMENT`,IS_CURRENT:`IS_CURRENT`,IS_PREVIOUS:`IS_PREVIOUS`})})(C7||(C7={}));let w7=[{type:C7.logicalOperations.AND,maxRules:`many`},{type:C7.logicalOperations.OR,maxRules:`many`}],$={EQUALS:C7.operations.EQUALS,NOT_EQUALS:C7.operations.NOT_EQUALS,IS_NULL:`IS_NULL`,NOT_NULL:`NOT_NULL`,IS_NULL_OR_BLANK:`IS_NULL_OR_BLANK`,NOT_NULL_OR_BLANK:`NOT_NULL_OR_BLANK`,CONTAINS:`CONTAINS`,CONTAINS_WORDS_STARTING_WITH:`CONTAINS_WORDS_STARTING_WITH`,CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:`CONTAINS_WORDS_STARTING_SPLIT_DELIMITER`,GREATER_THAN:C7.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:C7.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:C7.operations.LESS_THAN,LESS_THAN_OR_EQUAL:C7.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:`IS_BEFORE`,IS_AFTER:`IS_AFTER`,ON_OR_BEFORE:`ON_OR_BEFORE`,ON_OR_AFTER:`ON_OR_AFTER`,IS_CURRENT:C7.operations.IS_CURRENT,IS_PREVIOUS:C7.operations.IS_PREVIOUS},T7=e=>({type:`enum`,input:`select`,values:e}),aFe=T7({HOUR:{label:`Hour`,tooltip:`Beginning of the hour immediately preceding the current one to the current hour.`},DAY:{label:`Day`,tooltip:`Midnight on the day before today to midnight of the current day.`},WEEK_DAY:{label:`Week day`,tooltip:`Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday.`},WEEK:{label:`Week`,tooltip:`Midnight on the Monday of the previous week to midnight on the Monday of the current week.`},MONTH:{label:`Month`,tooltip:`Midnight on the 1st of the previous month to midnight on the 1st of the current month.`},YEAR:{label:`Year`,tooltip:`Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year.`}}),oFe=T7({HOUR:{label:`Hour`,tooltip:`Beginning of the current hour to beginning of the next hour.`},DAY:{label:`Day`,tooltip:`Midnight on the current day day to midnight of the next day.`},WEEK_DAY:{label:`Week day`,tooltip:`Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends.`},WEEK:{label:`Week`,tooltip:`Midnight on the Monday of the current week to midnight on the Monday of the next week.`},MONTH:{label:`Month`,tooltip:`Midnight on the 1st of the current month to midnight on the 1st of the next month.`},YEAR:{label:`Year`,tooltip:`Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year.`}}),E7=[{type:$.EQUALS,label:`Equals`,nbInputs:1,applyTo:[...f7,...p7,...u7,...d7],tooltip:`Check the equality of the field compared to a set value`},{type:$.NOT_EQUALS,label:`Not equals`,nbInputs:1,applyTo:[...f7,...p7,...u7,...d7],tooltip:`Check that the field is different from a set value`},{type:$.IS_NULL,label:`Is null`,nbInputs:0,applyTo:[`enum`,...p7,...u7,...d7],tooltip:`Check if the field value is null`},{type:$.NOT_NULL,label:`Not null`,nbInputs:0,applyTo:[`enum`,...p7,...u7,...d7],tooltip:`Check if the field value is not null`},{type:$.IS_NULL_OR_BLANK,label:`Is null or blank`,nbInputs:0,applyTo:[`string`],tooltip:`Check if the field value is null or an empty string`},{type:$.NOT_NULL_OR_BLANK,label:`Not null or blank`,nbInputs:0,applyTo:[`string`],tooltip:`Check if the field value is not null and not an empty string`},{type:$.CONTAINS,label:`Contains`,nbInputs:1,applyTo:[`string`],tooltip:`Check if the field contains the specified text (case insensitive)`},{type:$.CONTAINS_WORDS_STARTING_WITH,label:`Contains words starting with`,nbInputs:1,applyTo:[`string`],tooltip:`Check if the field contains words that start with the specified text, split by whitespace (case insensitive)`},{type:$.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:`Contains words starting with (split)`,nbInputs:2,applyTo:[`string`],tooltip:`Check if field contains words starting with text, split by a delimiter (case insensitive)`},{type:$.GREATER_THAN,label:`Greater than`,nbInputs:1,applyTo:[...u7],tooltip:`Check if the field value is greater than a specified number`},{type:$.GREATER_THAN_OR_EQUAL,label:`Greater than or equal to`,nbInputs:1,applyTo:[...u7],tooltip:`Check if the field value is greater than or equal to a specified number`},{type:$.LESS_THAN,label:`Less than`,nbInputs:1,applyTo:[...u7],tooltip:`Check if the field value is less than a specified number`},{type:$.LESS_THAN_OR_EQUAL,label:`Less than or equal to`,nbInputs:1,applyTo:[...u7],tooltip:`Check if the field value is less than or equal to a specified number`},{type:$.IS_BEFORE,label:`Is before`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is before a specified date/time`},{type:$.IS_AFTER,label:`Is after`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is after a specified date/time`},{type:$.ON_OR_BEFORE,label:`On or before`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is on or before a specified date/time`},{type:$.ON_OR_AFTER,label:`On or after`,nbInputs:1,applyTo:[...d7],tooltip:`Check if the field is on or after a specified date/time`},{type:$.IS_CURRENT,label:`Is current`,nbInputs:1,applyTo:[...d7],tooltip:`Check whether the current date/time matches the current hour/day/work day/week/month/year.`,valueType:oFe,optgroup:`Relative Period`},{type:$.IS_PREVIOUS,label:`Is previous`,nbInputs:1,applyTo:[...d7],tooltip:`Check whether the current date/time matches the previous hour/day/work day/week/month/year`,valueType:aFe,optgroup:`Relative Period`}];function sFe(e){switch(e){case`IS_BEFORE`:return`LESS_THAN`;case`IS_AFTER`:return`GREATER_THAN`;case`ON_OR_BEFORE`:return`LESS_THAN_OR_EQUAL`;case`ON_OR_AFTER`:return`GREATER_THAN_OR_EQUAL`;default:return e}}function cFe(e,t){switch(t){case $.IS_NULL_OR_BLANK:return v7(e,C7.methodCall.IS_NULL_OR_BLANK,[]);case $.NOT_NULL_OR_BLANK:return v7(e,C7.methodCall.NOT_NULL_OR_BLANK,[]);case $.CONTAINS:if(!(`value`in e))throw Error(`Invalid shape for operator CONTAINS`);return v7(e,C7.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:`STRING`,VALUE:e.value}]);case $.CONTAINS_WORDS_STARTING_WITH:if(!(`value`in e))throw Error(`Invalid shape for operator CONTAINS_WORDS_STARTING_WITH`);return v7(e,C7.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:`STRING`,VALUE:e.value}]);case $.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!(`value`in e)||!Array.isArray(e.value)||e.value.length!==2)throw Error(`Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER`);return v7(e,C7.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:`STRING`,VALUE:e})));case $.IS_CURRENT:case $.IS_PREVIOUS:if(!(`value`in e))throw Error(`Invalid shape for operator IS_CURRENT | IS_PREVIOUS`);return v7(e,C7.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:`STRING`,VALUE:e.value},{TYPE:`STRING`,VALUE:t===$.IS_CURRENT?`CURRENT`:`PREVIOUS`}]);default:throw Error(`Unreachable default case`)}}function lFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=y7(e),n=h7(t),r=sFe(t.operator.type);switch(r){case $.EQUALS:case $.NOT_EQUALS:case $.GREATER_THAN:case $.GREATER_THAN_OR_EQUAL:case $.LESS_THAN:case $.LESS_THAN_OR_EQUAL:return g7(t,r,n);case $.IS_NULL:return _7(t,C7.operations.EQUALS,{TYPE:`NULL`});case $.NOT_NULL:return _7(t,C7.operations.NOT_EQUALS,{TYPE:`NULL`});case $.IS_NULL_OR_BLANK:case $.NOT_NULL_OR_BLANK:case $.CONTAINS:case $.CONTAINS_WORDS_STARTING_WITH:case $.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case $.IS_CURRENT:case $.IS_PREVIOUS:return cFe(t,r);default:throw Error(`Unmatched case for operator name: ${r}`)}}function uFe(e,t){if(t.field.type!==`date`&&t.field.type!==`date-time`)return e;switch(e){case`LESS_THAN`:return`IS_BEFORE`;case`GREATER_THAN`:return`IS_AFTER`;case`LESS_THAN_OR_EQUAL`:return`ON_OR_BEFORE`;case`GREATER_THAN_OR_EQUAL`:return`ON_OR_AFTER`;default:return e}}function dFe(e,t){let n=(()=>{if(t.RIGHT.TYPE===`NULL`){let e=t.OPERATION===`EQUALS`?$[$.IS_NULL]:$[$.NOT_NULL];return E7.find(t=>t.type===e)}let n=uFe(t.OPERATION,e);return E7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function fFe(e,t){if(t.LEFT.TYPE!==`FIELD`)throw Error(`BinaryExpression LHS must be TYPE === FIELD`);if(![`STRING`,`NUMBER`,`BOOLEAN`,`NULL`].includes(t.RIGHT.TYPE))throw Error(`BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL`);return x7(dFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function pFe(e,t){let[n,r]=(()=>{switch(!0){case t.METHOD===`IS_NULL_OR_BLANK`:return[$[$.IS_NULL_OR_BLANK],void 0];case t.METHOD===`NOT_NULL_OR_BLANK`:return[$[$.NOT_NULL_OR_BLANK],void 0];case t.METHOD===`CONTAINS_IGNORE_CASE`:return[$[$.CONTAINS],t.PARAMETERS[1].VALUE];case t.METHOD===`CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE`&&t.PARAMETERS.length===2:return[$[$.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case t.METHOD===`CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE`&&t.PARAMETERS.length===3:return[$[$.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===C7.methodCall.DATE_TIME_IS_IN_RANGE&&t.PARAMETERS.length===3&&t.PARAMETERS[2].TYPE===`STRING`&&(t.PARAMETERS[2].VALUE===`CURRENT`||t.PARAMETERS[2].VALUE===`PREVIOUS`):return[$[t.PARAMETERS[2].VALUE===`CURRENT`?$.IS_CURRENT:$.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw Error(`Unhandled fromMethodExpression case`)}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:E7.find(e=>e.type===n),value:r}}function D7(e,t){return{combinator:w7.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!(`TYPE`in t))throw Error(`RuleExpression format not yet supported - no TYPE`);if(t.TYPE===`PREDICATE_EXPRESSION`)return D7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return fFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return pFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let O7=class extends o7{ruleConfigChanged(e,t){this.config=Object.assign({combinators:w7,operators:E7,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},t?.model?{model:D7(t.fields,t.model)}:{})}configChanged(e,t){if(t!==null){if(!t.operators||!t.combinators)throw Error(`Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead`);super.configChanged(e,t)}}dispatchChangeEvent(e){let t=b7(e,lFe);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],O7.prototype,`ruleConfig`,void 0),O7=q([$e({name:`foundation-rule-expression-builder`,styles:X5,template:Q5})],O7);let k7={TRIM:`TRIM`,PLUS:`PLUS`,MINUS:`MINUS`,MULTIPLY:`MULTIPLY`,DIVIDE:`DIVIDE`,CONVERT_TO_DATE:`CONVERT_TO_DATE`,CONVERT_TO_DATE_TIME:`CONVERT_TO_DATE_TIME`},A7=[{type:k7.PLUS,label:`Add (+)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE`},{type:k7.MINUS,label:`Subtract (-)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE`},{type:k7.MULTIPLY,label:`Multiply (*)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE`},{type:k7.DIVIDE,label:`Divide (/)`,applyTo:[...u7],nbInputs:1,tooltip:`Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE`},{type:k7.CONVERT_TO_DATE,label:`Convert to date`,applyTo:[`date`],nbInputs:0,tooltip:`Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm`},{type:k7.CONVERT_TO_DATE_TIME,label:`Convert to date time`,applyTo:[`date-time`],nbInputs:0,tooltip:`Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss`}];function mFe(e){return e}function hFe(e,t){switch(t){case k7.TRIM:return v7(e,C7.methodCall.TRIM,[]);case k7.CONVERT_TO_DATE:return v7(e,C7.methodCall.LONG_TO_DATE,[]);case k7.CONVERT_TO_DATE_TIME:return v7(e,C7.methodCall.LONG_TO_DATE_TIME,[])}}function gFe(e){if(!(e.operator?.type&&e.field?.fieldId))return null;let t=y7(e),n=h7(t),r=mFe(t.operator.type);switch(r){case k7.TRIM:case k7.CONVERT_TO_DATE:case k7.CONVERT_TO_DATE_TIME:return hFe(t,r);case k7.PLUS:case k7.MINUS:case k7.DIVIDE:case k7.MULTIPLY:return g7(t,r,n);default:throw Error(`Unmatched case for operator name: ${r}`)}}function _Fe(e,t){return t.field.type!==`date`&&t.field.type,e}function vFe(e,t){let n=(()=>{let n=_Fe(t.OPERATION,e);return A7.find(e=>e.type===n)})();return Object.assign(Object.assign({},e),{operator:n})}function yFe(e,t){if(t.LEFT.TYPE!==`FIELD`)throw Error(`BinaryExpression LHS must be TYPE === FIELD`);if(![`STRING`,`NUMBER`,`BOOLEAN`,`NULL`].includes(t.RIGHT.TYPE))throw Error(`BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL`);return x7(vFe({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function bFe(e,t){let[n,r]=(()=>{switch(!0){case t.METHOD===`TRIM`:return[k7[k7.TRIM],void 0];case t.METHOD===`LONG_TO_DATE`:return[k7[k7.CONVERT_TO_DATE],void 0];case t.METHOD===`LONG_TO_DATE_TIME`:return[k7[k7.CONVERT_TO_DATE_TIME],void 0];default:throw Error(`Unhandled fromMethodExpression case`)}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:A7.find(e=>e.type===n),value:r}}function j7(e,t){return{combinator:M5,children:t.EXPRESSIONS.map(t=>{if(!(`TYPE`in t))throw Error(`RuleExpression format not yet supported - no TYPE`);if(t.TYPE===`PREDICATE_EXPRESSION`)return j7(e,t);if(t.TYPE===`BINARY_EXPRESSION`)return yFe(e,t);if(t.TYPE===`METHOD_EXPRESSION`)return bFe(e,t);throw Error(`RuleExpression format not yet supported - unsupported TYPE`)})}}let M7=class extends o7{valueConfigChanged(e,t){let n={TYPE:`PREDICATE_EXPRESSION`,OPERATION:`NULL`,EXPRESSIONS:t.model?[t.model]:[]},r=j7(t.fields,n);this.config={combinators:[M5],operators:A7,fields:t.fields,model:r,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(t!==null){if(!t.operators||!t.combinators)throw Error(`Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead`);super.configChanged(e,t)}}dispatchChangeEvent(e){if(!(`children`in e))throw Error(`Invalid top level group hierarchy`);if(e.children.length>1)throw Error(`Value expressions should not have multiple rules`);if(e.children[0]&&`children`in e.children[0])throw Error(`Trying to convert group to rule`);let t=e.children.length===0?void 0:gFe(e.children[0]);this.dispatchEvent(new CustomEvent(`change`,{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};q([C],M7.prototype,`valueConfig`,void 0),M7=q([$e({name:`foundation-value-expression-builder`,styles:X5,template:Q5})],M7);let N7=T`<template ${k(`notificationListener`)}><slot></slot></template>`,xFe={mode:`open`,delegatesFocus:!0};var P7=class extends P{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){let e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return J(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(WS.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),QS(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>J(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return J(this,void 0,void 0,function*(){var e;this.resourceName&&((e=this.dataSub)==null||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return J(this,void 0,void 0,function*(){if(this.datasource?.initialized&&this.datasource.destroy(),!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){if(!this.datasource.stream){jy.warn(`No stream available for ${this.resourceName}`);return}this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate(Kv(e))})}disconnectedCallback(){var e,t,n;super.disconnectedCallback(),(e=this.dataSub)==null||e.unsubscribe(),delete this.dataSub,(t=this.connectionSub)==null||t.unsubscribe(),delete this.connectionSub,(n=this.datasource)==null||n.destroy(),delete this.datasource}handleStreamUpdate(e){let t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){let{HEADER:t,MESSAGE:n,NOTIFY_SEVERITY:r}=e,i=e.CREATED_AT?new Date(e.CREATED_AT):void 0,a=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0,o=[];this.toastButtons&&this.toastButtons.length>0&&(o=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));let s={title:t,body:n,createdAt:i,toast:{details:e,type:r?.toLowerCase(),buttons:o,autoClose:a===void 0?!!this.closeTimeout:!!a,closeTimeout:a??this.closeTimeout,position:this.toastPosition}};YS(s,this.tagName)}};q([C],P7.prototype,`notificationListener`,void 0),q([hv],P7.prototype,`connect`,void 0),q([D({attribute:`resource-name`})],P7.prototype,`resourceName`,void 0),q([D({attribute:`close-timeout`,converter:E})],P7.prototype,`closeTimeout`,void 0),q([C],P7.prototype,`toastButtons`,void 0),q([D({attribute:`toast-position`})],P7.prototype,`toastPosition`,void 0),q([cy],P7.prototype,`datasource`,void 0),P7.compose({baseName:`notification-listener`,template:N7,shadowOptions:xFe});let F7=Xd(`foundation-router`),I7=`$router`,L7=Object.freeze({getOrCreateFor:e=>{let t=e[I7];return t===void 0?e[I7]=new SFe(e):t},find:e=>p_.find(e),from:e=>p_.from(e)});var SFe=class extends m_{};let CFe=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function R7(e){return CFe.test(e)}function z7(e){return e.config instanceof N_?e:L7.find(e)}function wFe(e,t=`/`,n=!1){let r=e.join(t).replace(RegExp(t+`{1,}`,`g`),t);return!n&&r.endsWith(t)?r.slice(0,-1):r}function TFe(e){return e.replace(`/*${s_}`,``)}function B7(){document.querySelector(`foundation-router, fast-router`)===null&&window.dispatchEvent(new PopStateEvent(`popstate`))}let V7=Object.freeze({path:Object.freeze({get current(){return Qg.path.current},generateRoute:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=z7(e);for(;r!==null;){let e=yield r.config.generateRouteFromPath(t,n);if(e!==null)return e;r=r.parent}return null}),push:(e,t=!0)=>{if(e&&R7(e)){location.href=e;return}history.pushState({},document.title,e),B7(),t&&V7.path.trigger(e)},replace:(e,t=!0)=>{if(e&&R7(e)){location.href=e;return}history.replaceState({},document.title,e),B7(),t&&V7.path.trigger(e)},trigger:e=>{Qg.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=z7(e);for(;r!==null;){let e=yield r.config.generateRouteFromName(t,n);if(e!==null)return e;r=r.parent}return null}),push:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={},r=!0){let i=yield V7.name.generateRoute(e,t,n);i!==null&&V7.path.push(i,r)}),replace:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={},r=!0){let i=yield V7.name.generateRoute(e,t,n);i!==null&&V7.path.replace(i,r)}),trigger:(e,t,...n)=>J(void 0,[e,t,...n],void 0,function*(e,t,n={}){let r=yield V7.name.generateRoute(e,t,n);r!==null&&V7.path.trigger(r)})})}),H7=e=>!e.navId||e.navId===`header`||e.navId===`side-nav`;function EFe(e,t=H7,n=10){let r=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,i)=>{e.navItems.filter(t).map((t,r)=>{let a=t.placementIndex??i*n+r;return Object.assign(Object.assign({},t),{navId:t.navId??`header`,placementIndex:a,routePath:t.routePath??e.path,routeName:t.routeName??e.name})}).forEach(e=>r.push(e))}),r.sort((e,t)=>e.placementIndex-t.placementIndex)}var U7=class extends u_{constructor(){super(...arguments),this.definitions=[]}map(...e){let t=this.owner,n=!t.parent,r=t.basename;n&&r!==``&&r!==`/`&&(F7.debug(`Route paths remap required due to detected sub-path deployment`),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(r))return F7.debug(`'${e.path}' path okay as is`),e;let t=e.path.charAt(0)===`/`?``:`/`,n=`${r}${t}${e.path}`;return F7.debug(`'${e.path}' path modified to '${n}'`),Object.assign(Object.assign({},e),{path:n})})),this.definitions=[...e,...this.definitions],super.map(...e)}};q([C],U7.prototype,`definitions`,void 0);var W7=class extends N_{constructor(){super(),this.logger=F7,this.loginPath=`login`,this.notFoundPath=`not-found`,this.notPermittedPath=`not-permitted`,this.routes=new U7(this),this.basename=zf,this.routes=new U7(this)}getNavItems(e=H7){return EFe(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>J(this,void 0,void 0,function*(){this.analytics.trackEvent(Qd.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>J(this,void 0,void 0,function*(){let{settings:t}=e.route;(t?.isPermitted)?.call(t)===!1&&e.cancel(()=>{if(!this.user.isAuthenticated)this.user.trackPath(),V7.name.replace(e.router,this.loginPath);else{let n=t.notPermittedPath?.call(t)??this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),V7.name.replace(e.router,n)}})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),V7.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){let n=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return J(this,void 0,void 0,function*(){let r=yield n.generateRouteFromName.call(this,e,t);return r?this.generateNavigationPath(r):null})}navigateTo(e){return J(this,void 0,void 0,function*(){if(e.name){this.relativeTo||this.logger.error(`unable to navigate by name as the relativeTo router is not set`),yield V7.name.push(this.relativeTo,e.name,e.params,e.trigger);return}if(e.path){V7.path.push(this.generateNavigationPath(e.path,e.params),e.trigger);return}})}generateNavigationPath(e,t){let n=this.getNavigationPathBasename(),r=n_.build(t),i=n&&!e.startsWith(n)?wFe([n,e]):e;return i=r?`${i}?${r}`:i,i}getNavigationPathBasename(){let e=(this.parent?.relativeTo?.route)?.endpoint.route.path;return e?TFe(e):this.basename?this.basename:``}construct(e){return this.container.get(e)}};q([Nt],W7.prototype,`container`,void 0),q([ef],W7.prototype,`analytics`,void 0),q([vg],W7.prototype,`user`,void 0),q([jg],W7.prototype,`_session`,void 0);let G7=`navigate-to`,K7=`generate-navigation-path`,q7=class extends L7.from(Qe){constructor(){super(...arguments),this.logger=F7,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();let{path:t,params:n,callback:r}=e.detail;r&&r(this.config.generateNavigationPath(t,n))}}get router(){return this[I7]}connectedCallback(){var e;super.connectedCallback(),!this.config.isConfigured&&((e=this.config).relativeTo??(e.relativeTo=this.router),x.queueUpdate(()=>J(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(G7,this.onNavigateTo),this.addEventListener(K7,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(G7,this.onNavigateTo),this.removeEventListener(K7,this.onGenerateNavigationPath)}};q7=q([$e({name:`foundation-router`})],q7);let J7=e=>`control: ${e}-control, content: ${e}-content`,DFe=[`background: progress-ring-background`,`progress: progress-ring-progress`,`indeterminate-indicator-1: progress-ring-indeterminate`].join(`, `),Y7=e=>T`<${e}-card class=${e=>pn(`stepper-tab`,[`stepper-tab-hidden`,e.hideTabs])}part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab"><div class=${e=>pn(`stepper-tab-menu`,[`stepper-tab-menu-hidden`,e.hideTabs])}part="stepper-tab-menu"><slot name="tab" ${xt(`tabs`)}></slot></div>${A(e=>e.orientation===Va.vertical&&!e.hideProgress,T`<div class="stepper-tab-progress" part="stepper-tab-progress"><${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${DFe}" value=${e=>e.progressValue}></${e}-progress-ring><label part="progress-label">You have completed ${e=>e.progressValue}% of the fields required to create a project</label></div>`)}</${e}-card>${A(e=>!e.indicatorOnly,T`<${e}-card class="stepper-tab-panel" part="stepper-tab-panel" data-test-id="stepper-tab-panel"><div class="stepper-panel-container" part="stepper-panel-container"><slot name="tab-panel" ${xt(`tabpanels`)}></slot></div>${A(e=>!e.hideAllButtons,T`<div class="action-buttons-container" part="action-buttons-container"><slot name="action-buttons"><${e}-button part="back-button" exportparts="${J7(`back-button`)}" @click=${e=>e.previousStep()}?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>${A(e=>e.isLastStep&&!e.hideSubmitButton,T`<${e}-button part="submit-button" exportparts="${J7(`submit-button`)}" @click=${e=>e._submit()}?disabled=${e=>e.islastStepValid}data-test-id="submit-button">
1002
- Submit </${e}-button>`)} ${A(e=>!e.isLastStep,T`<${e}-button part="next-button" exportparts="${J7(`next-button`)}" @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,OFe=T` ${e=>Y7(Fy(e))} `,X7=O` :host{display: flex;height: 100%;width: 100%}:host([orientation='horizontal']){flex-direction: column}.stepper-tab{display: flex;flex-direction: column;width: 100%;height: 100%;max-width: 280px;border-radius: 0}.action-buttons-container{width: 100%;display: flex;justify-content: flex-end}.stepper-panel-container{height: 100%;overflow: hidden;padding: 15px}.stepper-tab-menu{display: flex;flex-direction: column;width: 100%;margin-bottom: 30px}.stepper-tab-menu-hidden{display: none}.stepper-tab-progress{display: flex;flex-direction: column;align-items: center;justify-content: start;flex: 1}.stepper-tab-progress .progress-ring{--design-unit: 10;margin: 0}.stepper-tab-panel{display: flex;flex-direction: column;justify-content: space-between;width: 100%;min-width: 370px;border-radius: 0}label{padding: 0 10px;color: rgb(135 155 166);display: block;cursor: pointer;text-align: center;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}:host([orientation='horizontal']) .stepper-tab-menu{height: 100%;width: 100%;display: flex;flex-direction: row;margin-bottom: 0;align-items: center;justify-content: center;gap: calc(var(--design-unit) * 4px);padding: 0 calc(var(--design-unit) * 4px)}:host([orientation='horizontal']) .stepper-tab-hidden{display: none}:host([orientation='horizontal']) .stepper-tab{max-width: 100%;max-height: 70px;height: 70px}`;var Z7=class extends P{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=Va.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if(e.slot===`tab`){let n=this.activeTabIndex===t,r=t+1===this.tabIds.length,i=this.tabIds[t],a=this.tabpanelIds[t];e.setAttribute(`id`,i),e.setAttribute(`aria-selected`,n?`true`:`false`),e.setAttribute(`aria-disabled`,n?`false`:`true`),x.setBooleanAttribute(e,`selected`,n),e.setAttribute(`orientation`,this.orientation),a&&e.setAttribute(`aria-controls`,a),e.setAttribute(`tab-position`,String(t+1)),x.setBooleanAttribute(e,`isLast`,r),x.setBooleanAttribute(e,`hideStepNumber`,this.hideStepNumber===!0),e.setAttribute(`tabindex`,n?`0`:`-1`),x.setBooleanAttribute(e,`showCursorPointer`,t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps),n&&(this.activetab=e,this.activeid=i)}}),this.activeTabIndex===0&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});let t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{let n=this.tabIds[t],r=this.tabpanelIds[t];e.setAttribute(`id`,r),e.setAttribute(`aria-labelledby`,n),this.activeTabIndex===t?e.removeAttribute(`hidden`):e.setAttribute(`hidden`,``)})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return this.activeid===void 0||this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid)}goToStep(e,t=!1){let n=e-1;if(e<1||e>this.tabs.length)return jy.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(n===this.activeTabIndex)return!1;if(t){if(n<this.activeTabIndex)return this.handleBackwardJump(n);if(n>this.activeTabIndex)return this.handleForwardJump(n)}return n<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(n):n>this.activeTabIndex&&this.allowForwardJumps?this.handleForwardJump(n):n===this.activeTabIndex+1?(this.nextStep(),!0):(jy.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit(`validation-failure`,{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return this.activeTabIndex===0}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){let e=this.tabs.length-1;return this.activeTabIndex===e&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs(),!1):(this.tabs[e].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit(`submit`)}nextStep(){if(!this.slotsInitialized){this.pendingNextStep=!0;return}if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid()){this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,this.getCompletedTabs();return}this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex+=1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit(`next-step`),this.$emit(`validation-success`));let e=this.tabs.length-1,t=this.activeTabIndex===e;this.hideSubmitButton&&t&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs()):(this.tabs[e].completed=!1,this.getCompletedTabs())}previousStep(){this.activeTabIndex!==0&&(this.tabs[this.activeTabIndex].completed=!1,--this.activeTabIndex,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>e.getAttribute(`id`)??`tab-${Rn()}`)}getTabPanelIds(){return this.tabpanels.map(e=>e.getAttribute(`id`)??`panel-${Rn()}`)}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}};q([D({attribute:`hide-submit-button`,mode:`boolean`})],Z7.prototype,`hideSubmitButton`,void 0),q([D({attribute:`hide-progress`,mode:`boolean`})],Z7.prototype,`hideProgress`,void 0),q([D({attribute:`hide-step-number`,mode:`boolean`})],Z7.prototype,`hideStepNumber`,void 0),q([D({attribute:`allow-backward-jumps`,mode:`boolean`})],Z7.prototype,`allowBackwardJumps`,void 0),q([D({attribute:`allow-forward-jumps`,mode:`boolean`})],Z7.prototype,`allowForwardJumps`,void 0),q([D({attribute:`hide-all-buttons`,mode:`boolean`})],Z7.prototype,`hideAllButtons`,void 0),q([D({attribute:`hide-tabs`,mode:`boolean`})],Z7.prototype,`hideTabs`,void 0),q([D({attribute:`indicator-only`,mode:`boolean`})],Z7.prototype,`indicatorOnly`,void 0),q([D],Z7.prototype,`orientation`,void 0),q([D],Z7.prototype,`activeid`,void 0),q([C],Z7.prototype,`tabs`,void 0),q([C],Z7.prototype,`tabpanels`,void 0),q([C],Z7.prototype,`validation`,void 0),q([C],Z7.prototype,`progressValue`,void 0),q([C],Z7.prototype,`activeTabIndex`,void 0),q([w],Z7.prototype,`disabledPreviousStep`,null),q([w],Z7.prototype,`isLastStep`,null),q([w],Z7.prototype,`islastStepValid`,null);let Q7={};Z7.compose(Object.assign({baseName:`stepper`,template:OFe,styles:X7,shadowOptions:void 0},Q7)),class extends sd{}.compose(Object.assign({baseName:`accordion-item`,template:(e,t)=>ad(e,t),styles:(e,t)=>O` ${od(e,t)} :host{--icon-container-calculator: calc( (6 + (var(--design-unit) * 6)) * 1px );/* height of section - (padding top +padding-bottom) */ --icon-margin-calculation: calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px)}.region{padding: 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px);color: var(--accent-foreground-rest)}:host([expanded]) .region{color: var(--accent-foreground-rest)}slot[name='expanded-icon']{display: none;stroke: none}slot[name='collapsed-icon'] path.plus-sign, slot[name='expanded-icon'] path.minus-sign{stroke: white}slot[name='expanded-icon'], slot[name='collapsed-icon']{background: var(--neutral-fill-rest);fill: none;stroke: none;height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}svg:not(:root){height: calc(((var(--design-unit) * 4)) * 1px);width: calc(((var(--design-unit) * 4)) * 1px)}.icon{height: var( --icon-container-calculator );/* UX 30px* for now it's 30 on default design unit - 4/ */ width: var(--icon-container-calculator);/* UX 30px */ margin: var(--icon-margin-calculation) var(--icon-margin-calculation) var(--icon-margin-calculation) 0}.button{padding: 0 calc((8 + (var(--design-unit) * 2 * var(--density))) * 1px) 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px)}.heading{grid-template-columns: auto 1fr auto;align-items: center}`,shadowOptions:cd},ld)),class extends nd{}.compose(Object.assign({baseName:`accordion`,template:(e,t)=>po(e,t),styles:(e,t)=>O` ${td(e,t)} :host{border-top: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)}.heading{height: calc(var(--base-height-multiplier) * 4px)}`,shadowOptions:rd},id)),class extends ob{}.compose({baseName:`actions-menu`,styles:(e,t)=>O` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${ud(e,t)} rapid-menu-item{display: flex;user-select: none}rapid-menu-item::part(content){margin-inline: calc(var(--design-unit) * 3px)}rapid-menu-item[disabled]{pointer-events: none}.actions-vertical .actions-menu{padding: 0}.actions-vertical .menu-item{margin: 0;padding: calc(var(--design-unit) * 4px);border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}.actions-vertical .menu-item:last-child{border-bottom: none}.actions-vertical .menu-item:focus{border: calc(var(--stroke-width) * 1px) solid var(--accent-foreground-focus)}`,template:ab});let kFe=O` ${SS}`;(class extends eC{}).compose(Object.assign({baseName:`ai-criteria-search`,template:(e,t)=>wS,styles:kFe,shadowOptions:void 0},tC)),class extends iC{}.compose({baseName:`ai-indicator`,template:rC,styles:(e,t)=>O` ${nC(e,t)} :host{--green: var(--success-color);--trafic-light-green: var(--success-color);--red: var(--error-color);--trafic-light-red: var(--error-color);--amber: var(--warning-color);--trafic-light-amber: var(--warning-color)}`});function $7(e,t){return new lo(`appearance`,e,t)}let AFe=O` :host([appearance='primary']){background: var(--accent-fill-rest);color: var(--foreground-on-accent-rest)}:host([appearance='primary']:hover){background: var(--accent-fill-hover);color: var(--foreground-on-accent-hover)}:host([appearance='primary']:active){background: var(--accent-fill-active);color: var(--foreground-on-accent-active)}:host([appearance='primary'][disabled]), :host([appearance='primary'][disabled]):hover, :host([appearance='primary'][disabled]):active{opacity: 50%}`,jFe=O` :host([appearance='secondary']){background: var(--secondary-fill-rest);color: contrast-color(var(--secondary-fill-rest))}:host([appearance='secondary']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary'][disabled]), :host([appearance='secondary'][disabled]):hover, :host([appearance='secondary'][disabled]):active{opacity: 50%}`,MFe=O` :host([appearance='neutral']){background: var(--neutral-button-fill, var(--neutral-fill-rest));border: var(--neutral-button-border, 0);color: var(--neutral-button-foreground, var(--neutral-foreground-rest))}:host([appearance='neutral']:hover){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-hover)), transparent 20% )}:host([appearance='neutral']:active){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-active)), transparent 30% )}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{opacity: 50%;background: var(--neutral-button-fill, var(--neutral-fill-rest));color: var(--neutral-button-foreground, var(--neutral-foreground-rest));border: var(--neutral-button-border, 0)}`,NFe=O` :host([appearance='danger']){background: var(--error-fill-rest);color: contrast-color(var(--error-fill-rest));border: 0}:host([appearance='danger']:hover){background: var(--error-fill-hover);color: contrast-color(var(--error-fill-hover))}:host([appearance='danger']:active){background: var(--error-fill-active);color: contrast-color(var(--error-fill-active))}:host([appearance='danger'][disabled]), :host([appearance='danger'][disabled]):hover, :host([appearance='danger'][disabled]):active{opacity: 50%}`,PFe=O` :host([appearance='success']){background: var(--success-fill-rest);color: contrast-color(var(--success-fill-rest));border: 0}:host([appearance='success']:hover){background: var(--success-fill-hover);color: contrast-color(var(--success-fill-hover))}:host([appearance='success']:active){background: var(--success-fill-active);color: contrast-color(var(--success-fill-active))}:host([appearance='success'][disabled]), :host([appearance='success'][disabled]):hover, :host([appearance='success'][disabled]):active{opacity: 50%}`,FFe=O` :host([appearance='warning']){background: var(--warning-fill-rest);color: contrast-color(var(--warning-fill-rest));border: 0}:host([appearance='warning']:hover){background: var(--warning-fill-hover);color: contrast-color(var(--warning-fill-hover))}:host([appearance='warning']:active){background: var(--warning-fill-active);color: contrast-color(var(--warning-fill-active))}:host([appearance='warning'][disabled]), :host([appearance='warning'][disabled]):hover, :host([appearance='warning'][disabled]):active{opacity: 50%}`,IFe=O` :host([appearance='tertiary']){background: var(--tertiary-fill-rest);color: contrast-color(var(--tertiary-fill-rest));border: 0}:host([appearance='tertiary']:hover){background: var(--tertiary-fill-hover);color: contrast-color(var(--tertiary-fill-hover))}:host([appearance='tertiary']:active){background: var(--tertiary-fill-active);color: contrast-color(var(--tertiary-fill-active))}:host([appearance='tertiary'][disabled]), :host([appearance='tertiary'][disabled]):hover, :host([appearance='tertiary'][disabled]):active{opacity: 50%}`,LFe=O` :host([appearance='primary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest)}:host([appearance='primary-outline']:hover){background: var(--accent-fill-hover);color: contrast-color(var(--accent-fill-hover))}:host([appearance='primary-outline']:active){background: var(--accent-fill-active);color: contrast-color(var(--accent-fill-active))}:host([appearance='primary-outline'][disabled]), :host([appearance='primary-outline'][disabled]):hover, :host([appearance='primary-outline'][disabled]):active{opacity: 50%}`,RFe=O` :host([appearance='secondary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--secondary-fill-rest)}:host([appearance='secondary-outline']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary-outline']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary-outline'][disabled]), :host([appearance='secondary-outline'][disabled]):hover, :host([appearance='secondary-outline'][disabled]):active{opacity: 50%}`,zFe=O` :host([appearance='neutral-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host([appearance='neutral-outline']:hover){background: var(--neutral-fill-hover);color: contrast-color(var(--neutral-fill-hover))}:host([appearance='neutral-outline']:active){background: var(--neutral-fill-active);color: contrast-color(var(--neutral-fill-active))}:host([appearance='neutral-outline'][disabled]), :host([appearance='neutral-outline'][disabled]):hover, :host([appearance='neutral-outline'][disabled]):active{opacity: 50%}`,BFe=O` :host([appearance='link']){background: none;border: none;color: var(--accent-foreground-rest)}:host([appearance='link']) .control{padding: 0}:host([appearance='link']:hover){color: var(--accent-foreground-hover)}:host([appearance='link'][disabled]), :host([appearance='link'][disabled]):hover, :host([appearance='link'][disabled]):active{opacity: 50%}`,VFe=(e,t)=>O` :host{font-weight: 500;color: var(--neutral-foreground-rest);box-sizing: border-box;font-size: var(--type-ramp-base-font-size);height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px)}.control{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px)}.start{margin-inline-end: calc(var(--design-unit) * 2px)}.end{margin-inline-start: calc(var(--design-unit) * 2px)}.control:has(.start){padding-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}.control:has(.end){padding-right: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}:host([appearance='neutral']){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral']:hover){background: var(--neutral-fill-rest)}:host([appearance='neutral']:active){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%));border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);opacity: 100%}:host([appearance='accent']){color: contrast-color(var(--accent-fill-rest))}`,e9=(e,t)=>O` ${IC(e,t)} ${VFe(e,t)} `.withBehaviors($7(`primary`,AFe),$7(`secondary`,jFe),$7(`tertiary`,IFe),$7(`neutral`,MFe),$7(`danger`,NFe),$7(`success`,PFe),$7(`warning`,FFe),$7(`primary-outline`,LFe),$7(`secondary-outline`,RFe),$7(`neutral-outline`,zFe),$7(`link`,BFe));(class extends sC{}).compose(Object.assign({baseName:`anchor`,template:(e,t)=>aC(e,t),styles:(e,t)=>O` ${oC(e,t)} ${e9(e,t)} `.withBehaviors(...e9(e,t).behaviors),shadowOptions:cC},lC)),class extends fC{}.compose(Object.assign({baseName:`anchored-region`,template:(e,t)=>uC(e,t),styles:(e,t)=>O` ${dC(e,t)}`,shadowOptions:pC},mC)),class extends _C{}.compose(Object.assign({baseName:`avatar`,template:(e,t)=>hC(e,t),styles:(e,t)=>O` ${gC(e,t)}`,shadowOptions:vC},yC)),class extends SC{}.compose(Object.assign({baseName:`badge`,template:(e,t)=>bC(e,t),styles:(e,t)=>O` ${xC(e,t)} :host{--badge-fill-primary: var(--accent-fill-rest);--badge-fill-neutral: var(--neutral-fill-rest);--badge-fill-success: var(--success-color);--badge-fill-danger: var(--error-color);--badge-fill-warning: var(--warning-color);--badge-fill-buy: var(--buy-color);--badge-fill-sell: var(--sell-color);--badge-color-text: var(--neutral-foreground-rest);font-size: var(--type-ramp-minus-2-font-size)}:host .control{padding: calc(${B} * 1px) calc(${B} * 2px);border: none}`,shadowOptions:void 0},CC));let HFe=O` ${wC} :host{--banner-height: calc( ((var(--design-unit) + 2) * var(--base-height-multiplier)) + (var(--design-unit) * var(--design-unit)) * 1px )}.banner{background-color: var(--neutral-layer-1);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}.content{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}`,UFe=EC;(class extends DC{}).compose({baseName:`banner`,shadowOptions:UFe,styles:HFe,template:TC}),class extends NC{}.compose(Object.assign({baseName:`breadcrumb-item`,template:(e,t)=>jC(e,t),styles:(e,t)=>O` ${MC(e,t)} .listitem{color: var(--accent-foreground-rest)}.control{color: var(--neutral-foreground-rest)}.control:hover{color: var(--neutral-foreground-rest)}.separator{color: var(--neutral-stroke-rest);margin: 0 12px}.control:hover .content::before{background: var(--neutral-foreground-rest)}.control .start{width: calc(var(--base-height-multiplier) * 3px);height: calc(var(--base-height-multiplier) * 3px);display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);margin: 0 -4px 0 0}.control:hover .start{background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}`,shadowOptions:void 0},PC)),class extends AC{}.compose(Object.assign({baseName:`breadcrumb`,template:(e,t)=>OC(e,t),styles:(e,t)=>O` ${kC(e,t)}`,shadowOptions:void 0},{})),class extends LC{}.compose(Object.assign({baseName:`button`,template:(e,t)=>FC(e,t),styles:e9,shadowOptions:RC},zC)),class extends HC{}.compose(Object.assign({baseName:`calendar`,template:(e,t)=>VC(e,t),styles:()=>O` ${BC()}`,shadowOptions:UC},WC)),class extends qC{}.compose(Object.assign({baseName:`card`,template:(e,t)=>GC(e,t),styles:(e,t)=>O` ${KC(e,t)} :host{background: var(--neutral-layer-card-container);color: ${H};border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));box-shadow: var(--card-box-shadow, none);border: var( --card-border, 1px solid var(--neutral-stroke-rest) );/** uses a token instead of #2E3339 value available in ux docs */ /* box-shadow and border-radius are being calculated at host level by using design-tokens */}::slotted(rapid-card){background: var(--neutral-layer-3)}`,shadowOptions:void 0},JC));let WFe=O` ${iw} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,GFe=T` ${aw(`rapid`)} `;var KFe=class extends sw{};let qFe=ow;KFe.compose(Object.assign({baseName:`categorized-multiselect`,template:GFe,styles:WFe,shadowOptions:void 0},qFe)),class extends uw{}.compose(Object.assign({baseName:`checkbox`,template:(e,t)=>cw(e,t),styles:(e,t)=>O` ${lw(e,t)} :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{fill: var(--neutral-foreground-rest)}.checked-indicator{fill: contrast-color(var(--accent-fill-rest));box-shadow: 2px 1000px 1px rgb(0 0 0 / 20%) inset;border-radius: calc(var(--control-corner-radius) * 1px)}.label{padding-inline-start: calc(var(--design-unit) * 2px)}`,shadowOptions:void 0},dw)),class extends gw{}.compose(Object.assign({baseName:`combobox`,template:(e,t)=>pw(e,t),styles:(e,t)=>O` ${fw(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-width: 0}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.combo-box-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s}.selected-value{height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .combo-box-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:_w},vw)),class extends xw{}.compose({baseName:`connection-indicator`,template:bw,styles:(e,t)=>O` ${yw(e,t)} :host{--light-size: calc(var(--design-unit) * 3px);--red: var(--error-color);--trafic-light-red: color-mix(in srgb, var(--red), transparent 0%);--trafic-light-red-glow: color-mix(in srgb, var(--red), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--red), transparent 80%) 0 0 8px 8px;--green: var(--success-color);--trafic-light-green: color-mix(in srgb, var(--green), transparent 0%);--trafic-light-green-glow: color-mix(in srgb, var(--green), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--green), transparent 80%) 0 0 8px 8px}.light{margin: calc(var(--design-unit) * 4px)}.label{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);color: var(--neutral-stroke-rest)}`});let JFe=()=>O` ${Sw} :host{--primary-gradient-angle: -113.5deg;display: inline-block}.calendar-dropdown{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.input-icon-container{display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px)}.input-icon-container:hover{background-color: var(--neutral-fill-rest)}.date-toggle::part(end){margin-inline-end: calc(var(--design-unit) * 1px)}.date-toggle{margin-bottom: 0}.month-day{width: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px);height: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px)}.week-days span{font-size: var(--type-ramp-minus-2-font-size)}`,YFe=T` ${ww(`rapid`)} `;(class extends Iw{}).compose(Object.assign({baseName:`date-picker`,template:YFe,styles:JFe,shadowOptions:void 0},{}));var t9;(function(e){e.primary=`#11C9FC`,e.neutral=`#7C909B`,e.error=`#F9644D`,e.success=`#7ACC79`,e.warning=`#FFB660`,e.tertiary=`#7B2FBE`,e.info=`#11C9FC`,e.buy=`#7ACC79`,e.sell=`#F14376`,e.chartPink=`#fb8176`,e.longGreen=`#7acc79`,e.shortPink=`#f14376`,e.warningYellow=`#fcb35f`,e.green=`#44c14c`,e.lightGreen=`#69cd70`,e.red=`#ef4d28`,e.lightRed=`#ee6588`,e.dodgerBlue=`#33a9ff`,e.lightDodgerBlue=`#5cbaff`,e.violet=`#9b1e74`,e.lightViolet=`#b528af`,e.white=`#f9f9f9`,e.silver=`#c1c1c1`,e.salomie=`#ffdf94`,e.lightSalomie=`#ccb276`,e.melon=`#ffbbb2`,e.lightMelon=`#cc968e`,e.portage=`#8a99f5`,e.lightPortage=`#adb8f8`,e.ice=`#97f4eb`,e.lightIce=`#6befe2`})(t9||(t9={}));let{create:n9}=ci,r9=ns(t9.error),i9=os.create(r9.r,r9.g,r9.b),a9=n9(`error-color`).withDefault(i9),o9=ns(t9.success),s9=os.create(o9.r,o9.g,o9.b),c9=n9(`success-color`).withDefault(s9),l9=ns(t9.warning),u9=os.create(l9.r,l9.g,l9.b),d9=n9(`warning-color`).withDefault(u9),f9=ns(t9.buy),p9=os.create(f9.r,f9.g,f9.b),XFe=n9(`buy-color`).withDefault(p9),m9=ns(t9.sell),h9=os.create(m9.r,m9.g,m9.b),ZFe=n9(`sell-color`).withDefault(h9),g9=ns(t9.info),_9=os.create(g9.r,g9.g,g9.b),QFe=n9(`info-color`).withDefault(_9),v9=ns(t9.error),y9=os.create(v9.r,v9.g,v9.b),$Fe=n9(`serious-notify-color`).withDefault(y9),{create:b9}=ci,x9=e=>ci.create({name:e,cssCustomPropertyName:null}),S9=os.create(1,1,1),eIe=os.create(0,0,0),C9=4.5;function tIe(e,t,n,r,i,a,o,s,c){let l=e.source,u=t.closestIndexOf(n)>=Math.max(o,s,c)?-1:1,d=e.closestIndexOf(l),f=d+u*-1*r,p=f+u*i,m=f+u*a;return{rest:e.get(f),hover:e.get(d),active:e.get(p),focus:e.get(m)}}function nIe(e,t,n,r,i,a,o){let s=e.source,c=e.closestIndexOf(s),l=ls(t)?-1:1,u=c+(l===1?Math.min(r,i):Math.max(l*r,l*i)),d=e.colorContrast(t,n,u,l),f=e.closestIndexOf(d),p=f+l*Math.abs(r-i),m=l===1?r<i:l*r>l*i,h=m?f:p,g=m?p:f;return{rest:e.get(h),hover:e.get(g),active:e.get(h+l*a),focus:e.get(h+l*o)}}function rIe(e,t){return e.contrast(S9)>=t?S9:eIe}function w9(e,t){let n=e,r=x9(`${n}-palette`).withDefault(e=>ds.from(t.getValueFor(e))),i=x9(`${n}-fill-rest-delta`).withDefault(0),a=x9(`${n}-fill-hover-delta`).withDefault(4),o=x9(`${n}-fill-active-delta`).withDefault(-5),s=x9(`${n}-fill-focus-delta`).withDefault(0),c=x9(`${n}-foreground-rest-delta`).withDefault(0),l=x9(`${n}-foreground-hover-delta`).withDefault(6),u=x9(`${n}-foreground-active-delta`).withDefault(-4),d=x9(`${n}-foreground-focus-delta`).withDefault(0),f=x9(`${n}-fill-recipe`).withDefault({evaluate:(e,t)=>tIe(r.getValueFor(e),bc.getValueFor(e),t??Fc.getValueFor(e),a.getValueFor(e),o.getValueFor(e),s.getValueFor(e),Zs.getValueFor(e),Qs.getValueFor(e),$s.getValueFor(e))}),p=b9(`${n}-fill-rest`).withDefault(e=>f.getValueFor(e).evaluate(e).rest),m=b9(`${n}-fill-hover`).withDefault(e=>f.getValueFor(e).evaluate(e).hover),h=b9(`${n}-fill-active`).withDefault(e=>f.getValueFor(e).evaluate(e).active),g=b9(`${n}-fill-focus`).withDefault(e=>f.getValueFor(e).evaluate(e).focus),_=e=>(t,n)=>rIe(n??p.getValueFor(t),e),v=x9(`foreground-on-${n}-recipe`).withDefault({evaluate:(e,t)=>_(C9)(e,t)}),y=b9(`foreground-on-${n}-rest`).withDefault(e=>v.getValueFor(e).evaluate(e,p.getValueFor(e))),b=b9(`foreground-on-${n}-hover`).withDefault(e=>v.getValueFor(e).evaluate(e,m.getValueFor(e))),ee=b9(`foreground-on-${n}-active`).withDefault(e=>v.getValueFor(e).evaluate(e,h.getValueFor(e))),x=b9(`foreground-on-${n}-focus`).withDefault(e=>v.getValueFor(e).evaluate(e,g.getValueFor(e))),te=x9(`foreground-on-${n}-large-recipe`).withDefault({evaluate:(e,t)=>_(7)(e,t)}),ne=b9(`foreground-on-${n}-rest-large`).withDefault(e=>te.getValueFor(e).evaluate(e,p.getValueFor(e))),S=b9(`foreground-on-${n}-hover-large`).withDefault(e=>te.getValueFor(e).evaluate(e,m.getValueFor(e))),C=b9(`foreground-on-${n}-active-large`).withDefault(e=>te.getValueFor(e).evaluate(e,h.getValueFor(e))),w=b9(`foreground-on-${n}-focus-large`).withDefault(e=>te.getValueFor(e).evaluate(e,g.getValueFor(e))),re=x9(`${n}-foreground-recipe`).withDefault({evaluate:(e,t)=>nIe(r.getValueFor(e),t??Fc.getValueFor(e),C9,c.getValueFor(e),l.getValueFor(e),u.getValueFor(e),d.getValueFor(e))});return{palette:r,fillRestDelta:i,fillHoverDelta:a,fillActiveDelta:o,fillFocusDelta:s,foregroundRestDelta:c,foregroundHoverDelta:l,foregroundActiveDelta:u,foregroundFocusDelta:d,fillRecipe:f,fillRest:p,fillHover:m,fillActive:h,fillFocus:g,foregroundOnRecipe:v,foregroundOnRest:y,foregroundOnHover:b,foregroundOnActive:ee,foregroundOnFocus:x,foregroundOnLargeRecipe:te,foregroundOnRestLarge:ne,foregroundOnHoverLarge:S,foregroundOnActiveLarge:C,foregroundOnFocusLarge:w,foregroundRecipe:re,foregroundRest:b9(`${n}-foreground-rest`).withDefault(e=>re.getValueFor(e).evaluate(e).rest),foregroundHover:b9(`${n}-foreground-hover`).withDefault(e=>re.getValueFor(e).evaluate(e).hover),foregroundActive:b9(`${n}-foreground-active`).withDefault(e=>re.getValueFor(e).evaluate(e).active),foregroundFocus:b9(`${n}-foreground-focus`).withDefault(e=>re.getValueFor(e).evaluate(e).focus)}}let T9=ns(t9.green),E9=os.create(T9.r,T9.g,T9.b),D9=ci.create(`secondary-color`).withDefault(E9),{palette:iIe,fillRestDelta:aIe,fillHoverDelta:oIe,fillActiveDelta:sIe,fillFocusDelta:cIe,foregroundRestDelta:lIe,foregroundHoverDelta:uIe,foregroundActiveDelta:dIe,foregroundFocusDelta:fIe,fillRecipe:pIe,fillRest:mIe,fillHover:hIe,fillActive:gIe,fillFocus:_Ie,foregroundOnRecipe:vIe,foregroundOnRest:yIe,foregroundOnHover:bIe,foregroundOnActive:xIe,foregroundOnFocus:SIe,foregroundOnLargeRecipe:CIe,foregroundOnRestLarge:wIe,foregroundOnHoverLarge:TIe,foregroundOnActiveLarge:EIe,foregroundOnFocusLarge:DIe,foregroundRecipe:OIe,foregroundRest:kIe,foregroundHover:AIe,foregroundActive:jIe,foregroundFocus:MIe}=w9(`secondary`,D9),O9=ns(t9.tertiary),k9=os.create(O9.r,O9.g,O9.b),A9=ci.create(`tertiary-color`).withDefault(k9),{palette:NIe,fillRestDelta:PIe,fillHoverDelta:FIe,fillActiveDelta:IIe,fillFocusDelta:LIe,foregroundRestDelta:RIe,foregroundHoverDelta:zIe,foregroundActiveDelta:BIe,foregroundFocusDelta:VIe,fillRecipe:HIe,fillRest:UIe,fillHover:WIe,fillActive:GIe,fillFocus:KIe,foregroundOnRecipe:qIe,foregroundOnRest:JIe,foregroundOnHover:YIe,foregroundOnActive:XIe,foregroundOnFocus:ZIe,foregroundOnLargeRecipe:QIe,foregroundOnRestLarge:$Ie,foregroundOnHoverLarge:eLe,foregroundOnActiveLarge:tLe,foregroundOnFocusLarge:nLe,foregroundRecipe:rLe,foregroundRest:iLe,foregroundHover:aLe,foregroundActive:oLe,foregroundFocus:sLe}=w9(`tertiary`,A9),{palette:cLe,fillRestDelta:lLe,fillHoverDelta:uLe,fillActiveDelta:dLe,fillFocusDelta:fLe,foregroundRestDelta:pLe,foregroundHoverDelta:mLe,foregroundActiveDelta:hLe,foregroundFocusDelta:gLe,fillRecipe:_Le,fillRest:vLe,fillHover:yLe,fillActive:bLe,fillFocus:xLe,foregroundOnRecipe:SLe,foregroundOnRest:CLe,foregroundOnHover:wLe,foregroundOnActive:TLe,foregroundOnFocus:ELe,foregroundOnLargeRecipe:DLe,foregroundOnRestLarge:OLe,foregroundOnHoverLarge:kLe,foregroundOnActiveLarge:ALe,foregroundOnFocusLarge:jLe,foregroundRecipe:MLe,foregroundRest:NLe,foregroundHover:PLe,foregroundActive:FLe,foregroundFocus:ILe}=w9(`error`,a9),{palette:LLe,fillRestDelta:RLe,fillHoverDelta:zLe,fillActiveDelta:BLe,fillFocusDelta:VLe,foregroundRestDelta:HLe,foregroundHoverDelta:ULe,foregroundActiveDelta:WLe,foregroundFocusDelta:GLe,fillRecipe:KLe,fillRest:qLe,fillHover:JLe,fillActive:YLe,fillFocus:XLe,foregroundOnRecipe:ZLe,foregroundOnRest:QLe,foregroundOnHover:$Le,foregroundOnActive:eRe,foregroundOnFocus:tRe,foregroundOnLargeRecipe:nRe,foregroundOnRestLarge:rRe,foregroundOnHoverLarge:iRe,foregroundOnActiveLarge:aRe,foregroundOnFocusLarge:oRe,foregroundRecipe:sRe,foregroundRest:cRe,foregroundHover:lRe,foregroundActive:uRe,foregroundFocus:dRe}=w9(`success`,c9),{palette:fRe,fillRestDelta:pRe,fillHoverDelta:mRe,fillActiveDelta:hRe,fillFocusDelta:gRe,foregroundRestDelta:_Re,foregroundHoverDelta:vRe,foregroundActiveDelta:yRe,foregroundFocusDelta:bRe,fillRecipe:xRe,fillRest:SRe,fillHover:CRe,fillActive:wRe,fillFocus:TRe,foregroundOnRecipe:ERe,foregroundOnRest:DRe,foregroundOnHover:ORe,foregroundOnActive:kRe,foregroundOnFocus:ARe,foregroundOnLargeRecipe:jRe,foregroundOnRestLarge:MRe,foregroundOnHoverLarge:NRe,foregroundOnActiveLarge:PRe,foregroundOnFocusLarge:FRe,foregroundRecipe:IRe,foregroundRest:LRe,foregroundHover:RRe,foregroundActive:zRe,foregroundFocus:BRe}=w9(`warning`,d9);var VRe=/* @__PURE__ */ c({accentFillActive:()=>Bc,accentFillActiveDelta:()=>Gs,accentFillFocus:()=>Vc,accentFillFocusDelta:()=>Ks,accentFillHover:()=>zc,accentFillHoverDelta:()=>Ws,accentFillRest:()=>Rc,accentFillRestDelta:()=>Us,accentForegroundActive:()=>rl,accentForegroundActiveDelta:()=>Ys,accentForegroundFocus:()=>il,accentForegroundFocusDelta:()=>Xs,accentForegroundHover:()=>nl,accentForegroundHoverDelta:()=>Js,accentForegroundRest:()=>tl,accentForegroundRestDelta:()=>qs,accentPalette:()=>Sc,baseHeightMultiplier:()=>vs,baseLayerLuminance:()=>ys,bodyFont:()=>_s,buyColor:()=>XFe,controlCornerRadius:()=>bs,defaultBuyColor:()=>p9,defaultErrorColor:()=>i9,defaultInfoColor:()=>_9,defaultSecondaryColor:()=>E9,defaultSellColor:()=>h9,defaultSeriousNotifyColor:()=>y9,defaultSuccessColor:()=>s9,defaultTertiaryColor:()=>k9,defaultWarningColor:()=>u9,density:()=>xs,designUnit:()=>B,direction:()=>Ss,disabledOpacity:()=>Cs,errorColor:()=>a9,errorFillActive:()=>bLe,errorFillActiveDelta:()=>dLe,errorFillFocus:()=>xLe,errorFillFocusDelta:()=>fLe,errorFillHover:()=>yLe,errorFillHoverDelta:()=>uLe,errorFillRecipe:()=>_Le,errorFillRest:()=>vLe,errorFillRestDelta:()=>lLe,errorForegroundActive:()=>FLe,errorForegroundActiveDelta:()=>hLe,errorForegroundFocus:()=>ILe,errorForegroundFocusDelta:()=>gLe,errorForegroundHover:()=>PLe,errorForegroundHoverDelta:()=>mLe,errorForegroundRecipe:()=>MLe,errorForegroundRest:()=>NLe,errorForegroundRestDelta:()=>pLe,errorPalette:()=>cLe,fillColor:()=>Fc,focusStrokeInner:()=>Ol,focusStrokeOuter:()=>Dl,focusStrokeWidth:()=>ws,foregroundOnAccentActive:()=>Kc,foregroundOnAccentActiveLarge:()=>Zc,foregroundOnAccentFocus:()=>qc,foregroundOnAccentFocusLarge:()=>Qc,foregroundOnAccentHover:()=>Gc,foregroundOnAccentHoverLarge:()=>Xc,foregroundOnAccentRest:()=>Wc,foregroundOnAccentRestLarge:()=>Yc,foregroundOnErrorActive:()=>TLe,foregroundOnErrorActiveLarge:()=>ALe,foregroundOnErrorFocus:()=>ELe,foregroundOnErrorFocusLarge:()=>jLe,foregroundOnErrorHover:()=>wLe,foregroundOnErrorHoverLarge:()=>kLe,foregroundOnErrorLargeRecipe:()=>DLe,foregroundOnErrorRecipe:()=>SLe,foregroundOnErrorRest:()=>CLe,foregroundOnErrorRestLarge:()=>OLe,foregroundOnSecondaryActive:()=>xIe,foregroundOnSecondaryActiveLarge:()=>EIe,foregroundOnSecondaryFocus:()=>SIe,foregroundOnSecondaryFocusLarge:()=>DIe,foregroundOnSecondaryHover:()=>bIe,foregroundOnSecondaryHoverLarge:()=>TIe,foregroundOnSecondaryLargeRecipe:()=>CIe,foregroundOnSecondaryRecipe:()=>vIe,foregroundOnSecondaryRest:()=>yIe,foregroundOnSecondaryRestLarge:()=>wIe,foregroundOnSuccessActive:()=>eRe,foregroundOnSuccessActiveLarge:()=>aRe,foregroundOnSuccessFocus:()=>tRe,foregroundOnSuccessFocusLarge:()=>oRe,foregroundOnSuccessHover:()=>$Le,foregroundOnSuccessHoverLarge:()=>iRe,foregroundOnSuccessLargeRecipe:()=>nRe,foregroundOnSuccessRecipe:()=>ZLe,foregroundOnSuccessRest:()=>QLe,foregroundOnSuccessRestLarge:()=>rRe,foregroundOnTertiaryActive:()=>XIe,foregroundOnTertiaryActiveLarge:()=>tLe,foregroundOnTertiaryFocus:()=>ZIe,foregroundOnTertiaryFocusLarge:()=>nLe,foregroundOnTertiaryHover:()=>YIe,foregroundOnTertiaryHoverLarge:()=>eLe,foregroundOnTertiaryLargeRecipe:()=>QIe,foregroundOnTertiaryRecipe:()=>qIe,foregroundOnTertiaryRest:()=>JIe,foregroundOnTertiaryRestLarge:()=>$Ie,foregroundOnWarningActive:()=>kRe,foregroundOnWarningActiveLarge:()=>PRe,foregroundOnWarningFocus:()=>ARe,foregroundOnWarningFocusLarge:()=>FRe,foregroundOnWarningHover:()=>ORe,foregroundOnWarningHoverLarge:()=>NRe,foregroundOnWarningLargeRecipe:()=>jRe,foregroundOnWarningRecipe:()=>ERe,foregroundOnWarningRest:()=>DRe,foregroundOnWarningRestLarge:()=>MRe,infoColor:()=>QFe,neutralFillActive:()=>cl,neutralFillActiveDelta:()=>$s,neutralFillFocus:()=>ll,neutralFillFocusDelta:()=>ec,neutralFillHover:()=>sl,neutralFillHoverDelta:()=>Qs,neutralFillInputActive:()=>pl,neutralFillInputActiveDelta:()=>rc,neutralFillInputFocus:()=>ml,neutralFillInputFocusDelta:()=>ic,neutralFillInputHover:()=>fl,neutralFillInputHoverDelta:()=>nc,neutralFillInputRest:()=>dl,neutralFillInputRestDelta:()=>tc,neutralFillLayerRest:()=>El,neutralFillLayerRestDelta:()=>pc,neutralFillRest:()=>ol,neutralFillRestDelta:()=>Zs,neutralFillStealthActive:()=>vl,neutralFillStealthActiveDelta:()=>sc,neutralFillStealthFocus:()=>yl,neutralFillStealthFocusDelta:()=>cc,neutralFillStealthHover:()=>_l,neutralFillStealthHoverDelta:()=>oc,neutralFillStealthRest:()=>gl,neutralFillStealthRestDelta:()=>ac,neutralFillStrongActive:()=>Cl,neutralFillStrongActiveDelta:()=>dc,neutralFillStrongFocus:()=>wl,neutralFillStrongFocusDelta:()=>fc,neutralFillStrongHover:()=>Sl,neutralFillStrongHoverDelta:()=>uc,neutralFillStrongRest:()=>xl,neutralFillStrongRestDelta:()=>lc,neutralForegroundHint:()=>kl,neutralForegroundRest:()=>H,neutralLayer1:()=>Oc,neutralLayer2:()=>Ac,neutralLayer3:()=>Mc,neutralLayer4:()=>Pc,neutralLayerCardContainer:()=>wc,neutralLayerFloating:()=>Ec,neutralPalette:()=>bc,neutralStrokeActive:()=>Nl,neutralStrokeActiveDelta:()=>gc,neutralStrokeDividerRest:()=>Fl,neutralStrokeDividerRestDelta:()=>vc,neutralStrokeFocus:()=>Pl,neutralStrokeFocusDelta:()=>_c,neutralStrokeHover:()=>Ml,neutralStrokeHoverDelta:()=>hc,neutralStrokeRest:()=>jl,neutralStrokeRestDelta:()=>mc,secondaryColor:()=>D9,secondaryFillActive:()=>gIe,secondaryFillActiveDelta:()=>sIe,secondaryFillFocus:()=>_Ie,secondaryFillFocusDelta:()=>cIe,secondaryFillHover:()=>hIe,secondaryFillHoverDelta:()=>oIe,secondaryFillRecipe:()=>pIe,secondaryFillRest:()=>mIe,secondaryFillRestDelta:()=>aIe,secondaryForegroundActive:()=>jIe,secondaryForegroundActiveDelta:()=>dIe,secondaryForegroundFocus:()=>MIe,secondaryForegroundFocusDelta:()=>fIe,secondaryForegroundHover:()=>AIe,secondaryForegroundHoverDelta:()=>uIe,secondaryForegroundRecipe:()=>OIe,secondaryForegroundRest:()=>kIe,secondaryForegroundRestDelta:()=>lIe,secondaryPalette:()=>iIe,sellColor:()=>ZFe,seriousNotifyColor:()=>$Fe,strokeWidth:()=>V,successColor:()=>c9,successFillActive:()=>YLe,successFillActiveDelta:()=>BLe,successFillFocus:()=>XLe,successFillFocusDelta:()=>VLe,successFillHover:()=>JLe,successFillHoverDelta:()=>zLe,successFillRecipe:()=>KLe,successFillRest:()=>qLe,successFillRestDelta:()=>RLe,successForegroundActive:()=>uRe,successForegroundActiveDelta:()=>WLe,successForegroundFocus:()=>dRe,successForegroundFocusDelta:()=>GLe,successForegroundHover:()=>lRe,successForegroundHoverDelta:()=>ULe,successForegroundRecipe:()=>sRe,successForegroundRest:()=>cRe,successForegroundRestDelta:()=>HLe,successPalette:()=>LLe,tertiaryColor:()=>A9,tertiaryFillActive:()=>GIe,tertiaryFillActiveDelta:()=>IIe,tertiaryFillFocus:()=>KIe,tertiaryFillFocusDelta:()=>LIe,tertiaryFillHover:()=>WIe,tertiaryFillHoverDelta:()=>FIe,tertiaryFillRecipe:()=>HIe,tertiaryFillRest:()=>UIe,tertiaryFillRestDelta:()=>PIe,tertiaryForegroundActive:()=>oLe,tertiaryForegroundActiveDelta:()=>BIe,tertiaryForegroundFocus:()=>sLe,tertiaryForegroundFocusDelta:()=>VIe,tertiaryForegroundHover:()=>aLe,tertiaryForegroundHoverDelta:()=>zIe,tertiaryForegroundRecipe:()=>rLe,tertiaryForegroundRest:()=>iLe,tertiaryForegroundRestDelta:()=>RIe,tertiaryPalette:()=>NIe,typeRampBaseFontSize:()=>Ts,typeRampBaseLineHeight:()=>Es,typeRampMinus1FontSize:()=>Ds,typeRampMinus1LineHeight:()=>Os,typeRampMinus2FontSize:()=>ks,typeRampMinus2LineHeight:()=>As,typeRampPlus1FontSize:()=>js,typeRampPlus1LineHeight:()=>Ms,typeRampPlus2FontSize:()=>Ns,typeRampPlus2LineHeight:()=>Ps,typeRampPlus3FontSize:()=>Fs,typeRampPlus3LineHeight:()=>Is,typeRampPlus4FontSize:()=>Ls,typeRampPlus4LineHeight:()=>Rs,typeRampPlus5FontSize:()=>zs,typeRampPlus5LineHeight:()=>Bs,typeRampPlus6FontSize:()=>Vs,typeRampPlus6LineHeight:()=>Hs,warningColor:()=>d9,warningFillActive:()=>wRe,warningFillActiveDelta:()=>hRe,warningFillFocus:()=>TRe,warningFillFocusDelta:()=>gRe,warningFillHover:()=>CRe,warningFillHoverDelta:()=>mRe,warningFillRecipe:()=>xRe,warningFillRest:()=>SRe,warningFillRestDelta:()=>pRe,warningForegroundActive:()=>zRe,warningForegroundActiveDelta:()=>yRe,warningForegroundFocus:()=>BRe,warningForegroundFocusDelta:()=>bRe,warningForegroundHover:()=>RRe,warningForegroundHoverDelta:()=>vRe,warningForegroundRecipe:()=>IRe,warningForegroundRest:()=>LRe,warningForegroundRestDelta:()=>_Re,warningPalette:()=>fRe});let j9=Vw(t9.primary),M9=Vw(t9.neutral),N9=Vw(t9.green),P9=Vw(t9.tertiary),F9=Vw(t9.error),I9=Vw(t9.success),L9=Vw(t9.warning),R9=hs.DarkMode,HRe=Fn.ltr,z9=`"Segoe UI", Arial, Helvetica, sans-serif`,B9=`14px`,V9=`20px`,URe={design_tokens:{color:{accent:{$value:j9.source.toColorString(),$type:`color`},neutral:{$value:M9.source.toColorString(),$type:`color`},secondary:{$value:N9.source.toColorString(),$type:`color`},tertiary:{$value:P9.source.toColorString(),$type:`color`},error:{$value:F9.source.toColorString(),$type:`color`},success:{$value:I9.source.toColorString(),$type:`color`},warning:{$value:L9.source.toColorString(),$type:`color`}},fontFamily:{bodyFont:{$value:z9,$type:`fontFamily`}},typography:{baseFontSize:{$value:B9,$type:`dimension`},baseLineHeight:{$value:V9,$type:`dimension`}},mode:{luminance:{$value:R9,$type:`number`}},style:{density:{$value:0,$type:`number`},baseHeightMultiplier:{$value:10,$type:`number`},borderRadius:{$value:4,$type:`number`},strokeWidth:{$value:1,$type:`number`}},space:{designUnit:{$value:4,$type:`number`}}}};var WRe=/* @__PURE__ */ c({accentFillActiveDeltaValue:()=>-5,accentFillFocusDeltaValue:()=>0,accentFillHoverDeltaValue:()=>4,accentFillRestDeltaValue:()=>0,accentForegroundActiveDeltaValue:()=>-4,accentForegroundFocusDeltaValue:()=>0,accentForegroundHoverDeltaValue:()=>6,accentForegroundRestDeltaValue:()=>0,accentPaletteValue:()=>j9,baseHeightMultiplierValue:()=>10,baseLayerLuminanceValue:()=>R9,bodyFontValue:()=>z9,controlCornerRadiusValue:()=>4,densityValue:()=>0,designTokens:()=>URe,designUnitValue:()=>4,directionValue:()=>HRe,disabledOpacityValue:()=>.3,errorPaletteValue:()=>F9,focusStrokeWidthValue:()=>2,neutralFillActiveDeltaValue:()=>5,neutralFillFocusDeltaValue:()=>0,neutralFillHoverDeltaValue:()=>10,neutralFillInputActiveDeltaValue:()=>0,neutralFillInputFocusDeltaValue:()=>10,neutralFillInputHoverDeltaValue:()=>5,neutralFillInputRestDeltaValue:()=>0,neutralFillLayerRestDeltaValue:()=>3,neutralFillRestDeltaValue:()=>7,neutralFillStealthActiveDeltaValue:()=>3,neutralFillStealthFocusDeltaValue:()=>0,neutralFillStealthHoverDeltaValue:()=>5,neutralFillStealthRestDeltaValue:()=>0,neutralFillStrongActiveDeltaValue:()=>-5,neutralFillStrongFocusDeltaValue:()=>0,neutralFillStrongHoverDeltaValue:()=>8,neutralFillStrongRestDeltaValue:()=>0,neutralPaletteValue:()=>M9,neutralStrokeActiveDeltaValue:()=>16,neutralStrokeDividerRestDeltaValue:()=>8,neutralStrokeFocusDeltaValue:()=>25,neutralStrokeHoverDeltaValue:()=>40,neutralStrokeRestDeltaValue:()=>25,prefix:()=>`rapid`,secondaryPaletteValue:()=>N9,strokeWidthValue:()=>1,successPaletteValue:()=>I9,tertiaryPaletteValue:()=>P9,typeRampBaseFontSizeValue:()=>B9,typeRampBaseLineHeightValue:()=>V9,typeRampMinus1FontSizeValue:()=>`13px`,typeRampMinus1LineHeightValue:()=>`19px`,typeRampMinus2FontSizeValue:()=>`12px`,typeRampMinus2LineHeightValue:()=>`18px`,typeRampPlus1FontSizeValue:()=>`15px`,typeRampPlus1LineHeightValue:()=>`21px`,typeRampPlus2FontSizeValue:()=>`16px`,typeRampPlus2LineHeightValue:()=>`22px`,typeRampPlus3FontSizeValue:()=>`17px`,typeRampPlus3LineHeightValue:()=>`23px`,typeRampPlus4FontSizeValue:()=>`18px`,typeRampPlus4LineHeightValue:()=>`24px`,typeRampPlus5FontSizeValue:()=>`19px`,typeRampPlus5LineHeightValue:()=>`25px`,typeRampPlus6FontSizeValue:()=>`20px`,typeRampPlus6LineHeightValue:()=>`26px`,warningPaletteValue:()=>L9});(class extends K{constructor(){super(),Rw(VRe,WRe,this)}}).compose({baseName:`design-system-provider`,template:T`<slot></slot>`});let H9=O` ${e0} :host{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}dialog{position: var(--dialog-position, fixed);top: 0;bottom: 0;border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest));text-align: left;line-height: normal;box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);background-color: var(--dialog-background, var(--neutral-layer-1))}.top{display: flex;align-items: center;justify-content: space-between;color: var(--neutral-foreground-rest);margin-bottom: calc(var(--design-unit) * 2px);font-weight: 500}.bottom{display: flex;flex-wrap: wrap;justify-content: flex-end;color: var(--neutral-foreground-rest);gap: calc(var(--design-unit) * 2px)}:host slot:first-of-type{color: ${H}}::slotted(rapid-button){margin-top: calc(var(--design-unit) * 4px - 1px)}slot[name='top']::slotted(*){margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-hint);font-weight: 700}.content-wrapper{min-width: var(--dialog-min-width);min-height: var(--dialog-min-height);height: fit-content;width: fit-content;max-width: var(--dialog-max-width);max-height: var(--dialog-max-height);display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.close-icon:hover svg{background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}.close-icon svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%)}.close-icon:hover svg g path{fill: var(--neutral-foreground-rest)}.close-icon:active svg{background-color: var(--neutral-layer-4)}.close-icon:active svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 67%)}.header-controls{rapid-button{--base-height-multiplier: 8}rapid-button::part(control){padding: 0 calc((8 + var(--design-unit) * 1 * var(--density)) * 1px)}}`,GRe=g0,KRe=n0,qRe=h0;(class extends v0{}).compose(Object.assign({baseName:`dialog`,shadowOptions:qRe,styles:H9,template:KRe},GRe)),class extends x0{}.compose(Object.assign({baseName:`disclosure`,template:(e,t)=>y0(e,t),styles:(e,t)=>O` ${b0(e,t)} :host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}:host([appearance='accent']) .invoker{padding: calc((10 + (var(--design-unit) * 2 * var(--density))) * 1px)}#disclosure-content{padding: 0 calc(var(--design-unit) * 4px) calc(var(--design-unit) * 4px);text-align: center}`,shadowOptions:h0},S0)),class extends T0{}.compose(Object.assign({baseName:`divider`,template:(e,t)=>C0(e,t),styles:(e,t)=>O` ${w0(e,t)}`,shadowOptions:void 0},E0)),class extends A0{}.compose({baseName:`dropdown-menu`,styles:(e,t)=>O` ${D0(`rapid`,e,t)} .actions-menu{border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);gap: 0;margin: calc(var(--design-unit) * 1px) 0}rapid-menu{margin: 0 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * -2px);border-radius: calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}`,template:k0});let JRe=O` ${j0}`;(class extends L0{}).compose({baseName:`environment-indicator`,styles:JRe,template:M0});function U9(e,...t){let n=``;return e.forEach((e,r)=>{n+=e,r<t.length&&(n+=t[r])}),n}let W9={number:`rapid-number-field`,text:`rapid-text-field`,date:`rapid-text-field`,datetimeLocal:`rapid-text-field`,checkbox:`rapid-checkbox`,button:`rapid-button`,select:`rapid-select`,option:`rapid-option`,optgroup:`rapid-optgroup`,radio:{input:`rapid-radio`,group:`rapid-radio-group`}},G9=U9` rapid-select, rapid-text-field, rapid-number-field{min-width: 180px}rapid-button.btn{padding: 0}rapid-button.btn-success{background-color: var(--accent-fill-active);border-color: var(--accent-fill-active)}rapid-button.btn-danger{background-color: var(--error-color);border-color: var(--error-border-color)}rapid-select::part(listbox){max-height: 15vh}`,K9=U9` border: unset;border: 1px solid var(--focus-stroke-outer);padding: calc(var(--design-unit) * 2.5px);border-radius: 10px;margin: calc(var(--design-unit) * 1px);`,q9={value:U9` ${G9} rapid-number-field, rapid-text-field{margin-bottom: 0}rapid-number-field::part(label){display: none}p.validation-msg{color: var(--neutral-foreground-rest)}`,rule:U9` ${G9} div.rule-container{${K9}}div.rule-container.error{border-color: var(--error-border-color)}`,operator:U9` ${G9} rapid-select{min-width: 350px}`,field:U9` ${G9} rapid-select{min-width: 350px}`,group:U9` ${G9} div.rules-group-container{${K9}}p.group-combinator-link{padding-left: calc(var(--design-unit) * 2.5px);color: var(--neutral-foreground-rest)}`},J9=class extends s7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],J9.prototype,`styles`,void 0),J9=q([$e({name:`rapid-expression-builder`,styles:S7.styles,template:S7.template})],J9);let Y9=class extends O7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],Y9.prototype,`styles`,void 0),Y9=q([$e({name:`rapid-rule-expression-builder`,styles:S7.styles,template:S7.template})],Y9);let X9=class extends M7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],X9.prototype,`styles`,void 0),X9=q([$e({name:`rapid-value-expression-builder`,styles:S7.styles,template:S7.template})],X9);let YRe=O` ${$0} ::-webkit-scrollbar{width: calc(var(--design-unit) * 3px)}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 3px) solid var(--neutral-layer-4)}:host::part(select-file-button), :host::part(upload-file-button){margin: 0 0 calc(var(--design-unit) * 2px) calc(var(--design-unit) * 2px)}`,XRe=T` ${e2(`rapid`)} `,ZRe=n2;(class extends t2{}).compose(Object.assign({baseName:`file-upload`,shadowOptions:void 0,styles:YRe,template:XRe},ZRe));let QRe=(e,t)=>O` ${l2(e,t)} .toggle, .toggle-collapsed{background: var(--neutral-layer-4);color: var(--neutral-foreground-hint)}.toggle{border-top: calc(var(--stroke-width) * 2px) solid}.toggle:hover, .toggle-collapsed:hover{color: var(--accent-foreground-rest)}.filter-bar{background: var(--neutral-layer-3)}`,$Re=T` ${u2(`rapid`)} `;(class extends d2{}).compose({baseName:`filter-bar`,template:$Re,styles:QRe});let eze=(e,t)=>O` ${r2} .filter-wrapper{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.close-icon{border: calc(var(--stroke-width) * 1px) solid transparent}.close-icon:hover{border-color: var(--error-color);background: color-mix(in srgb, var(--error-color), transparent 75%)}.close-icon:hover svg path{fill: var(--error-color)}rapid-select{margin-bottom: calc(var(--design-unit) * 2px)}.flex-row rapid-text-field, .flex-row rapid-select{flex: 1}`,tze=T` ${o2(`rapid`)} `;(class extends c2{}).compose({baseName:`filter`,template:tze,styles:eze}),class extends g2{}.compose(Object.assign({baseName:`flipper`,template:(e,t)=>m2(e,t),styles:(e,t)=>O` ${h2(e,t)} :host{color: var(--neutral-foreground-rest)}:host(:hover){color: var(--neutral-foreground-rest)}:host::before{background: color-mix(in srgb, var(--accent-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);color: var(--neutral-foreground-rest)}:host(:hover)::before{background: var(--accent-fill-rest);color: var(--neutral-foreground-rest)}`,shadowOptions:void 0},_2));let nze=O` ${v2} div.flyout{background-color: var(--neutral-layer-1);border-color: var(--neutral-stroke-rest);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}div.background{padding: calc(var(--design-unit) * 4px) 0}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}:host([position='left']) div.flyout{border-right-style: solid;border-right-width: calc(var(--stroke-width) * 1px)}:host([position='right']) div.flyout{border-left-style: solid;border-left-width: calc(var(--stroke-width) * 1px)}div.exit{cursor: pointer;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);display: flex;justify-content: center;align-items: center}div.content, div.footer{padding: 0 0 calc(var(--design-unit) * 2px)}div.exit:hover{background-color: var(--neutral-fill-hover);border-radius: calc(var(--stroke-width) * 3px)}`,rze=T` ${y2(`rapid`)} `,ize=x2;(class extends b2{}).compose(Object.assign({baseName:`flyout`,shadowOptions:void 0,styles:nze,template:rze},ize));let aze=(e,t)=>O` ${D2(e,t)}`,oze=(e,t)=>E2(e,t);var sze=class extends O2{};let cze={nextFlipper:T`<rapid-flipper @click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`,previousFlipper:T`<rapid-flipper @click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`};sze.compose(Object.assign({baseName:`horizontal-scroll`,template:oze,styles:aze,shadowOptions:k2},cze));let lze=(e,t)=>O` ${A2(e,t)}`,uze=T` ${j2(`rapid`)} `;var dze=class extends F2{};let fze=N2,pze=M2;dze.compose(Object.assign({baseName:`icon`,template:uze,styles:lze,shadowOptions:pze},fze)),class extends H2{}.compose(Object.assign({baseName:`option`,template:(e,t)=>B2(e,t),styles:(e,t)=>O` ${V2(e,t)} :host{border-radius: 0;padding: 0 calc(var(--design-unit) * 4px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host(.selected), :host(:not([disabled])[aria-selected='true']:active), :host(:not([disabled])[aria-selected='true']:hover){background: var(--neutral-layer-2);color: var(--accent-fill-rest);font-weight: 500}`,shadowOptions:void 0},U2)),class extends R2{}.compose(Object.assign({baseName:`listbox`,template:(e,t)=>I2(e,t),styles:(e,t)=>O` ${L2(e,t)} :host{padding: 0;max-width: 300px;/** if removed max-width will be fit-content */}::slotted(*:last-child){border-bottom: none}`,shadowOptions:void 0},z2)),class extends X2{}.compose(Object.assign({baseName:`menu-item`,template:(e,t)=>J2(e,t),styles:(e,t)=>O` ${Y2(e,t)} :host{margin: 0;--control-corner-radius: 0;background: var(--neutral-fill-stealth-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:hover){background: color-mix(in srgb, ${_l}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%)}:host(:focus){background: var(--neutral-fill-stealth-hover)}:host(.indent-0){border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}/* UX team wants border: solid 1px #2E3339;background: #2E3339 */ /* tokens being used by fast background: ${_l} color: ${H} */`,shadowOptions:void 0},Z2)),class extends K2{}.compose(Object.assign({baseName:`menu`,template:(e,t)=>W2(e,t),styles:(e,t)=>O` ${G2(e,t)} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%);padding: 0}`,shadowOptions:void 0},q2));let mze=O` ${H9}`,hze=e4,gze=Q2,_ze=$2;(class extends t4{}).compose(Object.assign({baseName:`modal`,shadowOptions:_ze,styles:mze,template:gze},hze));let vze=O` ${ZC} .root{min-width: 0}.control{height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-height: 0;outline: none;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font);box-sizing: border-box}:host(:focus-within:not([disabled])) .control{outline: none;border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}.control:hover:not(:focus):not([disabled]){outline: none;border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}#display-field{min-height: unset;padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px);font-family: var(--body-font), sans-serif;font-size: var(--type-ramp-base-font-size);background-color: transparent}#display-field:focus{outline: none;background: unset}#display-field:hover:not(:focus):not([disabled]){outline: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);left: calc( 100% - ((var(--base-height-multiplier) * (var(--design-unit) - 1)) + (var(--design-unit) - 2)) * 1px );background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}#arrow-icon{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);fill: var(--neutral-foreground-rest)}.label{color: var(--neutral-foreground-hint)}.options{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);overflow-x: hidden}rapid-checkbox{border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);padding: calc((var(--design-unit) + 1) * 1px) 0 calc((var(--design-unit) + 1) * 1px) calc((var(--design-unit) + 1) * 1px);margin: 0}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}rapid-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}rapid-checkbox[disabled]{cursor: not-allowed}`,yze=T` ${tw(`rapid`)} `;var bze=class extends rw{};let xze=nw;bze.compose(Object.assign({baseName:`multiselect`,template:yze,styles:vze,shadowOptions:void 0},xze)),class extends P7{}.compose({baseName:`notification-listener`,template:N7,shadowOptions:{mode:`open`,delegatesFocus:!0}});let Sze=(e,t)=>O` :host{flex: 1 1 auto;box-sizing: border-box}:host([disabled]){opacity: var(--disabled-opacity);cursor: not-allowed}:host .control{height: 100%;width: 100%;border: none;background-color: transparent;padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);font-family: var(--body-font)}:host .root{display: flex;box-sizing: border-box;position: relative;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:focus-within:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{display: block;color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0;font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.label-hidden{margin: 0}.controls{position: absolute;right: 3px;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center;flex-direction: column;cursor: pointer}.step-down, .step-up{width: 1em;height: 1em;margin: -2px}.step-up-glyph, .step-down-glyph{fill: var(--neutral-foreground-hint)}.control:focus-visible{outline: none}:host .control-field .control{width: 100%}${Z0}`;var Cze=class extends v4{};let wze=b4,Tze=n4,Eze=y4;Cze.compose(Object.assign({baseName:`number-field`,template:Tze,styles:Sze,shadowOptions:Eze},wze)),class extends C4{}.compose({baseName:`optgroup`,template:(e,t)=>S4(e,t),styles:(e,t)=>O` ${x4(e,t)}`}),class extends k4{}.compose(Object.assign({baseName:`system-health-overlay`,template:A4,styles:j4,shadowOptions:void 0},M4));let Dze=O` ${N4} :host{--pill-fill: ${ol};--pill-fill-hover: ${sl};--pill-foreground: ${H}}`,Oze=P4;(class extends I4{}).compose(Object.assign({baseName:`pill`,template:Oze,styles:Dze,shadowOptions:void 0},F4)),class extends I3{}.compose(Object.assign({baseName:`progress-ring`,template:(e,t)=>P3(e,t),styles:(e,t)=>O` ${F3(e,t)}`,shadowOptions:void 0},L3)),class extends E4{}.compose(Object.assign({baseName:`progress`,template:(e,t)=>w4(e,t),styles:(e,t)=>O` ${T4(e,t)}`,shadowOptions:void 0},D4)),class extends W3{}.compose(Object.assign({baseName:`radio-group`,template:(e,t)=>H3(e,t),styles:(e,t)=>O` ${U3(e,t)}`,shadowOptions:void 0},G3)),class extends B3{}.compose(Object.assign({baseName:`radio`,template:(e,t)=>R3(e,t),styles:(e,t)=>O` ${z3(e,t)} :host{margin: 0}:host .control{background: transparent}:host([aria-checked='true']) .control{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host .label{padding-inline-start: calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:hover{background: transparent}:host([aria-checked='true']:not([disabled])) .control:hover{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-hover)}.checked-indicator, :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},V3));let Z9=class extends p_.from(Qe){connectedCallback(){super.connectedCallback(),x.queueUpdate(()=>J(this,void 0,void 0,function*(){this.$router.config=this.config}))}};Z9=q([$e({name:`rapid-router`})],Z9);let kze=O` ${i6} :host{font-family: var(--body-font)}`,Aze=T` ${h6(`rapid`)} `;(class extends g6{}).compose(Object.assign({baseName:`scheduler-cron-builder`,template:Aze,styles:kze,shadowOptions:void 0},_6));let jze=O` ${v6} :host{font-family: var(--body-font)}`,Mze=T` ${y6(`rapid`)} `;(class extends b6{}).compose(Object.assign({baseName:`scheduler-timezone`,template:Mze,styles:jze,shadowOptions:void 0},x6));let Nze=O` ${K3} :host{font-family: var(--body-font)}`,Pze=T` ${q3(`rapid`)} `;(class extends J3{}).compose(Object.assign({baseName:`scheduler`,template:Pze,styles:Nze,shadowOptions:void 0},Y3)),class extends O6{}.compose(Object.assign({baseName:`search-bar-combobox`,template:(e,t)=>D6(e,t),styles:(e,t)=>O` ${E6(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--neutral-stroke-rest));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}`,shadowOptions:k6},A6));let Fze=O` ${S6}`,Ize=T` ${C6(`rapid`)} `;(class extends w6{}).compose(Object.assign({baseName:`search-bar`,template:Ize,styles:Fze,shadowOptions:void 0},T6)),class extends L6{}.compose(Object.assign({baseName:`section-navigator`,template:M6,styles:(e,t)=>j6,shadowOptions:R6},z6)),class extends H6{}.compose(Object.assign({baseName:`segmented-control`,template:(e,t)=>B6(e,t),styles:(e,t)=>O` ${V6(e,t)} :host{font-family: var(--body-font);margin: 0}:host ::slotted(*){transition: color 0.4s ease 0s}:host ::slotted(label){color: var(--neutral-foreground-rest)}:host ::slotted(rapid-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}:host ::slotted(rapid-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}:host ::slotted(rapid-segmented-item:only-of-type){border-radius: calc(var(--control-corner-radius) * 1px);border-left-width: 1px;border-right-width: 1px}:host ::slotted(*[aria-checked='true']){background: var(--neutral-fill-rest);box-shadow: none;color: var(--neutral-foreground-rest)}:host([appearance='primary']) ::slotted(*[aria-checked='true']){background: var(--accent-fill-rest);border-color: transparent;box-shadow: none;color: var(--foreground-on-accent-rest)}`,shadowOptions:void 0},{})),class extends B3{}.compose(Object.assign({baseName:`segmented-item`,template:(e,t)=>U6(e,t),styles:(e,t)=>O` ${W6(e,t)} :host{color: var(--neutral-fill-strong-rest);font-size: var(--type-ramp-minus-2-font-size);font-weight: 500;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);box-sizing: border-box;height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin: 0}:host([aria-checked='true']){color: color-mix(in srgb, white, transparent 10%)}`,shadowOptions:void 0},{})),class extends q6{}.compose(Object.assign({baseName:`select`,template:(e,t)=>G6(e,t),styles:(e,t)=>O` ${K6(e,t)} :host{border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not(.open)){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.select-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s;min-width: unset;min-height: unset}.selected-value{display: flex;align-items: center;height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .select-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:void 0},J6)),class extends Z6{}.compose(Object.assign({baseName:`skeleton`,template:(e,t)=>Y6(e,t),styles:(e,t)=>O` ${X6(e,t)} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:void 0},Q6)),class extends a8{}.compose(Object.assign({baseName:`slider-label`,template:(e,t)=>r8(e,t),styles:(e,t)=>O` ${i8(e,t)} .label{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-4);background-color: var(--neutral-fill-strong-hover);color: var(--neutral-layer-4);text-align: center;font-size: var(--type-ramp-minus-1-font-size, 12px)}`,shadowOptions:void 0},o8)),class extends t8{}.compose(Object.assign({baseName:`slider`,template:(e,t)=>$6(e,t),styles:(e,t)=>O` ${e8(e,t)} .thumb-cursor{background: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 2px)}.thumb-cursor:hover, .thumb-cursor:focus, .thumb-cursor:active{background: var(--accent-fill-rest);border-radius: transparent}:host(:focus-visible) .thumb-cursor{box-shadow: 0 0 0 0}.thumb-cursor:hover::after, .thumb-cursor:focus::after, .thumb-cursor:active::after{content: '';height: calc(var(--thumb-size) * 2px);width: calc(var(--thumb-size) * 2px);border-radius: calc(var(--control-corner-radius) * 4px);position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: -1}.thumb-cursor:hover::after{background-color: color-mix(in srgb, ${Rc}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Rc}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Rc}, transparent 70%)}.track{background-color: var(--neutral-fill-rest)}:host([orientation='horizontal']) .track .track-progress{background-color: var(--neutral-stroke-rest);height: calc((var(--track-width) + 2) * 1px) !important}:host([orientation='vertical']) .track .track-progress{background-color: var(--neutral-stroke-rest);width: calc((var(--track-width) + 2) * 1px) !important}`,shadowOptions:void 0},n8));let Lze=O` ${u8} .snackbar{border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);background-color: var(--neutral-layer-1);padding: calc((var(--design-unit) - 2) * 1px) calc(var(--design-unit) * 4px)}:host([type='error']) .snackbar::after{background-color: var(--error-color)}.content{font-family: var(--body-font);font-size: var(--type-ramp-minus-2-font-size);color: var(--neutral-foreground-rest)}.action{gap: calc(var(--design-unit) * 2px)}`,Rze=T` ${d8(`rapid`)} `,zze=f8;(class extends p8{}).compose({baseName:`snackbar`,shadowOptions:zze,styles:Lze,template:Rze}),class extends g8{}.compose({baseName:`stacking-icons`,template:h8,styles:(e,t)=>O` ${m8(e,t)}`}),class extends S8{}.compose({baseName:`status-pill`,template:v8,styles:_8}),class extends k8{}.compose(Object.assign({baseName:`stepper-tab-panel`,template:(e,t)=>O8(e,t),shadowOptions:void 0},A8));let Bze=(e,t)=>O` ${T8(e,t)} rapid-tree-item{--design-unit: 2.5;--neutral-fill-stealth-rest: var(--neutral-layer-3);--neutral-fill-stealth-hover: var(--fill-color);--neutral-fill-rest: var(--fill-color);--base-height-multiplier: 14.5;border-bottom: calc(var(--stroke-width) * 1px) solid var(--fill-color)}.completed-icon{color: var(--success-color)}.tree-item::part(positioning-region)::before{width: var(--tree-item-nested-width)}.stepper-icon{margin-right: calc(var(--design-unit) * 2px)}.error-icon{color: var(--error-color)}.step-number{font-size: var(--type-ramp-minus-1-font-size);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-title{font-size: var(--type-ramp-base-font-size)}.angle-icon{margin: 0 calc(var(--design-unit) * 4px)}:host([completed]) .step-number{border-color: var(--success-color);color: white;background-color: var(--success-color)}:host([completed]) .step-title{color: var(--success-color)}:host([error]) .step-number{border-color: var(--error-color);color: white;background-color: var(--error-color)}:host([error]) .step-title{color: var(--error-color)}`,Vze=T` ${w8(`rapid`)} `;(class extends E8{}).compose(Object.assign({baseName:`stepper-tab`,template:Vze,styles:Bze,shadowOptions:void 0},D8));let Hze=O` ${X7} :host{font-family: var(--body-font)}:host([orientation='horizontal']){height: 100%}.stepper-tab-panel{border: none;height: auto}:host([orientation='horizontal']) .stepper-tab-panel{height: 100%}.stepper-tab{background-color: var(--neutral-layer-3);border: none}.stepper-panel-container{padding: calc(var(--design-unit) * 4px)}.action-buttons-container{padding: calc(var(--design-unit) * 2px);width: auto;gap: calc(var(--design-unit) * 2px)}.stepper-tab-menu{margin-bottom: calc(var(--design-unit) * 4px)}.stepper-tab-progress{padding: calc(var(--design-unit) * 4px) 0}label{padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}`,Uze=T` ${Y7(`rapid`)} `;(class extends Z7{}).compose(Object.assign({baseName:`stepper`,template:Uze,styles:Hze,shadowOptions:void 0},Q7)),class extends N8{}.compose(Object.assign({baseName:`switch`,template:(e,t)=>j8(e,t),styles:(e,t)=>O` ${M8(e,t)} :host{--primary-gradient-angle: -113.5deg}.switch{background: none;border-color: var(--neutral-stroke-rest)}.checked-indicator{background-color: var(--neutral-stroke-rest)}.switch:hover{border-color: var(--neutral-stroke-rest);background: none}:host([aria-checked='true']) .switch{background: none}:host([aria-checked='true']) .checked-indicator{background: var(--accent-fill-rest)}:host([aria-checked='true']:not([disabled])) .switch:hover, :host([aria-checked='true']:not([disabled])) .switch:active{background: none}:host([aria-checked='true']:not([disabled])) .switch:hover .checked-indicator, :host([aria-checked='true']:not([disabled])) .switch:active .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`})),class extends B8{}.compose(Object.assign({baseName:`tab-panel`,template:(e,t)=>R8(e,t),styles:(e,t)=>O` ${z8(e,t)} :host{padding: 0;background-color: var(--neutral-layer-card-container);border-radius: 0 0 var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px)) var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));border-style: solid;border-width: var(--tabs-border-width, 1px);border-color: var(--tabs-border-color, var(--neutral-stroke-rest))}`,shadowOptions:void 0},V8)),class extends I8{}.compose(Object.assign({baseName:`tab`,template:(e,t)=>P8(e,t),styles:(e,t)=>O` ${F8(e,t)} :host{background-color: var(--neutral-layer-2);border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);margin-right: calc(var(--design-unit) * 5px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host([aria-selected='true']), :host([aria-selected='true']:hover){background-color: var(--neutral-layer-4);font-weight: 700}/* * Sustained alert, sampling the flash phase the platform animates on the document. Every * alerting surface reads that one value, so tabs and grid rows brighten and fade together * however long ago each of them started alerting. * * Mixing towards transparent and currentColor lets the tab fade back to its own resting * colours, so selected and unselected tabs each return to the right background. * * !important because a :host rule loses to any app stylesheet that colours tabs from the light * DOM, and an alert nobody can see is worse than no alert. */ :host([alert]){background-color: color-mix( in srgb, var(--tab-alert-color, var(--error-fill-rest)) calc(var(${q0}, 0) * 100%), transparent ) !important;color: color-mix( in srgb, contrast-color(var(--tab-alert-color, var(--error-fill-rest))) calc(var(${q0}, 0) * 100%), currentColor ) !important}/* Reduced motion stops the clock, leaving the phase at 0, so paint a steady alert instead. */ @media (prefers-reduced-motion: reduce){:host([alert]){background-color: var(--tab-alert-color, var(--error-fill-rest)) !important;color: contrast-color(var(--tab-alert-color, var(--error-fill-rest))) !important}}`,shadowOptions:void 0},L8)),class extends W8{}.compose(Object.assign({baseName:`tabs`,template:(e,t)=>H8(e,t),styles:(e,t)=>O` ${U8(e,t)} :host{background: var(--neutral-layer-3);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:not([appearance='secondary'])){background: var(--rapid-layout-item-background, var(--neutral-layer-3));border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, 0)}:host([appearance='secondary']){background: transparent}:host .tablist{padding: 0;display: grid;width: max-content;margin-top: 0}:host .tabpanel{height: 100%;min-height: 0}:host([appearance='secondary']) .tablist{margin-bottom: 0}:host .end, :host .start{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);height: calc(100% - 1px);display: flex;align-items: center}::slotted([slot='tab']:hover){color: var(--neutral-foreground-rest);background: var(--neutral-layer-1)}::slotted([role='tab']){border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px) 0 0;background: var(--tab-rest-background-color, var(--neutral-layer-4));padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin-right: 2px;box-shadow: none;font-size: var(--type-ramp-minus-1-font-size);border-style: solid;border-width: var(--tab-rest-border-width, 1px);border-color: var(--tab-rest-border-color, transparent)}::slotted([role='tab'][aria-selected='true']:not([appearance='secondary'])){border-style: solid;border-width: var(--tab-active-border-width, 1px 1px 0 1px);border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));background: var(--tab-active-background-color, var(--neutral-layer-card-container))}::slotted([role='tab'][aria-selected='true']){color: var(--accent-foreground-rest);background: var(--neutral-layer-card-container)}/* stylelint-disable selector-class-pattern */ .activeIndicator{display: none}:host([appearance='secondary']) .tablist .activeIndicator{display: block;height: 1px;margin-top: unset}::slotted([role='tab'][aria-selected='true'][appearance='secondary']){background: none}::slotted([role='tab'][appearance='secondary']){margin-left: 0;box-shadow: none;background: none}:host([appearance='secondary']:hover){color: var(--neutral-foreground-rest);background: none}:host([appearance='secondary']) ::slotted([role='tabpanel']){border: 0}`,shadowOptions:void 0},G8)),class extends J8{}.compose(Object.assign({baseName:`text-area`,template:(e,t)=>K8(e,t),styles:(e,t)=>O` ${q8(e,t)} :host{display: grid;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);padding: calc(var(--design-unit) * 2px)}:host(:hover:not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}`,shadowOptions:void 0},Y8)),class extends Q8{}.compose(Object.assign({baseName:`text-field`,template:(e,t)=>X8(e,t),styles:(e,t)=>O` ${Z8(e,t)} :host{display: block;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}:host .control-field .control{width: 100%}:host .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}:host input::placeholder{color: var(--neutral-foreground-hint);opacity: 75%}`,shadowOptions:$8},e5));let Wze=O` ${t5} .toast{background-color: ${Oc};border-radius: calc(var(--control-corner-radius) * 2px) calc(var(--control-corner-radius) * 2px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.top{align-items: flex-start}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}.content{font-size: var(--type-ramp-minus-1-font-size)}.date{margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}.content-wrapper{padding: calc(var(--design-unit) * 2px)}.toast::after{background-color: var(--accent-fill-rest);border-radius: 0;height: calc(100% - calc(var(--design-unit) * 5px));margin: calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}:host([notify='warning']) .toast::after{background-color: var(--warning-color)}:host([notify='success']) .toast::after{background-color: var(--success-color)}:host([notify='critical']) .toast::after, :host([notify='serious']) .toast::after, :host([notify='error']) .toast::after{background-color: var(--error-color)}`,Gze=i5,Kze=r5;(class extends a5{}).compose(Object.assign({baseName:`toast`,shadowOptions:Kze,styles:Wze,template:n5},Gze)),class extends c5{}.compose(Object.assign({baseName:`toolbar`,template:(e,t)=>o5(e,t),styles:(e,t)=>O` ${s5(e,t)} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:void 0},l5)),class extends f5{}.compose(Object.assign({baseName:`tooltip`,template:(e,t)=>u5(e,t),styles:(e,t)=>O` ${d5(e,t)} :host{visibility: visible}.tooltip{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);text-align: center;white-space: inherit;font-weight: 400}rapid-anchored-region.bottom .tooltip{margin-top: calc(var(--design-unit) * 1px);margin-left: calc(var(--design-unit) * 2px)}rapid-anchored-region.top.right .tooltip, rapid-anchored-region.bottom.right .tooltip{margin-left: 0}`,shadowOptions:void 0},p5)),class extends g5{}.compose(Object.assign({baseName:`tree-item`,template:(e,t)=>m5(e,t),styles:(e,t)=>O` ${h5(e,t)} :host{font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest);background-color: transparent}:host(.nested) .expand-collapse-button{background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);width: calc(var(--design-unit) * 5px);height: calc(var(--design-unit) * 5px);margin-left: calc(var(--design-unit) * 2px)}:host([selected]) .positioning-region{background: var(--neutral-fill-stealth-active)}.positioning-region::before{width: calc(var(--design-unit) * 1px)}:host([selected])::after{background: var(--accent-fill-rest);background-origin: border-box;background-size: cover;background-repeat: no-repeat}:host([slot='item']) .content-region{margin-inline-start: calc(var(--design-unit) * 4px + var(--expand-collapse-button-size))}.expand-collapse-glyph{width: calc(var(--design-unit) * 3px);height: calc(var(--design-unit) * 3px)}`,shadowOptions:void 0},{expandCollapseGlyph:`
1002
+ Submit </${e}-button>`)} ${A(e=>!e.isLastStep,T`<${e}-button part="next-button" exportparts="${J7(`next-button`)}" @click=${e=>e.nextStep()}data-test-id="next-button">Next</${e}-button>`)}</slot></div>`)}</${e}-card>`)} `,OFe=T` ${e=>Y7(Fy(e))} `,X7=O` :host{display: flex;height: 100%;width: 100%}:host([orientation='horizontal']){flex-direction: column}.stepper-tab{display: flex;flex-direction: column;width: 100%;height: 100%;max-width: 280px;border-radius: 0}.action-buttons-container{width: 100%;display: flex;justify-content: flex-end}.stepper-panel-container{height: 100%;overflow: hidden;padding: 15px}.stepper-tab-menu{display: flex;flex-direction: column;width: 100%;margin-bottom: 30px}.stepper-tab-menu-hidden{display: none}.stepper-tab-progress{display: flex;flex-direction: column;align-items: center;justify-content: start;flex: 1}.stepper-tab-progress .progress-ring{--design-unit: 10;margin: 0}.stepper-tab-panel{display: flex;flex-direction: column;justify-content: space-between;width: 100%;min-width: 370px;border-radius: 0}label{padding: 0 10px;color: rgb(135 155 166);display: block;cursor: pointer;text-align: center;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}:host([orientation='horizontal']) .stepper-tab-menu{height: 100%;width: 100%;display: flex;flex-direction: row;margin-bottom: 0;align-items: center;justify-content: center;gap: calc(var(--design-unit) * 4px);padding: 0 calc(var(--design-unit) * 4px)}:host([orientation='horizontal']) .stepper-tab-hidden{display: none}:host([orientation='horizontal']) .stepper-tab{max-width: 100%;max-height: 70px;height: 70px}`;var Z7=class extends P{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=Va.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if(e.slot===`tab`){let n=this.activeTabIndex===t,r=t+1===this.tabIds.length,i=this.tabIds[t],a=this.tabpanelIds[t];e.setAttribute(`id`,i),e.setAttribute(`aria-selected`,n?`true`:`false`),e.setAttribute(`aria-disabled`,n?`false`:`true`),x.setBooleanAttribute(e,`selected`,n),e.setAttribute(`orientation`,this.orientation),a&&e.setAttribute(`aria-controls`,a),e.setAttribute(`tab-position`,String(t+1)),x.setBooleanAttribute(e,`isLast`,r),x.setBooleanAttribute(e,`hideStepNumber`,this.hideStepNumber===!0),e.setAttribute(`tabindex`,n?`0`:`-1`),x.setBooleanAttribute(e,`showCursorPointer`,t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps),n&&(this.activetab=e,this.activeid=i)}}),this.activeTabIndex===0&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});let t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{let n=this.tabIds[t],r=this.tabpanelIds[t];e.setAttribute(`id`,r),e.setAttribute(`aria-labelledby`,n),this.activeTabIndex===t?e.removeAttribute(`hidden`):e.setAttribute(`hidden`,``)})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return this.activeid===void 0||this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid)}goToStep(e,t=!1){let n=e-1;if(e<1||e>this.tabs.length)return jy.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(n===this.activeTabIndex)return!1;if(t){if(n<this.activeTabIndex)return this.handleBackwardJump(n);if(n>this.activeTabIndex)return this.handleForwardJump(n)}return n<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(n):n>this.activeTabIndex&&this.allowForwardJumps?this.handleForwardJump(n):n===this.activeTabIndex+1?(this.nextStep(),!0):(jy.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit(`validation-failure`,{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit(`step-click`,{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return this.activeTabIndex===0}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){let e=this.tabs.length-1;return this.activeTabIndex===e&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs(),!1):(this.tabs[e].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit(`submit`)}nextStep(){if(!this.slotsInitialized){this.pendingNextStep=!0;return}if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid()){this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,this.getCompletedTabs();return}this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex+=1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit(`next-step`),this.$emit(`validation-success`));let e=this.tabs.length-1,t=this.activeTabIndex===e;this.hideSubmitButton&&t&&(this.validation&&this.validation[e]?.isValid()||!this.validation||!this.validation[e])?(this.tabs[e].completed=!0,this.getCompletedTabs()):(this.tabs[e].completed=!1,this.getCompletedTabs())}previousStep(){this.activeTabIndex!==0&&(this.tabs[this.activeTabIndex].completed=!1,--this.activeTabIndex,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>e.getAttribute(`id`)??`tab-${Rn()}`)}getTabPanelIds(){return this.tabpanels.map(e=>e.getAttribute(`id`)??`panel-${Rn()}`)}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}};q([D({attribute:`hide-submit-button`,mode:`boolean`})],Z7.prototype,`hideSubmitButton`,void 0),q([D({attribute:`hide-progress`,mode:`boolean`})],Z7.prototype,`hideProgress`,void 0),q([D({attribute:`hide-step-number`,mode:`boolean`})],Z7.prototype,`hideStepNumber`,void 0),q([D({attribute:`allow-backward-jumps`,mode:`boolean`})],Z7.prototype,`allowBackwardJumps`,void 0),q([D({attribute:`allow-forward-jumps`,mode:`boolean`})],Z7.prototype,`allowForwardJumps`,void 0),q([D({attribute:`hide-all-buttons`,mode:`boolean`})],Z7.prototype,`hideAllButtons`,void 0),q([D({attribute:`hide-tabs`,mode:`boolean`})],Z7.prototype,`hideTabs`,void 0),q([D({attribute:`indicator-only`,mode:`boolean`})],Z7.prototype,`indicatorOnly`,void 0),q([D],Z7.prototype,`orientation`,void 0),q([D],Z7.prototype,`activeid`,void 0),q([C],Z7.prototype,`tabs`,void 0),q([C],Z7.prototype,`tabpanels`,void 0),q([C],Z7.prototype,`validation`,void 0),q([C],Z7.prototype,`progressValue`,void 0),q([C],Z7.prototype,`activeTabIndex`,void 0),q([w],Z7.prototype,`disabledPreviousStep`,null),q([w],Z7.prototype,`isLastStep`,null),q([w],Z7.prototype,`islastStepValid`,null);let Q7={};Z7.compose(Object.assign({baseName:`stepper`,template:OFe,styles:X7,shadowOptions:void 0},Q7)),class extends sd{}.compose(Object.assign({baseName:`accordion-item`,template:(e,t)=>ad(e,t),styles:(e,t)=>O` ${od(e,t)} :host{--icon-container-calculator: calc( (6 + (var(--design-unit) * 6)) * 1px );/* height of section - (padding top +padding-bottom) */ --icon-margin-calculation: calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px)}.region{padding: 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px);color: var(--accent-foreground-rest)}:host([expanded]) .region{color: var(--accent-foreground-rest)}slot[name='expanded-icon']{display: none;stroke: none}slot[name='collapsed-icon'] path.plus-sign, slot[name='expanded-icon'] path.minus-sign{stroke: white}slot[name='expanded-icon'], slot[name='collapsed-icon']{background: var(--neutral-fill-rest);fill: none;stroke: none;height: calc((var(--design-unit) * 4) * 1px);width: calc((var(--design-unit) * 4) * 1px)}svg:not(:root){height: calc((var(--design-unit) * 4) * 1px);width: calc((var(--design-unit) * 4) * 1px)}.icon{height: var( --icon-container-calculator );/* UX 30px* for now it's 30 on default design unit - 4/ */ width: var(--icon-container-calculator);/* UX 30px */ margin: var(--icon-margin-calculation) var(--icon-margin-calculation) var(--icon-margin-calculation) 0}.button{padding: 0 calc((8 + (var(--design-unit) * 2 * var(--density))) * 1px) 0 calc((16 + (var(--design-unit) * 2 * var(--density))) * 1px)}.heading{grid-template-columns: auto 1fr auto;align-items: center}`,shadowOptions:cd},ld)),class extends nd{}.compose(Object.assign({baseName:`accordion`,template:(e,t)=>po(e,t),styles:(e,t)=>O` ${td(e,t)} :host{border-top: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest)}.heading{height: calc(var(--base-height-multiplier) * 4px)}`,shadowOptions:rd},id)),class extends ob{}.compose({baseName:`actions-menu`,styles:(e,t)=>O` :host{--actions-opener-height-multiplier: 0.6px;--menu-item-height-multiplier: 0.5px}${ud(e,t)} rapid-menu-item{display: flex;user-select: none}rapid-menu-item::part(content){margin-inline: calc(var(--design-unit) * 3px)}rapid-menu-item[disabled]{pointer-events: none}.actions-vertical .actions-menu{padding: 0}.actions-vertical .menu-item{margin: 0;padding: calc(var(--design-unit) * 4px);border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}.actions-vertical .menu-item:last-child{border-bottom: none}.actions-vertical .menu-item:focus{border: calc(var(--stroke-width) * 1px) solid var(--accent-foreground-focus)}`,template:ab});let kFe=O` ${SS}`;(class extends eC{}).compose(Object.assign({baseName:`ai-criteria-search`,template:(e,t)=>wS,styles:kFe,shadowOptions:void 0},tC)),class extends iC{}.compose({baseName:`ai-indicator`,template:rC,styles:(e,t)=>O` ${nC(e,t)} :host{--green: var(--success-color);--trafic-light-green: var(--success-color);--red: var(--error-color);--trafic-light-red: var(--error-color);--amber: var(--warning-color);--trafic-light-amber: var(--warning-color)}`});function $7(e,t){return new lo(`appearance`,e,t)}let AFe=O` :host([appearance='primary']){background: var(--accent-fill-rest);color: var(--foreground-on-accent-rest)}:host([appearance='primary']:hover){background: var(--accent-fill-hover);color: var(--foreground-on-accent-hover)}:host([appearance='primary']:active){background: var(--accent-fill-active);color: var(--foreground-on-accent-active)}:host([appearance='primary'][disabled]), :host([appearance='primary'][disabled]):hover, :host([appearance='primary'][disabled]):active{opacity: 50%}`,jFe=O` :host([appearance='secondary']){background: var(--secondary-fill-rest);color: contrast-color(var(--secondary-fill-rest))}:host([appearance='secondary']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary'][disabled]), :host([appearance='secondary'][disabled]):hover, :host([appearance='secondary'][disabled]):active{opacity: 50%}`,MFe=O` :host([appearance='neutral']){background: var(--neutral-button-fill, var(--neutral-fill-rest));border: var(--neutral-button-border, 0);color: var(--neutral-button-foreground, var(--neutral-foreground-rest))}:host([appearance='neutral']:hover){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-hover)), transparent 20% )}:host([appearance='neutral']:active){background: color-mix( in srgb, var(--neutral-button-fill, var(--neutral-fill-active)), transparent 30% )}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{opacity: 50%;background: var(--neutral-button-fill, var(--neutral-fill-rest));color: var(--neutral-button-foreground, var(--neutral-foreground-rest));border: var(--neutral-button-border, 0)}`,NFe=O` :host([appearance='danger']){background: var(--error-fill-rest);color: contrast-color(var(--error-fill-rest));border: 0}:host([appearance='danger']:hover){background: var(--error-fill-hover);color: contrast-color(var(--error-fill-hover))}:host([appearance='danger']:active){background: var(--error-fill-active);color: contrast-color(var(--error-fill-active))}:host([appearance='danger'][disabled]), :host([appearance='danger'][disabled]):hover, :host([appearance='danger'][disabled]):active{opacity: 50%}`,PFe=O` :host([appearance='success']){background: var(--success-fill-rest);color: contrast-color(var(--success-fill-rest));border: 0}:host([appearance='success']:hover){background: var(--success-fill-hover);color: contrast-color(var(--success-fill-hover))}:host([appearance='success']:active){background: var(--success-fill-active);color: contrast-color(var(--success-fill-active))}:host([appearance='success'][disabled]), :host([appearance='success'][disabled]):hover, :host([appearance='success'][disabled]):active{opacity: 50%}`,FFe=O` :host([appearance='warning']){background: var(--warning-fill-rest);color: contrast-color(var(--warning-fill-rest));border: 0}:host([appearance='warning']:hover){background: var(--warning-fill-hover);color: contrast-color(var(--warning-fill-hover))}:host([appearance='warning']:active){background: var(--warning-fill-active);color: contrast-color(var(--warning-fill-active))}:host([appearance='warning'][disabled]), :host([appearance='warning'][disabled]):hover, :host([appearance='warning'][disabled]):active{opacity: 50%}`,IFe=O` :host([appearance='tertiary']){background: var(--tertiary-fill-rest);color: contrast-color(var(--tertiary-fill-rest));border: 0}:host([appearance='tertiary']:hover){background: var(--tertiary-fill-hover);color: contrast-color(var(--tertiary-fill-hover))}:host([appearance='tertiary']:active){background: var(--tertiary-fill-active);color: contrast-color(var(--tertiary-fill-active))}:host([appearance='tertiary'][disabled]), :host([appearance='tertiary'][disabled]):hover, :host([appearance='tertiary'][disabled]):active{opacity: 50%}`,LFe=O` :host([appearance='primary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest)}:host([appearance='primary-outline']:hover){background: var(--accent-fill-hover);color: contrast-color(var(--accent-fill-hover))}:host([appearance='primary-outline']:active){background: var(--accent-fill-active);color: contrast-color(var(--accent-fill-active))}:host([appearance='primary-outline'][disabled]), :host([appearance='primary-outline'][disabled]):hover, :host([appearance='primary-outline'][disabled]):active{opacity: 50%}`,RFe=O` :host([appearance='secondary-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--secondary-fill-rest)}:host([appearance='secondary-outline']:hover){background: var(--secondary-fill-hover);color: contrast-color(var(--secondary-fill-hover))}:host([appearance='secondary-outline']:active){background: var(--secondary-fill-active);color: contrast-color(var(--secondary-fill-active))}:host([appearance='secondary-outline'][disabled]), :host([appearance='secondary-outline'][disabled]):hover, :host([appearance='secondary-outline'][disabled]):active{opacity: 50%}`,zFe=O` :host([appearance='neutral-outline']){background: none;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host([appearance='neutral-outline']:hover){background: var(--neutral-fill-hover);color: contrast-color(var(--neutral-fill-hover))}:host([appearance='neutral-outline']:active){background: var(--neutral-fill-active);color: contrast-color(var(--neutral-fill-active))}:host([appearance='neutral-outline'][disabled]), :host([appearance='neutral-outline'][disabled]):hover, :host([appearance='neutral-outline'][disabled]):active{opacity: 50%}`,BFe=O` :host([appearance='link']){background: none;border: none;color: var(--accent-foreground-rest)}:host([appearance='link']) .control{padding: 0}:host([appearance='link']:hover){color: var(--accent-foreground-hover)}:host([appearance='link'][disabled]), :host([appearance='link'][disabled]):hover, :host([appearance='link'][disabled]):active{opacity: 50%}`,VFe=(e,t)=>O` :host{font-weight: 500;color: var(--neutral-foreground-rest);box-sizing: border-box;font-size: var(--type-ramp-base-font-size);height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px)}.control{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px)}.start{margin-inline-end: calc(var(--design-unit) * 2px)}.end{margin-inline-start: calc(var(--design-unit) * 2px)}.control:has(.start){padding-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}.control:has(.end){padding-right: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px)}:host([appearance='neutral']){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral']:hover){background: var(--neutral-fill-rest)}:host([appearance='neutral']:active){background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%));border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest)}:host([appearance='neutral'][disabled]), :host([appearance='neutral'][disabled]):hover, :host([appearance='neutral'][disabled]):active{background: color-mix(in srgb, var(--neutral-fill-rest), transparent 70%);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-rest);color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);opacity: 100%}:host([appearance='accent']){color: contrast-color(var(--accent-fill-rest))}`,e9=(e,t)=>O` ${IC(e,t)} ${VFe(e,t)} `.withBehaviors($7(`primary`,AFe),$7(`secondary`,jFe),$7(`tertiary`,IFe),$7(`neutral`,MFe),$7(`danger`,NFe),$7(`success`,PFe),$7(`warning`,FFe),$7(`primary-outline`,LFe),$7(`secondary-outline`,RFe),$7(`neutral-outline`,zFe),$7(`link`,BFe));(class extends sC{}).compose(Object.assign({baseName:`anchor`,template:(e,t)=>aC(e,t),styles:(e,t)=>O` ${oC(e,t)} ${e9(e,t)} `.withBehaviors(...e9(e,t).behaviors),shadowOptions:cC},lC)),class extends fC{}.compose(Object.assign({baseName:`anchored-region`,template:(e,t)=>uC(e,t),styles:(e,t)=>O` ${dC(e,t)}`,shadowOptions:pC},mC)),class extends _C{}.compose(Object.assign({baseName:`avatar`,template:(e,t)=>hC(e,t),styles:(e,t)=>O` ${gC(e,t)}`,shadowOptions:vC},yC)),class extends SC{}.compose(Object.assign({baseName:`badge`,template:(e,t)=>bC(e,t),styles:(e,t)=>O` ${xC(e,t)} :host{--badge-fill-primary: var(--accent-fill-rest);--badge-fill-neutral: var(--neutral-fill-rest);--badge-fill-success: var(--success-color);--badge-fill-danger: var(--error-color);--badge-fill-warning: var(--warning-color);--badge-fill-buy: var(--buy-color);--badge-fill-sell: var(--sell-color);--badge-color-text: var(--neutral-foreground-rest);font-size: var(--type-ramp-minus-2-font-size)}:host .control{padding: calc(${B} * 1px) calc(${B} * 2px);border: none}`,shadowOptions:void 0},CC));let HFe=O` ${wC} :host{--banner-height: calc( ((var(--design-unit) + 2) * var(--base-height-multiplier)) + (var(--design-unit) * var(--design-unit)) * 1px )}.banner{background-color: var(--neutral-layer-1);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}.content{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}`,UFe=EC;(class extends DC{}).compose({baseName:`banner`,shadowOptions:UFe,styles:HFe,template:TC}),class extends NC{}.compose(Object.assign({baseName:`breadcrumb-item`,template:(e,t)=>jC(e,t),styles:(e,t)=>O` ${MC(e,t)} .listitem{color: var(--accent-foreground-rest)}.control{color: var(--neutral-foreground-rest)}.control:hover{color: var(--neutral-foreground-rest)}.separator{color: var(--neutral-stroke-rest);margin: 0 12px}.control:hover .content::before{background: var(--neutral-foreground-rest)}.control .start{width: calc(var(--base-height-multiplier) * 3px);height: calc(var(--base-height-multiplier) * 3px);display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);margin: 0 -4px 0 0}.control:hover .start{background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}`,shadowOptions:void 0},PC)),class extends AC{}.compose(Object.assign({baseName:`breadcrumb`,template:(e,t)=>OC(e,t),styles:(e,t)=>O` ${kC(e,t)}`,shadowOptions:void 0},{})),class extends LC{}.compose(Object.assign({baseName:`button`,template:(e,t)=>FC(e,t),styles:e9,shadowOptions:RC},zC)),class extends HC{}.compose(Object.assign({baseName:`calendar`,template:(e,t)=>VC(e,t),styles:()=>O` ${BC()}`,shadowOptions:UC},WC)),class extends qC{}.compose(Object.assign({baseName:`card`,template:(e,t)=>GC(e,t),styles:(e,t)=>O` ${KC(e,t)} :host{background: var(--neutral-layer-card-container);color: ${H};border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));box-shadow: var(--card-box-shadow, none);border: var( --card-border, 1px solid var(--neutral-stroke-rest) );/** uses a token instead of #2E3339 value available in ux docs */ /* box-shadow and border-radius are being calculated at host level by using design-tokens */}::slotted(rapid-card){background: var(--neutral-layer-3)}`,shadowOptions:void 0},JC));let WFe=O` ${iw} .label{color: var(--neutral-foreground-hint)}.options{background: var(--neutral-layer-4)}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}`,GFe=T` ${aw(`rapid`)} `;var KFe=class extends sw{};let qFe=ow;KFe.compose(Object.assign({baseName:`categorized-multiselect`,template:GFe,styles:WFe,shadowOptions:void 0},qFe)),class extends uw{}.compose(Object.assign({baseName:`checkbox`,template:(e,t)=>cw(e,t),styles:(e,t)=>O` ${lw(e,t)} .checked-indicator{fill: contrast-color(var(--accent-fill-rest));box-shadow: 2px 1000px 1px rgb(0 0 0 / 20%) inset;border-radius: calc(var(--control-corner-radius) * 1px)}:host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{fill: var(--neutral-foreground-rest)}.label{padding-inline-start: calc(var(--design-unit) * 2px)}`,shadowOptions:void 0},dw)),class extends gw{}.compose(Object.assign({baseName:`combobox`,template:(e,t)=>pw(e,t),styles:(e,t)=>O` ${fw(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-width: 0}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.combo-box-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s}.selected-value{height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .combo-box-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:_w},vw)),class extends xw{}.compose({baseName:`connection-indicator`,template:bw,styles:(e,t)=>O` ${yw(e,t)} :host{--light-size: calc(var(--design-unit) * 3px);--red: var(--error-color);--trafic-light-red: color-mix(in srgb, var(--red), transparent 0%);--trafic-light-red-glow: color-mix(in srgb, var(--red), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--red), transparent 80%) 0 0 8px 8px;--green: var(--success-color);--trafic-light-green: color-mix(in srgb, var(--green), transparent 0%);--trafic-light-green-glow: color-mix(in srgb, var(--green), transparent 60%) 0 0 4px 4px, color-mix(in srgb, var(--green), transparent 80%) 0 0 8px 8px}.light{margin: calc(var(--design-unit) * 4px)}.label{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);color: var(--neutral-stroke-rest)}`});let JFe=()=>O` ${Sw} :host{--primary-gradient-angle: -113.5deg;display: inline-block}.calendar-dropdown{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.input-icon-container{display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px)}.input-icon-container:hover{background-color: var(--neutral-fill-rest)}.date-toggle::part(end){margin-inline-end: calc(var(--design-unit) * 1px)}.date-toggle{margin-bottom: 0}.month-day{width: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px);height: calc(((var(--base-height-multiplier) * (var(--design-unit) - 1)) + 2) * 1px)}.week-days span{font-size: var(--type-ramp-minus-2-font-size)}`,YFe=T` ${ww(`rapid`)} `;(class extends Iw{}).compose(Object.assign({baseName:`date-picker`,template:YFe,styles:JFe,shadowOptions:void 0},{}));var t9;(function(e){e.primary=`#11C9FC`,e.neutral=`#7C909B`,e.error=`#F9644D`,e.success=`#7ACC79`,e.warning=`#FFB660`,e.tertiary=`#7B2FBE`,e.info=`#11C9FC`,e.buy=`#7ACC79`,e.sell=`#F14376`,e.chartPink=`#fb8176`,e.longGreen=`#7acc79`,e.shortPink=`#f14376`,e.warningYellow=`#fcb35f`,e.green=`#44c14c`,e.lightGreen=`#69cd70`,e.red=`#ef4d28`,e.lightRed=`#ee6588`,e.dodgerBlue=`#33a9ff`,e.lightDodgerBlue=`#5cbaff`,e.violet=`#9b1e74`,e.lightViolet=`#b528af`,e.white=`#f9f9f9`,e.silver=`#c1c1c1`,e.salomie=`#ffdf94`,e.lightSalomie=`#ccb276`,e.melon=`#ffbbb2`,e.lightMelon=`#cc968e`,e.portage=`#8a99f5`,e.lightPortage=`#adb8f8`,e.ice=`#97f4eb`,e.lightIce=`#6befe2`})(t9||(t9={}));let{create:n9}=ci,r9=ns(t9.error),i9=os.create(r9.r,r9.g,r9.b),a9=n9(`error-color`).withDefault(i9),o9=ns(t9.success),s9=os.create(o9.r,o9.g,o9.b),c9=n9(`success-color`).withDefault(s9),l9=ns(t9.warning),u9=os.create(l9.r,l9.g,l9.b),d9=n9(`warning-color`).withDefault(u9),f9=ns(t9.buy),p9=os.create(f9.r,f9.g,f9.b),XFe=n9(`buy-color`).withDefault(p9),m9=ns(t9.sell),h9=os.create(m9.r,m9.g,m9.b),ZFe=n9(`sell-color`).withDefault(h9),g9=ns(t9.info),_9=os.create(g9.r,g9.g,g9.b),QFe=n9(`info-color`).withDefault(_9),v9=ns(t9.error),y9=os.create(v9.r,v9.g,v9.b),$Fe=n9(`serious-notify-color`).withDefault(y9),{create:b9}=ci,x9=e=>ci.create({name:e,cssCustomPropertyName:null}),S9=os.create(1,1,1),eIe=os.create(0,0,0),C9=4.5;function tIe(e,t,n,r,i,a,o,s,c){let l=e.source,u=t.closestIndexOf(n)>=Math.max(o,s,c)?-1:1,d=e.closestIndexOf(l),f=d+u*-1*r,p=f+u*i,m=f+u*a;return{rest:e.get(f),hover:e.get(d),active:e.get(p),focus:e.get(m)}}function nIe(e,t,n,r,i,a,o){let s=e.source,c=e.closestIndexOf(s),l=ls(t)?-1:1,u=c+(l===1?Math.min(r,i):Math.max(l*r,l*i)),d=e.colorContrast(t,n,u,l),f=e.closestIndexOf(d),p=f+l*Math.abs(r-i),m=l===1?r<i:l*r>l*i,h=m?f:p,g=m?p:f;return{rest:e.get(h),hover:e.get(g),active:e.get(h+l*a),focus:e.get(h+l*o)}}function rIe(e,t){return e.contrast(S9)>=t?S9:eIe}function w9(e,t){let n=e,r=x9(`${n}-palette`).withDefault(e=>ds.from(t.getValueFor(e))),i=x9(`${n}-fill-rest-delta`).withDefault(0),a=x9(`${n}-fill-hover-delta`).withDefault(4),o=x9(`${n}-fill-active-delta`).withDefault(-5),s=x9(`${n}-fill-focus-delta`).withDefault(0),c=x9(`${n}-foreground-rest-delta`).withDefault(0),l=x9(`${n}-foreground-hover-delta`).withDefault(6),u=x9(`${n}-foreground-active-delta`).withDefault(-4),d=x9(`${n}-foreground-focus-delta`).withDefault(0),f=x9(`${n}-fill-recipe`).withDefault({evaluate:(e,t)=>tIe(r.getValueFor(e),bc.getValueFor(e),t??Fc.getValueFor(e),a.getValueFor(e),o.getValueFor(e),s.getValueFor(e),Zs.getValueFor(e),Qs.getValueFor(e),$s.getValueFor(e))}),p=b9(`${n}-fill-rest`).withDefault(e=>f.getValueFor(e).evaluate(e).rest),m=b9(`${n}-fill-hover`).withDefault(e=>f.getValueFor(e).evaluate(e).hover),h=b9(`${n}-fill-active`).withDefault(e=>f.getValueFor(e).evaluate(e).active),g=b9(`${n}-fill-focus`).withDefault(e=>f.getValueFor(e).evaluate(e).focus),_=e=>(t,n)=>rIe(n??p.getValueFor(t),e),v=x9(`foreground-on-${n}-recipe`).withDefault({evaluate:(e,t)=>_(C9)(e,t)}),y=b9(`foreground-on-${n}-rest`).withDefault(e=>v.getValueFor(e).evaluate(e,p.getValueFor(e))),b=b9(`foreground-on-${n}-hover`).withDefault(e=>v.getValueFor(e).evaluate(e,m.getValueFor(e))),ee=b9(`foreground-on-${n}-active`).withDefault(e=>v.getValueFor(e).evaluate(e,h.getValueFor(e))),x=b9(`foreground-on-${n}-focus`).withDefault(e=>v.getValueFor(e).evaluate(e,g.getValueFor(e))),te=x9(`foreground-on-${n}-large-recipe`).withDefault({evaluate:(e,t)=>_(7)(e,t)}),ne=b9(`foreground-on-${n}-rest-large`).withDefault(e=>te.getValueFor(e).evaluate(e,p.getValueFor(e))),S=b9(`foreground-on-${n}-hover-large`).withDefault(e=>te.getValueFor(e).evaluate(e,m.getValueFor(e))),C=b9(`foreground-on-${n}-active-large`).withDefault(e=>te.getValueFor(e).evaluate(e,h.getValueFor(e))),w=b9(`foreground-on-${n}-focus-large`).withDefault(e=>te.getValueFor(e).evaluate(e,g.getValueFor(e))),re=x9(`${n}-foreground-recipe`).withDefault({evaluate:(e,t)=>nIe(r.getValueFor(e),t??Fc.getValueFor(e),C9,c.getValueFor(e),l.getValueFor(e),u.getValueFor(e),d.getValueFor(e))});return{palette:r,fillRestDelta:i,fillHoverDelta:a,fillActiveDelta:o,fillFocusDelta:s,foregroundRestDelta:c,foregroundHoverDelta:l,foregroundActiveDelta:u,foregroundFocusDelta:d,fillRecipe:f,fillRest:p,fillHover:m,fillActive:h,fillFocus:g,foregroundOnRecipe:v,foregroundOnRest:y,foregroundOnHover:b,foregroundOnActive:ee,foregroundOnFocus:x,foregroundOnLargeRecipe:te,foregroundOnRestLarge:ne,foregroundOnHoverLarge:S,foregroundOnActiveLarge:C,foregroundOnFocusLarge:w,foregroundRecipe:re,foregroundRest:b9(`${n}-foreground-rest`).withDefault(e=>re.getValueFor(e).evaluate(e).rest),foregroundHover:b9(`${n}-foreground-hover`).withDefault(e=>re.getValueFor(e).evaluate(e).hover),foregroundActive:b9(`${n}-foreground-active`).withDefault(e=>re.getValueFor(e).evaluate(e).active),foregroundFocus:b9(`${n}-foreground-focus`).withDefault(e=>re.getValueFor(e).evaluate(e).focus)}}let T9=ns(t9.green),E9=os.create(T9.r,T9.g,T9.b),D9=ci.create(`secondary-color`).withDefault(E9),{palette:iIe,fillRestDelta:aIe,fillHoverDelta:oIe,fillActiveDelta:sIe,fillFocusDelta:cIe,foregroundRestDelta:lIe,foregroundHoverDelta:uIe,foregroundActiveDelta:dIe,foregroundFocusDelta:fIe,fillRecipe:pIe,fillRest:mIe,fillHover:hIe,fillActive:gIe,fillFocus:_Ie,foregroundOnRecipe:vIe,foregroundOnRest:yIe,foregroundOnHover:bIe,foregroundOnActive:xIe,foregroundOnFocus:SIe,foregroundOnLargeRecipe:CIe,foregroundOnRestLarge:wIe,foregroundOnHoverLarge:TIe,foregroundOnActiveLarge:EIe,foregroundOnFocusLarge:DIe,foregroundRecipe:OIe,foregroundRest:kIe,foregroundHover:AIe,foregroundActive:jIe,foregroundFocus:MIe}=w9(`secondary`,D9),O9=ns(t9.tertiary),k9=os.create(O9.r,O9.g,O9.b),A9=ci.create(`tertiary-color`).withDefault(k9),{palette:NIe,fillRestDelta:PIe,fillHoverDelta:FIe,fillActiveDelta:IIe,fillFocusDelta:LIe,foregroundRestDelta:RIe,foregroundHoverDelta:zIe,foregroundActiveDelta:BIe,foregroundFocusDelta:VIe,fillRecipe:HIe,fillRest:UIe,fillHover:WIe,fillActive:GIe,fillFocus:KIe,foregroundOnRecipe:qIe,foregroundOnRest:JIe,foregroundOnHover:YIe,foregroundOnActive:XIe,foregroundOnFocus:ZIe,foregroundOnLargeRecipe:QIe,foregroundOnRestLarge:$Ie,foregroundOnHoverLarge:eLe,foregroundOnActiveLarge:tLe,foregroundOnFocusLarge:nLe,foregroundRecipe:rLe,foregroundRest:iLe,foregroundHover:aLe,foregroundActive:oLe,foregroundFocus:sLe}=w9(`tertiary`,A9),{palette:cLe,fillRestDelta:lLe,fillHoverDelta:uLe,fillActiveDelta:dLe,fillFocusDelta:fLe,foregroundRestDelta:pLe,foregroundHoverDelta:mLe,foregroundActiveDelta:hLe,foregroundFocusDelta:gLe,fillRecipe:_Le,fillRest:vLe,fillHover:yLe,fillActive:bLe,fillFocus:xLe,foregroundOnRecipe:SLe,foregroundOnRest:CLe,foregroundOnHover:wLe,foregroundOnActive:TLe,foregroundOnFocus:ELe,foregroundOnLargeRecipe:DLe,foregroundOnRestLarge:OLe,foregroundOnHoverLarge:kLe,foregroundOnActiveLarge:ALe,foregroundOnFocusLarge:jLe,foregroundRecipe:MLe,foregroundRest:NLe,foregroundHover:PLe,foregroundActive:FLe,foregroundFocus:ILe}=w9(`error`,a9),{palette:LLe,fillRestDelta:RLe,fillHoverDelta:zLe,fillActiveDelta:BLe,fillFocusDelta:VLe,foregroundRestDelta:HLe,foregroundHoverDelta:ULe,foregroundActiveDelta:WLe,foregroundFocusDelta:GLe,fillRecipe:KLe,fillRest:qLe,fillHover:JLe,fillActive:YLe,fillFocus:XLe,foregroundOnRecipe:ZLe,foregroundOnRest:QLe,foregroundOnHover:$Le,foregroundOnActive:eRe,foregroundOnFocus:tRe,foregroundOnLargeRecipe:nRe,foregroundOnRestLarge:rRe,foregroundOnHoverLarge:iRe,foregroundOnActiveLarge:aRe,foregroundOnFocusLarge:oRe,foregroundRecipe:sRe,foregroundRest:cRe,foregroundHover:lRe,foregroundActive:uRe,foregroundFocus:dRe}=w9(`success`,c9),{palette:fRe,fillRestDelta:pRe,fillHoverDelta:mRe,fillActiveDelta:hRe,fillFocusDelta:gRe,foregroundRestDelta:_Re,foregroundHoverDelta:vRe,foregroundActiveDelta:yRe,foregroundFocusDelta:bRe,fillRecipe:xRe,fillRest:SRe,fillHover:CRe,fillActive:wRe,fillFocus:TRe,foregroundOnRecipe:ERe,foregroundOnRest:DRe,foregroundOnHover:ORe,foregroundOnActive:kRe,foregroundOnFocus:ARe,foregroundOnLargeRecipe:jRe,foregroundOnRestLarge:MRe,foregroundOnHoverLarge:NRe,foregroundOnActiveLarge:PRe,foregroundOnFocusLarge:FRe,foregroundRecipe:IRe,foregroundRest:LRe,foregroundHover:RRe,foregroundActive:zRe,foregroundFocus:BRe}=w9(`warning`,d9);var VRe=/* @__PURE__ */ c({accentFillActive:()=>Bc,accentFillActiveDelta:()=>Gs,accentFillFocus:()=>Vc,accentFillFocusDelta:()=>Ks,accentFillHover:()=>zc,accentFillHoverDelta:()=>Ws,accentFillRest:()=>Rc,accentFillRestDelta:()=>Us,accentForegroundActive:()=>rl,accentForegroundActiveDelta:()=>Ys,accentForegroundFocus:()=>il,accentForegroundFocusDelta:()=>Xs,accentForegroundHover:()=>nl,accentForegroundHoverDelta:()=>Js,accentForegroundRest:()=>tl,accentForegroundRestDelta:()=>qs,accentPalette:()=>Sc,baseHeightMultiplier:()=>vs,baseLayerLuminance:()=>ys,bodyFont:()=>_s,buyColor:()=>XFe,controlCornerRadius:()=>bs,defaultBuyColor:()=>p9,defaultErrorColor:()=>i9,defaultInfoColor:()=>_9,defaultSecondaryColor:()=>E9,defaultSellColor:()=>h9,defaultSeriousNotifyColor:()=>y9,defaultSuccessColor:()=>s9,defaultTertiaryColor:()=>k9,defaultWarningColor:()=>u9,density:()=>xs,designUnit:()=>B,direction:()=>Ss,disabledOpacity:()=>Cs,errorColor:()=>a9,errorFillActive:()=>bLe,errorFillActiveDelta:()=>dLe,errorFillFocus:()=>xLe,errorFillFocusDelta:()=>fLe,errorFillHover:()=>yLe,errorFillHoverDelta:()=>uLe,errorFillRecipe:()=>_Le,errorFillRest:()=>vLe,errorFillRestDelta:()=>lLe,errorForegroundActive:()=>FLe,errorForegroundActiveDelta:()=>hLe,errorForegroundFocus:()=>ILe,errorForegroundFocusDelta:()=>gLe,errorForegroundHover:()=>PLe,errorForegroundHoverDelta:()=>mLe,errorForegroundRecipe:()=>MLe,errorForegroundRest:()=>NLe,errorForegroundRestDelta:()=>pLe,errorPalette:()=>cLe,fillColor:()=>Fc,focusStrokeInner:()=>Ol,focusStrokeOuter:()=>Dl,focusStrokeWidth:()=>ws,foregroundOnAccentActive:()=>Kc,foregroundOnAccentActiveLarge:()=>Zc,foregroundOnAccentFocus:()=>qc,foregroundOnAccentFocusLarge:()=>Qc,foregroundOnAccentHover:()=>Gc,foregroundOnAccentHoverLarge:()=>Xc,foregroundOnAccentRest:()=>Wc,foregroundOnAccentRestLarge:()=>Yc,foregroundOnErrorActive:()=>TLe,foregroundOnErrorActiveLarge:()=>ALe,foregroundOnErrorFocus:()=>ELe,foregroundOnErrorFocusLarge:()=>jLe,foregroundOnErrorHover:()=>wLe,foregroundOnErrorHoverLarge:()=>kLe,foregroundOnErrorLargeRecipe:()=>DLe,foregroundOnErrorRecipe:()=>SLe,foregroundOnErrorRest:()=>CLe,foregroundOnErrorRestLarge:()=>OLe,foregroundOnSecondaryActive:()=>xIe,foregroundOnSecondaryActiveLarge:()=>EIe,foregroundOnSecondaryFocus:()=>SIe,foregroundOnSecondaryFocusLarge:()=>DIe,foregroundOnSecondaryHover:()=>bIe,foregroundOnSecondaryHoverLarge:()=>TIe,foregroundOnSecondaryLargeRecipe:()=>CIe,foregroundOnSecondaryRecipe:()=>vIe,foregroundOnSecondaryRest:()=>yIe,foregroundOnSecondaryRestLarge:()=>wIe,foregroundOnSuccessActive:()=>eRe,foregroundOnSuccessActiveLarge:()=>aRe,foregroundOnSuccessFocus:()=>tRe,foregroundOnSuccessFocusLarge:()=>oRe,foregroundOnSuccessHover:()=>$Le,foregroundOnSuccessHoverLarge:()=>iRe,foregroundOnSuccessLargeRecipe:()=>nRe,foregroundOnSuccessRecipe:()=>ZLe,foregroundOnSuccessRest:()=>QLe,foregroundOnSuccessRestLarge:()=>rRe,foregroundOnTertiaryActive:()=>XIe,foregroundOnTertiaryActiveLarge:()=>tLe,foregroundOnTertiaryFocus:()=>ZIe,foregroundOnTertiaryFocusLarge:()=>nLe,foregroundOnTertiaryHover:()=>YIe,foregroundOnTertiaryHoverLarge:()=>eLe,foregroundOnTertiaryLargeRecipe:()=>QIe,foregroundOnTertiaryRecipe:()=>qIe,foregroundOnTertiaryRest:()=>JIe,foregroundOnTertiaryRestLarge:()=>$Ie,foregroundOnWarningActive:()=>kRe,foregroundOnWarningActiveLarge:()=>PRe,foregroundOnWarningFocus:()=>ARe,foregroundOnWarningFocusLarge:()=>FRe,foregroundOnWarningHover:()=>ORe,foregroundOnWarningHoverLarge:()=>NRe,foregroundOnWarningLargeRecipe:()=>jRe,foregroundOnWarningRecipe:()=>ERe,foregroundOnWarningRest:()=>DRe,foregroundOnWarningRestLarge:()=>MRe,infoColor:()=>QFe,neutralFillActive:()=>cl,neutralFillActiveDelta:()=>$s,neutralFillFocus:()=>ll,neutralFillFocusDelta:()=>ec,neutralFillHover:()=>sl,neutralFillHoverDelta:()=>Qs,neutralFillInputActive:()=>pl,neutralFillInputActiveDelta:()=>rc,neutralFillInputFocus:()=>ml,neutralFillInputFocusDelta:()=>ic,neutralFillInputHover:()=>fl,neutralFillInputHoverDelta:()=>nc,neutralFillInputRest:()=>dl,neutralFillInputRestDelta:()=>tc,neutralFillLayerRest:()=>El,neutralFillLayerRestDelta:()=>pc,neutralFillRest:()=>ol,neutralFillRestDelta:()=>Zs,neutralFillStealthActive:()=>vl,neutralFillStealthActiveDelta:()=>sc,neutralFillStealthFocus:()=>yl,neutralFillStealthFocusDelta:()=>cc,neutralFillStealthHover:()=>_l,neutralFillStealthHoverDelta:()=>oc,neutralFillStealthRest:()=>gl,neutralFillStealthRestDelta:()=>ac,neutralFillStrongActive:()=>Cl,neutralFillStrongActiveDelta:()=>dc,neutralFillStrongFocus:()=>wl,neutralFillStrongFocusDelta:()=>fc,neutralFillStrongHover:()=>Sl,neutralFillStrongHoverDelta:()=>uc,neutralFillStrongRest:()=>xl,neutralFillStrongRestDelta:()=>lc,neutralForegroundHint:()=>kl,neutralForegroundRest:()=>H,neutralLayer1:()=>Oc,neutralLayer2:()=>Ac,neutralLayer3:()=>Mc,neutralLayer4:()=>Pc,neutralLayerCardContainer:()=>wc,neutralLayerFloating:()=>Ec,neutralPalette:()=>bc,neutralStrokeActive:()=>Nl,neutralStrokeActiveDelta:()=>gc,neutralStrokeDividerRest:()=>Fl,neutralStrokeDividerRestDelta:()=>vc,neutralStrokeFocus:()=>Pl,neutralStrokeFocusDelta:()=>_c,neutralStrokeHover:()=>Ml,neutralStrokeHoverDelta:()=>hc,neutralStrokeRest:()=>jl,neutralStrokeRestDelta:()=>mc,secondaryColor:()=>D9,secondaryFillActive:()=>gIe,secondaryFillActiveDelta:()=>sIe,secondaryFillFocus:()=>_Ie,secondaryFillFocusDelta:()=>cIe,secondaryFillHover:()=>hIe,secondaryFillHoverDelta:()=>oIe,secondaryFillRecipe:()=>pIe,secondaryFillRest:()=>mIe,secondaryFillRestDelta:()=>aIe,secondaryForegroundActive:()=>jIe,secondaryForegroundActiveDelta:()=>dIe,secondaryForegroundFocus:()=>MIe,secondaryForegroundFocusDelta:()=>fIe,secondaryForegroundHover:()=>AIe,secondaryForegroundHoverDelta:()=>uIe,secondaryForegroundRecipe:()=>OIe,secondaryForegroundRest:()=>kIe,secondaryForegroundRestDelta:()=>lIe,secondaryPalette:()=>iIe,sellColor:()=>ZFe,seriousNotifyColor:()=>$Fe,strokeWidth:()=>V,successColor:()=>c9,successFillActive:()=>YLe,successFillActiveDelta:()=>BLe,successFillFocus:()=>XLe,successFillFocusDelta:()=>VLe,successFillHover:()=>JLe,successFillHoverDelta:()=>zLe,successFillRecipe:()=>KLe,successFillRest:()=>qLe,successFillRestDelta:()=>RLe,successForegroundActive:()=>uRe,successForegroundActiveDelta:()=>WLe,successForegroundFocus:()=>dRe,successForegroundFocusDelta:()=>GLe,successForegroundHover:()=>lRe,successForegroundHoverDelta:()=>ULe,successForegroundRecipe:()=>sRe,successForegroundRest:()=>cRe,successForegroundRestDelta:()=>HLe,successPalette:()=>LLe,tertiaryColor:()=>A9,tertiaryFillActive:()=>GIe,tertiaryFillActiveDelta:()=>IIe,tertiaryFillFocus:()=>KIe,tertiaryFillFocusDelta:()=>LIe,tertiaryFillHover:()=>WIe,tertiaryFillHoverDelta:()=>FIe,tertiaryFillRecipe:()=>HIe,tertiaryFillRest:()=>UIe,tertiaryFillRestDelta:()=>PIe,tertiaryForegroundActive:()=>oLe,tertiaryForegroundActiveDelta:()=>BIe,tertiaryForegroundFocus:()=>sLe,tertiaryForegroundFocusDelta:()=>VIe,tertiaryForegroundHover:()=>aLe,tertiaryForegroundHoverDelta:()=>zIe,tertiaryForegroundRecipe:()=>rLe,tertiaryForegroundRest:()=>iLe,tertiaryForegroundRestDelta:()=>RIe,tertiaryPalette:()=>NIe,typeRampBaseFontSize:()=>Ts,typeRampBaseLineHeight:()=>Es,typeRampMinus1FontSize:()=>Ds,typeRampMinus1LineHeight:()=>Os,typeRampMinus2FontSize:()=>ks,typeRampMinus2LineHeight:()=>As,typeRampPlus1FontSize:()=>js,typeRampPlus1LineHeight:()=>Ms,typeRampPlus2FontSize:()=>Ns,typeRampPlus2LineHeight:()=>Ps,typeRampPlus3FontSize:()=>Fs,typeRampPlus3LineHeight:()=>Is,typeRampPlus4FontSize:()=>Ls,typeRampPlus4LineHeight:()=>Rs,typeRampPlus5FontSize:()=>zs,typeRampPlus5LineHeight:()=>Bs,typeRampPlus6FontSize:()=>Vs,typeRampPlus6LineHeight:()=>Hs,warningColor:()=>d9,warningFillActive:()=>wRe,warningFillActiveDelta:()=>hRe,warningFillFocus:()=>TRe,warningFillFocusDelta:()=>gRe,warningFillHover:()=>CRe,warningFillHoverDelta:()=>mRe,warningFillRecipe:()=>xRe,warningFillRest:()=>SRe,warningFillRestDelta:()=>pRe,warningForegroundActive:()=>zRe,warningForegroundActiveDelta:()=>yRe,warningForegroundFocus:()=>BRe,warningForegroundFocusDelta:()=>bRe,warningForegroundHover:()=>RRe,warningForegroundHoverDelta:()=>vRe,warningForegroundRecipe:()=>IRe,warningForegroundRest:()=>LRe,warningForegroundRestDelta:()=>_Re,warningPalette:()=>fRe});let j9=Vw(t9.primary),M9=Vw(t9.neutral),N9=Vw(t9.green),P9=Vw(t9.tertiary),F9=Vw(t9.error),I9=Vw(t9.success),L9=Vw(t9.warning),R9=hs.DarkMode,HRe=Fn.ltr,z9=`"Segoe UI", Arial, Helvetica, sans-serif`,B9=`14px`,V9=`20px`,URe={design_tokens:{color:{accent:{$value:j9.source.toColorString(),$type:`color`},neutral:{$value:M9.source.toColorString(),$type:`color`},secondary:{$value:N9.source.toColorString(),$type:`color`},tertiary:{$value:P9.source.toColorString(),$type:`color`},error:{$value:F9.source.toColorString(),$type:`color`},success:{$value:I9.source.toColorString(),$type:`color`},warning:{$value:L9.source.toColorString(),$type:`color`}},fontFamily:{bodyFont:{$value:z9,$type:`fontFamily`}},typography:{baseFontSize:{$value:B9,$type:`dimension`},baseLineHeight:{$value:V9,$type:`dimension`}},mode:{luminance:{$value:R9,$type:`number`}},style:{density:{$value:0,$type:`number`},baseHeightMultiplier:{$value:10,$type:`number`},borderRadius:{$value:4,$type:`number`},strokeWidth:{$value:1,$type:`number`}},space:{designUnit:{$value:4,$type:`number`}}}};var WRe=/* @__PURE__ */ c({accentFillActiveDeltaValue:()=>-5,accentFillFocusDeltaValue:()=>0,accentFillHoverDeltaValue:()=>4,accentFillRestDeltaValue:()=>0,accentForegroundActiveDeltaValue:()=>-4,accentForegroundFocusDeltaValue:()=>0,accentForegroundHoverDeltaValue:()=>6,accentForegroundRestDeltaValue:()=>0,accentPaletteValue:()=>j9,baseHeightMultiplierValue:()=>10,baseLayerLuminanceValue:()=>R9,bodyFontValue:()=>z9,controlCornerRadiusValue:()=>4,densityValue:()=>0,designTokens:()=>URe,designUnitValue:()=>4,directionValue:()=>HRe,disabledOpacityValue:()=>.3,errorPaletteValue:()=>F9,focusStrokeWidthValue:()=>2,neutralFillActiveDeltaValue:()=>5,neutralFillFocusDeltaValue:()=>0,neutralFillHoverDeltaValue:()=>10,neutralFillInputActiveDeltaValue:()=>0,neutralFillInputFocusDeltaValue:()=>10,neutralFillInputHoverDeltaValue:()=>5,neutralFillInputRestDeltaValue:()=>0,neutralFillLayerRestDeltaValue:()=>3,neutralFillRestDeltaValue:()=>7,neutralFillStealthActiveDeltaValue:()=>3,neutralFillStealthFocusDeltaValue:()=>0,neutralFillStealthHoverDeltaValue:()=>5,neutralFillStealthRestDeltaValue:()=>0,neutralFillStrongActiveDeltaValue:()=>-5,neutralFillStrongFocusDeltaValue:()=>0,neutralFillStrongHoverDeltaValue:()=>8,neutralFillStrongRestDeltaValue:()=>0,neutralPaletteValue:()=>M9,neutralStrokeActiveDeltaValue:()=>16,neutralStrokeDividerRestDeltaValue:()=>8,neutralStrokeFocusDeltaValue:()=>25,neutralStrokeHoverDeltaValue:()=>40,neutralStrokeRestDeltaValue:()=>25,prefix:()=>`rapid`,secondaryPaletteValue:()=>N9,strokeWidthValue:()=>1,successPaletteValue:()=>I9,tertiaryPaletteValue:()=>P9,typeRampBaseFontSizeValue:()=>B9,typeRampBaseLineHeightValue:()=>V9,typeRampMinus1FontSizeValue:()=>`13px`,typeRampMinus1LineHeightValue:()=>`19px`,typeRampMinus2FontSizeValue:()=>`12px`,typeRampMinus2LineHeightValue:()=>`18px`,typeRampPlus1FontSizeValue:()=>`15px`,typeRampPlus1LineHeightValue:()=>`21px`,typeRampPlus2FontSizeValue:()=>`16px`,typeRampPlus2LineHeightValue:()=>`22px`,typeRampPlus3FontSizeValue:()=>`17px`,typeRampPlus3LineHeightValue:()=>`23px`,typeRampPlus4FontSizeValue:()=>`18px`,typeRampPlus4LineHeightValue:()=>`24px`,typeRampPlus5FontSizeValue:()=>`19px`,typeRampPlus5LineHeightValue:()=>`25px`,typeRampPlus6FontSizeValue:()=>`20px`,typeRampPlus6LineHeightValue:()=>`26px`,warningPaletteValue:()=>L9});(class extends K{constructor(){super(),Rw(VRe,WRe,this)}}).compose({baseName:`design-system-provider`,template:T`<slot></slot>`});let H9=O` ${e0} :host{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}dialog{position: var(--dialog-position, fixed);top: 0;bottom: 0;border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest));text-align: left;line-height: normal;box-shadow: 0 2px 15px 0 rgb(0 0 0 / 35%);background-color: var(--dialog-background, var(--neutral-layer-1))}.top{display: flex;align-items: center;justify-content: space-between;color: var(--neutral-foreground-rest);margin-bottom: calc(var(--design-unit) * 2px);font-weight: 500}.bottom{display: flex;flex-wrap: wrap;justify-content: flex-end;color: var(--neutral-foreground-rest);gap: calc(var(--design-unit) * 2px)}:host slot:first-of-type{color: ${H}}::slotted(rapid-button){margin-top: calc(var(--design-unit) * 4px - 1px)}slot[name='top']::slotted(*){margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-hint);font-weight: 700}.content-wrapper{min-width: var(--dialog-min-width);min-height: var(--dialog-min-height);height: fit-content;width: fit-content;max-width: var(--dialog-max-width);max-height: var(--dialog-max-height);display: flex;flex-direction: column;justify-content: space-between;align-items: stretch}.close-icon:hover svg{background-color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 95%)}.close-icon svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%)}.close-icon:hover svg g path{fill: var(--neutral-foreground-rest)}.close-icon:active svg{background-color: var(--neutral-layer-4)}.close-icon:active svg g path{fill: color-mix(in srgb, var(--neutral-foreground-rest), transparent 67%)}.header-controls{rapid-button{--base-height-multiplier: 8}rapid-button::part(control){padding: 0 calc((8 + var(--design-unit) * 1 * var(--density)) * 1px)}}`,GRe=g0,KRe=n0,qRe=h0;(class extends v0{}).compose(Object.assign({baseName:`dialog`,shadowOptions:qRe,styles:H9,template:KRe},GRe)),class extends x0{}.compose(Object.assign({baseName:`disclosure`,template:(e,t)=>y0(e,t),styles:(e,t)=>O` ${b0(e,t)} :host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}:host([appearance='accent']) .invoker{padding: calc((10 + (var(--design-unit) * 2 * var(--density))) * 1px)}#disclosure-content{padding: 0 calc(var(--design-unit) * 4px) calc(var(--design-unit) * 4px);text-align: center}`,shadowOptions:h0},S0)),class extends T0{}.compose(Object.assign({baseName:`divider`,template:(e,t)=>C0(e,t),styles:(e,t)=>O` ${w0(e,t)}`,shadowOptions:void 0},E0)),class extends A0{}.compose({baseName:`dropdown-menu`,styles:(e,t)=>O` ${D0(`rapid`,e,t)} .actions-menu{border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);gap: 0;margin: calc(var(--design-unit) * 1px) 0}rapid-menu{margin: 0 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * -2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}`,template:k0});let JRe=O` ${j0}`;(class extends L0{}).compose({baseName:`environment-indicator`,styles:JRe,template:M0});function U9(e,...t){let n=``;return e.forEach((e,r)=>{n+=e,r<t.length&&(n+=t[r])}),n}let W9={number:`rapid-number-field`,text:`rapid-text-field`,date:`rapid-text-field`,datetimeLocal:`rapid-text-field`,checkbox:`rapid-checkbox`,button:`rapid-button`,select:`rapid-select`,option:`rapid-option`,optgroup:`rapid-optgroup`,radio:{input:`rapid-radio`,group:`rapid-radio-group`}},G9=U9` rapid-select, rapid-text-field, rapid-number-field{min-width: 180px}rapid-button.btn{padding: 0}rapid-button.btn-success{background-color: var(--accent-fill-active);border-color: var(--accent-fill-active)}rapid-button.btn-danger{background-color: var(--error-color);border-color: var(--error-border-color)}rapid-select::part(listbox){max-height: 15vh}`,K9=U9` border: unset;border: 1px solid var(--focus-stroke-outer);padding: calc(var(--design-unit) * 2.5px);border-radius: 10px;margin: calc(var(--design-unit) * 1px);`,q9={value:U9` ${G9} rapid-number-field, rapid-text-field{margin-bottom: 0}rapid-number-field::part(label){display: none}p.validation-msg{color: var(--neutral-foreground-rest)}`,rule:U9` ${G9} div.rule-container{${K9}}div.rule-container.error{border-color: var(--error-border-color)}`,operator:U9` ${G9} rapid-select{min-width: 350px}`,field:U9` ${G9} rapid-select{min-width: 350px}`,group:U9` ${G9} div.rules-group-container{${K9}}p.group-combinator-link{padding-left: calc(var(--design-unit) * 2.5px);color: var(--neutral-foreground-rest)}`},J9=class extends s7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],J9.prototype,`styles`,void 0),J9=q([$e({name:`rapid-expression-builder`,styles:S7.styles,template:S7.template})],J9);let Y9=class extends O7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],Y9.prototype,`styles`,void 0),Y9=q([$e({name:`rapid-rule-expression-builder`,styles:S7.styles,template:S7.template})],Y9);let X9=class extends M7{constructor(){super(...arguments),this.styles={customElements:W9,customStyles:q9}}};q([C],X9.prototype,`styles`,void 0),X9=q([$e({name:`rapid-value-expression-builder`,styles:S7.styles,template:S7.template})],X9);let YRe=O` ${$0} ::-webkit-scrollbar{width: calc(var(--design-unit) * 3px)}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-fill-rest);border: calc(var(--stroke-width) * 3px) solid var(--neutral-layer-4)}:host::part(select-file-button), :host::part(upload-file-button){margin: 0 0 calc(var(--design-unit) * 2px) calc(var(--design-unit) * 2px)}`,XRe=T` ${e2(`rapid`)} `,ZRe=n2;(class extends t2{}).compose(Object.assign({baseName:`file-upload`,shadowOptions:void 0,styles:YRe,template:XRe},ZRe));let QRe=(e,t)=>O` ${l2(e,t)} .toggle, .toggle-collapsed{background: var(--neutral-layer-4);color: var(--neutral-foreground-hint)}.toggle{border-top: calc(var(--stroke-width) * 2px) solid}.toggle:hover, .toggle-collapsed:hover{color: var(--accent-foreground-rest)}.filter-bar{background: var(--neutral-layer-3)}`,$Re=T` ${u2(`rapid`)} `;(class extends d2{}).compose({baseName:`filter-bar`,template:$Re,styles:QRe});let eze=(e,t)=>O` ${r2} .filter-wrapper{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.close-icon{border: calc(var(--stroke-width) * 1px) solid transparent}.close-icon:hover{border-color: var(--error-color);background: color-mix(in srgb, var(--error-color), transparent 75%)}.close-icon:hover svg path{fill: var(--error-color)}rapid-select{margin-bottom: calc(var(--design-unit) * 2px)}.flex-row rapid-text-field, .flex-row rapid-select{flex: 1}`,tze=T` ${o2(`rapid`)} `;(class extends c2{}).compose({baseName:`filter`,template:tze,styles:eze}),class extends g2{}.compose(Object.assign({baseName:`flipper`,template:(e,t)=>m2(e,t),styles:(e,t)=>O` ${h2(e,t)} :host{color: var(--neutral-foreground-rest)}:host(:hover){color: var(--neutral-foreground-rest)}:host::before{background: color-mix(in srgb, var(--accent-fill-rest), transparent 50%);border: calc(var(--stroke-width) * 1px) solid var(--accent-fill-rest);color: var(--neutral-foreground-rest)}:host(:hover)::before{background: var(--accent-fill-rest);color: var(--neutral-foreground-rest)}`,shadowOptions:void 0},_2));let nze=O` ${v2} div.flyout{background-color: var(--neutral-layer-1);border-color: var(--neutral-stroke-rest);color: var(--neutral-foreground-rest);padding: calc(var(--design-unit) * 4px)}div.background{padding: calc(var(--design-unit) * 4px) 0}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height)}:host([position='left']) div.flyout{border-right-style: solid;border-right-width: calc(var(--stroke-width) * 1px)}:host([position='right']) div.flyout{border-left-style: solid;border-left-width: calc(var(--stroke-width) * 1px)}div.exit{cursor: pointer;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);display: flex;justify-content: center;align-items: center}div.content, div.footer{padding: 0 0 calc(var(--design-unit) * 2px)}div.exit:hover{background-color: var(--neutral-fill-hover);border-radius: calc(var(--stroke-width) * 3px)}`,rze=T` ${y2(`rapid`)} `,ize=x2;(class extends b2{}).compose(Object.assign({baseName:`flyout`,shadowOptions:void 0,styles:nze,template:rze},ize));let aze=(e,t)=>O` ${D2(e,t)}`,oze=(e,t)=>E2(e,t);var sze=class extends O2{};let cze={nextFlipper:T`<rapid-flipper @click="${e=>e.scrollToNext()}" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`,previousFlipper:T`<rapid-flipper @click="${e=>e.scrollToPrevious()}" direction="previous" aria-hidden="${e=>e.flippersHiddenFromAT}"></rapid-flipper>`};sze.compose(Object.assign({baseName:`horizontal-scroll`,template:oze,styles:aze,shadowOptions:k2},cze));let lze=(e,t)=>O` ${A2(e,t)}`,uze=T` ${j2(`rapid`)} `;var dze=class extends F2{};let fze=N2,pze=M2;dze.compose(Object.assign({baseName:`icon`,template:uze,styles:lze,shadowOptions:pze},fze)),class extends H2{}.compose(Object.assign({baseName:`option`,template:(e,t)=>B2(e,t),styles:(e,t)=>O` ${V2(e,t)} :host{border-radius: 0;padding: 0 calc(var(--design-unit) * 4px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host(.selected), :host(:not([disabled])[aria-selected='true']:active), :host(:not([disabled])[aria-selected='true']:hover){background: var(--neutral-layer-2);color: var(--accent-fill-rest);font-weight: 500}`,shadowOptions:void 0},U2)),class extends R2{}.compose(Object.assign({baseName:`listbox`,template:(e,t)=>I2(e,t),styles:(e,t)=>O` ${L2(e,t)} :host{padding: 0;max-width: 300px;/** if removed max-width will be fit-content */}::slotted(*:last-child){border-bottom: none}`,shadowOptions:void 0},z2)),class extends X2{}.compose(Object.assign({baseName:`menu-item`,template:(e,t)=>J2(e,t),styles:(e,t)=>O` ${Y2(e,t)} :host{margin: 0;--control-corner-radius: 0;background: var(--neutral-fill-stealth-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:hover){background: color-mix(in srgb, ${_l}, transparent 15%);border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%)}:host(:focus){background: var(--neutral-fill-stealth-hover)}:host(.indent-0){border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-stealth-hover)}/* UX team wants border: solid 1px #2E3339;background: #2E3339 */ /* tokens being used by fast background: ${_l} color: ${H} */`,shadowOptions:void 0},Z2)),class extends K2{}.compose(Object.assign({baseName:`menu`,template:(e,t)=>W2(e,t),styles:(e,t)=>O` ${G2(e,t)} :host{border: calc(var(--focus-stroke-width) * 1px) solid color-mix(in srgb, ${_l}, transparent 15%);padding: 0}`,shadowOptions:void 0},q2));let mze=O` ${H9}`,hze=e4,gze=Q2,_ze=$2;(class extends t4{}).compose(Object.assign({baseName:`modal`,shadowOptions:_ze,styles:mze,template:gze},hze));let vze=O` ${ZC} .root{min-width: 0}.control{height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px );min-height: 0;outline: none;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font);box-sizing: border-box}:host(:focus-within:not([disabled])) .control{outline: none;border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}.control:hover:not(:focus):not([disabled]){outline: none;border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}#display-field{min-height: unset;padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px);font-family: var(--body-font), sans-serif;font-size: var(--type-ramp-base-font-size);background-color: transparent}#display-field:focus{outline: none;background: unset}#display-field:hover:not(:focus):not([disabled]){outline: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);left: calc( 100% - ((var(--base-height-multiplier) * (var(--design-unit) - 1)) + (var(--design-unit) - 2)) * 1px );background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}#arrow-icon{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);fill: var(--neutral-foreground-rest)}.label{color: var(--neutral-foreground-hint)}.options{border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);overflow-x: hidden}rapid-checkbox{border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);padding: calc((var(--design-unit) + 1) * 1px) 0 calc((var(--design-unit) + 1) * 1px) calc((var(--design-unit) + 1) * 1px);margin: 0}rapid-checkbox:hover:not([disabled]){background: var(--neutral-layer-4)}rapid-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}rapid-checkbox[disabled]{cursor: not-allowed}`,yze=T` ${tw(`rapid`)} `;var bze=class extends rw{};let xze=nw;bze.compose(Object.assign({baseName:`multiselect`,template:yze,styles:vze,shadowOptions:void 0},xze)),class extends P7{}.compose({baseName:`notification-listener`,template:N7,shadowOptions:{mode:`open`,delegatesFocus:!0}});let Sze=(e,t)=>O` :host{flex: 1 1 auto;box-sizing: border-box}:host([disabled]){opacity: var(--disabled-opacity);cursor: not-allowed}:host .control{height: 100%;width: 100%;border: none;background-color: transparent;padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);font-family: var(--body-font)}:host .root{display: flex;box-sizing: border-box;position: relative;align-items: center;border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:focus-within:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{display: block;color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0;font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height)}.label-hidden{margin: 0}.controls{position: absolute;right: 3px;width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center;flex-direction: column;cursor: pointer}.step-down, .step-up{width: 1em;height: 1em;margin: -2px}.step-up-glyph, .step-down-glyph{fill: var(--neutral-foreground-hint)}.control:focus-visible{outline: none}:host .control-field .control{width: 100%}${Z0}`;var Cze=class extends v4{};let wze=b4,Tze=n4,Eze=y4;Cze.compose(Object.assign({baseName:`number-field`,template:Tze,styles:Sze,shadowOptions:Eze},wze)),class extends C4{}.compose({baseName:`optgroup`,template:(e,t)=>S4(e,t),styles:(e,t)=>O` ${x4(e,t)}`}),class extends k4{}.compose(Object.assign({baseName:`system-health-overlay`,template:A4,styles:j4,shadowOptions:void 0},M4));let Dze=O` ${N4} :host{--pill-fill: ${ol};--pill-fill-hover: ${sl};--pill-foreground: ${H}}`,Oze=P4;(class extends I4{}).compose(Object.assign({baseName:`pill`,template:Oze,styles:Dze,shadowOptions:void 0},F4)),class extends I3{}.compose(Object.assign({baseName:`progress-ring`,template:(e,t)=>P3(e,t),styles:(e,t)=>O` ${F3(e,t)}`,shadowOptions:void 0},L3)),class extends E4{}.compose(Object.assign({baseName:`progress`,template:(e,t)=>w4(e,t),styles:(e,t)=>O` ${T4(e,t)}`,shadowOptions:void 0},D4)),class extends W3{}.compose(Object.assign({baseName:`radio-group`,template:(e,t)=>H3(e,t),styles:(e,t)=>O` ${U3(e,t)}`,shadowOptions:void 0},G3)),class extends B3{}.compose(Object.assign({baseName:`radio`,template:(e,t)=>R3(e,t),styles:(e,t)=>O` ${z3(e,t)} :host{margin: 0}:host .control{background: transparent}:host([aria-checked='true']) .control{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}:host .label{padding-inline-start: calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:hover{background: transparent}:host([aria-checked='true']:not([disabled])) .control:hover{background: transparent;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-hover)}.checked-indicator, :host([aria-checked='true']:not([disabled])) .control:hover .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},V3));let Z9=class extends p_.from(Qe){connectedCallback(){super.connectedCallback(),x.queueUpdate(()=>J(this,void 0,void 0,function*(){this.$router.config=this.config}))}};Z9=q([$e({name:`rapid-router`})],Z9);let kze=O` ${i6} :host{font-family: var(--body-font)}`,Aze=T` ${h6(`rapid`)} `;(class extends g6{}).compose(Object.assign({baseName:`scheduler-cron-builder`,template:Aze,styles:kze,shadowOptions:void 0},_6));let jze=O` ${v6} :host{font-family: var(--body-font)}`,Mze=T` ${y6(`rapid`)} `;(class extends b6{}).compose(Object.assign({baseName:`scheduler-timezone`,template:Mze,styles:jze,shadowOptions:void 0},x6));let Nze=O` ${K3} :host{font-family: var(--body-font)}`,Pze=T` ${q3(`rapid`)} `;(class extends J3{}).compose(Object.assign({baseName:`scheduler`,template:Pze,styles:Nze,shadowOptions:void 0},Y3)),class extends O6{}.compose(Object.assign({baseName:`search-bar-combobox`,template:(e,t)=>D6(e,t),styles:(e,t)=>O` ${E6(e,t)} :host{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--neutral-stroke-rest));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not([open])){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}:host .listbox ::slotted(*:last-child){border-bottom: none}`,shadowOptions:k6},A6));let Fze=O` ${S6}`,Ize=T` ${C6(`rapid`)} `;(class extends w6{}).compose(Object.assign({baseName:`search-bar`,template:Ize,styles:Fze,shadowOptions:void 0},T6)),class extends L6{}.compose(Object.assign({baseName:`section-navigator`,template:M6,styles:(e,t)=>j6,shadowOptions:R6},z6)),class extends H6{}.compose(Object.assign({baseName:`segmented-control`,template:(e,t)=>B6(e,t),styles:(e,t)=>O` ${V6(e,t)} :host{font-family: var(--body-font);margin: 0}:host ::slotted(*){transition: color 0.4s ease 0s}:host ::slotted(label){color: var(--neutral-foreground-rest)}:host ::slotted(rapid-segmented-item:first-of-type){border-radius: calc(var(--control-corner-radius) * 1px) 0 0 calc(var(--control-corner-radius) * 1px);border-right-width: 0}:host ::slotted(rapid-segmented-item:last-of-type){border-radius: 0 calc(var(--control-corner-radius) * 1px) calc(var(--control-corner-radius) * 1px) 0;border-left-width: 0}:host ::slotted(rapid-segmented-item:only-of-type){border-radius: calc(var(--control-corner-radius) * 1px);border-left-width: 1px;border-right-width: 1px}:host ::slotted(*[aria-checked='true']){background: var(--neutral-fill-rest);box-shadow: none;color: var(--neutral-foreground-rest)}:host([appearance='primary']) ::slotted(*[aria-checked='true']){background: var(--accent-fill-rest);border-color: transparent;box-shadow: none;color: var(--foreground-on-accent-rest)}`,shadowOptions:void 0},{})),class extends B3{}.compose(Object.assign({baseName:`segmented-item`,template:(e,t)=>U6(e,t),styles:(e,t)=>O` ${W6(e,t)} :host{color: var(--neutral-fill-strong-rest);font-size: var(--type-ramp-minus-2-font-size);font-weight: 500;border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);box-sizing: border-box;height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) - 4) * 1px);padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin: 0}:host([aria-checked='true']){color: color-mix(in srgb, white, transparent 10%)}`,shadowOptions:void 0},{})),class extends q6{}.compose(Object.assign({baseName:`select`,template:(e,t)=>G6(e,t),styles:(e,t)=>O` ${K6(e,t)} :host{border-radius: calc(var(--control-corner-radius) * 1px);border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:focus-within:not([disabled])){border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus)}:host(:hover:not([disabled]):not(.open)){border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host([open][position='below']) .listbox{padding: 0;margin-top: calc(${B} * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);border-radius: calc(var(--control-corner-radius) * 1px)}.control{padding: 0 calc((var(--design-unit) - 2) * 1px) 0 calc(var(--design-unit) * 2px)}:host(:not([disabled])) .control:active{background: none}.indicator{width: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);height: calc((var(--base-height-multiplier) * (var(--design-unit) - 1)) * 1px);background-color: var(--dropdown-indicator-background, var(--neutral-fill-rest));border-radius: calc(var(--control-corner-radius) * 1px);display: flex;justify-content: center;align-items: center}.select-indicator{width: calc(var(--design-unit) * 3.5px);height: calc(var(--design-unit) * 3.5px);transition: all 0.35s;min-width: unset;min-height: unset}.selected-value{display: flex;align-items: center;height: calc(100% - (var(--design-unit) * 1px));padding: 0;margin: 0}:host(:focus-within:not([disabled])) .indicator{background-color: transparent}:host([open]) .select-indicator{transition: all 0.35s;transform: rotate(180deg)}::slotted([role='option']){margin: 0}`,shadowOptions:void 0},J6)),class extends Z6{}.compose(Object.assign({baseName:`skeleton`,template:(e,t)=>Y6(e,t),styles:(e,t)=>O` ${X6(e,t)} :host{--skeleton-fill: var( --neutral-fill-stealth-rest );/** value in ux doc rgba(242 242 242 / 0.1) */}`,shadowOptions:void 0},Q6)),class extends a8{}.compose(Object.assign({baseName:`slider-label`,template:(e,t)=>r8(e,t),styles:(e,t)=>O` ${i8(e,t)} .label{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);border-radius: calc(var(--control-corner-radius) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-4);background-color: var(--neutral-fill-strong-hover);color: var(--neutral-layer-4);text-align: center;font-size: var(--type-ramp-minus-1-font-size, 12px)}`,shadowOptions:void 0},o8)),class extends t8{}.compose(Object.assign({baseName:`slider`,template:(e,t)=>$6(e,t),styles:(e,t)=>O` ${e8(e,t)} .thumb-cursor{background: var(--accent-fill-rest);border-radius: calc(var(--control-corner-radius) * 2px)}.thumb-cursor:hover, .thumb-cursor:focus, .thumb-cursor:active{background: var(--accent-fill-rest);border-radius: transparent}:host(:focus-visible) .thumb-cursor{box-shadow: 0 0 0 0}.thumb-cursor:hover::after, .thumb-cursor:focus::after, .thumb-cursor:active::after{content: '';height: calc(var(--thumb-size) * 2px);width: calc(var(--thumb-size) * 2px);border-radius: calc(var(--control-corner-radius) * 4px);position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: -1}.thumb-cursor:hover::after{background-color: color-mix(in srgb, ${Rc}, transparent 90%)}.thumb-cursor:focus::after{background-color: color-mix(in srgb, ${Rc}, transparent 80%)}.thumb-cursor:active::after{background-color: color-mix(in srgb, ${Rc}, transparent 70%)}.track{background-color: var(--neutral-fill-rest)}:host([orientation='horizontal']) .track .track-progress{background-color: var(--neutral-stroke-rest);height: calc((var(--track-width) + 2) * 1px) !important}:host([orientation='vertical']) .track .track-progress{background-color: var(--neutral-stroke-rest);width: calc((var(--track-width) + 2) * 1px) !important}`,shadowOptions:void 0},n8));let Lze=O` ${u8} .snackbar{border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);background-color: var(--neutral-layer-1);padding: calc((var(--design-unit) - 2) * 1px) calc(var(--design-unit) * 4px)}:host([type='error']) .snackbar::after{background-color: var(--error-color)}.content{font-family: var(--body-font);font-size: var(--type-ramp-minus-2-font-size);color: var(--neutral-foreground-rest)}.action{gap: calc(var(--design-unit) * 2px)}`,Rze=T` ${d8(`rapid`)} `,zze=f8;(class extends p8{}).compose({baseName:`snackbar`,shadowOptions:zze,styles:Lze,template:Rze}),class extends g8{}.compose({baseName:`stacking-icons`,template:h8,styles:(e,t)=>O` ${m8(e,t)}`}),class extends S8{}.compose({baseName:`status-pill`,template:v8,styles:_8}),class extends k8{}.compose(Object.assign({baseName:`stepper-tab-panel`,template:(e,t)=>O8(e,t),shadowOptions:void 0},A8));let Bze=(e,t)=>O` ${T8(e,t)} rapid-tree-item{--design-unit: 2.5;--neutral-fill-stealth-rest: var(--neutral-layer-3);--neutral-fill-stealth-hover: var(--fill-color);--neutral-fill-rest: var(--fill-color);--base-height-multiplier: 14.5;border-bottom: calc(var(--stroke-width) * 1px) solid var(--fill-color)}.completed-icon{color: var(--success-color)}.tree-item::part(positioning-region)::before{width: var(--tree-item-nested-width)}.stepper-icon{margin-right: calc(var(--design-unit) * 2px)}.error-icon{color: var(--error-color)}.step-number{font-size: var(--type-ramp-minus-1-font-size);border: calc(var(--stroke-width) * 1px) solid var(--neutral-fill-input-rest)}.step-title{font-size: var(--type-ramp-base-font-size)}.angle-icon{margin: 0 calc(var(--design-unit) * 4px)}:host([completed]) .step-number{border-color: var(--success-color);color: white;background-color: var(--success-color)}:host([completed]) .step-title{color: var(--success-color)}:host([error]) .step-number{border-color: var(--error-color);color: white;background-color: var(--error-color)}:host([error]) .step-title{color: var(--error-color)}`,Vze=T` ${w8(`rapid`)} `;(class extends E8{}).compose(Object.assign({baseName:`stepper-tab`,template:Vze,styles:Bze,shadowOptions:void 0},D8));let Hze=O` ${X7} :host{font-family: var(--body-font)}:host([orientation='horizontal']){height: 100%}.stepper-tab-panel{border: none;height: auto}:host([orientation='horizontal']) .stepper-tab-panel{height: 100%}.stepper-tab{background-color: var(--neutral-layer-3);border: none}.stepper-panel-container{padding: calc(var(--design-unit) * 4px)}.action-buttons-container{padding: calc(var(--design-unit) * 2px);width: auto;gap: calc(var(--design-unit) * 2px)}.stepper-tab-menu{margin-bottom: calc(var(--design-unit) * 4px)}.stepper-tab-progress{padding: calc(var(--design-unit) * 4px) 0}label{padding: 0 calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}`,Uze=T` ${Y7(`rapid`)} `;(class extends Z7{}).compose(Object.assign({baseName:`stepper`,template:Uze,styles:Hze,shadowOptions:void 0},Q7)),class extends N8{}.compose(Object.assign({baseName:`switch`,template:(e,t)=>j8(e,t),styles:(e,t)=>O` ${M8(e,t)} :host{--primary-gradient-angle: -113.5deg}.switch{background: none;border-color: var(--neutral-stroke-rest)}.checked-indicator{background-color: var(--neutral-stroke-rest)}.switch:hover{border-color: var(--neutral-stroke-rest);background: none}:host([aria-checked='true']) .switch{background: none}:host([aria-checked='true']) .checked-indicator{background: var(--accent-fill-rest)}:host([aria-checked='true']:not([disabled])) .switch:hover, :host([aria-checked='true']:not([disabled])) .switch:active{background: none}:host([aria-checked='true']:not([disabled])) .switch:hover .checked-indicator, :host([aria-checked='true']:not([disabled])) .switch:active .checked-indicator{background: var(--accent-fill-rest)}`,shadowOptions:void 0},{switch:`<div class="checked-indicator" part="checked-indicator"></div>`})),class extends B8{}.compose(Object.assign({baseName:`tab-panel`,template:(e,t)=>R8(e,t),styles:(e,t)=>O` ${z8(e,t)} :host{padding: 0;background-color: var(--neutral-layer-card-container);border-radius: 0 0 var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px)) var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));border-style: solid;border-width: var(--tabs-border-width, 1px);border-color: var(--tabs-border-color, var(--neutral-stroke-rest))}`,shadowOptions:void 0},V8)),class extends I8{}.compose(Object.assign({baseName:`tab`,template:(e,t)=>P8(e,t),styles:(e,t)=>O` ${F8(e,t)} :host{background-color: var(--neutral-layer-2);border-radius: calc(var(--control-corner-radius) * 2px);box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);margin-right: calc(var(--design-unit) * 5px);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host([aria-selected='true']), :host([aria-selected='true']:hover){background-color: var(--neutral-layer-4);font-weight: 700}/* * Sustained alert, sampling the flash phase the platform animates on the document. Every * alerting surface reads that one value, so tabs and grid rows brighten and fade together * however long ago each of them started alerting. * * Mixing towards transparent and currentColor lets the tab fade back to its own resting * colours, so selected and unselected tabs each return to the right background. * * !important because a :host rule loses to any app stylesheet that colours tabs from the light * DOM, and an alert nobody can see is worse than no alert. */ :host([alert]){background-color: color-mix( in srgb, var(--tab-alert-color, var(--error-fill-rest)) calc(var(${q0}, 0) * 100%), transparent ) !important;color: color-mix( in srgb, contrast-color(var(--tab-alert-color, var(--error-fill-rest))) calc(var(${q0}, 0) * 100%), currentColor ) !important}/* Reduced motion stops the clock, leaving the phase at 0, so paint a steady alert instead. */ @media (prefers-reduced-motion: reduce){:host([alert]){background-color: var(--tab-alert-color, var(--error-fill-rest)) !important;color: contrast-color(var(--tab-alert-color, var(--error-fill-rest))) !important}}`,shadowOptions:void 0},L8)),class extends W8{}.compose(Object.assign({baseName:`tabs`,template:(e,t)=>H8(e,t),styles:(e,t)=>O` ${U8(e,t)} :host{background: var(--neutral-layer-3);border-radius: calc(var(--control-corner-radius) * 1px)}:host(:not([appearance='secondary'])){background: var(--rapid-layout-item-background, var(--neutral-layer-3));border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1px));border: var(--card-border, 0)}:host([appearance='secondary']){background: transparent}:host .tablist{padding: 0;display: grid;width: max-content;margin-top: 0}:host .tabpanel{height: 100%;min-height: 0}:host([appearance='secondary']) .tablist{margin-bottom: 0}:host .end, :host .start{padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);height: calc(100% - 1px);display: flex;align-items: center}::slotted([slot='tab']:hover){color: var(--neutral-foreground-rest);background: var(--neutral-layer-1)}::slotted([role='tab']){border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px) 0 0;background: var(--tab-rest-background-color, var(--neutral-layer-4));padding: 0 calc((16 + var(--design-unit) * 2 * var(--density)) * 1px);margin-right: 2px;box-shadow: none;font-size: var(--type-ramp-minus-1-font-size);border-style: solid;border-width: var(--tab-rest-border-width, 1px);border-color: var(--tab-rest-border-color, transparent)}::slotted([role='tab'][aria-selected='true']:not([appearance='secondary'])){border-style: solid;border-width: var(--tab-active-border-width, 1px 1px 0 1px);border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));background: var(--tab-active-background-color, var(--neutral-layer-card-container))}::slotted([role='tab'][aria-selected='true']){color: var(--accent-foreground-rest);background: var(--neutral-layer-card-container)}/* stylelint-disable selector-class-pattern */ .activeIndicator{display: none}:host([appearance='secondary']) .tablist .activeIndicator{display: block;height: 1px;margin-top: unset}::slotted([role='tab'][aria-selected='true'][appearance='secondary']){background: none}::slotted([role='tab'][appearance='secondary']){margin-left: 0;box-shadow: none;background: none}:host([appearance='secondary']:hover){color: var(--neutral-foreground-rest);background: none}:host([appearance='secondary']) ::slotted([role='tabpanel']){border: 0}`,shadowOptions:void 0},G8)),class extends J8{}.compose(Object.assign({baseName:`text-area`,template:(e,t)=>K8(e,t),styles:(e,t)=>O` ${q8(e,t)} :host{display: grid;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px);padding: calc(var(--design-unit) * 2px)}:host(:hover:not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover)}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .control{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}`,shadowOptions:void 0},Y8)),class extends Q8{}.compose(Object.assign({baseName:`text-field`,template:(e,t)=>X8(e,t),styles:(e,t)=>O` ${Z8(e,t)} :host{display: block;flex: 1 1 auto;box-sizing: border-box}:host .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}:host .control-field .control{width: 100%}:host .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}:host(:hover:not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}:host(:is(:focus, :focus-within, :focus-visible):not([disabled])) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}:host input::placeholder{color: var(--neutral-foreground-hint);opacity: 75%}`,shadowOptions:$8},e5));let Wze=O` ${t5} .toast{background-color: ${Oc};border-radius: calc(var(--control-corner-radius) * 2px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest)}.top{align-items: flex-start}:host{font-size: var(--type-ramp-base-font-size);font-family: var(--body-font);line-height: var(--type-ramp-base-line-height);color: var(--neutral-foreground-rest)}.content{font-size: var(--type-ramp-minus-1-font-size)}.date{margin: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}.content-wrapper{padding: calc(var(--design-unit) * 2px)}.toast::after{background-color: var(--accent-fill-rest);border-radius: 0;height: calc(100% - calc(var(--design-unit) * 5px));margin: calc(var(--design-unit) * 0) calc(var(--design-unit) * 1px)}:host([notify='warning']) .toast::after{background-color: var(--warning-color)}:host([notify='success']) .toast::after{background-color: var(--success-color)}:host([notify='critical']) .toast::after, :host([notify='serious']) .toast::after, :host([notify='error']) .toast::after{background-color: var(--error-color)}`,Gze=i5,Kze=r5;(class extends a5{}).compose(Object.assign({baseName:`toast`,shadowOptions:Kze,styles:Wze,template:n5},Gze)),class extends c5{}.compose(Object.assign({baseName:`toolbar`,template:(e,t)=>o5(e,t),styles:(e,t)=>O` ${s5(e,t)} :host{align-items: center;color: var(--neutral-foreground-rest)}.positioning-region{align-items: center}`,shadowOptions:void 0},l5)),class extends f5{}.compose(Object.assign({baseName:`tooltip`,template:(e,t)=>u5(e,t),styles:(e,t)=>O` ${d5(e,t)} :host{visibility: visible}.tooltip{padding: calc((var(--design-unit) - 1) * 2px) calc(var(--design-unit) * 2px);text-align: center;white-space: inherit;font-weight: 400}rapid-anchored-region.bottom .tooltip{margin-top: calc(var(--design-unit) * 1px);margin-left: calc(var(--design-unit) * 2px)}rapid-anchored-region.top.right .tooltip, rapid-anchored-region.bottom.right .tooltip{margin-left: 0}`,shadowOptions:void 0},p5)),class extends g5{}.compose(Object.assign({baseName:`tree-item`,template:(e,t)=>m5(e,t),styles:(e,t)=>O` ${h5(e,t)} :host{font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest);background-color: transparent}:host(.nested) .expand-collapse-button{background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);width: calc(var(--design-unit) * 5px);height: calc(var(--design-unit) * 5px);margin-left: calc(var(--design-unit) * 2px)}:host([selected]) .positioning-region{background: var(--neutral-fill-stealth-active)}.positioning-region::before{width: calc(var(--design-unit) * 1px)}:host([selected])::after{background: var(--accent-fill-rest);background-origin: border-box;background-size: cover;background-repeat: no-repeat}:host([slot='item']) .content-region{margin-inline-start: calc(var(--design-unit) * 4px + var(--expand-collapse-button-size))}.expand-collapse-glyph{width: calc(var(--design-unit) * 3px);height: calc(var(--design-unit) * 3px)}`,shadowOptions:void 0},{expandCollapseGlyph:`
1003
1003
  <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">
1004
1004
  <path d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"/>
1005
1005
  </svg>`})),class extends y5{}.compose(Object.assign({baseName:`tree-view`,template:(e,t)=>_5(e,t),styles:(e,t)=>O` ${v5(e,t)}`,shadowOptions:void 0},b5));let qze=(e,t)=>O` ${x5(e,t)} a{color: var(--accent-fill-rest);opacity: 65%}a:hover{opacity: 100%}.url-input-link{font-family: var(--body-font);font-size: var(--type-ramp-base-font-size);top: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) / 2 * 1px)}`,Jze=T` ${S5(`rapid`)} `;(class extends w5{}).compose(Object.assign({baseName:`url-input`,template:Jze,styles:qze,shadowOptions:void 0},C5));let Yze=O` ${T5} .digit .control{height: 100%;border-radius: calc(var(--control-corner-radius) * 1px);padding: 0 calc(var(--design-unit) * 2px)}.digit .control-field .control{width: 100%}.digit .root{border-style: solid;border-width: var(--neutral-stroke-width-rest, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-rest, var(--focus-stroke-outer));background-color: var(--neutral-fill-input-rest);height: calc( (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px )}.digit:hover:not(.disabled) .root{border-style: solid;border-width: var(--neutral-stroke-width-hover, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-hover, var(--neutral-foreground-rest));background: var(--neutral-fill-input-hover);box-shadow: none}.digit:focus-within:not(.disabled) .root{border-style: solid;border-width: var(--neutral-stroke-width-focus, 1px 1px 1px 1px);border-color: var(--neutral-stroke-fill-focus, var(--accent-fill-rest));background-color: var(--neutral-fill-input-focus);box-shadow: none}.label{color: var(--neutral-foreground-hint);font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{margin: 0}`,Xze=E5;var Zze=class extends A5{};let Qze=O5,$ze=D5;Zze.compose(Object.assign({baseName:`verification-code-input`,template:Xze,styles:Yze,shadowOptions:$ze},Qze));var eBe=/* @__PURE__ */ c({Accordion:()=>tBe,AccordionItem:()=>nBe,ActionsMenu:()=>rBe,AiCriteriaSearch:()=>iBe,AiIndicator:()=>aBe,Anchor:()=>oBe,AnchoredRegion:()=>sBe,Avatar:()=>cBe,Badge:()=>lBe,Banner:()=>uBe,Breadcrumb:()=>dBe,BreadcrumbItem:()=>fBe,Button:()=>pBe,Calendar:()=>mBe,Card:()=>hBe,CategorizedMultiselect:()=>gBe,Checkbox:()=>_Be,Combobox:()=>vBe,ConnectionIndicator:()=>yBe,DatePicker:()=>bBe,DesignSystemProvider:()=>xBe,Dialog:()=>SBe,Disclosure:()=>CBe,Divider:()=>wBe,DropdownMenu:()=>TBe,EnvironmentIndicator:()=>EBe,FileUpload:()=>ABe,Filter:()=>$9,FilterBar:()=>jBe,Flipper:()=>MBe,Flyout:()=>NBe,HorizontalScroll:()=>PBe,Icon:()=>FBe,Listbox:()=>IBe,ListboxOption:()=>LBe,Menu:()=>RBe,MenuItem:()=>zBe,Modal:()=>BBe,Multiselect:()=>VBe,NotificationListener:()=>HBe,NumberField:()=>UBe,Optgroup:()=>WBe,Pill:()=>GBe,Progress:()=>KBe,ProgressRing:()=>qBe,Radio:()=>JBe,RadioGroup:()=>YBe,RapidExpressionBuilder:()=>DBe,RapidRouter:()=>XBe,RapidRuleExpressionBuilder:()=>OBe,RapidValueExpressionBuilder:()=>kBe,Scheduler:()=>ZBe,SchedulerCronBuilder:()=>QBe,SchedulerTimezone:()=>$Be,SearchBar:()=>tVe,SearchBarCombobox:()=>eVe,SectionNavigator:()=>nVe,SegmentedControl:()=>rVe,SegmentedItem:()=>iVe,Select:()=>aVe,Skeleton:()=>oVe,Slider:()=>sVe,SliderLabel:()=>cVe,Snackbar:()=>lVe,StackingIcons:()=>uVe,StatusPill:()=>dVe,Stepper:()=>fVe,StepperTab:()=>pVe,StepperTabPanel:()=>mVe,Switch:()=>hVe,SystemHealthOverlay:()=>OVe,Tab:()=>gVe,TabPanel:()=>_Ve,Tabs:()=>vVe,TextArea:()=>yVe,TextField:()=>bVe,Toast:()=>xVe,Toolbar:()=>SVe,Tooltip:()=>CVe,TreeItem:()=>wVe,TreeView:()=>TVe,UrlInput:()=>EVe,VerificationCodeInput:()=>DVe});function Q9(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}let tBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-accordion`,{...i,ref:n},r)}),nBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-accordion-item`,{...i,ref:n},r)}),rBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-actions-menu`,{...i,ref:n},r)}),iBe=e.default.forwardRef(function(t,n){let{onCriteriaChanged:r,onValidationErrors:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`criteria-changed`,t);let n=e=>l.current?.(e);return e.addEventListener(`validation-errors`,n),()=>{e.removeEventListener(`criteria-changed`,t),e.removeEventListener(`validation-errors`,n)}},[]),e.default.createElement(`rapid-ai-criteria-search`,{...o,ref:Q9(s,n)},a)}),aBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-ai-indicator`,{...i,ref:n},r)}),oBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-anchor`,{...i,ref:n},r)}),sBe=e.default.forwardRef(function(t,n){let{onLoaded:r,onPositionchange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`loaded`,t);let n=e=>l.current?.(e);return e.addEventListener(`positionchange`,n),()=>{e.removeEventListener(`loaded`,t),e.removeEventListener(`positionchange`,n)}},[]),e.default.createElement(`rapid-anchored-region`,{...o,ref:Q9(s,n)},a)}),cBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-avatar`,{...i,ref:n},r)}),lBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-badge`,{...i,ref:n},r)}),uBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-banner`,{...i,ref:n},r)}),dBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-breadcrumb`,{...i,ref:n},r)}),fBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-breadcrumb-item`,{...i,ref:n},r)}),pBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-button`,{...i,ref:n},r)}),mBe=e.default.forwardRef(function(t,n){let{onDateselected:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`dateselected`,t),()=>{e.removeEventListener(`dateselected`,t)}},[]),e.default.createElement(`rapid-calendar`,{...a,ref:Q9(o,n)},i)}),hBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-card`,{...i,ref:n},r)}),gBe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`selectionChange`,t),()=>{e.removeEventListener(`selectionChange`,t)}},[]),e.default.createElement(`rapid-categorized-multiselect`,{...a,ref:Q9(o,n)},i)}),_Be=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-checkbox`,{...i,ref:n},r)}),vBe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-combobox`,{...a,ref:Q9(o,n)},i)}),yBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-connection-indicator`,{...i,ref:n},r)}),bBe=e.default.forwardRef(function(t,n){let{onValueChanged:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`value-changed`,t),()=>{e.removeEventListener(`value-changed`,t)}},[]),e.default.createElement(`rapid-date-picker`,{...a,ref:Q9(o,n)},i)}),xBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-design-system-provider`,{...i,ref:n},r)}),SBe=e.default.forwardRef(function(t,n){let{onClose:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`close`,t),()=>{e.removeEventListener(`close`,t)}},[]),e.default.createElement(`rapid-dialog`,{...a,ref:Q9(o,n)},i)}),CBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-disclosure`,{...i,ref:n},r)}),wBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-divider`,{...i,ref:n},r)}),TBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-dropdown-menu`,{...i,ref:n},r)}),EBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-environment-indicator`,{...i,ref:n},r)}),DBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(J9)??`rapid-expression-builder`,{...u,ref:Q9(d,n)},l)}),OBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(Y9)??`rapid-rule-expression-builder`,{...u,ref:Q9(d,n)},l)}),kBe=e.default.forwardRef(function(t,n){let{onAddGroup:r,onDelGroup:i,onAddRule:a,onDelRule:o,onUpdateGroup:s,onUpdateRule:c,children:l,...u}=t,d=e.default.useRef(null),f=e.default.useRef(r);f.current=r;let p=e.default.useRef(i);p.current=i;let m=e.default.useRef(a);m.current=a;let h=e.default.useRef(o);h.current=o;let g=e.default.useRef(s);g.current=s;let _=e.default.useRef(c);return _.current=c,e.default.useLayoutEffect(()=>{let e=d.current;if(!e)return;let t=e=>f.current?.(e);e.addEventListener(`add-group`,t);let n=e=>p.current?.(e);e.addEventListener(`del-group`,n);let r=e=>m.current?.(e);e.addEventListener(`add-rule`,r);let i=e=>h.current?.(e);e.addEventListener(`del-rule`,i);let a=e=>g.current?.(e);e.addEventListener(`update-group`,a);let o=e=>_.current?.(e);return e.addEventListener(`update-rule`,o),()=>{e.removeEventListener(`add-group`,t),e.removeEventListener(`del-group`,n),e.removeEventListener(`add-rule`,r),e.removeEventListener(`del-rule`,i),e.removeEventListener(`update-group`,a),e.removeEventListener(`update-rule`,o)}},[]),e.default.createElement(customElements.getName(X9)??`rapid-value-expression-builder`,{...u,ref:Q9(d,n)},l)}),ABe=e.default.forwardRef(function(t,n){let{onFileSelected:r,onSuccess:i,onErrorOut:a,onClear:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`file-selected`,t);let n=e=>d.current?.(e);e.addEventListener(`success`,n);let r=e=>f.current?.(e);e.addEventListener(`errorOut`,r);let i=e=>p.current?.(e);return e.addEventListener(`clear`,i),()=>{e.removeEventListener(`file-selected`,t),e.removeEventListener(`success`,n),e.removeEventListener(`errorOut`,r),e.removeEventListener(`clear`,i)}},[]),e.default.createElement(`rapid-file-upload`,{...c,ref:Q9(l,n)},s)}),$9=e.default.forwardRef(function(t,n){let{onFilterChanged:r,onFilterCleared:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`filter-changed`,t);let n=e=>l.current?.(e);return e.addEventListener(`filter-cleared`,n),()=>{e.removeEventListener(`filter-changed`,t),e.removeEventListener(`filter-cleared`,n)}},[]),e.default.createElement(`rapid-filter`,{...o,ref:Q9(s,n)},a)}),jBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-filter-bar`,{...i,ref:n},r)}),MBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-flipper`,{...i,ref:n},r)}),NBe=e.default.forwardRef(function(t,n){let{onClosed:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`closed`,t),()=>{e.removeEventListener(`closed`,t)}},[]),e.default.createElement(`rapid-flyout`,{...a,ref:Q9(o,n)},i)}),PBe=e.default.forwardRef(function(t,n){let{onScrollstart:r,onScrollend:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`scrollstart`,t);let n=e=>l.current?.(e);return e.addEventListener(`scrollend`,n),()=>{e.removeEventListener(`scrollstart`,t),e.removeEventListener(`scrollend`,n)}},[]),e.default.createElement(`rapid-horizontal-scroll`,{...o,ref:Q9(s,n)},a)}),FBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-icon`,{...i,ref:n},r)}),IBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-listbox`,{...i,ref:n},r)}),LBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-option`,{...i,ref:n},r)}),RBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-menu`,{...i,ref:n},r)}),zBe=e.default.forwardRef(function(t,n){let{onOnMenuClick:r,onExpandedChange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`onMenuClick`,t);let n=e=>l.current?.(e);return e.addEventListener(`expanded-change`,n),()=>{e.removeEventListener(`onMenuClick`,t),e.removeEventListener(`expanded-change`,n)}},[]),e.default.createElement(`rapid-menu-item`,{...o,ref:Q9(s,n)},a)}),BBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-modal`,{...i,ref:n},r)}),VBe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,onClear:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`selectionChange`,t);let n=e=>l.current?.(e);return e.addEventListener(`clear`,n),()=>{e.removeEventListener(`selectionChange`,t),e.removeEventListener(`clear`,n)}},[]),e.default.createElement(`rapid-multiselect`,{...o,ref:Q9(s,n)},a)}),HBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-notification-listener`,{...i,ref:n},r)}),UBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-number-field`,{...i,ref:n},r)}),WBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-optgroup`,{...i,ref:n},r)}),GBe=e.default.forwardRef(function(t,n){let{onRemove:r,onPillClick:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`remove`,t);let n=e=>l.current?.(e);return e.addEventListener(`pill-click`,n),()=>{e.removeEventListener(`remove`,t),e.removeEventListener(`pill-click`,n)}},[]),e.default.createElement(`rapid-pill`,{...o,ref:Q9(s,n)},a)}),KBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-progress`,{...i,ref:n},r)}),qBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-progress-ring`,{...i,ref:n},r)}),JBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-radio`,{...i,ref:n},r)}),YBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-radio-group`,{...i,ref:n},r)}),XBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(customElements.getName(Z9)??`rapid-router`,{...i,ref:n},r)}),ZBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler`,{...i,ref:n},r)}),QBe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler-cron-builder`,{...i,ref:n},r)}),$Be=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-scheduler-timezone`,{...i,ref:n},r)}),eVe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-search-bar-combobox`,{...a,ref:Q9(o,n)},i)}),tVe=e.default.forwardRef(function(t,n){let{onSelectionChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`selectionChange`,t),()=>{e.removeEventListener(`selectionChange`,t)}},[]),e.default.createElement(`rapid-search-bar`,{...a,ref:Q9(o,n)},i)}),nVe=e.default.forwardRef(function(t,n){let{onSectionNavigatorSetState:r,onSectionNavigatorSetStates:i,onSectionNavigatorClearState:a,onSectionNavigatorClearAllStates:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`section-navigator-set-state`,t);let n=e=>d.current?.(e);e.addEventListener(`section-navigator-set-states`,n);let r=e=>f.current?.(e);e.addEventListener(`section-navigator-clear-state`,r);let i=e=>p.current?.(e);return e.addEventListener(`section-navigator-clear-all-states`,i),()=>{e.removeEventListener(`section-navigator-set-state`,t),e.removeEventListener(`section-navigator-set-states`,n),e.removeEventListener(`section-navigator-clear-state`,r),e.removeEventListener(`section-navigator-clear-all-states`,i)}},[]),e.default.createElement(`rapid-section-navigator`,{...c,ref:Q9(l,n)},s)}),rVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-segmented-control`,{...i,ref:n},r)}),iVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-segmented-item`,{...i,ref:n},r)}),aVe=e.default.forwardRef(function(t,n){let{onOpenChange:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`open-change`,t),()=>{e.removeEventListener(`open-change`,t)}},[]),e.default.createElement(`rapid-select`,{...a,ref:Q9(o,n)},i)}),oVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-skeleton`,{...i,ref:n},r)}),sVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-slider`,{...i,ref:n},r)}),cVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-slider-label`,{...i,ref:n},r)}),lVe=e.default.forwardRef(function(t,n){let{onAutoDismiss:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`autoDismiss`,t),()=>{e.removeEventListener(`autoDismiss`,t)}},[]),e.default.createElement(`rapid-snackbar`,{...a,ref:Q9(o,n)},i)}),uVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-stacking-icons`,{...i,ref:n},r)}),dVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-status-pill`,{...i,ref:n},r)}),fVe=e.default.forwardRef(function(t,n){let{onStepClick:r,onValidationFailure:i,onNextStep:a,onValidationSuccess:o,children:s,...c}=t,l=e.default.useRef(null),u=e.default.useRef(r);u.current=r;let d=e.default.useRef(i);d.current=i;let f=e.default.useRef(a);f.current=a;let p=e.default.useRef(o);return p.current=o,e.default.useLayoutEffect(()=>{let e=l.current;if(!e)return;let t=e=>u.current?.(e);e.addEventListener(`step-click`,t);let n=e=>d.current?.(e);e.addEventListener(`validation-failure`,n);let r=e=>f.current?.(e);e.addEventListener(`next-step`,r);let i=e=>p.current?.(e);return e.addEventListener(`validation-success`,i),()=>{e.removeEventListener(`step-click`,t),e.removeEventListener(`validation-failure`,n),e.removeEventListener(`next-step`,r),e.removeEventListener(`validation-success`,i)}},[]),e.default.createElement(`rapid-stepper`,{...c,ref:Q9(l,n)},s)}),pVe=e.default.forwardRef(function(t,n){let{onTabClicked:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`tab-clicked`,t),()=>{e.removeEventListener(`tab-clicked`,t)}},[]),e.default.createElement(`rapid-stepper-tab`,{...a,ref:Q9(o,n)},i)}),mVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-stepper-tab-panel`,{...i,ref:n},r)}),hVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-switch`,{...i,ref:n},r)}),gVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tab`,{...i,ref:n},r)}),_Ve=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tab-panel`,{...i,ref:n},r)}),vVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tabs`,{...i,ref:n},r)}),yVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-text-area`,{...i,ref:n},r)}),bVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-text-field`,{...i,ref:n},r)}),xVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-toast`,{...i,ref:n},r)}),SVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-toolbar`,{...i,ref:n},r)}),CVe=e.default.forwardRef(function(t,n){let{onDismiss:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`dismiss`,t),()=>{e.removeEventListener(`dismiss`,t)}},[]),e.default.createElement(`rapid-tooltip`,{...a,ref:Q9(o,n)},i)}),wVe=e.default.forwardRef(function(t,n){let{onExpandedChange:r,onSelectedChange:i,children:a,...o}=t,s=e.default.useRef(null),c=e.default.useRef(r);c.current=r;let l=e.default.useRef(i);return l.current=i,e.default.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=e=>c.current?.(e);e.addEventListener(`expanded-change`,t);let n=e=>l.current?.(e);return e.addEventListener(`selected-change`,n),()=>{e.removeEventListener(`expanded-change`,t),e.removeEventListener(`selected-change`,n)}},[]),e.default.createElement(`rapid-tree-item`,{...o,ref:Q9(s,n)},a)}),TVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-tree-view`,{...i,ref:n},r)}),EVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-url-input`,{...i,ref:n},r)}),DVe=e.default.forwardRef(function(t,n){let{onComplete:r,children:i,...a}=t,o=e.default.useRef(null),s=e.default.useRef(r);return s.current=r,e.default.useLayoutEffect(()=>{let e=o.current;if(!e)return;let t=e=>s.current?.(e);return e.addEventListener(`complete`,t),()=>{e.removeEventListener(`complete`,t)}},[]),e.default.createElement(`rapid-verification-code-input`,{...a,ref:Q9(o,n)},i)}),OVe=e.default.forwardRef(function(t,n){let{children:r,...i}=t;return e.default.createElement(`rapid-system-health-overlay`,{...i,ref:n},r)});if(typeof window<`u`){let e=window;e.rapid||(e.rapid={}),e.rapid.react=eBe}})(React);