@uniformdev/uniform-mcp 20.55.1 → 20.55.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +227 -219
- package/dist/server.mjs +227 -219
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -94,7 +94,7 @@ See https://reactjs.org/docs/forms.html#controlled-components`),K=R.initialPage?
|
|
|
94
94
|
`),r=[];for(let o of n)r.push("> "+o);return r.join(`
|
|
95
95
|
`)},regExp:One,replace:(t,e,n,r)=>{if(r){let i=t.getPreviousSibling();if(ku(i))return i.splice(i.getChildrenSize(),0,[Wn(),...e]),void t.remove()}let o=V4();o.append(...e),t.replace(o),r||o.select(0,0)},type:"element"},Fne={dependencies:[jl],export:t=>{if(!qm(t))return null;let e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?`
|
|
96
96
|
`+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:vO},regExpStart:Ine,replace:(t,e,n,r,o,i)=>{let s,a;if(!e&&o){if(o.length===1)r?(s=Rs(),a=n[1]+o[0]):(s=Rs(n[1]),a=o[0].startsWith(" ")?o[0].slice(1):o[0]);else{if(s=Rs(n[1]),o[0].trim().length===0)for(;o.length>0&&!o[0].length;)o.shift();else o[0]=o[0].startsWith(" ")?o[0].slice(1):o[0];for(;o.length>0&&!o[o.length-1].length;)o.pop();a=o.join(`
|
|
97
|
-
`)}let l=mt(a);s.append(l),t.append(s)}else e&&kne(l=>Rs(l?l[1]:void 0))(t,e,n,i)},type:"multiline-element"},Bne={dependencies:[$a,Ta],export:(t,e)=>Gr(t)?AE(t,e,0):null,regExp:Ane,replace:bO("bullet"),type:"element"},LTe={dependencies:[$a,Ta],export:(t,e)=>Gr(t)?AE(t,e,0):null,regExp:Mne,replace:bO("check"),type:"element"},zne={dependencies:[$a,Ta],export:(t,e)=>Gr(t)?AE(t,e,0):null,regExp:Lne,replace:bO("number"),type:"element"},jne={format:["code"],tag:"`",type:"text-format"},Vne={format:["highlight"],tag:"==",type:"text-format"},Une={format:["bold","italic"],tag:"***",type:"text-format"},Hne={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Kne={format:["bold"],tag:"**",type:"text-format"},Wne={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Gne={format:["strikethrough"],tag:"~~",type:"text-format"},Yne={format:["italic"],tag:"*",type:"text-format"},Zne={format:["italic"],intraword:!1,tag:"_",type:"text-format"},qne={dependencies:[SE],export:(t,e,n)=>{if(!CE(t)||xE(t))return null;let r=t.getTitle(),o=e(t);return r?`[${o}](${t.getURL()} "${r}")`:`[${o}](${t.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{let[,n,r,o]=e,i=bE(r,{title:o}),s=n.split("[").length-1,a=n.split("]").length-1,l=n,c="";if(s<a)return;if(s>a){let d=n.split("[");c="["+d[0],l=d.slice(1).join("[")}let u=mt(l);return u.setFormat(t.getFormat()),i.append(u),t.replace(i),c&&i.insertBefore(mt(c)),u},trigger:")",type:"text-match"},Jne=[Rne,Pne,Bne,zne],Xne=[Fne],Qne=[jne,Une,Hne,Kne,Wne,Vne,Yne,Zne,Gne],ere=[qne],ME=[...Jne,...Xne,...Qne,...ere]});var Un,jmt,Vmt,Umt,Hmt,Kmt,Wmt,Gmt,ore,Ymt,ire,Zmt,qmt,Jmt,Xmt,sre,Qmt,are,lre,egt,cre,tgt,ngt,ure,rgt,dre=ue(async()=>{"use strict";Un=await(process.env.NODE_ENV!=="production"?wne().then(()=>Sne):rre().then(()=>nre)),jmt=Un.$convertFromMarkdownString,Vmt=Un.$convertToMarkdownString,Umt=Un.BOLD_ITALIC_STAR,Hmt=Un.BOLD_ITALIC_UNDERSCORE,Kmt=Un.BOLD_STAR,Wmt=Un.BOLD_UNDERSCORE,Gmt=Un.CHECK_LIST,ore=Un.CODE,Ymt=Un.ELEMENT_TRANSFORMERS,ire=Un.HEADING,Zmt=Un.HIGHLIGHT,qmt=Un.INLINE_CODE,Jmt=Un.ITALIC_STAR,Xmt=Un.ITALIC_UNDERSCORE,sre=Un.LINK,Qmt=Un.MULTILINE_ELEMENT_TRANSFORMERS,are=Un.ORDERED_LIST,lre=Un.QUOTE,egt=Un.STRIKETHROUGH,cre=Un.TEXT_FORMAT_TRANSFORMERS,tgt=Un.TEXT_MATCH_TRANSFORMERS,ngt=Un.TRANSFORMERS,ure=Un.UNORDERED_LIST,rgt=Un.registerMarkdownShortcuts});var $ie=_e((
|
|
97
|
+
`)}let l=mt(a);s.append(l),t.append(s)}else e&&kne(l=>Rs(l?l[1]:void 0))(t,e,n,i)},type:"multiline-element"},Bne={dependencies:[$a,Ta],export:(t,e)=>Gr(t)?AE(t,e,0):null,regExp:Ane,replace:bO("bullet"),type:"element"},LTe={dependencies:[$a,Ta],export:(t,e)=>Gr(t)?AE(t,e,0):null,regExp:Mne,replace:bO("check"),type:"element"},zne={dependencies:[$a,Ta],export:(t,e)=>Gr(t)?AE(t,e,0):null,regExp:Lne,replace:bO("number"),type:"element"},jne={format:["code"],tag:"`",type:"text-format"},Vne={format:["highlight"],tag:"==",type:"text-format"},Une={format:["bold","italic"],tag:"***",type:"text-format"},Hne={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Kne={format:["bold"],tag:"**",type:"text-format"},Wne={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Gne={format:["strikethrough"],tag:"~~",type:"text-format"},Yne={format:["italic"],tag:"*",type:"text-format"},Zne={format:["italic"],intraword:!1,tag:"_",type:"text-format"},qne={dependencies:[SE],export:(t,e,n)=>{if(!CE(t)||xE(t))return null;let r=t.getTitle(),o=e(t);return r?`[${o}](${t.getURL()} "${r}")`:`[${o}](${t.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{let[,n,r,o]=e,i=bE(r,{title:o}),s=n.split("[").length-1,a=n.split("]").length-1,l=n,c="";if(s<a)return;if(s>a){let d=n.split("[");c="["+d[0],l=d.slice(1).join("[")}let u=mt(l);return u.setFormat(t.getFormat()),i.append(u),t.replace(i),c&&i.insertBefore(mt(c)),u},trigger:")",type:"text-match"},Jne=[Rne,Pne,Bne,zne],Xne=[Fne],Qne=[jne,Une,Hne,Kne,Wne,Vne,Yne,Zne,Gne],ere=[qne],ME=[...Jne,...Xne,...Qne,...ere]});var Un,jmt,Vmt,Umt,Hmt,Kmt,Wmt,Gmt,ore,Ymt,ire,Zmt,qmt,Jmt,Xmt,sre,Qmt,are,lre,egt,cre,tgt,ngt,ure,rgt,dre=ue(async()=>{"use strict";Un=await(process.env.NODE_ENV!=="production"?wne().then(()=>Sne):rre().then(()=>nre)),jmt=Un.$convertFromMarkdownString,Vmt=Un.$convertToMarkdownString,Umt=Un.BOLD_ITALIC_STAR,Hmt=Un.BOLD_ITALIC_UNDERSCORE,Kmt=Un.BOLD_STAR,Wmt=Un.BOLD_UNDERSCORE,Gmt=Un.CHECK_LIST,ore=Un.CODE,Ymt=Un.ELEMENT_TRANSFORMERS,ire=Un.HEADING,Zmt=Un.HIGHLIGHT,qmt=Un.INLINE_CODE,Jmt=Un.ITALIC_STAR,Xmt=Un.ITALIC_UNDERSCORE,sre=Un.LINK,Qmt=Un.MULTILINE_ELEMENT_TRANSFORMERS,are=Un.ORDERED_LIST,lre=Un.QUOTE,egt=Un.STRIKETHROUGH,cre=Un.TEXT_FORMAT_TRANSFORMERS,tgt=Un.TEXT_MATCH_TRANSFORMERS,ngt=Un.TRANSFORMERS,ure=Un.UNORDERED_LIST,rgt=Un.registerMarkdownShortcuts});var $ie=_e((hwt,Tie)=>{"use strict";var lLe=Object.prototype.hasOwnProperty,cLe=Object.prototype.toString;Tie.exports=function(e,n,r){if(cLe.call(n)!=="[object Function]")throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var i=0;i<o;i++)n.call(r,e[i],i,e);else for(var s in e)lLe.call(e,s)&&n.call(r,e[s],s,e)}});var ZO=_e((vwt,Nie)=>{"use strict";var uLe=$ie();Nie.exports=Tn;function Tn(t,e,n){if(arguments.length===3)return Tn.set(t,e,n);if(arguments.length===2)return Tn.get(t,e);var r=Tn.bind(Tn,t);for(var o in Tn)Tn.hasOwnProperty(o)&&(r[o]=Tn[o].bind(r,t));return r}Tn.get=function(e,n){for(var r=Array.isArray(n)?n:Tn.parse(n),o=0;o<r.length;++o){var i=r[o];if(!(typeof e=="object"&&i in e))throw new Error("Invalid reference token: "+i);e=e[i]}return e};Tn.set=function(e,n,r){var o=Array.isArray(n)?n:Tn.parse(n),i=o[0];if(o.length===0)throw Error("Can not set the root object");for(var s=0;s<o.length-1;++s){var a=o[s];typeof a!="string"&&typeof a!="number"&&(a=String(a)),!(a==="__proto__"||a==="constructor"||a==="prototype")&&(a==="-"&&Array.isArray(e)&&(a=e.length),i=o[s+1],a in e||(i.match(/^(\d+|-)$/)?e[a]=[]:e[a]={}),e=e[a])}return i==="-"&&Array.isArray(e)&&(i=e.length),e[i]=r,this};Tn.remove=function(t,e){var n=Array.isArray(e)?e:Tn.parse(e),r=n[n.length-1];if(r===void 0)throw new Error('Invalid JSON pointer for remove: "'+e+'"');var o=Tn.get(t,n.slice(0,-1));if(Array.isArray(o)){var i=+r;if(r===""&&isNaN(i))throw new Error('Invalid array index: "'+r+'"');Array.prototype.splice.call(o,i,1)}else delete o[r]};Tn.dict=function(e,n){var r={};return Tn.walk(e,function(o,i){r[i]=o},n),r};Tn.walk=function(e,n,r){var o=[];r=r||function(i){var s=Object.prototype.toString.call(i);return s==="[object Object]"||s==="[object Array]"},function i(s){uLe(s,function(a,l){o.push(String(l)),r(a)?i(a):n(a,Tn.compile(o)),o.pop()})}(e)};Tn.has=function(e,n){try{Tn.get(e,n)}catch{return!1}return!0};Tn.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")};Tn.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")};Tn.parse=function(e){if(e==="")return[];if(e.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(Tn.unescape)};Tn.compile=function(e){return e.length===0?"":"/"+e.map(Tn.escape).join("/")}});import{McpServer as oOe}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as iOe}from"@modelcontextprotocol/sdk/server/stdio.js";var mx={name:"@uniformdev/uniform-mcp",version:"20.55.1",description:"Uniform MCP Server",license:"SEE LICENSE IN LICENSE.txt",bin:{"uniform-mcp":"./dist/index.mjs"},exports:{".":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./server":{types:"./dist/server.d.mts",import:"./dist/server.mjs"}},sideEffects:!1,scripts:{build:"run-p build:stdio build:server","build:stdio":"tsup --config tsup.stdio.config.ts","build:server":"tsup --config tsup.server.config.ts",dev:"tsup --watch --config tsup.stdio.config.ts",clean:"rimraf dist",lint:'eslint "src/**/*.{js,ts,tsx}"',format:'prettier --write "src/**/*.{js,ts,tsx}"',mcp:"node dist/index.mjs"},dependencies:{"@modelcontextprotocol/sdk":"1.25.2","@types/uuid":"9.0.4","@uniformdev/canvas":"workspace:*","@uniformdev/project-map":"workspace:*","fast-json-patch":"3.1.1",immer:"10.1.3",linkedom:"0.18.12",uuid:"9.0.1",zod:"3.25.76"},files:["/dist"],publishConfig:{access:"public"},devDependencies:{"@uniformdev/design-system":"workspace:*","@uniformdev/files":"workspace:*","@uniformdev/mesh-edgehancer-sdk":"workspace:*","@uniformdev/richtext":"workspace:*"}};var tk=I(ek());var nk=(0,tk.default)(6),gx=class t extends Error{constructor(n,r,o,i,s,a){super(`${n}
|
|
98
98
|
${i}${s?" "+s:""} (${r} ${o}${a?` Request ID: ${a}`:""})`);this.errorMessage=n;this.fetchMethod=r;this.fetchUri=o;this.statusCode=i;this.statusText=s;this.requestId=a;Object.setPrototypeOf(this,t.prototype)}};var hx=class t{options;constructor(e){if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let n=e.fetch;if(!n)if(typeof window<"u")n=window.fetch.bind(window);else if(typeof fetch<"u")n=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:n,apiHost:this.ensureApiHost(e.apiHost),apiKey:e.apiKey??null,projectId:e.projectId??null,bearerToken:e.bearerToken??null,limitPolicy:e.limitPolicy??nk,bypassCache:e.bypassCache??!1}}async apiClient(e,n){return(await this.apiClientWithResponse(e,n)).body}async apiClientWithResponse(e,n){return this.options.limitPolicy(async()=>{let r=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`};this.options.bypassCache&&(r["x-bypass-cache"]="true");let{fetch:o,signal:i}=this.options,a=await vle(()=>o(e.toString(),{...n,signal:i,headers:{...n?.headers,...r}}));if(!a.ok){let l="";try{let c=await a.text();try{let u=JSON.parse(c);u.errorMessage?l=Array.isArray(u.errorMessage)?u.errorMessage.join(", "):u.errorMessage:l=c}catch{l=c}}catch{l="General error"}throw new gx(l,n?.method??"GET",e.toString(),a.status,a.statusText,t.getRequestId(a))}return n?.expectNoContent?{response:a,body:null}:{response:a,body:await a.json()}})}createUrl(e,n,r){let o=new URL(`${r??this.options.apiHost}${e}`);return Object.entries(n??{}).forEach(([i,s])=>{typeof s<"u"&&s!==null&&o.searchParams.append(i,Array.isArray(s)?s.join(","):s?.toString()??"")}),o}ensureApiHost(e){if(!e)return"https://uniform.app";if(!e?.startsWith("http"))throw new Error('Your apiHost must start with "http"');if(e.indexOf("/",8)>-1)throw new Error("Your apiHost must not contain a path element after the domain");if(e.indexOf("?")>-1)throw new Error("Your apiHost must not contain a query string");return e?.endsWith("/")&&(e=e.substring(0,e.length-1)),e}static getRequestId(e){let n=e.headers.get("apigw-requestid");if(n)return n}};async function vle(t){let n=5,r;for(;n>0&&(r=await t(),r.status===429);){let o=0;try{let a=r.clone(),l=a.headers.get("date"),c=l?new Date(l).getTime():void 0,d=(await a.json())?.info?.reset;typeof c=="number"&&typeof d=="number"&&(o=Math.max(0,Math.min(Math.round(1.1*(d-c)),1e4)))}catch{}let i=Math.pow(2,5-n)*333,s=i+Math.round(Math.random()*(i/2))*(Math.random()>.5?1:-1);await new Promise(a=>setTimeout(a,Math.max(0,o+s))),n-=1}return r}var vx=class extends hx{telemetryContext;constructor(e){e.apiHost||(e.apiHost="https://ai.uniform.global"),super(e),this.telemetryContext=e.telemetryContext}async invoke(e,n){let r={};if(this.telemetryContext){let{threadId:i,uniformClient:s,userAgent:a}=this.telemetryContext;i&&(r["x-thread-id"]=i),s&&(r["x-uniform-client"]=s),a&&(r["user-agent"]=a)}return(await this.apiClientWithResponse(new URL(`/projects/${this.options.projectId}/tools/${e}`,this.options.apiHost),{method:"POST",body:n?JSON.stringify(n):void 0,headers:Object.keys(r).length>0?r:void 0})).body}};var ik=process.env.UNIFORM_API_KEY,G5=process.env.UNIFORM_PROJECT_ID,rk=process.env.UNIFORM_API_HOST??"https://uniform.app",yle=process.env.UNIFORM_AI_API_HOST??"https://ai.uniform.global";if(!ik&&process.env.NODE_ENV!=="test")throw new Error("UNIFORM_API_KEY is not set");if(!G5&&process.env.NODE_ENV!=="test")throw new Error("UNIFORM_PROJECT_ID is not set");var ok={apiHost:rk,apiKey:ik,projectId:G5,baseWebUrl:`${rk}/projects/${G5}`},sk={...ok,toolInvoker:new vx({...ok,apiHost:yle,telemetryContext:{userAgent:`uniform-mcp/${mx.version}`,uniformClient:"mcp"}})};import{z as Pp}from"zod";var ak={displayName:"Ask Una",description:"Ask the Uniform Docs assistant, Una, questions about Uniform features, usage, and best practices.",inputSchema:Pp.object({question:Pp.string().describe(`Prompt for the uniform docs AI assistant.
|
|
99
99
|
The prompt should describe the information you are looking for.
|
|
100
100
|
You may be detailed but do not use more than 100 words.
|
|
@@ -2672,10 +2672,13 @@ to {
|
|
|
2672
2672
|
overflow: hidden;
|
|
2673
2673
|
white-space: nowrap;
|
|
2674
2674
|
`,xyt=x`
|
|
2675
|
+
/* matches the rendered height of ParameterInput (padding + line-height + border) */
|
|
2676
|
+
min-height: calc(var(--spacing-sm) * 2 + var(--fs-sm) * 1.5 + 2px);
|
|
2677
|
+
`,Cyt=x`
|
|
2675
2678
|
// this allows the button to be as wide as the text
|
|
2676
2679
|
min-width: 0;
|
|
2677
2680
|
margin-right: auto;
|
|
2678
|
-
`;function g9e(t){var e;let r=(e=h9e(t).formatToParts().find(o=>o.type==="timeZoneName"))==null?void 0:e.value;return String(t).replace(/_/g," ")+(r?` (${r})`:"")}function h9e(t){try{return Intl.DateTimeFormat("en",{timeZoneName:"shortOffset",timeZone:t})}catch(e){if(!(e instanceof RangeError))throw e;return Intl.DateTimeFormat("en",{timeZoneName:"short",timeZone:t})}}var v9e=typeof Intl<"u"&&typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):["Etc/UTC"];function y9e(t){let e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(e.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4}var
|
|
2681
|
+
`;function g9e(t){var e;let r=(e=h9e(t).formatToParts().find(o=>o.type==="timeZoneName"))==null?void 0:e.value;return String(t).replace(/_/g," ")+(r?` (${r})`:"")}function h9e(t){try{return Intl.DateTimeFormat("en",{timeZoneName:"shortOffset",timeZone:t})}catch(e){if(!(e instanceof RangeError))throw e;return Intl.DateTimeFormat("en",{timeZoneName:"short",timeZone:t})}}var v9e=typeof Intl<"u"&&typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):["Etc/UTC"];function y9e(t){let e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(e.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4}var Syt=v9e.map(t=>{let e=t;return e==="Europe/Kiev"&&(e="Europe/Kyiv"),{label:g9e(e),value:e,offset:y9e(e)}}).sort((t,e)=>t.offset!==e.offset?t.offset-e.offset:t.value.localeCompare(e.value)),wyt=(0,Tp.createContext)({clearValue(){},changeDate(){},changeTime(){}});var b9e=x`
|
|
2679
2682
|
display: grid;
|
|
2680
2683
|
grid-template-columns: max-content auto;
|
|
2681
2684
|
gap: var(--spacing-sm) var(--spacing-md);
|
|
@@ -2690,7 +2693,7 @@ to {
|
|
|
2690
2693
|
`,S9e=x`
|
|
2691
2694
|
display: flex;
|
|
2692
2695
|
margin: 0;
|
|
2693
|
-
`,w9e=wO.default.forwardRef(({items:t,variant:e="horizontal",...n},r)=>t?.length?O("dl",{ref:r,css:e==="vertical"?x9e:b9e,...n,children:t?.map(({label:o,value:i})=>ie(wO.default.Fragment,{children:[O("dt",{css:C9e,children:o}),O("dd",{css:S9e,children:typeof i=="boolean"?O(E9e,{value:i}):i})]},o))}):null);w9e.displayName="DescriptionList";var E9e=({value:t})=>O(t?woe.TbCheck:Eoe.TbMinus,{style:{color:t?"var(--accent-dark)":"var(--gray-500)"},strokeWidth:3})
|
|
2696
|
+
`,w9e=wO.default.forwardRef(({items:t,variant:e="horizontal",...n},r)=>t?.length?O("dl",{ref:r,css:e==="vertical"?x9e:b9e,...n,children:t?.map(({label:o,value:i})=>ie(wO.default.Fragment,{children:[O("dt",{css:C9e,children:o}),O("dd",{css:S9e,children:typeof i=="boolean"?O(E9e,{value:i}):i})]},o))}):null);w9e.displayName="DescriptionList";var E9e=({value:t})=>O(t?woe.TbCheck:Eoe.TbMinus,{style:{color:t?"var(--accent-dark)":"var(--gray-500)"},strokeWidth:3}),$yt=x`
|
|
2694
2697
|
&[open] {
|
|
2695
2698
|
& > summary svg {
|
|
2696
2699
|
rotate: 0deg;
|
|
@@ -2699,7 +2702,7 @@ to {
|
|
|
2699
2702
|
padding-bottom: var(--spacing-sm);
|
|
2700
2703
|
}
|
|
2701
2704
|
}
|
|
2702
|
-
|
|
2705
|
+
`,Nyt=x`
|
|
2703
2706
|
position: relative;
|
|
2704
2707
|
animation: ${g7e} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
2705
2708
|
will-change: height;
|
|
@@ -2707,13 +2710,13 @@ to {
|
|
|
2707
2710
|
&:focus-within {
|
|
2708
2711
|
z-index: 1;
|
|
2709
2712
|
}
|
|
2710
|
-
`,
|
|
2713
|
+
`,Dyt=x`
|
|
2711
2714
|
margin-left: calc(1.25rem / 2);
|
|
2712
2715
|
border-left: 1px solid var(--gray-300);
|
|
2713
2716
|
padding-top: calc(var(--spacing-md) / 2);
|
|
2714
2717
|
padding-left: var(--spacing-base);
|
|
2715
2718
|
padding-bottom: var(--spacing-sm);
|
|
2716
|
-
`,
|
|
2719
|
+
`,Lyt=x`
|
|
2717
2720
|
align-items: center;
|
|
2718
2721
|
cursor: pointer;
|
|
2719
2722
|
display: grid;
|
|
@@ -2725,12 +2728,12 @@ to {
|
|
|
2725
2728
|
&::-webkit-details-marker {
|
|
2726
2729
|
display: none;
|
|
2727
2730
|
}
|
|
2728
|
-
`,Lyt=x`
|
|
2729
|
-
padding: 0;
|
|
2730
2731
|
`,Ayt=x`
|
|
2732
|
+
padding: 0;
|
|
2733
|
+
`,Myt=x`
|
|
2731
2734
|
transition: rotate var(--duration-fast) var(--timing-ease-out);
|
|
2732
2735
|
rotate: -90deg;
|
|
2733
|
-
`,
|
|
2736
|
+
`,Oyt=x`
|
|
2734
2737
|
visibility: hidden;
|
|
2735
2738
|
`;var _9e=x`
|
|
2736
2739
|
background: transparent;
|
|
@@ -2755,7 +2758,7 @@ to {
|
|
|
2755
2758
|
`,T9e=x`
|
|
2756
2759
|
opacity: 0.3;
|
|
2757
2760
|
pointer-events: none;
|
|
2758
|
-
`,
|
|
2761
|
+
`,Ryt=(0,_oe.forwardRef)(({disableDnd:t,height:e="3.125rem",...n},r)=>O("button",{type:"button",ref:r,css:[_9e,t?T9e:null,{height:e}],disabled:t,...n})),$9e=(t="var(--white)")=>x`
|
|
2759
2762
|
background-color: ${t};
|
|
2760
2763
|
display: flex;
|
|
2761
2764
|
gap: var(--spacing-sm);
|
|
@@ -2791,7 +2794,7 @@ to {
|
|
|
2791
2794
|
overflow: auto;
|
|
2792
2795
|
padding: 0 var(--spacing-md) var(--spacing-base) var(--spacing-sm);
|
|
2793
2796
|
${fs}
|
|
2794
|
-
`,
|
|
2797
|
+
`,Fyt=x`
|
|
2795
2798
|
font-size: var(--fs-base);
|
|
2796
2799
|
`,O9e=En`
|
|
2797
2800
|
0% {
|
|
@@ -2847,13 +2850,13 @@ to {
|
|
|
2847
2850
|
&:first-of-type {
|
|
2848
2851
|
background: rgba(31, 43, 52, 0.4);
|
|
2849
2852
|
}
|
|
2850
|
-
`,Noe=(0,vi.createContext)({providerId:"",drawersRegistry:[],registerDrawer:()=>{},unregisterDrawer:()=>{},registerTakeoverStackId:()=>{},unregisterTakeoverStackId:()=>{}}),F9e=({children:t})=>{let[e,n]=(0,vi.useState)([]),r=(0,vi.useId)(),[o,i]=(0,vi.useState)(void 0);Vre({handler:()=>{var u,d;(d=(u=e.at(-1))==null?void 0:u.onRequestClose)==null||d.call(u)},shortcut:"escape"});let s=(0,vi.useCallback)(({drawer:u,onFirstRender:d})=>{n(f=>{var p,m;let g=f.findIndex(S=>Doe(S,u)),h=f[g],v=h!==void 0&&!Ere(h,u),y=!h||v,b=[...f];return v&&((p=h.onRequestClose)==null||p.call(h),b.splice(g,1)),(y||v)&&d?.(),b=[...b,{...u,registeredAt:(m=h?.registeredAt)!=null?m:Date.now(),onFirstRender:d,isFirstRender:y}].sort((S,C)=>{var w,E;return((w=S.registeredAt)!=null?w:0)-((E=C.registeredAt)!=null?E:0)}),b})},[n]),a=(0,vi.useCallback)(u=>{n(d=>d.filter(f=>!Ere(u,f)))},[n]),l=(0,vi.useCallback)(u=>{o!==u&&i(u)},[o]),c=(0,vi.useCallback)(u=>{o===u&&i(void 0)},[o]);return O(Noe.Provider,{value:{drawersRegistry:e,registerDrawer:s,unregisterDrawer:a,providerId:r,drawerTakeoverStackId:o,registerTakeoverStackId:l,unregisterTakeoverStackId:c},children:t})},IO=()=>(0,vi.useContext)(Noe);function Doe(t,e){return t?.id===e?.id&&t?.stackId===e?.stackId}function Ere(t,e){return Doe(t,e)&&t.instanceKey===e.instanceKey}var Loe="_default",Aoe=(0,Bi.createContext)({}),B9e=()=>(0,Bi.useContext)(Aoe),z9e=Bi.default.forwardRef(({minWidth:t,maxWidth:e,position:n,leftAligned:r,...o},i)=>{var s;let{stackId:a}=B9e(),{drawerTakeoverStackId:l}=IO(),c={width:o.width,minWidth:t,maxWidth:e,position:n,leftAligned:r},u=(0,Bi.useRef)((s=l??o.stackId)!=null?s:a);return u.current?O(_re,{ref:i,...o,stackId:u.current}):ie(F9e,{children:[O(_re,{ref:i,...o}),O(V9e,{stackId:Loe,...c})]})});z9e.displayName="Drawer";var _re=({ref:t,stackId:e=Loe,id:n,bgColor:r="var(--gray-50)",children:o,header:i,instanceKey:s,onRequestClose:a,leftAligned:l,width:c="medium",testId:u="side-dialog"})=>{let{registerDrawer:d,unregisterDrawer:f,providerId:p}=IO(),m=(0,Bi.useRef)(null),[g,h]=(0,Bi.useState)(null);if((0,Bi.useEffect)(()=>(d({drawer:{width:c,id:n,stackId:e,onRequestClose:a,instanceKey:s},onFirstRender:()=>{var y,b;h(j9e({providerId:p,stackId:e,id:n})),t&&"current"in t&&!((y=t.current)!=null&&y.contains(document.activeElement))&&((b=m.current)==null||b.focus({preventScroll:!0}))}}),()=>{f({id:n,stackId:e,instanceKey:s})}),[n,e,s,p,d,f]),!g)return null;let v=`dialog-header-${p}-${e}-${n}`;return O(Aoe.Provider,{value:{id:n,stackId:e,leftAligned:l},children:(0,$oe.createPortal)(ie("div",{ref:t,id:n,role:"dialog",tabIndex:-1,"aria-labelledby":v,css:$9e(r),"data-testid":u,children:[ie("div",{css:D9e,children:[i?O("div",{id:v,css:L9e,"data-testid":"header",children:i}):null,O(Xh,{ref:m,type:"button",onClick:a,css:N9e,title:"Close dialog",buttonType:"ghost","data-testid":"close-button",children:O(Ko,{icon:Toe.CgChevronRight,iconColor:"gray",size:24,css:{transform:"rotate(var(--drawer-close-icon-rotation))"}})})]}),O("div",{css:M9e,children:o})]}),g)})},j9e=t=>document.querySelector(Object.entries(Moe(t)).map(([e,n])=>`[${e}="${n}"]`).join("")),
|
|
2853
|
+
`,Noe=(0,vi.createContext)({providerId:"",drawersRegistry:[],registerDrawer:()=>{},unregisterDrawer:()=>{},registerTakeoverStackId:()=>{},unregisterTakeoverStackId:()=>{}}),F9e=({children:t})=>{let[e,n]=(0,vi.useState)([]),r=(0,vi.useId)(),[o,i]=(0,vi.useState)(void 0);Vre({handler:()=>{var u,d;(d=(u=e.at(-1))==null?void 0:u.onRequestClose)==null||d.call(u)},shortcut:"escape"});let s=(0,vi.useCallback)(({drawer:u,onFirstRender:d})=>{n(f=>{var p,m;let g=f.findIndex(S=>Doe(S,u)),h=f[g],v=h!==void 0&&!Ere(h,u),y=!h||v,b=[...f];return v&&((p=h.onRequestClose)==null||p.call(h),b.splice(g,1)),(y||v)&&d?.(),b=[...b,{...u,registeredAt:(m=h?.registeredAt)!=null?m:Date.now(),onFirstRender:d,isFirstRender:y}].sort((S,C)=>{var w,E;return((w=S.registeredAt)!=null?w:0)-((E=C.registeredAt)!=null?E:0)}),b})},[n]),a=(0,vi.useCallback)(u=>{n(d=>d.filter(f=>!Ere(u,f)))},[n]),l=(0,vi.useCallback)(u=>{o!==u&&i(u)},[o]),c=(0,vi.useCallback)(u=>{o===u&&i(void 0)},[o]);return O(Noe.Provider,{value:{drawersRegistry:e,registerDrawer:s,unregisterDrawer:a,providerId:r,drawerTakeoverStackId:o,registerTakeoverStackId:l,unregisterTakeoverStackId:c},children:t})},IO=()=>(0,vi.useContext)(Noe);function Doe(t,e){return t?.id===e?.id&&t?.stackId===e?.stackId}function Ere(t,e){return Doe(t,e)&&t.instanceKey===e.instanceKey}var Loe="_default",Aoe=(0,Bi.createContext)({}),B9e=()=>(0,Bi.useContext)(Aoe),z9e=Bi.default.forwardRef(({minWidth:t,maxWidth:e,position:n,leftAligned:r,...o},i)=>{var s;let{stackId:a}=B9e(),{drawerTakeoverStackId:l}=IO(),c={width:o.width,minWidth:t,maxWidth:e,position:n,leftAligned:r},u=(0,Bi.useRef)((s=l??o.stackId)!=null?s:a);return u.current?O(_re,{ref:i,...o,stackId:u.current}):ie(F9e,{children:[O(_re,{ref:i,...o}),O(V9e,{stackId:Loe,...c})]})});z9e.displayName="Drawer";var _re=({ref:t,stackId:e=Loe,id:n,bgColor:r="var(--gray-50)",children:o,header:i,instanceKey:s,onRequestClose:a,leftAligned:l,width:c="medium",testId:u="side-dialog"})=>{let{registerDrawer:d,unregisterDrawer:f,providerId:p}=IO(),m=(0,Bi.useRef)(null),[g,h]=(0,Bi.useState)(null);if((0,Bi.useEffect)(()=>(d({drawer:{width:c,id:n,stackId:e,onRequestClose:a,instanceKey:s},onFirstRender:()=>{var y,b;h(j9e({providerId:p,stackId:e,id:n})),t&&"current"in t&&!((y=t.current)!=null&&y.contains(document.activeElement))&&((b=m.current)==null||b.focus({preventScroll:!0}))}}),()=>{f({id:n,stackId:e,instanceKey:s})}),[n,e,s,p,d,f]),!g)return null;let v=`dialog-header-${p}-${e}-${n}`;return O(Aoe.Provider,{value:{id:n,stackId:e,leftAligned:l},children:(0,$oe.createPortal)(ie("div",{ref:t,id:n,role:"dialog",tabIndex:-1,"aria-labelledby":v,css:$9e(r),"data-testid":u,children:[ie("div",{css:D9e,children:[i?O("div",{id:v,css:L9e,"data-testid":"header",children:i}):null,O(Xh,{ref:m,type:"button",onClick:a,css:N9e,title:"Close dialog",buttonType:"ghost","data-testid":"close-button",children:O(Ko,{icon:Toe.CgChevronRight,iconColor:"gray",size:24,css:{transform:"rotate(var(--drawer-close-icon-rotation))"}})})]}),O("div",{css:M9e,children:o})]}),g)})},j9e=t=>document.querySelector(Object.entries(Moe(t)).map(([e,n])=>`[${e}="${n}"]`).join("")),Vyt=x`
|
|
2851
2854
|
background: var(--gray-50);
|
|
2852
2855
|
display: flex;
|
|
2853
2856
|
flex-direction: column;
|
|
2854
2857
|
gap: var(--spacing-base);
|
|
2855
2858
|
height: 100%;
|
|
2856
|
-
`,
|
|
2859
|
+
`,Uyt=x`
|
|
2857
2860
|
background: var(--white);
|
|
2858
2861
|
padding: var(--spacing-base);
|
|
2859
2862
|
flex: 1;
|
|
@@ -2861,29 +2864,29 @@ to {
|
|
|
2861
2864
|
overflow-y: auto;
|
|
2862
2865
|
${fs}
|
|
2863
2866
|
border-radius: var(--rounded-base);
|
|
2864
|
-
`,
|
|
2867
|
+
`,Hyt=x`
|
|
2865
2868
|
display: flex;
|
|
2866
2869
|
gap: var(--spacing-sm);
|
|
2867
2870
|
padding: 0 var(--spacing-base) var(--spacing-base);
|
|
2868
|
-
`;var Tre={narrow:"29rem",medium:"43rem",wide:"57rem"},$re=64,Nre=16,V9e=({stackId:t,position:e="absolute",width:n="medium",minWidth:r="0",maxWidth:o="100%",leftAligned:i=!1,withoutFluidWidth:s=!1,...a})=>{let{drawersRegistry:l,providerId:c}=IO(),u=l.filter(({stackId:f})=>f===t);(0,KE.useEffect)(()=>{u.forEach(({isFirstRender:f,onFirstRender:p})=>{f&&p?.()})},[u]);let d=(0,KE.useMemo)(()=>{var f;let p=(f=Tre[n])!=null?f:n;return s?p:`max(${[p,...u.map(({width:g})=>{var h;return g?(h=Tre[g])!=null?h:g:null})].filter(g=>typeof g=="string").join()})`},[u,n,s]);return u.length===0?null:O("div",{css:[A9e,{position:e},e==="sticky"?{height:"100%",marginTop:"-100%"}:void 0],...a,children:u.map(({id:f,stackId:p,onRequestClose:m},g)=>O(U9e,{index:g,totalDrawers:u.length,width:d,minWidth:r,maxWidth:o,onOverlayClick:m,leftAligned:i,children:O("div",{...Moe({providerId:c,stackId:p,id:f}),style:{width:"100%",height:"100%"}})},`${p}-${f}`))})},U9e=({index:t,totalDrawers:e,width:n,minWidth:r,maxWidth:o,leftAligned:i,onOverlayClick:s,children:a})=>{let l=Nre*t;if(e*Nre>$re){let u=t===0?0:t/e;l=Math.round($re*u)}let c=`calc(${n} - ${l}px)`;return ie(_o,{children:[O("div",{css:P9e,onClick:s}),O("div",{css:[k9e,i?R9e:null],style:{width:c,minWidth:r,maxWidth:o},"data-testid":"drawer-wrapper",children:a})]})},Moe=({providerId:t,stackId:e,id:n})=>({"data-drawer-id":`${t}-${e}-${n}`,"data-testid":"container-drawer"});var
|
|
2871
|
+
`;var Tre={narrow:"29rem",medium:"43rem",wide:"57rem"},$re=64,Nre=16,V9e=({stackId:t,position:e="absolute",width:n="medium",minWidth:r="0",maxWidth:o="100%",leftAligned:i=!1,withoutFluidWidth:s=!1,...a})=>{let{drawersRegistry:l,providerId:c}=IO(),u=l.filter(({stackId:f})=>f===t);(0,KE.useEffect)(()=>{u.forEach(({isFirstRender:f,onFirstRender:p})=>{f&&p?.()})},[u]);let d=(0,KE.useMemo)(()=>{var f;let p=(f=Tre[n])!=null?f:n;return s?p:`max(${[p,...u.map(({width:g})=>{var h;return g?(h=Tre[g])!=null?h:g:null})].filter(g=>typeof g=="string").join()})`},[u,n,s]);return u.length===0?null:O("div",{css:[A9e,{position:e},e==="sticky"?{height:"100%",marginTop:"-100%"}:void 0],...a,children:u.map(({id:f,stackId:p,onRequestClose:m},g)=>O(U9e,{index:g,totalDrawers:u.length,width:d,minWidth:r,maxWidth:o,onOverlayClick:m,leftAligned:i,children:O("div",{...Moe({providerId:c,stackId:p,id:f}),style:{width:"100%",height:"100%"}})},`${p}-${f}`))})},U9e=({index:t,totalDrawers:e,width:n,minWidth:r,maxWidth:o,leftAligned:i,onOverlayClick:s,children:a})=>{let l=Nre*t;if(e*Nre>$re){let u=t===0?0:t/e;l=Math.round($re*u)}let c=`calc(${n} - ${l}px)`;return ie(_o,{children:[O("div",{css:P9e,onClick:s}),O("div",{css:[k9e,i?R9e:null],style:{width:c,minWidth:r,maxWidth:o},"data-testid":"drawer-wrapper",children:a})]})},Moe=({providerId:t,stackId:e,id:n})=>({"data-drawer-id":`${t}-${e}-${n}`,"data-testid":"container-drawer"});var Gyt=x`
|
|
2869
2872
|
background: var(--white);
|
|
2870
2873
|
border: 1px solid var(--gray-200);
|
|
2871
2874
|
border-radius: var(--rounded-2xl);
|
|
2872
2875
|
padding: var(--spacing-lg);
|
|
2873
|
-
`,
|
|
2876
|
+
`,Yyt=x`
|
|
2874
2877
|
overflow-y: auto;
|
|
2875
2878
|
overflow-x: hidden;
|
|
2876
2879
|
${fs}
|
|
2877
|
-
`;var
|
|
2880
|
+
`;var qyt=x`
|
|
2878
2881
|
font-size: var(--fs-base);
|
|
2879
2882
|
margin: 0;
|
|
2880
|
-
`,
|
|
2883
|
+
`,Jyt=x`
|
|
2881
2884
|
color: var(--primary-action-default);
|
|
2882
2885
|
|
|
2883
2886
|
&:hover {
|
|
2884
2887
|
color: var(--primary-action-hover);
|
|
2885
2888
|
}
|
|
2886
|
-
`,
|
|
2889
|
+
`,Xyt=x`
|
|
2887
2890
|
align-items: center;
|
|
2888
2891
|
display: flex;
|
|
2889
2892
|
gap: var(--spacing-sm);
|
|
@@ -2945,7 +2948,7 @@ to {
|
|
|
2945
2948
|
`,eNe=x`
|
|
2946
2949
|
height: inherit;
|
|
2947
2950
|
width: inherit;
|
|
2948
|
-
`,tNe=({width:t,height:e,...n})=>ie("svg",{role:"img",width:t??"214",height:e??"214",viewBox:"0 0 214 214",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-testid":"broken-image",...n,children:[O("rect",{width:"214",height:"214",fill:"#F9FAFB"}),O("rect",{width:"214",height:"214",fill:"url(#pattern0)"}),ie("defs",{children:[O("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:O("use",{xlinkHref:"#image0_761_4353",transform:"scale(0.0025)"})}),O("image",{id:"image0_761_4353",width:"400",height:"400",xlinkHref:"data:image/png;base64,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UfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBuB/we75KcVO2CRagAAAABJRU5ErkJggg=="})]})]}),nNe=100;function koe({alt:t,src:e,srcSet:n,className:r,imgClassName:o,variant:i="inline",width:s,height:a,errorFallbackSrc:l,...c}){let[u,d]=(0,rl.useState)(!0),[f,p]=(0,rl.useState)(""),{currentSrc:m,currentSrcSet:g,tryFallback:h}=m7e({src:e??"",srcSet:n,errorFallbackSrc:l,logContext:"Image"}),v="The text you provided is not a valid URL";(0,rl.useEffect)(()=>{p("")},[e,n]);let y=(0,rl.useCallback)(()=>{let w="";try{if(m==="")d(!1);else{let E=String(m).startsWith("//")?`https://${m}`:String(m);if(!_6e(E,{allowRelative:!0,isSecure:!0}))throw Error(v)}w=""}catch{w=v,d(!1)}p(w)},[p,m]),b=(0,rl.useRef)(y);return b.current=y,(0,rl.useEffect)(()=>{b.current()},[m]),ie("span",{className:r,css:[Y9e,u?Z9e:null,i==="fill-container"?Q9e:null],children:[m&&!f?O("img",{...c,className:o,alt:t,src:m,srcSet:g,css:[Dre,i==="fill-container"?eNe:null,u?q9e:Lre],loading:"lazy",width:s,height:a,onLoad:()=>{p(""),m&&d(!0);let w=setTimeout(()=>{d(!1)},nNe);return()=>clearTimeout(w)},onError:()=>{if(h()){d(!0);return}p("Image failed to load"),d(!1)}}):null,m&&f?ie("span",{style:{display:"inline-flex",position:"relative",...i==="fill-container"?{}:{width:s,height:a}},children:[O(tNe,{css:[J9e,Dre,Lre],"data-testid":"broken-image"}),O(ooe,{message:f,css:X9e,truncated:!0})]}):null]})}var obt=x`
|
|
2951
|
+
`,tNe=({width:t,height:e,...n})=>ie("svg",{role:"img",width:t??"214",height:e??"214",viewBox:"0 0 214 214",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","data-testid":"broken-image",...n,children:[O("rect",{width:"214",height:"214",fill:"#F9FAFB"}),O("rect",{width:"214",height:"214",fill:"url(#pattern0)"}),ie("defs",{children:[O("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:O("use",{xlinkHref:"#image0_761_4353",transform:"scale(0.0025)"})}),O("image",{id:"image0_761_4353",width:"400",height:"400",xlinkHref:"data:image/png;base64,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UfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBsBDMtNUfKBgDEBDMtYXFKDgBuB/we75KcVO2CRagAAAABJRU5ErkJggg=="})]})]}),nNe=100;function koe({alt:t,src:e,srcSet:n,className:r,imgClassName:o,variant:i="inline",width:s,height:a,errorFallbackSrc:l,...c}){let[u,d]=(0,rl.useState)(!0),[f,p]=(0,rl.useState)(""),{currentSrc:m,currentSrcSet:g,tryFallback:h}=m7e({src:e??"",srcSet:n,errorFallbackSrc:l,logContext:"Image"}),v="The text you provided is not a valid URL";(0,rl.useEffect)(()=>{p("")},[e,n]);let y=(0,rl.useCallback)(()=>{let w="";try{if(m==="")d(!1);else{let E=String(m).startsWith("//")?`https://${m}`:String(m);if(!_6e(E,{allowRelative:!0,isSecure:!0}))throw Error(v)}w=""}catch{w=v,d(!1)}p(w)},[p,m]),b=(0,rl.useRef)(y);return b.current=y,(0,rl.useEffect)(()=>{b.current()},[m]),ie("span",{className:r,css:[Y9e,u?Z9e:null,i==="fill-container"?Q9e:null],children:[m&&!f?O("img",{...c,className:o,alt:t,src:m,srcSet:g,css:[Dre,i==="fill-container"?eNe:null,u?q9e:Lre],loading:"lazy",width:s,height:a,onLoad:()=>{p(""),m&&d(!0);let w=setTimeout(()=>{d(!1)},nNe);return()=>clearTimeout(w)},onError:()=>{if(h()){d(!0);return}p("Image failed to load"),d(!1)}}):null,m&&f?ie("span",{style:{display:"inline-flex",position:"relative",...i==="fill-container"?{}:{width:s,height:a}},children:[O(tNe,{css:[J9e,Dre,Lre],"data-testid":"broken-image"}),O(ooe,{message:f,css:X9e,truncated:!0})]}):null]})}var ibt=x`
|
|
2949
2952
|
align-items: center;
|
|
2950
2953
|
box-sizing: border-box;
|
|
2951
2954
|
border-radius: var(--rounded-base);
|
|
@@ -2975,19 +2978,19 @@ to {
|
|
|
2975
2978
|
margin: unset;
|
|
2976
2979
|
}
|
|
2977
2980
|
}
|
|
2978
|
-
`,ibt=x`
|
|
2979
|
-
border: 1px dashed var(--gray-800);
|
|
2980
2981
|
`,sbt=x`
|
|
2982
|
+
border: 1px dashed var(--gray-800);
|
|
2983
|
+
`,abt=x`
|
|
2981
2984
|
display: block;
|
|
2982
2985
|
font-weight: var(--fw-bold);
|
|
2983
2986
|
margin: 0 0 var(--spacing-base);
|
|
2984
2987
|
max-width: 13rem;
|
|
2985
|
-
`,
|
|
2988
|
+
`,lbt=x`
|
|
2986
2989
|
display: block;
|
|
2987
2990
|
max-width: 10rem;
|
|
2988
2991
|
max-height: 4rem;
|
|
2989
2992
|
margin: 0 auto;
|
|
2990
|
-
`,
|
|
2993
|
+
`,cbt=x`
|
|
2991
2994
|
color: var(--gray-500);
|
|
2992
2995
|
display: -webkit-box;
|
|
2993
2996
|
-webkit-line-clamp: 1;
|
|
@@ -2999,7 +3002,7 @@ to {
|
|
|
2999
3002
|
white-space: normal;
|
|
3000
3003
|
position: absolute;
|
|
3001
3004
|
bottom: calc(var(--spacing-base) * 3.8);
|
|
3002
|
-
`,
|
|
3005
|
+
`,ubt=x`
|
|
3003
3006
|
align-items: center;
|
|
3004
3007
|
background: var(--brand-secondary-3);
|
|
3005
3008
|
border-radius: 0 var(--rounded-md) 0 var(--rounded-md);
|
|
@@ -3013,23 +3016,23 @@ to {
|
|
|
3013
3016
|
position: absolute;
|
|
3014
3017
|
top: 0;
|
|
3015
3018
|
right: 0;
|
|
3016
|
-
`;var
|
|
3019
|
+
`;var dbt=x`
|
|
3017
3020
|
position: absolute;
|
|
3018
3021
|
bottom: var(--spacing-sm);
|
|
3019
3022
|
right: var(--spacing-xs);
|
|
3020
3023
|
max-height: 1rem;
|
|
3021
|
-
`,
|
|
3024
|
+
`,fbt=x`
|
|
3022
3025
|
font-size: var(--fs-xs);
|
|
3023
3026
|
gap: var(--spacing-sm);
|
|
3024
3027
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
3025
3028
|
text-transform: uppercase;
|
|
3026
|
-
`,
|
|
3029
|
+
`,pbt=x`
|
|
3027
3030
|
position: absolute;
|
|
3028
3031
|
bottom: var(--spacing-base);
|
|
3029
3032
|
gap: var(--spacing-sm);
|
|
3030
3033
|
font-size: var(--fs-xs);
|
|
3031
3034
|
overflow: hidden;
|
|
3032
|
-
`;var
|
|
3035
|
+
`;var gbt=x`
|
|
3033
3036
|
align-items: center;
|
|
3034
3037
|
box-sizing: border-box;
|
|
3035
3038
|
border-radius: var(--rounded-base);
|
|
@@ -3055,22 +3058,22 @@ to {
|
|
|
3055
3058
|
margin: unset;
|
|
3056
3059
|
}
|
|
3057
3060
|
}
|
|
3058
|
-
`,
|
|
3061
|
+
`,hbt=x`
|
|
3059
3062
|
width: 10rem;
|
|
3060
3063
|
height: 4rem;
|
|
3061
3064
|
margin: 0 auto;
|
|
3062
|
-
`,
|
|
3065
|
+
`,vbt=x`
|
|
3063
3066
|
width: 5rem;
|
|
3064
3067
|
height: var(--spacing-sm);
|
|
3065
3068
|
margin: var(--spacing-sm) 0;
|
|
3066
|
-
`,
|
|
3069
|
+
`,ybt=x`
|
|
3067
3070
|
animation: ${jE} 1s linear infinite alternate;
|
|
3068
3071
|
border-radius: var(--rounded-base);
|
|
3069
|
-
`;var
|
|
3072
|
+
`;var xbt=x`
|
|
3070
3073
|
position: relative;
|
|
3071
3074
|
width: 50px;
|
|
3072
3075
|
margin-bottom: var(--spacing-base);
|
|
3073
|
-
`,
|
|
3076
|
+
`,Cbt=x`
|
|
3074
3077
|
position: absolute;
|
|
3075
3078
|
inset: 0;
|
|
3076
3079
|
margin: auto;
|
|
@@ -3109,44 +3112,44 @@ to {
|
|
|
3109
3112
|
`,Mre=x`
|
|
3110
3113
|
text-decoration: none;
|
|
3111
3114
|
color: currentColor;
|
|
3112
|
-
`,
|
|
3115
|
+
`,wbt=x`
|
|
3113
3116
|
border: calc(${Foe} + 1px) solid var(--primary-action-active);
|
|
3114
3117
|
z-index: 1; // Used to elevate active state border over other Tile borders
|
|
3115
3118
|
`,Ore=x`
|
|
3116
3119
|
flex-direction: row;
|
|
3117
3120
|
justify-content: flex-start;
|
|
3118
|
-
`,iNe=(0,Poe.forwardRef)(({orientation:t="vertical",children:e,...n},r)=>{if("linkManagerComponent"in n){let{linkManagerComponent:o,...i}=n;return O(o,{css:[Are,Mre,t==="horizontal"?Ore:void 0],ref:r,...i,children:e})}return O("a",{ref:r,css:[Are,Mre,t==="horizontal"?Ore:void 0],...n,children:e})});iNe.displayName="LinkTile";var
|
|
3121
|
+
`,iNe=(0,Poe.forwardRef)(({orientation:t="vertical",children:e,...n},r)=>{if("linkManagerComponent"in n){let{linkManagerComponent:o,...i}=n;return O(o,{css:[Are,Mre,t==="horizontal"?Ore:void 0],ref:r,...i,children:e})}return O("a",{ref:r,css:[Are,Mre,t==="horizontal"?Ore:void 0],...n,children:e})});iNe.displayName="LinkTile";var Tbt=x`
|
|
3119
3122
|
overflow: visible;
|
|
3120
3123
|
|
|
3121
3124
|
&::after {
|
|
3122
3125
|
display: none;
|
|
3123
3126
|
}
|
|
3124
|
-
`;var
|
|
3127
|
+
`;var Nbt=x`
|
|
3125
3128
|
font-size: var(--fs-base);
|
|
3126
|
-
`,
|
|
3129
|
+
`,Dbt=x`
|
|
3127
3130
|
color: var(--gray-500);
|
|
3128
3131
|
font-size: var(--fs-sm);
|
|
3129
3132
|
line-height: 1.2;
|
|
3130
|
-
`;var
|
|
3133
|
+
`;var Abt=x`
|
|
3131
3134
|
position: absolute;
|
|
3132
3135
|
top: 0;
|
|
3133
3136
|
left: 0;
|
|
3134
|
-
`,
|
|
3137
|
+
`,Mbt=x`
|
|
3135
3138
|
align-items: center;
|
|
3136
3139
|
display: flex;
|
|
3137
3140
|
gap: var(--spacing-sm);
|
|
3138
3141
|
margin: 0 0 var(--spacing-md);
|
|
3139
3142
|
position: relative;
|
|
3140
|
-
`,
|
|
3143
|
+
`,Obt=x`
|
|
3141
3144
|
align-items: center;
|
|
3142
3145
|
display: flex;
|
|
3143
3146
|
gap: var(--spacing-base);
|
|
3144
3147
|
padding: 0 var(--spacing-base);
|
|
3145
|
-
`,Obt=x`
|
|
3146
|
-
margin-top: 0;
|
|
3147
3148
|
`,Ibt=x`
|
|
3148
|
-
margin-
|
|
3149
|
+
margin-top: 0;
|
|
3149
3150
|
`,kbt=x`
|
|
3151
|
+
margin-bottom: var(--spacing-base);
|
|
3152
|
+
`,Rbt=x`
|
|
3150
3153
|
background: var(--white);
|
|
3151
3154
|
display: flex;
|
|
3152
3155
|
padding: var(--spacing-base);
|
|
@@ -3155,7 +3158,7 @@ to {
|
|
|
3155
3158
|
height: 100%;
|
|
3156
3159
|
position: relative;
|
|
3157
3160
|
z-index: var(--z-10);
|
|
3158
|
-
`;var
|
|
3161
|
+
`;var Ubt=x``,Hbt=x`
|
|
3159
3162
|
animation: var(--duration-fast) var(--timing-ease-out);
|
|
3160
3163
|
align-items: flex-start;
|
|
3161
3164
|
display: grid;
|
|
@@ -3163,11 +3166,11 @@ to {
|
|
|
3163
3166
|
gap: var(--spacing-sm);
|
|
3164
3167
|
background-color: white;
|
|
3165
3168
|
flex: 1;
|
|
3166
|
-
`,
|
|
3169
|
+
`,Kbt=x`
|
|
3167
3170
|
display: flex;
|
|
3168
3171
|
background-color: white;
|
|
3169
3172
|
border-radius: var(--rounded-sm);
|
|
3170
|
-
`;var
|
|
3173
|
+
`;var Gbt=x`
|
|
3171
3174
|
/* swatch-default: gray-100 / gray-200 */
|
|
3172
3175
|
--swatch-default-bg: #f3f4f6;
|
|
3173
3176
|
--swatch-default-border: #e5e7eb;
|
|
@@ -3207,7 +3210,7 @@ to {
|
|
|
3207
3210
|
/* swatch-red: FFC6C6 / F0BBBB */
|
|
3208
3211
|
--swatch-red-bg: #ffc6c6;
|
|
3209
3212
|
--swatch-red-border: #f0bbbb;
|
|
3210
|
-
`,
|
|
3213
|
+
`,Ybt=x`
|
|
3211
3214
|
border-radius: var(--rounded-base);
|
|
3212
3215
|
border: 1px solid var(--variant-border);
|
|
3213
3216
|
background: var(--variant-bg);
|
|
@@ -3218,7 +3221,7 @@ to {
|
|
|
3218
3221
|
text-overflow: ellipsis;
|
|
3219
3222
|
white-space: nowrap;
|
|
3220
3223
|
max-width: 100%;
|
|
3221
|
-
`,
|
|
3224
|
+
`,Zbt={default:x`
|
|
3222
3225
|
// 20px
|
|
3223
3226
|
width: 1.25rem;
|
|
3224
3227
|
height: 1.25rem;
|
|
@@ -3226,7 +3229,7 @@ to {
|
|
|
3226
3229
|
// 16px
|
|
3227
3230
|
width: 1rem;
|
|
3228
3231
|
height: 1rem;
|
|
3229
|
-
`};var
|
|
3232
|
+
`};var qbt=x`
|
|
3230
3233
|
background: transparent;
|
|
3231
3234
|
border: none;
|
|
3232
3235
|
border-radius: 0 var(--rounded-base) var(--rounded-base) 0;
|
|
@@ -3235,7 +3238,7 @@ to {
|
|
|
3235
3238
|
&:hover {
|
|
3236
3239
|
color: var(--action-destructive-default);
|
|
3237
3240
|
}
|
|
3238
|
-
`,
|
|
3241
|
+
`,Jbt=x`
|
|
3239
3242
|
position: relative;
|
|
3240
3243
|
cursor: pointer;
|
|
3241
3244
|
transition:
|
|
@@ -3245,16 +3248,16 @@ to {
|
|
|
3245
3248
|
background: color-mix(in srgb, var(--variant-bg), var(--typography-base) 5%);
|
|
3246
3249
|
border-color: color-mix(in srgb, var(--variant-border), var(--typography-base) 5%);
|
|
3247
3250
|
}
|
|
3248
|
-
`,
|
|
3251
|
+
`,Xbt=x`
|
|
3249
3252
|
white-space: nowrap;
|
|
3250
3253
|
overflow: hidden;
|
|
3251
3254
|
text-overflow: ellipsis;
|
|
3252
3255
|
min-width: 0;
|
|
3253
|
-
`,
|
|
3256
|
+
`,Qbt=x`
|
|
3254
3257
|
position: absolute;
|
|
3255
3258
|
bottom: 0.1rem;
|
|
3256
3259
|
right: 0.1rem;
|
|
3257
|
-
`;var
|
|
3260
|
+
`;var txt=x`
|
|
3258
3261
|
align-items: center;
|
|
3259
3262
|
border-radius: var(--rounded-full);
|
|
3260
3263
|
border: 1px solid var(--variant-border);
|
|
@@ -3264,7 +3267,7 @@ to {
|
|
|
3264
3267
|
max-width: 100%;
|
|
3265
3268
|
min-width: 0;
|
|
3266
3269
|
overflow: hidden;
|
|
3267
|
-
`,
|
|
3270
|
+
`,nxt={xs:x`
|
|
3268
3271
|
font-size: var(--fs-xs);
|
|
3269
3272
|
gap: var(--spacing-xs);
|
|
3270
3273
|
`,sm:x`
|
|
@@ -3273,46 +3276,46 @@ to {
|
|
|
3273
3276
|
`,md:x`
|
|
3274
3277
|
font-size: var(--fs-base);
|
|
3275
3278
|
gap: var(--spacing-base);
|
|
3276
|
-
`};var
|
|
3279
|
+
`};var oxt=x`
|
|
3277
3280
|
display: grid;
|
|
3278
3281
|
gap: var(--spacing-sm);
|
|
3279
|
-
`,oxt=x`
|
|
3280
|
-
grid-template-columns: 1rem auto;
|
|
3281
3282
|
`,ixt=x`
|
|
3282
|
-
grid-template-columns: auto
|
|
3283
|
+
grid-template-columns: 1rem auto;
|
|
3283
3284
|
`,sxt=x`
|
|
3285
|
+
grid-template-columns: auto 1rem;
|
|
3286
|
+
`,axt=x`
|
|
3284
3287
|
grid-template-columns: 1rem auto 1rem;
|
|
3285
|
-
`;var
|
|
3288
|
+
`;var lxt=x`
|
|
3286
3289
|
overflow: hidden;
|
|
3287
3290
|
text-overflow: ellipsis;
|
|
3288
3291
|
white-space: nowrap;
|
|
3289
3292
|
max-width: 100%;
|
|
3290
|
-
`;var
|
|
3293
|
+
`;var uxt=x`
|
|
3291
3294
|
margin-block: var(--spacing-sm);
|
|
3292
|
-
`,
|
|
3295
|
+
`,dxt=x`
|
|
3293
3296
|
background: var(--gray-100);
|
|
3294
3297
|
margin-top: var(--spacing-sm);
|
|
3295
3298
|
position: relative;
|
|
3296
3299
|
overflow: hidden;
|
|
3297
3300
|
height: 0.25rem;
|
|
3298
|
-
`,
|
|
3301
|
+
`,fxt=x`
|
|
3299
3302
|
position: absolute;
|
|
3300
3303
|
inset: 0;
|
|
3301
3304
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
3302
|
-
`,
|
|
3305
|
+
`,pxt=x`
|
|
3303
3306
|
font-size: var(--fs-sm);
|
|
3304
|
-
`;var
|
|
3307
|
+
`;var gxt=x`
|
|
3305
3308
|
display: flex block;
|
|
3306
3309
|
flex-direction: column;
|
|
3307
3310
|
gap: var(--spacing-sm);
|
|
3308
|
-
`,
|
|
3311
|
+
`,hxt=x`
|
|
3309
3312
|
color: var(--gray-400);
|
|
3310
3313
|
font-weight: var(--fw-medium);
|
|
3311
3314
|
font-size: var(--fs-sm);
|
|
3312
3315
|
text-transform: uppercase;
|
|
3313
|
-
`;var
|
|
3316
|
+
`;var yxt=x`
|
|
3314
3317
|
position: relative;
|
|
3315
|
-
`,
|
|
3318
|
+
`,bxt=x`
|
|
3316
3319
|
background: var(--gray-50);
|
|
3317
3320
|
border-top: 1px solid var(--gray-200);
|
|
3318
3321
|
border-bottom: 1px solid var(--gray-200);
|
|
@@ -3332,7 +3335,7 @@ to {
|
|
|
3332
3335
|
margin-block: 0;
|
|
3333
3336
|
}
|
|
3334
3337
|
}
|
|
3335
|
-
`;var
|
|
3338
|
+
`;var Cxt=x`
|
|
3336
3339
|
align-items: center;
|
|
3337
3340
|
background: var(--white);
|
|
3338
3341
|
border-radius: var(--rounded-base);
|
|
@@ -3340,11 +3343,11 @@ to {
|
|
|
3340
3343
|
display: flex;
|
|
3341
3344
|
min-height: 52px;
|
|
3342
3345
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
3343
|
-
`,Cxt=x`
|
|
3344
|
-
box-shadow: var(--shadow-base);
|
|
3345
3346
|
`,Sxt=x`
|
|
3346
|
-
|
|
3347
|
+
box-shadow: var(--shadow-base);
|
|
3347
3348
|
`,wxt=x`
|
|
3349
|
+
border-color: var(--brand-secondary-3);
|
|
3350
|
+
`,Ext=x`
|
|
3348
3351
|
align-items: center;
|
|
3349
3352
|
border: none;
|
|
3350
3353
|
background: transparent;
|
|
@@ -3358,31 +3361,31 @@ to {
|
|
|
3358
3361
|
&:focus {
|
|
3359
3362
|
outline: none;
|
|
3360
3363
|
}
|
|
3361
|
-
`,
|
|
3364
|
+
`,_xt=x`
|
|
3362
3365
|
align-items: center;
|
|
3363
3366
|
cursor: pointer;
|
|
3364
3367
|
display: flex;
|
|
3365
3368
|
padding: var(--spacing-xs) var(--spacing-base) var(--spacing-xs);
|
|
3366
3369
|
flex-grow: 1;
|
|
3367
|
-
`,
|
|
3370
|
+
`,Txt=x`
|
|
3368
3371
|
align-items: center;
|
|
3369
3372
|
display: flex;
|
|
3370
3373
|
gap: var(--spacing-sm);
|
|
3371
3374
|
flex-grow: 1;
|
|
3372
3375
|
flex-wrap: wrap;
|
|
3373
|
-
|
|
3376
|
+
`,$xt=x`
|
|
3374
3377
|
position: absolute;
|
|
3375
3378
|
height: 0;
|
|
3376
3379
|
width: 0;
|
|
3377
3380
|
opacity: 0;
|
|
3378
|
-
|
|
3381
|
+
`,Nxt=x`
|
|
3379
3382
|
border-radius: var(--rounded-full);
|
|
3380
3383
|
background: var(--brand-secondary-3);
|
|
3381
3384
|
color: var(--white);
|
|
3382
3385
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
3383
3386
|
min-width: 24px;
|
|
3384
3387
|
opacity: 0;
|
|
3385
|
-
`,
|
|
3388
|
+
`,Dxt=x`
|
|
3386
3389
|
animation: ${Wre} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
3387
3390
|
`;function aNe(t){let e=t==="lg"?10:5;return En`
|
|
3388
3391
|
0%, 100% {
|
|
@@ -3498,7 +3501,7 @@ to {
|
|
|
3498
3501
|
display: grid;
|
|
3499
3502
|
grid-template-columns: repeat(${t}, minmax(250px, 1fr));
|
|
3500
3503
|
gap: var(--spacing-base);
|
|
3501
|
-
`,
|
|
3504
|
+
`,Fxt=(0,Uoe.forwardRef)(({gridCount:t=3,children:e,...n},r)=>O("div",{ref:r,"data-testid":"object-grid-container",css:ENe(t),...n,children:e})),zxt=x`
|
|
3502
3505
|
border: 1px solid var(--gray-300);
|
|
3503
3506
|
border-radius: var(--rounded-base);
|
|
3504
3507
|
background: var(--white);
|
|
@@ -3516,18 +3519,18 @@ to {
|
|
|
3516
3519
|
border: 1px solid var(--accent-dark);
|
|
3517
3520
|
}
|
|
3518
3521
|
}
|
|
3519
|
-
`,
|
|
3522
|
+
`,jxt=x`
|
|
3520
3523
|
cursor: pointer;
|
|
3521
3524
|
&:hover,
|
|
3522
3525
|
&:focus {
|
|
3523
3526
|
border: 1px solid var(--accent-dark);
|
|
3524
3527
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
3525
3528
|
}
|
|
3526
|
-
`,
|
|
3529
|
+
`,Vxt=x`
|
|
3527
3530
|
display: flex;
|
|
3528
3531
|
flex: 1 1 0;
|
|
3529
3532
|
position: relative;
|
|
3530
|
-
`,
|
|
3533
|
+
`,Uxt=x`
|
|
3531
3534
|
background: var(--gray-50);
|
|
3532
3535
|
border-radius: var(--rounded-base) var(--rounded-base) 0 0;
|
|
3533
3536
|
position: relative;
|
|
@@ -3538,57 +3541,57 @@ to {
|
|
|
3538
3541
|
overflow: hidden;
|
|
3539
3542
|
height: 100%;
|
|
3540
3543
|
z-index: 0;
|
|
3541
|
-
`,
|
|
3544
|
+
`,Hxt=x`
|
|
3542
3545
|
display: grid;
|
|
3543
3546
|
grid-template-columns: 1fr auto;
|
|
3544
3547
|
padding: var(--spacing-sm);
|
|
3545
3548
|
gap: var(--spacing-sm);
|
|
3546
3549
|
min-height: 52px;
|
|
3547
3550
|
width: 100%;
|
|
3548
|
-
`,Hxt=x`
|
|
3549
|
-
min-width: 0;
|
|
3550
3551
|
`,Kxt=x`
|
|
3552
|
+
min-width: 0;
|
|
3553
|
+
`,Wxt=x`
|
|
3551
3554
|
object-fit: cover;
|
|
3552
3555
|
width: 100%;
|
|
3553
3556
|
height: auto;
|
|
3554
|
-
`,
|
|
3557
|
+
`,Gxt=x`
|
|
3555
3558
|
color: var(--gray-500);
|
|
3556
3559
|
font-size: var(--fs-sm);
|
|
3557
3560
|
white-space: nowrap;
|
|
3558
3561
|
overflow: hidden;
|
|
3559
3562
|
text-overflow: ellipsis;
|
|
3560
3563
|
max-width: 100%;
|
|
3561
|
-
`;var
|
|
3564
|
+
`;var Zxt=x`
|
|
3562
3565
|
aspect-ratio: 16/9;
|
|
3563
3566
|
max-width: 100%;
|
|
3564
3567
|
max-height: 100%;
|
|
3565
3568
|
height: inherit;
|
|
3566
3569
|
width: inherit;
|
|
3567
3570
|
object-fit: contain;
|
|
3568
|
-
`,
|
|
3571
|
+
`,qxt=x`
|
|
3569
3572
|
aspect-ratio: 16/9;
|
|
3570
3573
|
width: 100%;
|
|
3571
3574
|
height: 100%;
|
|
3572
|
-
`,
|
|
3575
|
+
`,Jxt=x`
|
|
3573
3576
|
display: flex;
|
|
3574
3577
|
width: 100%;
|
|
3575
3578
|
height: 100%;
|
|
3576
3579
|
padding: var(--spacing-sm);
|
|
3577
|
-
`,
|
|
3580
|
+
`,Xxt=x`
|
|
3578
3581
|
position: relative;
|
|
3579
3582
|
display: flex;
|
|
3580
3583
|
align-items: center;
|
|
3581
3584
|
justify-content: center;
|
|
3582
3585
|
flex: 1;
|
|
3583
3586
|
height: 100%;
|
|
3584
|
-
`,
|
|
3587
|
+
`,Qxt=x`
|
|
3585
3588
|
position: absolute;
|
|
3586
3589
|
width: 60%;
|
|
3587
3590
|
height: auto;
|
|
3588
3591
|
aspect-ratio: 1;
|
|
3589
3592
|
opacity: 0.05;
|
|
3590
3593
|
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
3591
|
-
`,
|
|
3594
|
+
`,eCt=x`
|
|
3592
3595
|
align-items: center;
|
|
3593
3596
|
background: var(--gray-50);
|
|
3594
3597
|
display: flex;
|
|
@@ -3598,13 +3601,13 @@ to {
|
|
|
3598
3601
|
z-index: 1;
|
|
3599
3602
|
width: 24px;
|
|
3600
3603
|
height: 24px;
|
|
3601
|
-
`,
|
|
3604
|
+
`,tCt=x`
|
|
3602
3605
|
border-bottom-right-radius: var(--rounded-base);
|
|
3603
3606
|
left: var(--spacing-sm);
|
|
3604
|
-
`,
|
|
3607
|
+
`,nCt=x`
|
|
3605
3608
|
border-bottom-left-radius: var(--rounded-base);
|
|
3606
3609
|
right: var(--spacing-sm);
|
|
3607
|
-
`,
|
|
3610
|
+
`,rCt=x`
|
|
3608
3611
|
align-items: stretch;
|
|
3609
3612
|
border: none;
|
|
3610
3613
|
background: none;
|
|
@@ -3616,17 +3619,17 @@ to {
|
|
|
3616
3619
|
&:hover {
|
|
3617
3620
|
outline: none;
|
|
3618
3621
|
}
|
|
3619
|
-
`,
|
|
3622
|
+
`,oCt=x`
|
|
3620
3623
|
position: absolute;
|
|
3621
3624
|
bottom: var(--spacing-base);
|
|
3622
|
-
`,oCt=x`
|
|
3623
|
-
left: var(--spacing-base);
|
|
3624
3625
|
`,iCt=x`
|
|
3625
|
-
|
|
3626
|
+
left: var(--spacing-base);
|
|
3626
3627
|
`,sCt=x`
|
|
3628
|
+
right: var(--spacing-base);
|
|
3629
|
+
`,aCt=x`
|
|
3627
3630
|
animation: ${Wre} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
3628
3631
|
opacity: 0;
|
|
3629
|
-
`;var
|
|
3632
|
+
`;var cCt=x`
|
|
3630
3633
|
color: var(--gray-500);
|
|
3631
3634
|
overflow: hidden;
|
|
3632
3635
|
text-overflow: ellipsis;
|
|
@@ -3634,22 +3637,22 @@ to {
|
|
|
3634
3637
|
min-width: 0;
|
|
3635
3638
|
max-width: 100%;
|
|
3636
3639
|
font-size: var(--fs-sm);
|
|
3637
|
-
`,
|
|
3640
|
+
`,uCt=x`
|
|
3638
3641
|
min-width: 50px;
|
|
3639
|
-
`;var
|
|
3642
|
+
`;var fCt=x`
|
|
3640
3643
|
border-radius: var(--rounded-base);
|
|
3641
3644
|
display: flex;
|
|
3642
3645
|
flex-direction: column;
|
|
3643
3646
|
gap: var(--spacing-sm);
|
|
3644
3647
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
3645
|
-
`;var
|
|
3648
|
+
`;var pCt=x`
|
|
3646
3649
|
aspect-ratio: 16/9;
|
|
3647
3650
|
max-width: 100%;
|
|
3648
3651
|
max-height: 100%;
|
|
3649
3652
|
height: auto;
|
|
3650
3653
|
padding: var(--spacing-sm);
|
|
3651
3654
|
overflow: hidden;
|
|
3652
|
-
`,
|
|
3655
|
+
`,mCt=x`
|
|
3653
3656
|
animation: ${t0} 1s linear infinite alternate;
|
|
3654
3657
|
border-radius: var(--rounded-base);
|
|
3655
3658
|
background: var(--gray-300);
|
|
@@ -3657,13 +3660,13 @@ to {
|
|
|
3657
3660
|
width: 100%;
|
|
3658
3661
|
height: auto;
|
|
3659
3662
|
aspect-ratio: 1;
|
|
3660
|
-
`,
|
|
3663
|
+
`,gCt=x`
|
|
3661
3664
|
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
3662
3665
|
min-height: 52px;
|
|
3663
|
-
`,
|
|
3666
|
+
`,hCt=x`
|
|
3664
3667
|
flex-grow: 1;
|
|
3665
3668
|
gap: var(--spacing-xs);
|
|
3666
|
-
`;var
|
|
3669
|
+
`;var yCt=x`
|
|
3667
3670
|
background: var(--white);
|
|
3668
3671
|
display: grid;
|
|
3669
3672
|
gap: var(--spacing-sm);
|
|
@@ -3682,21 +3685,21 @@ to {
|
|
|
3682
3685
|
background: var(--gray-50);
|
|
3683
3686
|
outline: none;
|
|
3684
3687
|
}
|
|
3685
|
-
`,yCt=x`
|
|
3686
|
-
align-items: center;
|
|
3687
3688
|
`,bCt=x`
|
|
3689
|
+
align-items: center;
|
|
3690
|
+
`,xCt=x`
|
|
3688
3691
|
display: grid;
|
|
3689
3692
|
gap: var(--spacing-sm);
|
|
3690
3693
|
justify-content: space-between;
|
|
3691
3694
|
flex-grow: 1;
|
|
3692
|
-
`,
|
|
3695
|
+
`,CCt=x`
|
|
3693
3696
|
display: flex;
|
|
3694
3697
|
gap: var(--spacing-sm);
|
|
3695
|
-
`,
|
|
3698
|
+
`,SCt=x`
|
|
3696
3699
|
> [role='listitem']:not(:first-of-type) {
|
|
3697
3700
|
border-top: 1px solid var(--gray-200);
|
|
3698
3701
|
}
|
|
3699
|
-
`,
|
|
3702
|
+
`,wCt=x`
|
|
3700
3703
|
align-items: center;
|
|
3701
3704
|
background: var(--gray-100);
|
|
3702
3705
|
color: var(--gray-500);
|
|
@@ -3705,30 +3708,30 @@ to {
|
|
|
3705
3708
|
height: 45px;
|
|
3706
3709
|
text-align: center;
|
|
3707
3710
|
font-size: var(--fs-xs);
|
|
3708
|
-
`,
|
|
3711
|
+
`,ECt=x`
|
|
3709
3712
|
object-fit: cover;
|
|
3710
3713
|
width: 100%;
|
|
3711
3714
|
height: 100%;
|
|
3712
|
-
`,
|
|
3715
|
+
`,_Ct=x`
|
|
3713
3716
|
animation: ${jE} 1s linear infinite alternate;
|
|
3714
3717
|
background: var(--white);
|
|
3715
3718
|
display: flex;
|
|
3716
3719
|
gap: var(--spacing-sm);
|
|
3717
3720
|
flex-grow: 1;
|
|
3718
3721
|
padding: var(--spacing-sm);
|
|
3719
|
-
`,
|
|
3722
|
+
`,TCt=x`
|
|
3720
3723
|
flex-grow: 1;
|
|
3721
|
-
`;var
|
|
3724
|
+
`;var $Ct=x`
|
|
3722
3725
|
animation: ${t0} 1s linear infinite alternate;
|
|
3723
3726
|
border-radius: var(--rounded-base);
|
|
3724
3727
|
background: var(--gray-300);
|
|
3725
3728
|
display: block;
|
|
3726
3729
|
width: 80px;
|
|
3727
3730
|
height: 55px;
|
|
3728
|
-
|
|
3731
|
+
`,NCt=x`
|
|
3729
3732
|
display: flex;
|
|
3730
3733
|
gap: var(--spacing-xs);
|
|
3731
|
-
`;var
|
|
3734
|
+
`;var LCt=x`
|
|
3732
3735
|
display: flex;
|
|
3733
3736
|
flex-direction: column;
|
|
3734
3737
|
gap: var(--spacing-xs);
|
|
@@ -3737,27 +3740,27 @@ to {
|
|
|
3737
3740
|
align-items: center;
|
|
3738
3741
|
flex-direction: row;
|
|
3739
3742
|
}
|
|
3740
|
-
`,
|
|
3743
|
+
`,ACt=x`
|
|
3741
3744
|
line-height: 1.25;
|
|
3742
|
-
`;var
|
|
3745
|
+
`;var OCt=ft`
|
|
3743
3746
|
align-items: center;
|
|
3744
3747
|
display: flex;
|
|
3745
|
-
`,OCt=ft`
|
|
3746
|
-
opacity: var(--opacity-50);
|
|
3747
3748
|
`,ICt=ft`
|
|
3748
|
-
|
|
3749
|
+
opacity: var(--opacity-50);
|
|
3749
3750
|
`,kCt=ft`
|
|
3750
|
-
|
|
3751
|
-
padding: var(--spacing-sm) var(--spacing-base);
|
|
3751
|
+
cursor: pointer-default;
|
|
3752
3752
|
`,RCt=ft`
|
|
3753
|
+
display: block;
|
|
3753
3754
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
3754
3755
|
`,PCt=ft`
|
|
3756
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
3757
|
+
`,FCt=ft`
|
|
3755
3758
|
border-radius: var(--rounded-base);
|
|
3756
3759
|
background: var(--gray-200);
|
|
3757
|
-
`,
|
|
3760
|
+
`,BCt=ft`
|
|
3758
3761
|
margin-left: var(--spacing-xs);
|
|
3759
3762
|
margin-right: var(--spacing-xs);
|
|
3760
|
-
`;var Hoe=(0,GE.createContext)({id:"",label:"",hiddenLabel:void 0,errorMessage:void 0,handleManuallySetErrorMessage:()=>{}}),vd=()=>{let{id:t,label:e,hiddenLabel:n,errorMessage:r,handleManuallySetErrorMessage:o}=(0,GE.useContext)(Hoe);return{id:t,label:e,hiddenLabel:n,errorMessage:r,handleManuallySetErrorMessage:o}},
|
|
3763
|
+
`;var Hoe=(0,GE.createContext)({id:"",label:"",hiddenLabel:void 0,errorMessage:void 0,handleManuallySetErrorMessage:()=>{}}),vd=()=>{let{id:t,label:e,hiddenLabel:n,errorMessage:r,handleManuallySetErrorMessage:o}=(0,GE.useContext)(Hoe);return{id:t,label:e,hiddenLabel:n,errorMessage:r,handleManuallySetErrorMessage:o}},jCt=x`
|
|
3761
3764
|
align-items: center;
|
|
3762
3765
|
border: none;
|
|
3763
3766
|
border-radius: var(--rounded-base);
|
|
@@ -3782,7 +3785,7 @@ to {
|
|
|
3782
3785
|
&:focus {
|
|
3783
3786
|
outline: none;
|
|
3784
3787
|
}
|
|
3785
|
-
`;var
|
|
3788
|
+
`;var UCt=x`
|
|
3786
3789
|
--hover-color: var(--accent-dark-hover);
|
|
3787
3790
|
--active-color: var(--accent-dark-active);
|
|
3788
3791
|
border: 1px solid transparent;
|
|
@@ -3806,7 +3809,7 @@ to {
|
|
|
3806
3809
|
opacity: 0.5;
|
|
3807
3810
|
cursor: default;
|
|
3808
3811
|
}
|
|
3809
|
-
`,
|
|
3812
|
+
`,HCt=x`
|
|
3810
3813
|
--text-color: var(--typography-inverted);
|
|
3811
3814
|
&:hover,
|
|
3812
3815
|
&:focus,
|
|
@@ -3822,7 +3825,7 @@ to {
|
|
|
3822
3825
|
background: var(--active-color);
|
|
3823
3826
|
color: var(--text-color);
|
|
3824
3827
|
}
|
|
3825
|
-
`,
|
|
3828
|
+
`,KCt=x`
|
|
3826
3829
|
--text-color: var(--typography-light);
|
|
3827
3830
|
&:hover:not([aria-disabled='true']),
|
|
3828
3831
|
&:focus:not([aria-disabled='true']),
|
|
@@ -3834,7 +3837,7 @@ to {
|
|
|
3834
3837
|
&[aria-pressed='true']:not([aria-disabled='true']) {
|
|
3835
3838
|
border-color: var(--active-color);
|
|
3836
3839
|
}
|
|
3837
|
-
`,
|
|
3840
|
+
`,WCt=x`
|
|
3838
3841
|
--text-color: var(--typography-inverted);
|
|
3839
3842
|
box-shadow: inset 0 0 0 1px transparent;
|
|
3840
3843
|
&:hover,
|
|
@@ -3848,17 +3851,17 @@ to {
|
|
|
3848
3851
|
background: var(--active-color);
|
|
3849
3852
|
border-color: var(--active-color);
|
|
3850
3853
|
}
|
|
3851
|
-
`;var
|
|
3854
|
+
`;var YCt=x`
|
|
3852
3855
|
align-items: center;
|
|
3853
3856
|
display: flex;
|
|
3854
3857
|
gap: var(--spacing-base);
|
|
3855
3858
|
justify-content: space-between;
|
|
3856
3859
|
margin-bottom: var(--spacing-sm);
|
|
3857
|
-
`,
|
|
3860
|
+
`,ZCt=x`
|
|
3858
3861
|
align-items: center;
|
|
3859
3862
|
display: flex;
|
|
3860
3863
|
gap: var(--spacing-sm);
|
|
3861
|
-
`,
|
|
3864
|
+
`,qCt=x`
|
|
3862
3865
|
text-overflow: ellipsis;
|
|
3863
3866
|
white-space: nowrap;
|
|
3864
3867
|
overflow: hidden;
|
|
@@ -3882,7 +3885,7 @@ to {
|
|
|
3882
3885
|
font-weight: var(--fw-medium);
|
|
3883
3886
|
margin-bottom: var(--spacing-base);
|
|
3884
3887
|
width: 100%;
|
|
3885
|
-
`,
|
|
3888
|
+
`,QCt=(0,Koe.forwardRef)(({legend:t,isDisabled:e,children:n,...r},o)=>ie("fieldset",{css:$Ne,disabled:e,ref:o,...r,children:[O("legend",{css:NNe,children:t}),n]})),DNe=x`
|
|
3886
3889
|
margin-top: var(--spacing-xs);
|
|
3887
3890
|
background: var(--gray-50);
|
|
3888
3891
|
padding: var(--spacing-sm);
|
|
@@ -3992,6 +3995,11 @@ to {
|
|
|
3992
3995
|
cursor: not-allowed;
|
|
3993
3996
|
color: var(--gray-400);
|
|
3994
3997
|
}
|
|
3998
|
+
|
|
3999
|
+
&::-webkit-calendar-picker-indicator {
|
|
4000
|
+
color: var(--gray-500);
|
|
4001
|
+
opacity: var(--opacity-50);
|
|
4002
|
+
}
|
|
3995
4003
|
`,PNe=x`
|
|
3996
4004
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
|
3997
4005
|
background-position: right var(--spacing-sm) center;
|
|
@@ -4001,7 +4009,7 @@ to {
|
|
|
4001
4009
|
`,qoe=x`
|
|
4002
4010
|
display: flex; // used to correct overflow with chrome textarea
|
|
4003
4011
|
position: relative;
|
|
4004
|
-
`,
|
|
4012
|
+
`,o2t=x`
|
|
4005
4013
|
align-items: center;
|
|
4006
4014
|
background: var(--white);
|
|
4007
4015
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -4130,7 +4138,7 @@ to {
|
|
|
4130
4138
|
`,HNe=x`
|
|
4131
4139
|
resize: vertical;
|
|
4132
4140
|
min-height: 2rem;
|
|
4133
|
-
`,
|
|
4141
|
+
`,i2t=x`
|
|
4134
4142
|
align-items: center;
|
|
4135
4143
|
appearance: none;
|
|
4136
4144
|
box-sizing: border-box;
|
|
@@ -4217,7 +4225,7 @@ to {
|
|
|
4217
4225
|
flex-grow: 1;
|
|
4218
4226
|
position: relative;
|
|
4219
4227
|
max-width: 100%;
|
|
4220
|
-
`,
|
|
4228
|
+
`,c2t=x`
|
|
4221
4229
|
background: var(--brand-secondary-6);
|
|
4222
4230
|
border-radius: var(--rounded-sm);
|
|
4223
4231
|
padding: var(--spacing-sm);
|
|
@@ -4234,7 +4242,7 @@ to {
|
|
|
4234
4242
|
right: 0;
|
|
4235
4243
|
`,yd=t=>{let{id:e,label:n,caption:r,captionTestId:o,errorMessage:i,errorTestId:s,infoMessage:a,warningMessage:l,hiddenLabel:c,labelLeadingIcon:u,menuItems:d,title:f,hasOverriddenValue:p,onResetOverriddenValue:m,...g}=t;return{shellProps:{id:e,label:n,caption:r,captionTestId:o,errorMessage:i,infoMessage:a,warningMessage:l,errorTestId:s,hiddenLabel:c,labelLeadingIcon:u,menuItems:d,title:f,hasOverriddenValue:p,onResetOverriddenValue:m},innerProps:g}},bd=({label:t,labelLeadingIcon:e,labelTrailingIcon:n,hiddenLabel:r,id:o,errorMessage:i,warningMessage:s,infoMessage:a,caption:l,errorTestId:c,captionTestId:u,menuItems:d,actionItems:f,hasOverriddenValue:p,onResetOverriddenValue:m,title:g,children:h,isParameterGroup:v=!1,menuWithoutPortal:y,...b})=>{let[S,C]=(0,Yoe.useState)(void 0),w=_=>C(_),E=i||S;return ie("div",{css:RNe,...b,id:o,children:[r||g?null:ie(Ire,{id:o,css:EO,children:[e??null,t,n??null]}),g?ie(Ire,{id:o,asSpan:!0,testId:"parameter-label",children:[e??null,g,n??null]}):null,ie("div",{css:qoe,children:[f?O("div",{"data-action-bar":!0,css:[Joe,VNe,d?x`
|
|
4236
4244
|
right: var(--spacing-md);
|
|
4237
|
-
`:void 0],children:f}):null,d?O(ZNe,{label:`${t} menu`,disabled:b.disabled,withoutPortal:y,children:d}):null,O(Hoe.Provider,{value:{id:o,label:t,hiddenLabel:r,errorMessage:E,handleManuallySetErrorMessage:_=>w(_)},children:v?O("div",{style:{flexGrow:1},children:h}):ie(XNe,{children:[h,p&&m?O(QNe,{onClick:m,tooltipProps:{portal:!y}}):null]})})]}),O(r0,{helperMessageTestId:u,helperMessage:l,errorTestId:c,errorMessage:E,warningMessage:s,infoMessage:a})]})},XNe=({children:t})=>O("div",{css:qNe,children:t}),QNe=t=>O(FE,{title:"The default value has been overridden",...t.tooltipProps,children:O("button",{type:"button",css:JNe,...t,children:O("span",{hidden:!0,children:"reset overridden value to default"})})}),
|
|
4245
|
+
`:void 0],children:f}):null,d?O(ZNe,{label:`${t} menu`,disabled:b.disabled,withoutPortal:y,children:d}):null,O(Hoe.Provider,{value:{id:o,label:t,hiddenLabel:r,errorMessage:E,handleManuallySetErrorMessage:_=>w(_)},children:v?O("div",{style:{flexGrow:1},children:h}):ie(XNe,{children:[h,p&&m?O(QNe,{onClick:m,tooltipProps:{portal:!y}}):null]})})]}),O(r0,{helperMessageTestId:u,helperMessage:l,errorTestId:c,errorMessage:E,warningMessage:s,infoMessage:a})]})},XNe=({children:t})=>O("div",{css:qNe,children:t}),QNe=t=>O(FE,{title:"The default value has been overridden",...t.tooltipProps,children:O("button",{type:"button",css:JNe,...t,children:O("span",{hidden:!0,children:"reset overridden value to default"})})}),f2t=(0,Sb.forwardRef)(({children:t,...e},n)=>{let{shellProps:r,innerProps:o}=yd(e);return ie(bd,{"data-test-id":"parameter-image",...r,children:[O(e8e,{ref:n,...o}),t]})}),e8e=(0,Sb.forwardRef)((t,e)=>{let{value:n}=t,{id:r,label:o,hiddenLabel:i,errorMessage:s}=vd(),a=(0,Sb.useDeferredValue)(n);return ie(_o,{children:[O("input",{css:wb,type:"text",id:r,ref:e,"aria-label":i&&typeof o=="string"?o:void 0,autoComplete:"off",...t}),s||t.disablePreview?null:O(ONe,{imageSrc:a})]})}),m2t=(0,FO.forwardRef)((t,e)=>{let{shellProps:n,innerProps:r}=yd(t);return O(bd,{"data-testid":"parameter-input",...n,children:O(t8e,{ref:e,...r})})}),t8e=(0,FO.forwardRef)(({enableMouseWheel:t=!1,...e},n)=>{let{id:r,label:o,hiddenLabel:i}=vd(),s=t!==!0&&e.type==="number";return O("input",{css:wb,id:r,type:e.type||"text","aria-label":i&&typeof o=="string"?o:void 0,autoComplete:"off",ref:n,onWheel:s?coe:void 0,...e})});var h2t=(0,BO.forwardRef)(({disabled:t,onConnectLink:e,externalLink:n,...r},o)=>{let{shellProps:i,innerProps:s}=yd(r);return O(bd,{"data-testid":"link-parameter-editor",...i,label:s.value?i.label:"",title:!s.value&&typeof i.label=="string"?i.label:void 0,children:O(n8e,{onConnectLink:e,externalLink:n,disabled:t,ref:o,...s})})}),n8e=(0,BO.forwardRef)(({externalLink:t,onConnectLink:e,disabled:n,buttonText:r="Select link",...o},i)=>{let{id:s,label:a,hiddenLabel:l}=vd();return o.value?ie("div",{css:qoe,children:[O("input",{type:"text",css:[wb,GNe(!!t)],readOnly:!!o.value,id:s,ref:i,"aria-label":l&&typeof a=="string"?a:void 0,...o}),ie("div",{css:WNe,children:[O(Xh,{buttonType:"ghost",size:"sm",disabled:n,onClick:e,title:"edit current selection","data-testid":"edit-current-selection",children:"edit"}),t?O("a",{href:t,css:YNe,title:"Open link in new tab",target:"_blank",rel:"noopener noreferrer",children:O(Ko,{icon:"arrows-expand-up-right",iconColor:"currentColor",size:"1rem"})}):null]})]}):O("div",{css:KNe,children:O(Xh,{buttonType:"ghost",size:"sm",disabled:n,onClick:e,children:r})})});var Ep="20px",kE=x`
|
|
4238
4246
|
background: var(--white);
|
|
4239
4247
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cline x1='4' y1='9' x2='16' y2='9' stroke='%236b7280' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
4240
4248
|
background-repeat: no-repeat;
|
|
@@ -4510,17 +4518,17 @@ to {
|
|
|
4510
4518
|
appearance: textfield;
|
|
4511
4519
|
-moz-appearance: textfield;
|
|
4512
4520
|
}
|
|
4513
|
-
`;function mb(t){return Math.ceil(t.length*9.799999999999999+24)}function v8e(t){if(t<=0)return[];if(t===1)return[[0]];if(t===2)return[[0,t-1]];let e=[];if(e.push([0,t-1]),t%2===1)e.push([Math.floor(t/2)]);else{let r=Math.floor(t/2)-1,o=Math.floor(t/2);e.push([r,o])}let n=4;for(;n<=t;){let r=[];for(let o=1;o<n;o+=2){let i=Math.round(o/n*(t-1));i>0&&i<t-1&&r.push(i)}r.length>0&&e.push(r),n*=2}return e}function SO(t,e,n,r,o){let i=t/100*o,s=n/100*o,a=8,l=i-e/2-a/2,c=i+e/2+a/2,u=s-r/2-a/2,d=s+r/2+a/2;return!(c<u||d<l)}function y8e(t,e,n){let r=t.map((a,l)=>({tick:a,index:l})).filter(({tick:a})=>a.label);if(r.length===0)return[];let o=e!==void 0?r.findIndex(({tick:a})=>a.position===e):-1,i=v8e(r.length),s=new Set(i[0]||[]);o!==-1&&s.add(o);for(let a=1;a<i.length;a++){let l=new Set(s);for(let f of i[a])l.add(f);let c=Math.max(2,Math.floor(n/100));if(l.size>c)break;let u=Array.from(l).sort((f,p)=>f-p),d=!1;for(let f=0;f<u.length-1;f++){let p=r[u[f]],m=r[u[f+1]],g=mb(p.tick.label||""),h=mb(m.tick.label||"");if(SO(p.tick.percentage,g,m.tick.percentage,h,n)){d=!0;break}}if(!d)s=l;else break}if(o!==-1&&s.has(o)){let a=r[o].tick,l=mb(a.label||""),c=Array.from(s).sort((d,f)=>d-f),u=c.indexOf(o);if(u>0){let d=c[u-1],f=r[d].tick,p=mb(f.label||"");SO(f.percentage,p,a.percentage,l,n)&&s.delete(d)}if(u<c.length-1){let d=c[u+1],f=r[d].tick,p=mb(f.label||"");SO(a.percentage,l,f.percentage,p,n)&&s.delete(d)}}return r.map(({index:a},l)=>({tickIndex:a,isVisible:s.has(l),priority:s.has(l)?1:10}))}function b8e({ticks:t,currentValue:e,containerWidth:n=300}){let r=(0,i0.useRef)(null),[o,i]=(0,i0.useState)(n);(0,i0.useEffect)(()=>{if(r.current){let l=new ResizeObserver(c=>{for(let u of c)i(u.contentRect.width)});return l.observe(r.current),i(r.current.offsetWidth),()=>l.disconnect()}},[]);let s=y8e(t,e,o),a=new Map(s.map(l=>[l.tickIndex,l.isVisible]));return O("div",{ref:r,css:p8e,children:t.map((l,c)=>({tick:l,index:c})).filter(({tick:l})=>l.label).map(({tick:l,index:c})=>{var u;let d=(u=a.get(c))!=null?u:!1;return O("div",{css:m8e,style:{left:`${l.percentage}%`,opacity:d?1:0,pointerEvents:d?"auto":"none"},"data-position":l.percentage===0?"0":l.percentage===100?"100":void 0,title:l.label,children:l.label},`label-${c}-${l.position}`)})})}var jO=(0,_p.forwardRef)(({value:t,onChange:e,onBlur:n,min:r,max:o,step:i,options:s,showNumberInput:a=!s,disabled:l=!1,"aria-label":c,id:u,name:d},f)=>{let p=!!(s&&s.length>0),{min:m,max:g,step:h,smallTicks:v,largeTicks:y}=(0,_p.useMemo)(()=>{if(p&&s){if(s.length===0)return{min:0,max:0,step:1,smallTicks:[],largeTicks:[]};let z=s.length-1,W=z>0?z:1;return{min:0,max:z,step:1,smallTicks:[],largeTicks:s.map((R,F)=>({position:F,percentage:F/W*100,label:R.text,isLarge:!0}))}}let _=r??0,$=o??100,T=i!=null&&i>0?i:$-_>20?Math.ceil(($-_)/20):1,N=$-_,P=T>0?Math.floor(N/T):0,B=[];if(P<=100)for(let z=0;z<=P;z++){let W=_+z*T,R=(W-_)/N*100;B.push({position:W,percentage:R,isLarge:!1})}else{let z=Math.ceil(P/100);for(let W=0;W<=P;W+=z){let R=_+W*T,F=(R-_)/N*100;B.push({position:R,percentage:F,isLarge:!1})}}let k=[{position:_,percentage:0,label:_.toString(),isLarge:!0},{position:$,percentage:100,label:$.toString(),isLarge:!0}];if(N>=20){let z=_+N/2;k.push({position:z,percentage:50,label:Math.round(z).toString(),isLarge:!0})}return{min:_,max:$,step:T,smallTicks:B,largeTicks:k}},[p,s,r,o,i]),b=t==null||typeof t=="number"&&isNaN(t),S=b?m:Math.min(Math.max(t,m),g),C=(0,_p.useCallback)(_=>{let $=Number(_.target.value);e($)},[e]),w=(0,_p.useCallback)(_=>{if(_.target.value==="")e(void 0);else{let $=Number(_.target.value);e(isNaN($)?void 0:$)}},[e]),E=g===m?0:(S-m)/(g-m)*100;return ie("div",{css:r8e,children:[ie("div",{css:o8e,children:[ie("div",{css:i8e,children:[ie("div",{css:s8e,children:[O("div",{css:a8e}),O("div",{css:l8e,style:{width:`${E}%`}})]}),O("input",{ref:f,type:"range",id:u,name:d,min:m,max:g,step:h,value:S,onChange:C,onBlur:n,disabled:l,"aria-label":c,"data-unset":b?"":void 0,css:f8e})]}),ie("div",{css:c8e,children:[v.map((_,$)=>O("div",{css:u8e,style:{left:`${_.percentage}%`}},`small-${$}`)),y.map((_,$)=>O("div",{css:d8e,style:{left:`${_.percentage}%`}},`large-${$}`))]}),y.some(_=>_.label)&&O(b8e,{ticks:y,currentValue:b?void 0:S})]}),a&&!p&&O("div",{css:g8e,children:O("input",{type:"number",value:b?"":t,onChange:w,onBlur:n,disabled:l,min:m,max:g,step:h,css:h8e})})]})});jO.displayName="Slider";var x8e=(0,zO.forwardRef)((t,e)=>{let{shellProps:n,innerProps:r}=yd(t);return O(bd,{"data-testid":"parameter-number-slider",...n,children:O(eie,{ref:e,...r})})}),eie=(0,zO.forwardRef)(({...t},e)=>{let{id:n,label:r,hiddenLabel:o}=vd();return O(jO,{ref:e,id:n,"aria-label":o&&typeof r=="string"?r:void 0,...t})});x8e.displayName="ParameterNumberSlider";eie.displayName="ParameterNumberSliderInner";var C8e=[{label:"Heading 1",type:"h1"},{label:"Heading 2",type:"h2"},{label:"Heading 3",type:"h3"},{label:"Heading 4",type:"h4"},{label:"Heading 5",type:"h5"},{label:"Heading 6",type:"h6"},{label:"Bullet List",type:"unorderedList"},{label:"Ordered List",type:"orderedList"},{label:"Link",type:"link"},{label:"Blockquote",type:"quote"},{label:"Code Block",type:"code"},{label:"Table",type:"table"},{label:"Asset",type:"asset"},{label:"Dynamic Token",type:"variable"}],S8e=[{label:"Bold",type:"bold"},{label:"Italic",type:"italic"},{label:"Underline",type:"underline"},{label:"Strikethrough",type:"strikethrough"},{label:"Code",type:"code"},{label:"Superscript",type:"superscript"},{label:"Subscript",type:"subscript"}];var
|
|
4521
|
+
`;function mb(t){return Math.ceil(t.length*9.799999999999999+24)}function v8e(t){if(t<=0)return[];if(t===1)return[[0]];if(t===2)return[[0,t-1]];let e=[];if(e.push([0,t-1]),t%2===1)e.push([Math.floor(t/2)]);else{let r=Math.floor(t/2)-1,o=Math.floor(t/2);e.push([r,o])}let n=4;for(;n<=t;){let r=[];for(let o=1;o<n;o+=2){let i=Math.round(o/n*(t-1));i>0&&i<t-1&&r.push(i)}r.length>0&&e.push(r),n*=2}return e}function SO(t,e,n,r,o){let i=t/100*o,s=n/100*o,a=8,l=i-e/2-a/2,c=i+e/2+a/2,u=s-r/2-a/2,d=s+r/2+a/2;return!(c<u||d<l)}function y8e(t,e,n){let r=t.map((a,l)=>({tick:a,index:l})).filter(({tick:a})=>a.label);if(r.length===0)return[];let o=e!==void 0?r.findIndex(({tick:a})=>a.position===e):-1,i=v8e(r.length),s=new Set(i[0]||[]);o!==-1&&s.add(o);for(let a=1;a<i.length;a++){let l=new Set(s);for(let f of i[a])l.add(f);let c=Math.max(2,Math.floor(n/100));if(l.size>c)break;let u=Array.from(l).sort((f,p)=>f-p),d=!1;for(let f=0;f<u.length-1;f++){let p=r[u[f]],m=r[u[f+1]],g=mb(p.tick.label||""),h=mb(m.tick.label||"");if(SO(p.tick.percentage,g,m.tick.percentage,h,n)){d=!0;break}}if(!d)s=l;else break}if(o!==-1&&s.has(o)){let a=r[o].tick,l=mb(a.label||""),c=Array.from(s).sort((d,f)=>d-f),u=c.indexOf(o);if(u>0){let d=c[u-1],f=r[d].tick,p=mb(f.label||"");SO(f.percentage,p,a.percentage,l,n)&&s.delete(d)}if(u<c.length-1){let d=c[u+1],f=r[d].tick,p=mb(f.label||"");SO(a.percentage,l,f.percentage,p,n)&&s.delete(d)}}return r.map(({index:a},l)=>({tickIndex:a,isVisible:s.has(l),priority:s.has(l)?1:10}))}function b8e({ticks:t,currentValue:e,containerWidth:n=300}){let r=(0,i0.useRef)(null),[o,i]=(0,i0.useState)(n);(0,i0.useEffect)(()=>{if(r.current){let l=new ResizeObserver(c=>{for(let u of c)i(u.contentRect.width)});return l.observe(r.current),i(r.current.offsetWidth),()=>l.disconnect()}},[]);let s=y8e(t,e,o),a=new Map(s.map(l=>[l.tickIndex,l.isVisible]));return O("div",{ref:r,css:p8e,children:t.map((l,c)=>({tick:l,index:c})).filter(({tick:l})=>l.label).map(({tick:l,index:c})=>{var u;let d=(u=a.get(c))!=null?u:!1;return O("div",{css:m8e,style:{left:`${l.percentage}%`,opacity:d?1:0,pointerEvents:d?"auto":"none"},"data-position":l.percentage===0?"0":l.percentage===100?"100":void 0,title:l.label,children:l.label},`label-${c}-${l.position}`)})})}var jO=(0,_p.forwardRef)(({value:t,onChange:e,onBlur:n,min:r,max:o,step:i,options:s,showNumberInput:a=!s,disabled:l=!1,"aria-label":c,id:u,name:d},f)=>{let p=!!(s&&s.length>0),{min:m,max:g,step:h,smallTicks:v,largeTicks:y}=(0,_p.useMemo)(()=>{if(p&&s){if(s.length===0)return{min:0,max:0,step:1,smallTicks:[],largeTicks:[]};let z=s.length-1,W=z>0?z:1;return{min:0,max:z,step:1,smallTicks:[],largeTicks:s.map((R,F)=>({position:F,percentage:F/W*100,label:R.text,isLarge:!0}))}}let _=r??0,$=o??100,T=i!=null&&i>0?i:$-_>20?Math.ceil(($-_)/20):1,N=$-_,P=T>0?Math.floor(N/T):0,B=[];if(P<=100)for(let z=0;z<=P;z++){let W=_+z*T,R=(W-_)/N*100;B.push({position:W,percentage:R,isLarge:!1})}else{let z=Math.ceil(P/100);for(let W=0;W<=P;W+=z){let R=_+W*T,F=(R-_)/N*100;B.push({position:R,percentage:F,isLarge:!1})}}let k=[{position:_,percentage:0,label:_.toString(),isLarge:!0},{position:$,percentage:100,label:$.toString(),isLarge:!0}];if(N>=20){let z=_+N/2;k.push({position:z,percentage:50,label:Math.round(z).toString(),isLarge:!0})}return{min:_,max:$,step:T,smallTicks:B,largeTicks:k}},[p,s,r,o,i]),b=t==null||typeof t=="number"&&isNaN(t),S=b?m:Math.min(Math.max(t,m),g),C=(0,_p.useCallback)(_=>{let $=Number(_.target.value);e($)},[e]),w=(0,_p.useCallback)(_=>{if(_.target.value==="")e(void 0);else{let $=Number(_.target.value);e(isNaN($)?void 0:$)}},[e]),E=g===m?0:(S-m)/(g-m)*100;return ie("div",{css:r8e,children:[ie("div",{css:o8e,children:[ie("div",{css:i8e,children:[ie("div",{css:s8e,children:[O("div",{css:a8e}),O("div",{css:l8e,style:{width:`${E}%`}})]}),O("input",{ref:f,type:"range",id:u,name:d,min:m,max:g,step:h,value:S,onChange:C,onBlur:n,disabled:l,"aria-label":c,"data-unset":b?"":void 0,css:f8e})]}),ie("div",{css:c8e,children:[v.map((_,$)=>O("div",{css:u8e,style:{left:`${_.percentage}%`}},`small-${$}`)),y.map((_,$)=>O("div",{css:d8e,style:{left:`${_.percentage}%`}},`large-${$}`))]}),y.some(_=>_.label)&&O(b8e,{ticks:y,currentValue:b?void 0:S})]}),a&&!p&&O("div",{css:g8e,children:O("input",{type:"number",value:b?"":t,onChange:w,onBlur:n,disabled:l,min:m,max:g,step:h,css:h8e})})]})});jO.displayName="Slider";var x8e=(0,zO.forwardRef)((t,e)=>{let{shellProps:n,innerProps:r}=yd(t);return O(bd,{"data-testid":"parameter-number-slider",...n,children:O(eie,{ref:e,...r})})}),eie=(0,zO.forwardRef)(({...t},e)=>{let{id:n,label:r,hiddenLabel:o}=vd();return O(jO,{ref:e,id:n,"aria-label":o&&typeof r=="string"?r:void 0,...t})});x8e.displayName="ParameterNumberSlider";eie.displayName="ParameterNumberSliderInner";var C8e=[{label:"Heading 1",type:"h1"},{label:"Heading 2",type:"h2"},{label:"Heading 3",type:"h3"},{label:"Heading 4",type:"h4"},{label:"Heading 5",type:"h5"},{label:"Heading 6",type:"h6"},{label:"Bullet List",type:"unorderedList"},{label:"Ordered List",type:"orderedList"},{label:"Link",type:"link"},{label:"Blockquote",type:"quote"},{label:"Code Block",type:"code"},{label:"Table",type:"table"},{label:"Asset",type:"asset"},{label:"Dynamic Token",type:"variable"}],S8e=[{label:"Bold",type:"bold"},{label:"Italic",type:"italic"},{label:"Underline",type:"underline"},{label:"Strikethrough",type:"strikethrough"},{label:"Code",type:"code"},{label:"Superscript",type:"superscript"},{label:"Subscript",type:"subscript"}];var w2t={required:!1,formatting:{builtIn:S8e.map(t=>t.type)},elements:{builtIn:C8e.map(t=>t.type)},elementsConfig:{asset:{allowedTypes:["image"]}}},w8e=jl,VO=jl.importDOM(),E8e=VO.pre;VO.pre=t=>t.childNodes.length===1&&Array.from(t.childNodes).some(e=>e.nodeName==="CODE")?null:E8e(t);w8e.importDOM=function(){return VO};var T2t=ft`
|
|
4514
4522
|
font-weight: 700;
|
|
4515
|
-
`,T2t=ft`
|
|
4516
|
-
font-style: italic;
|
|
4517
4523
|
`,$2t=ft`
|
|
4518
|
-
|
|
4524
|
+
font-style: italic;
|
|
4519
4525
|
`,N2t=ft`
|
|
4520
|
-
text-decoration:
|
|
4526
|
+
text-decoration: underline;
|
|
4521
4527
|
`,D2t=ft`
|
|
4522
|
-
text-decoration:
|
|
4528
|
+
text-decoration: line-through;
|
|
4523
4529
|
`,L2t=ft`
|
|
4530
|
+
text-decoration: underline line-through;
|
|
4531
|
+
`,A2t=ft`
|
|
4524
4532
|
background-color: var(--gray-100);
|
|
4525
4533
|
border-radius: var(--rounded-sm);
|
|
4526
4534
|
display: inline-block;
|
|
@@ -4530,13 +4538,13 @@ to {
|
|
|
4530
4538
|
font-size: var(--fs-sm);
|
|
4531
4539
|
padding-left: var(--spacing-xs);
|
|
4532
4540
|
padding-right: var(--spacing-xs);
|
|
4533
|
-
`,
|
|
4541
|
+
`,M2t=ft`
|
|
4534
4542
|
vertical-align: super;
|
|
4535
4543
|
font-size: smaller;
|
|
4536
|
-
`,
|
|
4544
|
+
`,O2t=ft`
|
|
4537
4545
|
vertical-align: sub;
|
|
4538
4546
|
font-size: smaller;
|
|
4539
|
-
`,
|
|
4547
|
+
`,I2t=ft`
|
|
4540
4548
|
${UE}
|
|
4541
4549
|
${MO}
|
|
4542
4550
|
text-decoration: underline;
|
|
@@ -4552,38 +4560,38 @@ to {
|
|
|
4552
4560
|
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
4553
4561
|
`,A8e=ft`
|
|
4554
4562
|
font-size: var(--fs-base);
|
|
4555
|
-
`,
|
|
4563
|
+
`,k2t=ft`
|
|
4556
4564
|
${T8e}
|
|
4557
4565
|
${o0(!0)}
|
|
4558
4566
|
${hd}
|
|
4559
|
-
`,
|
|
4567
|
+
`,R2t=ft`
|
|
4560
4568
|
${$8e}
|
|
4561
4569
|
${o0(!0)}
|
|
4562
4570
|
${hd}
|
|
4563
|
-
`,
|
|
4571
|
+
`,P2t=ft`
|
|
4564
4572
|
${N8e}
|
|
4565
4573
|
${o0(!0)}
|
|
4566
4574
|
${hd}
|
|
4567
|
-
`,
|
|
4575
|
+
`,F2t=ft`
|
|
4568
4576
|
${D8e}
|
|
4569
4577
|
${o0(!0)}
|
|
4570
4578
|
${hd}
|
|
4571
|
-
`,
|
|
4579
|
+
`,B2t=ft`
|
|
4572
4580
|
${L8e}
|
|
4573
4581
|
${o0(!0)}
|
|
4574
4582
|
${hd}
|
|
4575
|
-
`,
|
|
4583
|
+
`,z2t=ft`
|
|
4576
4584
|
${A8e}
|
|
4577
4585
|
${o0(!0)}
|
|
4578
4586
|
${hd}
|
|
4579
|
-
`,
|
|
4587
|
+
`,j2t=ft`
|
|
4580
4588
|
line-height: 1.5;
|
|
4581
4589
|
margin-bottom: var(--spacing-base);
|
|
4582
4590
|
|
|
4583
4591
|
&:last-child {
|
|
4584
4592
|
margin-bottom: 0;
|
|
4585
4593
|
}
|
|
4586
|
-
`,
|
|
4594
|
+
`,V2t=ft`
|
|
4587
4595
|
${hd}
|
|
4588
4596
|
display: block;
|
|
4589
4597
|
list-style: decimal;
|
|
@@ -4611,7 +4619,7 @@ to {
|
|
|
4611
4619
|
}
|
|
4612
4620
|
}
|
|
4613
4621
|
}
|
|
4614
|
-
`,
|
|
4622
|
+
`,U2t=ft`
|
|
4615
4623
|
${hd}
|
|
4616
4624
|
display: block;
|
|
4617
4625
|
list-style: disc;
|
|
@@ -4631,11 +4639,11 @@ to {
|
|
|
4631
4639
|
list-style-type: square;
|
|
4632
4640
|
}
|
|
4633
4641
|
}
|
|
4634
|
-
`,U2t=ft`
|
|
4635
|
-
margin-left: var(--spacing-md);
|
|
4636
4642
|
`,H2t=ft`
|
|
4637
|
-
|
|
4643
|
+
margin-left: var(--spacing-md);
|
|
4638
4644
|
`,K2t=ft`
|
|
4645
|
+
list-style-type: none;
|
|
4646
|
+
`,W2t=ft`
|
|
4639
4647
|
border-left: 0.25rem solid var(--gray-300);
|
|
4640
4648
|
color: var(--gray-600);
|
|
4641
4649
|
margin-bottom: var(--spacing-base);
|
|
@@ -4644,7 +4652,7 @@ to {
|
|
|
4644
4652
|
&:last-child {
|
|
4645
4653
|
margin-bottom: 0;
|
|
4646
4654
|
}
|
|
4647
|
-
`,
|
|
4655
|
+
`,G2t=ft`
|
|
4648
4656
|
background-color: var(--gray-100);
|
|
4649
4657
|
border-radius: var(--rounded-sm);
|
|
4650
4658
|
display: block;
|
|
@@ -4658,7 +4666,7 @@ to {
|
|
|
4658
4666
|
&:last-child {
|
|
4659
4667
|
margin-bottom: 0;
|
|
4660
4668
|
}
|
|
4661
|
-
`,
|
|
4669
|
+
`,Y2t=ft`
|
|
4662
4670
|
border-collapse: collapse;
|
|
4663
4671
|
border-spacing: 0;
|
|
4664
4672
|
border-color: var(--gray-300);
|
|
@@ -4670,7 +4678,7 @@ to {
|
|
|
4670
4678
|
&:last-child {
|
|
4671
4679
|
margin-bottom: 0;
|
|
4672
4680
|
}
|
|
4673
|
-
`,
|
|
4681
|
+
`,Z2t=ft`
|
|
4674
4682
|
background-color: var(--white);
|
|
4675
4683
|
border-color: var(--gray-300);
|
|
4676
4684
|
border-style: solid;
|
|
@@ -4705,7 +4713,7 @@ to {
|
|
|
4705
4713
|
left: 100%;
|
|
4706
4714
|
z-index: 1;
|
|
4707
4715
|
}
|
|
4708
|
-
`,
|
|
4716
|
+
`,q2t=ft`
|
|
4709
4717
|
background-color: var(--gray-100);
|
|
4710
4718
|
border-color: var(--gray-300);
|
|
4711
4719
|
border-style: solid;
|
|
@@ -4718,25 +4726,25 @@ to {
|
|
|
4718
4726
|
text-align: start;
|
|
4719
4727
|
vertical-align: top;
|
|
4720
4728
|
width: 7rem;
|
|
4721
|
-
`;var O8e=t=>t?.type==="projectMapNode"&&!!(t.nodeId&&t.path&&t.projectMapId),_O=t=>typeof t?.type=="string"&&["url","tel","email"].includes(t.type)&&!!t.path,I8e=t=>t.startsWith("http://")||t.startsWith("https://")?"url":t.startsWith("mailto:")||t.includes("@")?"email":t.startsWith("tel:")||t.startsWith("+")?"tel":"url";function k8e(t){let e=null;if(!wa(t))return{node:e};let n=t.textContent;if(n===null||n==="")return{node:e};let r=t.getAttribute("data-link");if(r)try{r=JSON.parse(r)}catch{}let o=t.getAttribute("href"),i,s,a,l;if(r&&typeof r=="object"&&("path"in r&&typeof r.path=="string"&&(o=r.path),"type"in r&&typeof r.type=="string"&&(a=r.type),"projectMapId"in r&&typeof r.projectMapId=="string"&&(i=r.projectMapId),"nodeId"in r&&typeof r.nodeId=="string"&&(s=r.nodeId),"dynamicInputValues"in r&&typeof r.dynamicInputValues=="string"))try{l=JSON.parse(r.dynamicInputValues)}catch{}if(!o)return{node:null};a||(a=I8e(o)),a==="email"&&o.startsWith("mailto:")?o=o.replace("mailto:",""):a==="tel"&&o.startsWith("tel:")&&(o=o.replace("tel:",""));let c={type:a,path:o,projectMapId:i,nodeId:s,dynamicInputValues:l};return(O8e(c)||_O(c))&&(e=TO(c)),{node:e}}var UO=class nie extends Dt{static getType(){return"link"}getLink(){return this.getLatest().__link}setLink(e){let n=this.getWritable();n.__link=e}static clone(e){return new nie(e.__link,e.__key)}constructor(e,n){super(n),this.__link=e}static importJSON(e){let n=TO(e.link);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),link:this.getLink(),type:this.getType(),version:1}}createDOM(e){let n=document.createElement("a");return n.setAttribute("data-link",JSON.stringify(this.__link)),_O(this.__link)&&(this.__link.type==="url"?n.setAttribute("href",this.__link.path):this.__link.type==="tel"?n.setAttribute("href",`tel:${this.__link.path}`):this.__link.type==="email"&&n.setAttribute("href",`mailto:${this.__link.path}`)),ke(n,e.theme.link),n}updateDOM(e,n){return yre(e.__link,this.__link)||(n.setAttribute("data-link",JSON.stringify(this.__link)),_O(this.__link)&&(this.__link.type==="url"?n.setAttribute("href",this.__link.path):this.__link.type==="tel"?n.setAttribute("href",`tel:${this.__link.path}`):this.__link.type==="email"&&n.setAttribute("href",`mailto:${this.__link.path}`))),!1}static importDOM(){return{a:()=>({conversion:k8e,priority:1})}}insertNewAfter(e,n=!0){let r=this.getParentOrThrow().insertNewAfter(e,n);if(Y(r)){let o=TO("nodeId"in this.__link?{nodeId:this.__link.nodeId,projectMapId:this.__link.projectMapId,path:this.__link.path,type:this.__link.type}:{path:this.__link.path,type:this.__link.type});return r.append(o),o}return null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}};function TO(t){return $t(new UO(t))}var
|
|
4729
|
+
`;var O8e=t=>t?.type==="projectMapNode"&&!!(t.nodeId&&t.path&&t.projectMapId),_O=t=>typeof t?.type=="string"&&["url","tel","email"].includes(t.type)&&!!t.path,I8e=t=>t.startsWith("http://")||t.startsWith("https://")?"url":t.startsWith("mailto:")||t.includes("@")?"email":t.startsWith("tel:")||t.startsWith("+")?"tel":"url";function k8e(t){let e=null;if(!wa(t))return{node:e};let n=t.textContent;if(n===null||n==="")return{node:e};let r=t.getAttribute("data-link");if(r)try{r=JSON.parse(r)}catch{}let o=t.getAttribute("href"),i,s,a,l;if(r&&typeof r=="object"&&("path"in r&&typeof r.path=="string"&&(o=r.path),"type"in r&&typeof r.type=="string"&&(a=r.type),"projectMapId"in r&&typeof r.projectMapId=="string"&&(i=r.projectMapId),"nodeId"in r&&typeof r.nodeId=="string"&&(s=r.nodeId),"dynamicInputValues"in r&&typeof r.dynamicInputValues=="string"))try{l=JSON.parse(r.dynamicInputValues)}catch{}if(!o)return{node:null};a||(a=I8e(o)),a==="email"&&o.startsWith("mailto:")?o=o.replace("mailto:",""):a==="tel"&&o.startsWith("tel:")&&(o=o.replace("tel:",""));let c={type:a,path:o,projectMapId:i,nodeId:s,dynamicInputValues:l};return(O8e(c)||_O(c))&&(e=TO(c)),{node:e}}var UO=class nie extends Dt{static getType(){return"link"}getLink(){return this.getLatest().__link}setLink(e){let n=this.getWritable();n.__link=e}static clone(e){return new nie(e.__link,e.__key)}constructor(e,n){super(n),this.__link=e}static importJSON(e){let n=TO(e.link);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),link:this.getLink(),type:this.getType(),version:1}}createDOM(e){let n=document.createElement("a");return n.setAttribute("data-link",JSON.stringify(this.__link)),_O(this.__link)&&(this.__link.type==="url"?n.setAttribute("href",this.__link.path):this.__link.type==="tel"?n.setAttribute("href",`tel:${this.__link.path}`):this.__link.type==="email"&&n.setAttribute("href",`mailto:${this.__link.path}`)),ke(n,e.theme.link),n}updateDOM(e,n){return yre(e.__link,this.__link)||(n.setAttribute("data-link",JSON.stringify(this.__link)),_O(this.__link)&&(this.__link.type==="url"?n.setAttribute("href",this.__link.path):this.__link.type==="tel"?n.setAttribute("href",`tel:${this.__link.path}`):this.__link.type==="email"&&n.setAttribute("href",`mailto:${this.__link.path}`))),!1}static importDOM(){return{a:()=>({conversion:k8e,priority:1})}}insertNewAfter(e,n=!0){let r=this.getParentOrThrow().insertNewAfter(e,n);if(Y(r)){let o=TO("nodeId"in this.__link?{nodeId:this.__link.nodeId,projectMapId:this.__link.projectMapId,path:this.__link.path,type:this.__link.type}:{path:this.__link.path,type:this.__link.type});return r.append(o),o}return null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}};function TO(t){return $t(new UO(t))}var t4t=bt("REMOVE_LINK_NODE_COMMAND"),n4t=bt("UPSERT_LINK_NODE_COMMAND"),r4t=bt("OPEN_LINK_NODE_MODAL_COMMAND");var o4t=x`
|
|
4722
4730
|
position: absolute;
|
|
4723
4731
|
z-index: 11;
|
|
4724
|
-
`,
|
|
4732
|
+
`,i4t=x`
|
|
4725
4733
|
${f9e};
|
|
4726
4734
|
${p9e};
|
|
4727
4735
|
${m9e};
|
|
4728
4736
|
align-items: center;
|
|
4729
4737
|
display: flex;
|
|
4730
|
-
`,
|
|
4738
|
+
`,s4t=x`
|
|
4731
4739
|
${UE}
|
|
4732
4740
|
${MO}
|
|
4733
4741
|
`;var R8e=x`
|
|
4734
4742
|
position: absolute;
|
|
4735
4743
|
transform: translate(calc(-100% - 1px), 1px);
|
|
4736
|
-
`,P8e=(0,xd.forwardRef)((t,e)=>{let{tableCellEl:n,positioningAnchorEl:r,...o}=t,[i,s]=(0,xd.useState)({x:0,y:0});return(0,xd.useLayoutEffect)(()=>{let a=n.getBoundingClientRect(),l=r.getBoundingClientRect(),c=a.right-l.left+r.scrollLeft,u=a.top-l.top+r.scrollTop;s({x:c,y:u})},[n,r]),O(Ioe,{ref:e,css:[R8e,{top:i.y,left:i.x}],size:"xs",buttonType:"unimportant",...o,children:O(Ko,{icon:"chevron-down",size:"1rem",iconColor:"currentColor"})})});P8e.displayName="TableActionMenuTrigger";var
|
|
4744
|
+
`,P8e=(0,xd.forwardRef)((t,e)=>{let{tableCellEl:n,positioningAnchorEl:r,...o}=t,[i,s]=(0,xd.useState)({x:0,y:0});return(0,xd.useLayoutEffect)(()=>{let a=n.getBoundingClientRect(),l=r.getBoundingClientRect(),c=a.right-l.left+r.scrollLeft,u=a.top-l.top+r.scrollTop;s({x:c,y:u})},[n,r]),O(Ioe,{ref:e,css:[R8e,{top:i.y,left:i.x}],size:"xs",buttonType:"unimportant",...o,children:O(Ko,{icon:"chevron-down",size:"1rem",iconColor:"currentColor"})})});P8e.displayName="TableActionMenuTrigger";var u4t=x`
|
|
4737
4745
|
position: absolute;
|
|
4738
4746
|
z-index: var(--z-10);
|
|
4739
|
-
`;var
|
|
4747
|
+
`;var p4t=x`
|
|
4740
4748
|
${fs}
|
|
4741
4749
|
background: var(--gray-50);
|
|
4742
4750
|
border-radius: var(--rounded-base);
|
|
@@ -4749,7 +4757,7 @@ to {
|
|
|
4749
4757
|
position: sticky;
|
|
4750
4758
|
top: calc(var(--spacing-sm) * -2);
|
|
4751
4759
|
z-index: 10;
|
|
4752
|
-
`,
|
|
4760
|
+
`,m4t=x`
|
|
4753
4761
|
display: flex;
|
|
4754
4762
|
flex-shrink: 0;
|
|
4755
4763
|
gap: var(--spacing-xs);
|
|
@@ -4765,7 +4773,7 @@ to {
|
|
|
4765
4773
|
top: 4px;
|
|
4766
4774
|
width: 1px;
|
|
4767
4775
|
}
|
|
4768
|
-
`,
|
|
4776
|
+
`,g4t=x`
|
|
4769
4777
|
align-items: center;
|
|
4770
4778
|
appearance: none;
|
|
4771
4779
|
border: 0;
|
|
@@ -4778,16 +4786,16 @@ to {
|
|
|
4778
4786
|
justify-content: center;
|
|
4779
4787
|
min-width: 32px;
|
|
4780
4788
|
padding: 0 var(--spacing-sm);
|
|
4781
|
-
`,g4t=x`
|
|
4782
|
-
background: var(--gray-200);
|
|
4783
4789
|
`,h4t=x`
|
|
4790
|
+
background: var(--gray-200);
|
|
4791
|
+
`,v4t=x`
|
|
4784
4792
|
justify-content: space-between;
|
|
4785
4793
|
min-width: 7rem;
|
|
4786
|
-
`,v4t=x`
|
|
4787
|
-
color: inherit;
|
|
4788
4794
|
`,y4t=x`
|
|
4795
|
+
color: inherit;
|
|
4796
|
+
`,b4t=x`
|
|
4789
4797
|
margin-left: var(--spacing-xs);
|
|
4790
|
-
`;var
|
|
4798
|
+
`;var x4t=x`
|
|
4791
4799
|
position: relative;
|
|
4792
4800
|
|
|
4793
4801
|
&::before {
|
|
@@ -4802,11 +4810,11 @@ to {
|
|
|
4802
4810
|
right: var(--spacing-sm);
|
|
4803
4811
|
z-index: 2;
|
|
4804
4812
|
}
|
|
4805
|
-
`,
|
|
4813
|
+
`,C4t=x`
|
|
4806
4814
|
display: flex;
|
|
4807
4815
|
flex-flow: column;
|
|
4808
4816
|
flex-grow: 1;
|
|
4809
|
-
`,
|
|
4817
|
+
`,S4t=x`
|
|
4810
4818
|
${fs}
|
|
4811
4819
|
background: var(--white);
|
|
4812
4820
|
border-radius: var(--rounded-sm);
|
|
@@ -4837,14 +4845,14 @@ to {
|
|
|
4837
4845
|
min-height: calc(3rem + (2 * var(--spacing-sm)));
|
|
4838
4846
|
max-height: unset;
|
|
4839
4847
|
}
|
|
4840
|
-
`,
|
|
4848
|
+
`,w4t=x`
|
|
4841
4849
|
overflow: hidden;
|
|
4842
4850
|
pointer-events: none;
|
|
4843
4851
|
|
|
4844
4852
|
& > * {
|
|
4845
4853
|
pointer-events: auto;
|
|
4846
4854
|
}
|
|
4847
|
-
`,
|
|
4855
|
+
`,E4t=x`
|
|
4848
4856
|
color: var(--gray-500);
|
|
4849
4857
|
font-style: italic;
|
|
4850
4858
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -4854,7 +4862,7 @@ to {
|
|
|
4854
4862
|
position: absolute;
|
|
4855
4863
|
top: calc(1rem + var(--spacing-sm));
|
|
4856
4864
|
user-select: none;
|
|
4857
|
-
`,
|
|
4865
|
+
`,_4t=x`
|
|
4858
4866
|
min-height: 100%;
|
|
4859
4867
|
flex-grow: 1;
|
|
4860
4868
|
|
|
@@ -4862,7 +4870,7 @@ to {
|
|
|
4862
4870
|
&:focus-within {
|
|
4863
4871
|
outline: none;
|
|
4864
4872
|
}
|
|
4865
|
-
`;var
|
|
4873
|
+
`;var T4t=[ire,are,ure,sre,ore,lre,...cre];var N4t=(0,HO.forwardRef)(({defaultOption:t,options:e,...n},r)=>{let{shellProps:o,innerProps:i}=yd(n);return O(bd,{...o,children:O(B8e,{options:e,defaultOption:t,...i,ref:r})})}),B8e=(0,HO.forwardRef)(({defaultOption:t,options:e,...n},r)=>{let{id:o,label:i,hiddenLabel:s}=vd();return ie("select",{css:[wb,PNe],id:o,"aria-label":s&&typeof i=="string"?i:void 0,ref:r,...n,children:[t?O("option",{value:"",children:t}):null,e.map(a=>{var l;return O("option",{value:(l=a.value)!=null?l:a.label,children:a.label},a.label)})]})}),z8e=(0,$p.forwardRef)((t,e)=>{let{shellProps:n,innerProps:r}=yd(t);return O(bd,{"data-testid":"parameter-select-slider",...n,children:O(aie,{ref:e,...r})})}),aie=(0,$p.forwardRef)(({options:t,value:e,onChange:n,...r},o)=>{let{id:i,label:s,hiddenLabel:a}=vd(),l=(0,$p.useMemo)(()=>{if(e==null||e==="")return;let u=t.findIndex(d=>d.value===e);return u>=0?u:void 0},[t,e]),c=(0,$p.useCallback)(u=>{var d;n(u===void 0||(d=t[u])==null?void 0:d.value)},[t,n]);return O(jO,{ref:o,id:i,"aria-label":a&&typeof s=="string"?s:void 0,value:l,onChange:c,options:t,showNumberInput:!1,...r})});z8e.displayName="ParameterSelectSlider";aie.displayName="ParameterSelectSliderInner";var A4t=(0,KO.forwardRef)((t,e)=>{let{shellProps:n,innerProps:r}=yd(t);return O(bd,{"data-testid":"parameter-textarea",...n,children:O(j8e,{ref:e,...r})})}),j8e=(0,KO.forwardRef)(({...t},e)=>{let{id:n,label:r,hiddenLabel:o}=vd();return O("textarea",{css:[wb,HNe],id:n,ref:e,"aria-label":o&&typeof r=="string"?r:void 0,...t})}),V8e=(0,WO.forwardRef)((t,e)=>{let{shellProps:n,innerProps:r}=yd(t);return O(bd,{...n,children:O(lie,{ref:e,...r})})});V8e.displayName="ParameterToggle";var lie=(0,WO.forwardRef)(({children:t,...e},n)=>{let{type:r,withoutIndeterminateState:o,...i}=e,{id:s,label:a}=vd();return ie("label",{css:FNe,children:[O("input",{css:[BNe,e.withoutIndeterminateState?void 0:zNe],type:r,id:s,ref:n,...i}),O("span",{css:jNe,children:a}),t]})});lie.displayName="ParameterToggleInner";var I4t=x`
|
|
4866
4874
|
background: var(--gray-50);
|
|
4867
4875
|
margin-block: var(--spacing-sm);
|
|
4868
4876
|
position: relative;
|
|
@@ -4870,7 +4878,7 @@ to {
|
|
|
4870
4878
|
height: 1rem;
|
|
4871
4879
|
border-radius: var(--rounded-sm);
|
|
4872
4880
|
border: solid 1px var(--gray-300);
|
|
4873
|
-
`,
|
|
4881
|
+
`,k4t={primary:x`
|
|
4874
4882
|
--progress-color: var(--accent-light);
|
|
4875
4883
|
`,secondary:x`
|
|
4876
4884
|
--progress-color: var(--accent-alt-light);
|
|
@@ -4883,9 +4891,9 @@ to {
|
|
|
4883
4891
|
to {
|
|
4884
4892
|
background-position: 64px 0;
|
|
4885
4893
|
}
|
|
4886
|
-
`,k4t=x`
|
|
4887
|
-
background-color: var(--progress-color);
|
|
4888
4894
|
`,R4t=x`
|
|
4895
|
+
background-color: var(--progress-color);
|
|
4896
|
+
`,P4t=x`
|
|
4889
4897
|
background-image: linear-gradient(
|
|
4890
4898
|
45deg,
|
|
4891
4899
|
var(--progress-color) 25%,
|
|
@@ -4898,23 +4906,23 @@ to {
|
|
|
4898
4906
|
);
|
|
4899
4907
|
background-size: 64px 64px;
|
|
4900
4908
|
animation: ${U8e} 1s linear infinite;
|
|
4901
|
-
`,
|
|
4909
|
+
`,F4t=x`
|
|
4902
4910
|
position: absolute;
|
|
4903
4911
|
inset: 0;
|
|
4904
4912
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
4905
4913
|
transform-origin: 0 center;
|
|
4906
|
-
`;var
|
|
4914
|
+
`;var z4t=x`
|
|
4907
4915
|
display: flex;
|
|
4908
4916
|
flex-direction: column;
|
|
4909
4917
|
gap: var(--spacing-sm);
|
|
4910
4918
|
list-style-type: none;
|
|
4911
|
-
`,
|
|
4919
|
+
`,j4t=x`
|
|
4912
4920
|
display: flex;
|
|
4913
4921
|
gap: var(--spacing-base);
|
|
4914
4922
|
align-items: center;
|
|
4915
|
-
`;var
|
|
4923
|
+
`;var U4t=x`
|
|
4916
4924
|
position: relative;
|
|
4917
|
-
`,
|
|
4925
|
+
`,H4t=x`
|
|
4918
4926
|
position: absolute;
|
|
4919
4927
|
inset: 0;
|
|
4920
4928
|
z-index: 1;
|
|
@@ -4941,15 +4949,15 @@ to {
|
|
|
4941
4949
|
transform-origin: right;
|
|
4942
4950
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
4943
4951
|
}
|
|
4944
|
-
`,
|
|
4952
|
+
`,K4t=x`
|
|
4945
4953
|
&::before {
|
|
4946
4954
|
opacity: 1;
|
|
4947
4955
|
}
|
|
4948
|
-
`,
|
|
4956
|
+
`,W4t=x`
|
|
4949
4957
|
&::after {
|
|
4950
4958
|
opacity: 1;
|
|
4951
4959
|
}
|
|
4952
|
-
`,
|
|
4960
|
+
`,G4t=x`
|
|
4953
4961
|
overflow-y: auto;
|
|
4954
4962
|
scroll-behavior: smooth;
|
|
4955
4963
|
scrollbar-width: none;
|
|
@@ -4957,7 +4965,7 @@ to {
|
|
|
4957
4965
|
width: 0px;
|
|
4958
4966
|
height: 0px;
|
|
4959
4967
|
}
|
|
4960
|
-
`,
|
|
4968
|
+
`,Y4t=x`
|
|
4961
4969
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
4962
4970
|
--segmented-control-border-width: 1px;
|
|
4963
4971
|
--segmented-control-selected-color: var(--accent-dark);
|
|
@@ -4976,13 +4984,13 @@ to {
|
|
|
4976
4984
|
gap: 0;
|
|
4977
4985
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
4978
4986
|
font-size: var(--fs-xs);
|
|
4979
|
-
`,
|
|
4987
|
+
`,Z4t=x`
|
|
4980
4988
|
flex-direction: column;
|
|
4981
4989
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
4982
4990
|
var(--segmented-control-rounded-value) 0 0;
|
|
4983
4991
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
4984
4992
|
var(--segmented-control-rounded-value);
|
|
4985
|
-
`,
|
|
4993
|
+
`,q4t=x`
|
|
4986
4994
|
position: relative;
|
|
4987
4995
|
|
|
4988
4996
|
&:first-of-type label {
|
|
@@ -5007,9 +5015,9 @@ to {
|
|
|
5007
5015
|
&:has(+ *:has(:checked)) label {
|
|
5008
5016
|
box-shadow: var(--segmented-control-border-width) 0 0 0 transparent;
|
|
5009
5017
|
}
|
|
5010
|
-
`,q4t=x`
|
|
5011
|
-
${p7e}
|
|
5012
5018
|
`,J4t=x`
|
|
5019
|
+
${p7e}
|
|
5020
|
+
`,X4t=x`
|
|
5013
5021
|
position: relative;
|
|
5014
5022
|
display: flex;
|
|
5015
5023
|
align-items: center;
|
|
@@ -5043,25 +5051,25 @@ to {
|
|
|
5043
5051
|
color: var(--gray-50);
|
|
5044
5052
|
background-color: var(--gray-400);
|
|
5045
5053
|
}
|
|
5046
|
-
`,X4t=x`
|
|
5047
|
-
padding-inline: 0.5em;
|
|
5048
5054
|
`,Q4t=x`
|
|
5049
|
-
|
|
5055
|
+
padding-inline: 0.5em;
|
|
5050
5056
|
`,e3t=x`
|
|
5057
|
+
opacity: 0.5;
|
|
5058
|
+
`,t3t=x`
|
|
5051
5059
|
display: flex;
|
|
5052
5060
|
align-items: center;
|
|
5053
5061
|
justify-content: center;
|
|
5054
5062
|
gap: var(--spacing-sm);
|
|
5055
5063
|
height: 100%;
|
|
5056
|
-
`,
|
|
5064
|
+
`,n3t=x`
|
|
5057
5065
|
white-space: nowrap;
|
|
5058
5066
|
`;var K8e=En`
|
|
5059
5067
|
from { opacity: 0.1; }
|
|
5060
5068
|
to { opacity: 0.025; }
|
|
5061
|
-
`,
|
|
5069
|
+
`,o3t=x`
|
|
5062
5070
|
animation: ${K8e} 1s ease-out infinite alternate;
|
|
5063
5071
|
background-color: var(--gray-500);
|
|
5064
|
-
`;var
|
|
5072
|
+
`;var s3t=x`
|
|
5065
5073
|
--color: #00b4ff;
|
|
5066
5074
|
--speed: 5s;
|
|
5067
5075
|
--red: rgb(218, 63, 50);
|
|
@@ -5698,7 +5706,7 @@ to {
|
|
|
5698
5706
|
flex-direction: row;
|
|
5699
5707
|
`,NDe=x`
|
|
5700
5708
|
flex-direction: row-reverse;
|
|
5701
|
-
`,
|
|
5709
|
+
`,m3t=(0,ZE.forwardRef)(({label:t,infoText:e,toggleText:n,children:r,switchSize:o="base",alignment:i="left",...s},a)=>{let l=e,{SwitchInputContainerAlignmentStyles:c,SwitchInputCheckedDirection:u,SwitchInputLabelAlignment:d}=(0,ZE.useMemo)(()=>i==="left"?{SwitchInputContainerAlignmentStyles:$De,SwitchInputCheckedDirection:yDe,SwitchInputLabelAlignment:CDe(o)}:{SwitchInputContainerAlignmentStyles:NDe,SwitchInputCheckedDirection:bDe,SwitchInputLabelAlignment:SDe(o)},[i,o]);return e&&n&&(l=s.checked?n:e),ie(_o,{children:[ie("label",{css:[hDe,c,u,s.disabled?xDe:void 0],children:[O("input",{type:"checkbox",css:[vDe(o),u],...s,ref:a}),O("span",{css:[wDe(o),d],children:t})]}),l?O("p",{css:[TDe,i==="left"?EDe(o):_De(o)],children:l}):null,r]})}),DDe=({cellPadding:t="var(--spacing-sm)"})=>x`
|
|
5702
5710
|
border-bottom: 1px solid var(--gray-400);
|
|
5703
5711
|
border-collapse: collapse;
|
|
5704
5712
|
min-width: 100%;
|
|
@@ -5728,7 +5736,7 @@ to {
|
|
|
5728
5736
|
font-weight: var(--fw-regular);
|
|
5729
5737
|
line-height: 1.2;
|
|
5730
5738
|
}
|
|
5731
|
-
`,
|
|
5739
|
+
`,h3t=x`
|
|
5732
5740
|
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
5733
5741
|
overflow-x: auto;
|
|
5734
5742
|
${fs}
|
|
@@ -5744,7 +5752,7 @@ to {
|
|
|
5744
5752
|
white-space: initial;
|
|
5745
5753
|
}
|
|
5746
5754
|
}
|
|
5747
|
-
`;var
|
|
5755
|
+
`;var y3t=Cd.forwardRef(({children:t,cellPadding:e,...n},r)=>O("table",{ref:r,css:DDe({cellPadding:e}),...n,children:t})),b3t=Cd.forwardRef(({children:t,...e},n)=>O("thead",{ref:n,css:LDe,...e,children:t})),x3t=Cd.forwardRef(({children:t,...e},n)=>O("tbody",{ref:n,...e,children:t})),C3t=Cd.forwardRef(({children:t,...e},n)=>O("tfoot",{ref:n,...e,children:t})),S3t=Cd.forwardRef(({children:t,...e},n)=>O("tr",{ref:n,css:ADe,...e,children:t})),w3t=Cd.forwardRef(({children:t,...e},n)=>O("th",{ref:n,css:MDe,...e,children:t})),E3t=Cd.forwardRef(({children:t,...e},n)=>O("td",{ref:n,...e,children:t})),T3t=x`
|
|
5748
5756
|
align-items: center;
|
|
5749
5757
|
border: 0;
|
|
5750
5758
|
height: 2.5rem;
|
|
@@ -5760,11 +5768,11 @@ to {
|
|
|
5760
5768
|
&[aria-selected='true'] {
|
|
5761
5769
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
5762
5770
|
}
|
|
5763
|
-
|
|
5771
|
+
`,$3t=x`
|
|
5764
5772
|
display: flex;
|
|
5765
5773
|
gap: var(--spacing-base);
|
|
5766
5774
|
border-bottom: 1px solid var(--gray-300);
|
|
5767
|
-
`;var
|
|
5775
|
+
`;var D3t=x`
|
|
5768
5776
|
align-items: center;
|
|
5769
5777
|
align-self: center;
|
|
5770
5778
|
color: var(--gray-500);
|
|
@@ -5779,29 +5787,29 @@ to {
|
|
|
5779
5787
|
content: '';
|
|
5780
5788
|
display: block;
|
|
5781
5789
|
}
|
|
5782
|
-
`,
|
|
5790
|
+
`,L3t=x`
|
|
5783
5791
|
font-size: var(--fs-sm);
|
|
5784
5792
|
&:before {
|
|
5785
5793
|
width: var(--fs-xs);
|
|
5786
5794
|
height: var(--fs-xs);
|
|
5787
5795
|
}
|
|
5788
|
-
`,
|
|
5796
|
+
`,A3t=x`
|
|
5789
5797
|
font-size: var(--fs-xs);
|
|
5790
5798
|
&:before {
|
|
5791
5799
|
width: var(--fs-xxs);
|
|
5792
5800
|
height: var(--fs-xxs);
|
|
5793
5801
|
}
|
|
5794
|
-
`,
|
|
5802
|
+
`,M3t=x`
|
|
5795
5803
|
&:before {
|
|
5796
5804
|
background: var(--white);
|
|
5797
5805
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
5798
5806
|
}
|
|
5799
|
-
`,
|
|
5807
|
+
`,O3t=x`
|
|
5800
5808
|
&:before {
|
|
5801
5809
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
5802
5810
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
5803
5811
|
}
|
|
5804
|
-
`,
|
|
5812
|
+
`,I3t=x`
|
|
5805
5813
|
color: var(--error);
|
|
5806
5814
|
&:before {
|
|
5807
5815
|
/* TODO: replace this with an svg icon */
|
|
@@ -5813,30 +5821,30 @@ to {
|
|
|
5813
5821
|
var(--error) 59%
|
|
5814
5822
|
);
|
|
5815
5823
|
}
|
|
5816
|
-
`,
|
|
5824
|
+
`,k3t=x`
|
|
5817
5825
|
&:before {
|
|
5818
5826
|
background: var(--accent-dark);
|
|
5819
5827
|
}
|
|
5820
|
-
`,
|
|
5828
|
+
`,R3t=x`
|
|
5821
5829
|
&:before {
|
|
5822
5830
|
background: var(--brand-secondary-5);
|
|
5823
5831
|
}
|
|
5824
|
-
`,
|
|
5832
|
+
`,P3t=x`
|
|
5825
5833
|
&:before {
|
|
5826
5834
|
background: var(--gray-800);
|
|
5827
5835
|
}
|
|
5828
|
-
`,
|
|
5836
|
+
`,F3t=x`
|
|
5829
5837
|
&:before {
|
|
5830
5838
|
background: var(--error);
|
|
5831
5839
|
}
|
|
5832
5840
|
`;await ut();var qE=I(V());function GO(t){let[,e]=t.split(":");return e}var gie="${",hie="}";var vie=I(V());function yie({displayName:t,referenceIsValid:e,tooltip:n,reference:r,onClick:o,clickToEdit:i,isFresh:s,selected:a,disabled:l,errorMessage:c=`${r} is not defined.`}){let u=!!o,d=s?!0:e,f=d==="warning"?kDe:d==="info"?IDe:d?vie.Fragment:ODe,p=d?u&&i?"Click to edit":void 0:c,m=React.createElement(Soe,{onClick:o,"aria-selected":a?!0:void 0,"aria-disabled":l},React.createElement(f,null,t||r));if(n){let h=(n?`${n}${p?`
|
|
5833
5841
|
|
|
5834
5842
|
${p}`:""}`:p??"").split(`
|
|
5835
|
-
`);return React.createElement(FE,{title:React.createElement($O,{gap:"sm"},h.map((v,y)=>React.createElement("div",{key:y},v)))},React.createElement("span",null,m))}return m}function ODe({children:t}){return React.createElement("span",{style:{textDecoration:"underline",textDecorationStyle:"wavy",textDecorationColor:"var(--error)"}},t)}function IDe({children:t}){return React.createElement("span",{style:{textDecoration:"underline",textDecorationStyle:"wavy",textDecorationColor:"var(--primary-action-default)"}},t)}function kDe({children:t}){return React.createElement("span",{style:{textDecoration:"underline",textDecorationStyle:"wavy",textDecorationColor:"var(--alert)"}},t)}import{createVariableReference as W3t}from"@uniformdev/canvas";await ut();var Tb=I(V()),RDe=I(Bs());var eSt=bt("uniform:open-insert-variable"),bie=bt("uniform:edit-variable"),tSt=bt("uniform:disconnect-variable"),nSt=bt("uniform:insert-variable");var s0=class t extends gu{constructor(n,r,o){super(o);this.reference=n;this.__variableState=r}__variableState;static getType(){return"variable"}static clone(n){return new t(n.reference,{...n.__variableState},n.__key)}static importJSON(n){return xie(n.reference,{displayName:GO(n.reference),referenceIsValid:!0,isFresh:!1,hasClickEvent:void 0,tooltip:void 0,isLoading:!1})}getState(){return this.getLatest().__variableState}setState(n){this.getWritable().__variableState=n}exportJSON(){return{reference:this.reference,type:t.getType(),version:1}}getTextContent(){return PDe(this.reference)}createDOM(){return document.createElement("span")}updateDOM(){return!1}static importDOM(){return{binding:()=>({conversion:FDe,priority:0})}}decorate(){return React.createElement(zDe,{state:this.__variableState,reference:this.reference,nodeKey:this.__key})}};function FDe(t){let n=t.textContent.replace(gie,"").replace(hie,"");return{node:xie(n,{displayName:GO(n),hasClickEvent:!0,referenceIsValid:!0,tooltip:void 0,isFresh:!0,isLoading:!1})}}function xie(t,e){return new s0(t,e)}function BDe(t){return t instanceof s0}function zDe({state:t,reference:e,nodeKey:n}){let[r]=Lg(),[o,i,s]=gG(n),a=!r.isEditable(),l=(0,qE.useCallback)(c=>{if(o&&qe(H())){c.preventDefault();let u=rt(n);BDe(u)&&u.remove()}return!1},[o,n]);return(0,qE.useEffect)(()=>ot(r.registerCommand(va,l,Ae),r.registerCommand(ha,l,Ae),r.registerCommand(ni,c=>{let u=H();if(qe(u)){let d=u.getNodes();if(d.length>0)return c.preventDefault(),d[0].selectPrevious(),!0}if(!U(u))return!1;if(Rl(u,!0)){let d=c.shiftKey;return c.preventDefault(),kl(u,d,!0),!0}return!1},pe),r.registerCommand(ga,c=>{let u=H();if(qe(u)&&!jDe(c.target)){let f=u.getNodes();if(f.length>0)return c.preventDefault(),f[0].selectNext(0,0),!0}if(!U(u))return!1;let d=c.shiftKey;return Rl(u,!1)?(c.preventDefault(),kl(u,d,!1),!0):!1},pe)),[s,r,o,n,l,i]),React.createElement(yie,{...t,reference:e,displayName:t.isLoading?React.createElement(Boe,{size:"sm"}):t.displayName,selected:o,disabled:a,clickToEdit:t.hasClickEvent,onClick:t.hasClickEvent?()=>{i(!o),r.dispatchCommand(bie,{reference:e,sourceKey:n})}:()=>i(!o)})}function jDe(t){let e=ct(t);return Yn(e)}await ut();await ut();var $b=class t extends gu{__asset;__assetQuery;__upload;__error;getAsset(){return this.getLatest().__asset}setAsset(e){let n=this.getWritable();n.__asset=e}getAssetQuery(){return this.getLatest().__assetQuery}setAssetQuery(e){let n=this.getWritable();n.__assetQuery=e}getUpload(){return this.getLatest().__upload}setUpload(e){let n=this.getWritable();n.__upload=e}getError(){return this.getLatest().__error}setError(e){let n=this.getWritable();n.__error=e}static getType(){return"asset"}constructor(e,n,r,o,i){super(i),this.__asset=e,this.__upload=n,this.__error=o,this.__assetQuery=r}static clone(e){return new t(e.__asset,e.__upload,e.__assetQuery,e.__error,e.__key)}exportJSON(){let e={type:"asset",version:1};if(this.__asset&&(e.__asset=this.__asset),this.__assetQuery&&(e.__assetQuery=this.__assetQuery),this.__upload&&"fileUrl"in this.__upload){let{fileUrl:n,suggestedAltText:r,suggestedCaption:o}=this.__upload;e.__upload={fileUrl:n,suggestedAltText:r,suggestedCaption:o}}return this.__error&&(e.__error=this.__error),e}static importJSON(e){return YO({asset:e.__asset,assetQuery:e.__assetQuery,upload:e.__upload,error:e.__error})}static importDOM(){return{img:()=>({conversion:e=>VDe(e,YO),priority:0}),figure:()=>({conversion:e=>UDe(e,YO),priority:0})}}createDOM(e){let n=document.createElement("span"),o=e.theme.image;return o!==void 0&&(n.className=o),n}updateDOM(){return!1}isInline(){return!1}};function YO({asset:t,upload:e,assetQuery:n,error:r}){return $t(new $b(t,e,n,r))}function Cie(t){return t.parentElement!=null&&t.parentElement.tagName==="LI"&&t.previousSibling===null&&t.getAttribute("aria-roledescription")==="checkbox"}function VDe(t,e){let n=t;if(n.src.startsWith("file:///")||Cie(n))return null;let{alt:r,src:o}=n;return{node:Sie({altText:r,src:o,createAssetNode:e})}}function UDe(t,e){let n=t,r=n.querySelector("img"),o=n.querySelector("figcaption");if(!r||r.src.startsWith("file:///")||Cie(r))return null;let{alt:i,src:s}=r;return s.startsWith("uniform://")?{node:e({assetQuery:{id:r.src.split("uniform://")[1],suggestedAltText:i,suggestedCaption:o?.textContent??void 0}})}:{node:Sie({altText:i,src:s,caption:o?.textContent??void 0,createAssetNode:e})}}function Sie({altText:t,src:e,caption:n,createAssetNode:r}){return r({asset:void 0,upload:{fileUrl:e,suggestedAltText:t,suggestedCaption:n},assetQuery:void 0})}var HDe=t=>new DOMParser().parseFromString(t,"text/html");function wie(t,e=HDe){let n=qV({nodes:[$a,Ta,UO,yg,bg,Fm,VW,jW,UW,jl,$b,s0]}),r=e(t);return n.update(()=>{b7("skip-dom-selection");let o=Xm(n,r);Tt().select(),As(o)},{discrete:!0}),n.getEditorState().toJSON()}function Eie({twee:t,nodeId:e,propertyId:n,propertyType:r,locale:o,propertyEdit:i,conditionIndex:s=-1,definitionIndex:a,domParser:l}){let c=t.getNodeById(e);if(!c)throw new Error(`Node with ID ${e} not found`);if(i.action==="clearValue")t.updateNodeProperty({nodeId:e,property:n,value:null,source:"ai",locale:o,conditionIndex:-1});else if(i.action==="resetOverride")t.resetPatternPropertyOverride(e,n,o);else if(i.action==="setValue"){if(r==="contentReference"){QDe({twee:t,nodeId:e,targetNode:c,propertyId:n,propertyType:r,propertyEdit:i,locale:o,conditionIndex:s,definitionIndex:a});return}let u=XDe({twee:t,targetNode:c,propertyId:n,propertyType:r,propertyEdit:i,domParser:l}),d=t.getNodeProperty(e,n);if(!o&&d?.locales)throw new Error(`The ${n} property is localized in ${Object.keys(d.locales).join(", ")}, but no locale was provided when setting its value. Please provide an explicit locale.`);if(n===GDe){let f=t.getParentInfo(e);if(f?.parentId){let p=t.getNodeProperty(f.parentId,WDe);if(p?.value!==Dk)throw new Error(`Cannot edit personalization criteria when the parent personalization component is not using the Strongest Variation Match selection method. Current selection method: ${p?.value||"Top-down criteria matching"}.`)}}t.updateNodeProperty({nodeId:e,property:n,value:()=>u,source:"ai",locale:o,conditionIndex:s,type:r})}}var XDe=({twee:t,targetNode:e,propertyId:n,propertyType:r,propertyEdit:o,domParser:i})=>{if(r==="richText")return wie(o.newValue??"",i);if(r==="number")return Number(o.newValue);if(n===KDe){if(JDe(e.value.type))throw new Error("Enrichment tags are not allowed in system components.");if(t.getParentInfo(e.nodeId)?.parentId===YDe)throw new Error("Enrichment tags are not allowed in personalization variants.")}return o.treatNewValueAsJson?JSON.parse(o.newValue):o.newValue};function QDe({twee:t,nodeId:e,targetNode:n,propertyId:r,propertyType:o,propertyEdit:i,locale:s,conditionIndex:a,definitionIndex:l}){let c=zp(n.nodeId,r,s,a),u;try{u=i.treatNewValueAsJson?JSON.parse(i.newValue):i.newValue}catch(y){throw new Error(`Invalid reference field data: ${y instanceof Error?y.message:"Unknown error"}`)}if(!u||typeof u!="object"||u.type!==ll)throw new Error("Invalid reference field definition received from AI");let d=u.variables?.entryIds;if(!d||typeof d!="string"||d.length===0){t.updateNode({nodeId:n.nodeId,updateDataResources:[{type:"remove",name:c}]}),t.updateNodeProperty({nodeId:e,property:r,value:null,source:"ai",locale:s,conditionIndex:a,type:o});return}let m=l[n.value.type]?.parameters?.find(({id:y})=>y===r)?.typeConfig?.isMulti??!1,g=Ek(d,{targetLocale:s,enabledLocales:t.getNodeById(t.rootNodeId)?.value._locales??[]});t.updateNode({nodeId:n.nodeId,updateDataResources:[{type:"set",name:c,value:g}]});let h=`/${c}/entries${m?"":"/0"}`,v=qDe(ZDe({syntax:"jptr",pointer:h}));t.updateNodeProperty({nodeId:e,property:r,value:()=>v,source:"ai",locale:s,conditionIndex:a,type:o})}import{validate as eLe}from"uuid";var _ie=t=>eLe(t)?t:btoa(t);function a0(t,e,n="Component instance"){let r=t.getNodeById(e);if(r)return r;let o=[];if(t.visitNodeAndDescendants(t.rootNodeId,i=>{i.nodeId!==e&&i.nodeId.includes(e)&&o.push(i.nodeId)}),o.length>0){let i=o.map(s=>`"${_ie(s)}"`).join(", ");throw new Error(`${n} with ID ${e} not found. You might have meant one of these IDs that does exist: ${i}. Component IDs should be used exactly as provided in the _id field.`)}throw new Error(`${n} with ID ${e} not found`)}async function JE({twee:t,slotUpdates:e,propertyUpdates:n,dataResourceUpdates:r,localeUpdates:o,nameUpdate:i,slugUpdate:s,descriptionUpdate:a,currentEditorLocale:l,referenceData:c,dataSourceVariant:u,onStatusUpdate:d,isEditingPattern:f,domParser:p}){let m=[],g=(i?1:0)+(s?1:0)+(a?1:0)+(e.createComponentInstances?.length??0)+(e.moveComponentInstances?.length??0)+(e.duplicateComponentInstances?.length??0)+(e.deleteComponentInstances?.length??0)+(o?.enableLocales?.length??0)+(o?.disableLocales?.length??0)+n.length,h=0,v=C=>{m.push(C),h++,d?.({completed:h,total:g})};i&&(t.updateRootNode({update:{_name:i}}),v({summary:"Updated name",success:!0})),s&&(t.updateRootNode({update:{_slug:s}}),v({summary:"Updated slug",success:!0})),a&&(t.updateRootMetadata({description:a}),v({summary:"Updated description",success:!0}));let y=await c.fetchDefinitions();await oLe({slotUpdates:e,twee:t,definitions:y,referenceData:c,addResult:v,isEditingPattern:f});let b=m.some(C=>!C.success);if(b?e.moveComponentInstances?.forEach(C=>{m.push({summary:`Skipped moving component ${C.componentId} because previous actions failed`,success:!1})}):await iLe({slotUpdates:e,twee:t,definitions:y,addResult:v,isEditingPattern:f}),b=m.some(C=>!C.success),e.duplicateComponentInstances)for(let C of e.duplicateComponentInstances)if(b)v({summary:`Skipped duplicating component ${C} because previous actions failed`,success:!1});else{let w=await t.duplicateNode(C,c.resolvePatternData);v({summary:`Duplicated component ${C}. The new duplicate has ID ${w} and is placed immediately after the original component in the same slot.`,success:!0})}return b=m.some(C=>!C.success),e.deleteComponentInstances?.forEach(C=>{b?v({summary:`Skipped deleting component ${C} because previous actions failed`,success:!1}):(t.deleteNode(C,!1),v({summary:`Deleted component ${C}`,success:!0}))}),b=m.some(C=>!C.success),o?.enableLocales?.forEach(C=>{b?v({summary:`Skipped enabling locale ${C} because previous actions failed`,success:!1}):(t.enableLocale(C),v({summary:`Enabled locale ${C}`,success:!0}))}),b=m.some(C=>!C.success),o?.disableLocales?.forEach(C=>{b?v({summary:`Skipped disabling locale ${C} because previous actions failed`,success:!1}):(t.disableLocale(C),v({summary:`Disabled locale ${C}`,success:!0}))}),b=m.some(C=>!C.success),b?n.length>0&&v({summary:`Skipped ${n.length} property updates because previous actions failed`,success:!1}):(await sLe({propertyUpdates:n,twee:t,currentEditorLocale:l,referenceData:c,definitions:y,addResult:v})).forEach(w=>{if(!w.result.success)return;let E="componentId"in w.update?w.update.componentId:t.rootNodeId,_=X5({twee:t,nodeId:E,currentEditorLocale:w.currentLocale,definition:w.propertyDefinition}),$=(t.getNodeById(t.rootNodeId)?.value)._locales??[];if(_&&!$.includes(_)){v({summary:`The ${_} locale is not enabled on this entity. Please enable it before setting values in this locale.`,success:!1});return}if(w.result.action!=="nothing")try{Eie({twee:t,nodeId:E,propertyId:w.propertyDefinition.id,propertyType:w.propertyDefinition.type,locale:_,propertyEdit:w.result,definitionIndex:y,domParser:p}),v({summary:`Updated value of ${w.propertyDefinition.id} on ${E}${_?` in ${_}`:""}`,success:!0})}catch(T){v({summary:`Failed to update value of ${w.propertyDefinition.id} on ${E}${_?` in ${_}`:""}: ${T instanceof Error?T.message:"Unknown error"}`,success:!1})}if("overridable"in w.update&&w.update.overridable!==void 0)if(w.propertyDefinition.type===tLe)v({summary:`Cannot set overridability for block property '${w.propertyDefinition.id}' - blocks do not support overrides`,success:!1});else{let T=w.update.overridable;t.updateNode({nodeId:E,updateComponent:N=>{N._overridability??={},N._overridability.parameters??={},N._overridability.parameters[w.propertyDefinition.id]=T}}),v({summary:`Updated overridability for ${E}`,success:!0})}}),b=m.some(C=>!C.success),b?r.length>0&&m.push({summary:`Skipped ${r.length} data resource updates because previous actions failed`,success:!1}):(await aLe({dataResourceUpdates:r,twee:t,referenceData:c,results:m,dataSourceVariant:u})).forEach(w=>{if(!w.result.success)return;let E=w.update.componentId;if(w.result.action==="resetOverride")t.updateNode({nodeId:E,updateDataResources:[{type:"reset",name:w.update.dataResourceName}]}),m.push({summary:`Reset data resource to pattern default for ${w.update.dataResourceName} on ${E}`,success:!0});else if(w.result.action==="setValue")try{_k({twee:t,nodeId:E,dataResourceName:w.update.dataResourceName,dataType:w.dataType,dataResourceEdit:w.result}),m.push({summary:`Updated data resource ${w.update.dataResourceName} on ${E}`,success:!0})}catch(_){m.push({summary:`Failed to update data resource ${w.update.dataResourceName} on ${E}: ${_ instanceof Error?_.message:"Unknown error"}`,success:!1})}}),{success:m.every(C=>C.success),actionsTaken:m}}async function oLe({slotUpdates:t,twee:e,definitions:n,referenceData:r,addResult:o,isEditingPattern:i}){(await Promise.allSettled(t.createComponentInstances?.map(async a=>{let l=a0(e,a.parentComponentId,"Parent component");if(!n[l.value.type])throw new Error(`Definition for parent component type ${l.value.type} not found`);let u=J5({twee:e,parentNodeId:a.parentComponentId,slotName:a.slotName,componentDefinitionsIndex:n});if(!u)throw new Error(`Can't find allowed components for slot ${a.slotName}`);if(a.instanceType==="component"){if(!a.componentType)throw new Error("componentType is required when inserting a component instance");if(!$x({type:a.componentType},u,i))throw new Error(`Component type ${a.componentType} is not allowed in slot ${a.slotName}`);e.insertNode({node:{type:a.componentType},overrideNodeId:a.newComponentInstanceUuid,parentNodeId:a.parentComponentId,parentSlot:a.slotName,targetIndexInSlot:a.slotIndex}),o({summary:`Inserted component ${a.componentType} in slot ${a.slotName} ${a.slotIndex!==void 0?`at index ${a.slotIndex}`:""}`,success:!0})}else{if(!a.componentPatternId)throw new Error("componentPatternId is required when inserting a component pattern instance");let d=await r.resolvePatternData(a.componentPatternId);if(!d)throw new Error(`Pattern definition with ID ${a.componentPatternId} not found`);if(!$x({type:d.type,_pattern:a.componentPatternId},u,!1))throw new Error(`Pattern ${a.componentPatternId} is not allowed in slot ${a.slotName}`);e.insertPattern({pattern:d,patternInstanceId:a.newComponentInstanceUuid,parentNodeId:a.parentComponentId,parentSlot:a.slotName,targetIndexInSlot:a.slotIndex}),o({summary:`Inserted pattern ${d._name} in slot ${a.slotName} ${a.slotIndex!==void 0?`at index ${a.slotIndex}`:""}`,success:!0})}})??[])).forEach((a,l)=>{if(a.status==="rejected"){let c=t.createComponentInstances?.[l];console.error("Error inserting component",a.reason),o({summary:`Failed to insert component ${c?.newComponentInstanceUuid}: ${"message"in a.reason?a.reason.message:"Unknown error"}`,success:!1})}})}async function iLe({slotUpdates:t,twee:e,definitions:n,addResult:r,isEditingPattern:o}){(await Promise.allSettled(t.moveComponentInstances?.map(async s=>{let a=a0(e,s.componentId,"Component to move"),l=a0(e,s.newParentComponentId,"Destination component");if(!n[l.value.type])throw new Error(`Definition for destination component type ${l.value.type} not found`);let u=J5({twee:e,parentNodeId:s.newParentComponentId,slotName:s.newSlotName,componentDefinitionsIndex:n});if(!u)throw new Error(`Can't find allowed components for slot ${s.newSlotName}`);if(!$x({type:a.value.type,_pattern:a.value._pattern},u,o))throw new Error(a.value._pattern?`Pattern ${a.value._pattern} is not allowed in slot ${s.newSlotName}`:`Component ${a.value.type} is not allowed in slot ${s.newSlotName}`);e.moveNode({movedNodeId:s.componentId,parentNodeId:s.newParentComponentId,parentSlot:s.newSlotName,targetIndexInSlot:s.newSlotIndex}),r({summary:`Moved component ${s.componentId} to ${s.newParentComponentId} in slot ${s.newSlotName} at index ${s.newSlotIndex}`,success:!0})})??[])).forEach((s,a)=>{if(s.status==="rejected"){let l=t.moveComponentInstances?.[a];console.error("Error moving component",s.reason),r({summary:`Failed to move component ${l?.componentId}: ${"message"in s.reason?s.reason.message:"Unknown error"}`,success:!1})}})}async function sLe({propertyUpdates:t,twee:e,currentEditorLocale:n,referenceData:r,definitions:o,addResult:i}){if(t.length===0)return[];let[s,a]=await Promise.all([r.fetchProjectGuidance(),r.getToolClient()]),l=await Promise.allSettled(t.map(async c=>(async()=>{let u="componentId"in c?c.componentId:e.rootNodeId,d=a0(e,u),f=o[d.value.type];if(!f)throw new Error(`Definition with ID ${d.value.type} not found`);let p="fieldId"in c?c.fieldId:c.parameterId,m=f.parameters?.find(w=>w.id===p),g=c.fromLocale??c.locale??n,h=c.locale??n,v=m??{id:p,type:"unknown"};if(c.editInstructions===void 0)return{result:{success:!0,newValue:"",treatNewValueAsJson:!1,action:"nothing"},update:c,propertyDefinition:v};if(c.editInstructions==="")return{result:{success:!0,newValue:"",treatNewValueAsJson:!1,action:"clearValue"},update:c,propertyDefinition:v};if(!m)throw new Error(`Property with ID ${p} not found`);if(m.type==="contentReference"){let w=X5({definition:m,twee:e,nodeId:u,currentEditorLocale:n}),E=zp(u,p,w,-1),_=d.value._dataResources?.[E],$=await a.invoke("createDataResourceEdit",{edit:c.editInstructions,dataType:ll,currentValue:_?.variables||{}});if(!$.success)throw new Error($.summary??"Failed to edit reference field data resource");return{result:{success:!0,newValue:JSON.stringify({type:ll,variables:$.newValue}),treatNewValueAsJson:!0,action:"setValue"},update:c,propertyDefinition:m,currentLocale:w}}let y=nLe({property:e.getNodeProperty(u,p),locale:g,conditionIndex:-1}),b,S=e.getNodeProperty(u,rLe);S?.value?.dim&&(b=await r.getDimensionGuidance(S.value.dim));let C=await a.invoke("createPropertyEdit",{edit:c.editInstructions,propertyDefinition:{id:p,name:m.name,type:m.type,guidance:m.guidance,typeConfig:m.typeConfig},outputLocale:h,documentContext:void 0,currentValue:y,projectGuidance:s,componentGuidance:f.description,audienceGuidance:b});if(!C.success)throw new Error(C.summary??"Failed to edit property");return{result:C,update:c,propertyDefinition:m,currentLocale:h}})()));return l.forEach((c,u)=>{if(c.status==="rejected"){let d=t[u],f="fieldId"in d?d.fieldId:d.parameterId;i({summary:`Failed to edit property ${f}: ${"message"in c.reason?c.reason.message:"Unknown error"}`,success:!1})}}),l.filter(c=>c.status==="fulfilled").map(c=>c.value)}async function aLe({dataResourceUpdates:t,twee:e,referenceData:n,results:r,dataSourceVariant:o}){if(t.length===0)return[];let i=await n.getToolClient(),s=await Promise.allSettled(t.map(async a=>(async()=>{let l=a.componentId,c=a0(e,l);if(a.editInstructions===void 0)return{result:{success:!0,newValue:{},action:"nothing"},update:a,dataType:"unknown"};if(a.editInstructions==="")return{result:{success:!0,newValue:{},action:"setValue"},update:a,dataType:"unknown"};let u=c.value._dataResources?.[a.dataResourceName],d=c.value._patternDataResources?.[a.dataResourceName];if(!d)throw new Error(`Pattern data resource ${a.dataResourceName} does not exist on the ${c.value._pattern} pattern`);let f=u?.variables??d.variables,p=d.type,m=await i.invoke("createDataResourceEdit",{edit:a.editInstructions,dataType:p,currentValue:f,dataSourceVariant:o});if(!m.success)throw new Error(m.summary??"Failed to edit data resource");return{result:m,update:a,dataType:p}})()));return s.forEach((a,l)=>{if(a.status==="rejected"){let c=t[l];r.push({summary:`Failed to edit data resource ${c.dataResourceName}: ${"message"in a.reason?a.reason.message:"Unknown error"}`,success:!1})}}),s.filter(a=>a.status==="fulfilled").map(a=>a.value)}import{CANVAS_BLOCK_PARAM_TYPE as Gs,CANVAS_ENRICHMENT_TAG_PARAM as sse,CANVAS_LOCALE_TAG_PARAM as Ab,CANVAS_LOCALIZATION_SLOT as iI,CANVAS_LOCALIZATION_TYPE as JLe,CANVAS_PERSONALIZATION_PARAM as Mb,CANVAS_PERSONALIZE_SLOT as ase,CANVAS_SLOT_SECTION_SLOT as XLe,CANVAS_SLOT_SECTION_TYPE as o5,CANVAS_TEST_SLOT as lse,CANVAS_TEST_VARIANT_PARAM as cse,CANVAS_VIZ_CONTROL_PARAM as Sd,convertToBindExpression as use,createVariableReference as dse,getEffectivePropertyValue as fse,getPropertiesValue as QLe,parseVariableExpression as pse,walkNodeTree as Cc,walkPropertyValues as eAe}from"@uniformdev/canvas";var Lp=I(ZO(),1),gse=I(E0(),1);import{produce as tr}from"immer";import{v4 as wd}from"uuid";import{v4 as dLe}from"uuid";async function Die({projectMapClient:t,compositionId:e,compositionName:n,nodePathSegment:r,parentNodeId:o,localePathSegments:i,allowedQueryStrings:s}){let l=(await t.getProjectMapDefinition({}))?.projectMaps[0]?.id;if(!l)throw new Error("No project map found for this project");let c=r||i?.[0]?.pathSegment,u,d=0;if(o){let h=(await t.getNodes({id:o})).nodes?.[0];if(!h)throw new Error("Parent node not found");let v=h.path;d=((await t.getNodes({path:v,depth:1,expanded:!1})).nodes?.filter(C=>C.path!==v)??[]).reduce((C,w)=>Math.max(C,w.order??0),-1)+100,u=`${v==="/"?"":v}/${c}`}else u=`/${c}`;let f=i?.reduce((g,{locale:h,pathSegment:v})=>(g[h]={pathSegment:v,name:v},g),{}),p=s?.map(({name:g,defaultValue:h})=>({name:g,...h!==void 0&&{value:h}})),m=dLe();return await t.upsertProjectMapNodes({projectMapId:l,nodes:[{node:{id:m,name:n,path:u,type:"composition",compositionId:e,order:d,...f&&{locales:f},...p&&{data:{queryStrings:p}}}}]}),{path:u,nodeId:m}}import{bindVariablesToObject as fLe}from"@uniformdev/canvas";var Nb="Untitled",Lie=60;function Aie({value:t,isNew:e,contentType:n}){let{result:r}=fLe({value:t,handleBinding:()=>"{token}",variables:{}}),o=n.entryName??"",i=(n.fields??[]).find(s=>s.id===o);if(typeof r=="string"){if(i?.type==="image")return r.length>0?`Image: ${mLe(r)}`:`${Nb} image`;if(r.length>0)return i?.type==="date"?hLe(r)?vLe(r):"Invalid date":Np(r)}else{if(typeof r=="number"||typeof r=="boolean")return r.toString();if(typeof r<"u"&&r!==null){if(i?.type==="link")return pLe(r);if(uk(r))return Np(Y5(r.root));if(i?.type==="datetime"&&r){let s=r;return s.datetime&&Mie(s.datetime)?yLe(s.datetime):"Invalid datetime"}else return Np(bLe(r).description)}}return e?`New entry: ${n.name}`:Nb}function pLe(t){return t?t.type==="projectMapNode"?t.path.length>0?`Link to ${Np(t.path)}`:`Link to project map node (${t.nodeId})`:t.path.length>0?`Link to ${Np(t.path)}`:`${Nb} link`:`${Nb} link`}function mLe(t){try{let{pathname:e,hostname:n}=new URL(t),r=e.split("/").filter(o=>o);return r.length>2?`/${r[0]}/.../${r[r.length-1]} (${Np(n)})`:`${e} (${Np(n)})`}catch{return t}}function Np(t){let e=t.split(" ").filter(i=>i).reverse();if(e.length<1)return Nb;let n="",r=e.pop(),o=()=>n.length+(r?.length??0)+(n.length>0?1:0);for(;r&&o()<Lie;)n+=n.length>0?` ${r}`:r,r=e.pop();return n.length<1?`${t.slice(0,Lie)}...`:e.length>0?`${n}...`:n}var gLe=/^[1-9][0-9]{3}-[0-1][0-9]-[0-3][0-9]$/;function hLe(t){return gLe.test(t)?Mie(t):!1}function Mie(t){let e=new Date(t);return e instanceof Date&&!isNaN(Number(e))}function vLe(t){return new Date(t).toLocaleDateString()}function yLe(t){return new Date(t).toLocaleString()}function bLe(t){let e=qO(t);return e?{description:e,named:!0}:{description:xLe(t).valuePreview,named:!1}}function xLe(t){if(typeof t>"u")return{valueIcon:"close-o",valuePreview:"undefined"};if(t===null)return{valueIcon:"close-o",valuePreview:"null"};if(Array.isArray(t))return{valuePreview:`array with ${t.length} item${t.length!==1?"s":""}`,valueIcon:"list"};if(typeof t=="boolean")return{valuePreview:t.toString(),valueIcon:t?"check-r":"close-r"};if(typeof t=="number"||typeof t=="bigint")return{valuePreview:t.toString(10),valueIcon:"number-input"};if(typeof t=="object"){let e=Object.keys(t);return{valuePreview:`object with ${e.length} ${e.length!==1?"properties":"property"}`,valueIcon:"shape-hexagon"}}return{valuePreview:t,valueIcon:"text-input"}}var CLe=["displayName","name","_name","title","heading","label","parameters","fields","properties","entry","slug","_slug","alt","alt_description","description","results","items","entries","hits","value","id","objectID","identifier"];function qO(t){if(typeof t=="string")return t;if(typeof t=="number")return t.toString(10);if(typeof t=="boolean")return t.toString();if(typeof t!="object"||t===null)return;if(Array.isArray(t)){if(t.length===0)return;let r=qO(t[0]);return r?t.length===1?r:`${r} and ${t.length-1} other${t.length>2?"s":""}`:void 0}let n=t;for(let r of CLe)if(r in n){let o=qO(n[r]);if(o)return o}}import{CANVAS_SLOT_SECTION_SLOT as SLe,walkNodeTree as wLe}from"@uniformdev/canvas";import{v4 as Oie}from"uuid";var Db="|";function XE(t,e){if(!t)return e??Oie();let n=t.split(Db),r=(e??Oie()).split(Db);return n.at(-1)===r[0]&&n.pop(),n.concat(r).join(Db)}function kie(t){let e=t.indexOf(Db);if(e<0)throw new Error(`Cannot remove pattern instance ID from ${t}`);return t.substring(e+1)}function QE(t,e,n=!1){wLe(t,({node:r,actions:{setDescendantsContext:o},context:i})=>{let s=!n&&!i?.currentParentPatternInstanceId,a="_pattern"in r&&!!r._pattern;if(i?.currentParentPatternInstanceId){let c=XE(i.currentParentPatternInstanceId,r._id);r._id=c}let l=i?.currentParentPatternInstanceId;a&&(l=r._id),"_overrides"in r&&r._overrides&&Iie(r._overrides,l,s),"_patternOverrides"in r&&r._patternOverrides&&Iie(r._patternOverrides,l,s),a&&o({currentParentPatternInstanceId:r._id})},{initialContext:{currentParentPatternInstanceId:e}})}var Iie=(t,e,n)=>{Object.entries(t).forEach(([r,o])=>{let i=n?r:XE(e,r);Object.entries(o.slots??{}).forEach(([s,a])=>{a.forEach(l=>{let{partOfNestedPattern:c}=e5(r??"");QE(l,s===SLe&&!c?void 0:e,!0)})}),i&&(delete t[r],t[i]=o)})};function e5(t){let e=t.split(Db);return e.length===1?{partOfPattern:void 0,partOfNestedPattern:void 0}:e.length===2?{partOfPattern:e[0],partOfNestedPattern:void 0}:{partOfPattern:e[0],partOfNestedPattern:e[e.length-2]}}import{CANVAS_SLOT_SECTION_SLOT as jie}from"@uniformdev/canvas";import{CANVAS_VIZ_CONTROL_PARAM as NLe}from"@uniformdev/canvas";import{CANVAS_ENRICHMENT_TAG_PARAM as Rie,CANVAS_INTENT_TAG_PARAM as ELe,CANVAS_LOCALE_TAG_PARAM as _Le,CANVAS_PERSONALIZATION_PARAM as Pie,CANVAS_TEST_VARIANT_PARAM as TLe,CANVAS_VIZ_CONTROL_PARAM as Fie}from"@uniformdev/canvas";var $Le="$internal_displayName",Bie=[{id:$Le,name:"Display Name",type:"text"},{id:ELe,name:"Intent Tag",type:"intentTag"},{id:_Le,name:"Locale Visibility",type:"localeSelect"},{id:Pie,name:"Personalization Criteria",type:Pie},{id:Rie,name:"Enrichment Tags",type:Rie,helpText:"Seeing this component will increase a visitor's score in these enrichments."},{id:TLe,name:"A/B Test",type:"testVariant"},{id:Fie,name:"Visibility Control",type:Fie}];var DLe=Bie.reduce((t,e)=>(e.id===NLe||t.add(e.id),t),new Set);function Dp(t,e){return DLe.has(e)?"yes":t?.parameters?.[e]??"no"}function JO(t,e){e&&Object.entries(e).forEach(([n,r])=>{let o=t[n];if(r.parameters||o?.parameters){t[n]??={};let i={...r?.parameters};Object.entries(o?.parameters??{}).forEach(([s,a])=>{let l=i[s];if(!l)i[s]=a;else if(a.locales||a.localesConditions||l.locales||l.localesConditions){let c={...l,...a};(a.locales||l.locales)&&(c.locales={...l.locales,...a.locales}),(a.localesConditions||l.localesConditions)&&(c.localesConditions={...l.localesConditions,...a.localesConditions}),i[s]=c}else i[s]={...l,...a}}),t[n].parameters=i}if((r.dataResources||o?.dataResources)&&(t[n]??={},t[n].dataResources={...r?.dataResources,...o?.dataResources}),r.slots||o?.slots){t[n]??={};let i=Object.entries(o?.slots??{}).reduce((s,[a,l])=>(s[a]&&Array.isArray(s[a])?s[a]=[...l,...s[a]]:s[a]=l,s),r.slots??{});t[n].slots=i}(r.variant!==void 0||o?.variant!==void 0)&&(t[n]=t[n]??{},t[n].variant=o?.variant??r?.variant)})}function zie({applyOverrideToNode:t}){let e=new Set,n={};return{visitNode(r){e.add(r._id),JO(n,r._overrides),JO(n,r._patternOverrides);let o=n[r._id];o&&(o.parameters&&Object.keys(o.parameters).forEach(i=>{Dp(r._overridability,i)==="no"&&(console.log(`[Override] Cleaned override from ${r._id} parameter ${i} because it is not overridable`),delete n[r._id].parameters?.[i])}),o.dataResources&&Object.keys(o.dataResources).forEach(i=>{r._patternDataResources?.[i]?.isPatternParameter||(console.log(`[Override] Cleaned override from ${r._id} data resource ${i} because it is not overridable`),delete n[r._id].dataResources?.[i])}),o.variant!==void 0&&(r._overridability?.variants||delete o.variant),t({node:r,overrides:o}))},overrides:n}}function XO(t){let{beforeApplyParameterOverride:e,beforeApplyDataResourceOverride:n}=t??{};return zie({applyOverrideToNode({node:r,overrides:o}){if(Object.entries(o.parameters??{}).map(([i,s])=>{r.parameters=r.parameters??{},e?.(r,i,s,r.parameters[i]);let a=r.parameters[i]??={type:s.type};s.locales||s.localesConditions?(a.locales??={},delete a.value,delete a.conditions,new Set([...Object.keys(s.locales??{}),...Object.keys(s.localesConditions??{})]).forEach(u=>{delete a.locales?.[u],delete a.localesConditions?.[u];let d=s.locales?.[u],f=s.localesConditions?.[u];d!=null&&(a.locales??={},a.locales[u]=d),f!=null&&(a.localesConditions??={},a.localesConditions[u]=f)}),a.locales&&Object.keys(a.locales).length===0&&delete a.locales,a.localesConditions&&Object.keys(a.localesConditions).length===0&&delete a.localesConditions):(delete a.locales,delete a.localesConditions,delete a.conditions,delete a.value,s.value!==null&&s.value!==void 0&&(a.value=s.value,a.connectedData=s.connectedData),s.conditions!==null&&s.conditions!==void 0&&(a.conditions=s.conditions)),!a.locales&&!a.localesConditions&&!a.conditions&&a.value===void 0&&delete r.parameters[i]}),Object.entries(o.dataResources??{}).forEach(([i,s])=>{n?.(r,i,s,r._dataResources?.[i]),r._dataResources??={},r._dataResources[i]=s}),o.variant!==void 0&&(r.variant=o.variant),o.slots){r.slots??={};let i=Object.keys(o.slots)[0];r.slots[jie]??=[],r.slots[jie]=[...o.slots[i]??[]]}}})}import{CANVAS_SLOT_SECTION_SLOT as LLe,CANVAS_SLOT_SECTION_TYPE as ALe}from"@uniformdev/canvas";var Vie=({preserveOwnSlotSections:t=!1,preserveChildrenSlotSections:e=!1}={})=>n=>{if(n.node.type!==ALe)return;let{partOfPattern:r,partOfNestedPattern:o}=e5(n.node._id??"");!r&&!o&&t||r&&!o&&e||MLe(n)},MLe=({node:t,type:e,actions:n})=>{e!=="entry"&&(n.insertAfter(t.slots?.[LLe]??[]),n.remove())};import{walkNodeTree as RLe}from"@uniformdev/canvas";import{produce as PLe}from"immer";import{v4 as FLe}from"uuid";import{CANVAS_SLOT_SECTION_SLOT as Uie,walkNodeTree as OLe}from"@uniformdev/canvas";import{produce as ILe}from"immer";import{v4 as kLe}from"uuid";function t5(t,e,n,r=kLe()){if(!t._pattern)throw new Error("Not a pattern");let o={};return OLe(t,({node:i,ancestorsAndSelf:s,actions:a})=>{let l=i._id,c=e[l];if(s.length===1)i._id=r;else{let d=s[0];d.type!=="slot"||d.parentSlot!==Uie?(i._id=kie(l),i._id=XE(r,i._id)):(a.replace({...o[l],_id:o[l]._id}),a.stopProcessingDescendants())}if(c){let d=ILe(c,f=>{f.slots&&Object.entries(f.slots).forEach(([p,m])=>{if(p!==Uie)throw new Error("Only slot section items are supported for duplication");m.forEach((g,h)=>{if(!g._id)return;let v=n5(g,e,n);o[g._id]=v,m[h]=v})})});n?.(i._id,d,l)}}),r}function n5(t,e,n){return PLe(t,r=>{RLe(r,({type:o,node:i,actions:{stopProcessingDescendants:s}})=>{o==="component"&&i._pattern?(t5(i,e,n),s()):i._id=FLe()})})}import{produce as BLe}from"immer";import{v4 as zLe}from"uuid";function Hie(t,e=zLe()){return BLe(t,n=>(n._pattern?t5(n,n._overrides??{},(r,o,i)=>{delete n._overrides[i],n._overrides[r]=o},e):n._id=e,n))}import{bindExpressionPrefix as Kie}from"@uniformdev/canvas";var jLe=new Set(["t","a","p","c"]),VLe=new Set(["w","e","i"]);function Wie(t){if(!t.startsWith(Kie))return;let[n,r,...o]=t.substring(Kie.length).split(":");if(n==="jptr"){if(!r)throw new Error(`Missing JSON pointer in dynamic token binding '${t}'`);let i="t",s="w",a;for(let l of o){let[c,u]=l.split("=");if(c==="fa"){if(!jLe.has(u))throw new Error(`Invalid failure action '${u}' in dynamic token binding '${t}'`);i=u}else if(c==="fl"){if(!VLe.has(u))throw new Error(`Invalid failure log level '${u}' in dynamic token binding '${t}'`);s=u}else if(c==="fd")a=HLe(u);else throw new Error(`Unsupported property '${l}' in dynamic token binding '${t}'`)}return{pointer:Gie(ULe(r)),syntax:n,failureAction:i,failureLogLevel:s,failureDefault:i==="t"?a:void 0}}throw new Error(`Unsupported dynamic token binding syntax '${n}'`)}function ULe(t){return t.replace(/\$\[([^}]+)\]/g,"${$1}")}function Gie(t){let e=t.split("\\");return e.map((n,r)=>{if(n==="")return r>0&&e[r-1]===""?"":"\\";let o=n[0],i=n.substring(1);return o===";"&&(o=":"),i?o+i:o}).join("")}function HLe(t){return Gie(t.replace("\\+","="))}function Yie(t){if(!t?.pointer)return;let e=t.pointer.indexOf("/",1);return e<0?{dataResource:t.pointer.substring(1)}:{dataResource:t.pointer.substring(1,e),dataExpression:t.pointer.substring(e)}}function r5({locale:t,conditionIndex:e,property:n}){if(t===void 0)if(e<0){if(delete n.value,!n.conditions?.length)return!1}else n.conditions?.splice(e,1);else e<0?delete n.locales?.[t]:n.localesConditions?.[t]?.splice(e,1);if(n.localesConditions){for(let[r,o]of Object.entries(n.localesConditions))if(o.length===0){delete n.localesConditions[r];break}Object.keys(n.localesConditions).length===0&&delete n.localesConditions}return n.locales&&Object.keys(n.locales).length===0&&delete n.locales,n.conditions&&n.conditions.length===0&&delete n.conditions,!!(n.value!==void 0||n.locales||n.conditions||n.localesConditions)}function QO({locale:t,conditionIndex:e,conditionDefinition:n,property:r,newPropertyValue:o}){t===void 0?e<0?r.value=o:(r.conditions??=[],Zie(r.conditions,e,n,o)):e<0?(r.locales??={},r.locales[t]=o):(r.localesConditions??={},r.localesConditions[t]??=[],Zie(r.localesConditions[t],e,n,o))}function Zie(t,e,n,r){if(e<0)throw new Error("Condition index must be greater than or equal to 0");let o=t[e];t[e]={when:n??o?.when??{clauses:[]},value:r===void 0?null:r,id:o?.id??KLe(t)}}function KLe(t){let e=new Set(t.map(r=>r.id)),n=0;for(;e.has(n);)n++;return n}function qie(t){let e=!1,n={};return"_pattern"in t&&t._patternDataResources&&Object.entries(t._patternDataResources).forEach(([r,o])=>{e=!0,n[r]={...o,source:"patternDataResource"}}),t._dataResources&&Object.entries(t._dataResources).forEach(([r,o])=>{n[r]?n[r].isPatternParameter&&(e=!0,n[r]={...o,source:"dataResource"}):(e=!0,n[r]={...o,source:"dataResource"})}),e?n:void 0}import{CANVAS_DRAFT_STATE as WLe,convertEntryToPutEntry as FEt,getPropertiesValue as jEt}from"@uniformdev/canvas";function Jie(t){let{fields:e,entryName:n,type:r="contentType",thumbnailField:o,...i}=t;return{...i,titleParameter:n,thumbnailParameter:o,parameters:e,canBeComposition:r==="block",permissions:t.permissions,useTeamPermissions:t.useTeamPermissions??!0,workflowId:t.workflowId}}function Xie(t){return{id:t.id,name:t.name,entryName:t.titleParameter,thumbnailField:t.thumbnailParameter,fields:t.parameters,icon:t.icon,description:t.description,slugSettings:t.slugSettings,type:t.canBeComposition?"block":"contentType",created:t.created,updated:t.updated,permissions:t.permissions,useTeamPermissions:t.useTeamPermissions,workflowId:t.workflowId||void 0}}function Lb(t){let{entry:{fields:e,...n},...r}=t;return{created:"",modified:"",composition:{_id:"",...n,_name:t.entry._name??"Untitled",parameters:e,_overridability:t.entry._overridability,_overrides:t.entry._overrides,_pattern:t.entry._pattern,_patternError:t.entry._patternError},pattern:!!t.pattern,previewImageUrl:t.entry._thumbnail,...r}}function Qie(t,e,n,r,o,i,s){let a=s??e.projectId;if(!a)throw new Error("projectId is required in currentEntry or explicitly");return{created:e.created??"",modified:e.modified??"",projectId:a,state:r??e.state??WLe,releaseId:o??e.releaseId,workflowId:n?.workflowId??e.workflowId,workflowStageId:n?.workflowStageId??e.workflowStageId,editionId:i,editionName:n?.editionName??e.editionName,editionPriority:n?.editionPriority??e.editionPriority,pattern:e.pattern,entry:{type:t.type,_id:t._id,_name:t._name,_slug:t._slug??"",fields:t.parameters,_thumbnail:n?.previewImageUrl??void 0,_dataResources:t._dataResources,_pattern:t._pattern,_patternError:t._patternError,_overridability:t._overridability,_overrides:t._overrides,_locales:t._locales,_author:t._author,_authorSubject:t._authorSubject,_creator:t._creator,_creatorSubject:t._creatorSubject,_patternDataResources:t._patternDataResources}}}function eI(t,e){let{parameters:n,...r}=t;return{...r,_id:e??r._id??"unknown",fields:n}}function tI(t){let{fields:e,...n}=t;return{...n,parameters:e}}function nI(t){let e=Wie(t);if(e)switch(e.syntax){case"jptr":return Yie(e);default:throw new Error(`Unsupported dynamic token binding syntax '${e.syntax}'`)}}import{CANVAS_VIZ_LOCALE_RULE as GLe}from"@uniformdev/canvas";import{produce as YLe}from"immer";function ese(t,e,n){let r=YLe(t.criteria,o=>tse(o,e,n));return r&&{...t,criteria:r}}function tse(t,e,n){if(!t)return t;let r=!1;for(let o of t.clauses)if("clauses"in o){let i=tse(o,e,n);if(i===null){if(t.op!=="|")return null;t.clauses.splice(t.clauses.indexOf(o),1),r=!0}else i!==void 0&&(t.clauses[t.clauses.indexOf(o)]=i,r=!0)}else if(o.rule===GLe){let i=Array.isArray(o.value)?o.value:[o.value],s=i.includes(e),a=i.includes(n);if(!s&&!a||s&&a)continue;if(i.length===1&&a&&!s)return null;s&&!a&&(o.value=i.concat(n),r=!0)}return r?t:void 0}var nse=I(ZO(),1);function rI(t,e){try{return(0,nse.get)(t,e)}catch{return}}function oI(t,e,n=0){let r=t.slice(n*4,n*4+4);if(!r)throw new Error("Failed to generate a default variation name");return`${e.startsWith("$")?e.slice(1):e}-${r}`}import{CANVAS_VIZ_LOCALE_RULE as ZLe}from"@uniformdev/canvas";import{produce as qLe}from"immer";function rse(t,e){let n=qLe(t.criteria,r=>ose(r,e));return n&&{...t,criteria:n}}function ose(t,e){if(!t)return t;for(let n=t.clauses.length-1;n>=0;n--){let r=t.clauses[n];if("clauses"in r){let o=ose(r,e);if(o)t.clauses[n]=o;else if(t.clauses.splice(n,1),o===null&&t.op!=="|")return null}else if(r.rule===ZLe){let o=Array.isArray(r.value)?r.value:[r.value],i=o.indexOf(e);if(i!==-1)if(Array.isArray(r.value)&&r.value.length>1)o.splice(i,1);else if(r.op.startsWith("!"))t.clauses.splice(n,1);else return null}}if(t.clauses.length!==0)return t}function ise(t,e){let n=w0();if(process.env.NODE_ENV==="development"&&!e){let r=new Error().stack?.split(`
|
|
5843
|
+
`);return React.createElement(FE,{title:React.createElement($O,{gap:"sm"},h.map((v,y)=>React.createElement("div",{key:y},v)))},React.createElement("span",null,m))}return m}function ODe({children:t}){return React.createElement("span",{style:{textDecoration:"underline",textDecorationStyle:"wavy",textDecorationColor:"var(--error)"}},t)}function IDe({children:t}){return React.createElement("span",{style:{textDecoration:"underline",textDecorationStyle:"wavy",textDecorationColor:"var(--primary-action-default)"}},t)}function kDe({children:t}){return React.createElement("span",{style:{textDecoration:"underline",textDecorationStyle:"wavy",textDecorationColor:"var(--alert)"}},t)}import{createVariableReference as G3t}from"@uniformdev/canvas";await ut();var Tb=I(V()),RDe=I(Bs());var tSt=bt("uniform:open-insert-variable"),bie=bt("uniform:edit-variable"),nSt=bt("uniform:disconnect-variable"),rSt=bt("uniform:insert-variable");var s0=class t extends gu{constructor(n,r,o){super(o);this.reference=n;this.__variableState=r}__variableState;static getType(){return"variable"}static clone(n){return new t(n.reference,{...n.__variableState},n.__key)}static importJSON(n){return xie(n.reference,{displayName:GO(n.reference),referenceIsValid:!0,isFresh:!1,hasClickEvent:void 0,tooltip:void 0,isLoading:!1})}getState(){return this.getLatest().__variableState}setState(n){this.getWritable().__variableState=n}exportJSON(){return{reference:this.reference,type:t.getType(),version:1}}getTextContent(){return PDe(this.reference)}createDOM(){return document.createElement("span")}updateDOM(){return!1}static importDOM(){return{binding:()=>({conversion:FDe,priority:0})}}decorate(){return React.createElement(zDe,{state:this.__variableState,reference:this.reference,nodeKey:this.__key})}};function FDe(t){let n=t.textContent.replace(gie,"").replace(hie,"");return{node:xie(n,{displayName:GO(n),hasClickEvent:!0,referenceIsValid:!0,tooltip:void 0,isFresh:!0,isLoading:!1})}}function xie(t,e){return new s0(t,e)}function BDe(t){return t instanceof s0}function zDe({state:t,reference:e,nodeKey:n}){let[r]=Lg(),[o,i,s]=gG(n),a=!r.isEditable(),l=(0,qE.useCallback)(c=>{if(o&&qe(H())){c.preventDefault();let u=rt(n);BDe(u)&&u.remove()}return!1},[o,n]);return(0,qE.useEffect)(()=>ot(r.registerCommand(va,l,Ae),r.registerCommand(ha,l,Ae),r.registerCommand(ni,c=>{let u=H();if(qe(u)){let d=u.getNodes();if(d.length>0)return c.preventDefault(),d[0].selectPrevious(),!0}if(!U(u))return!1;if(Rl(u,!0)){let d=c.shiftKey;return c.preventDefault(),kl(u,d,!0),!0}return!1},pe),r.registerCommand(ga,c=>{let u=H();if(qe(u)&&!jDe(c.target)){let f=u.getNodes();if(f.length>0)return c.preventDefault(),f[0].selectNext(0,0),!0}if(!U(u))return!1;let d=c.shiftKey;return Rl(u,!1)?(c.preventDefault(),kl(u,d,!1),!0):!1},pe)),[s,r,o,n,l,i]),React.createElement(yie,{...t,reference:e,displayName:t.isLoading?React.createElement(Boe,{size:"sm"}):t.displayName,selected:o,disabled:a,clickToEdit:t.hasClickEvent,onClick:t.hasClickEvent?()=>{i(!o),r.dispatchCommand(bie,{reference:e,sourceKey:n})}:()=>i(!o)})}function jDe(t){let e=ct(t);return Yn(e)}await ut();await ut();var $b=class t extends gu{__asset;__assetQuery;__upload;__error;getAsset(){return this.getLatest().__asset}setAsset(e){let n=this.getWritable();n.__asset=e}getAssetQuery(){return this.getLatest().__assetQuery}setAssetQuery(e){let n=this.getWritable();n.__assetQuery=e}getUpload(){return this.getLatest().__upload}setUpload(e){let n=this.getWritable();n.__upload=e}getError(){return this.getLatest().__error}setError(e){let n=this.getWritable();n.__error=e}static getType(){return"asset"}constructor(e,n,r,o,i){super(i),this.__asset=e,this.__upload=n,this.__error=o,this.__assetQuery=r}static clone(e){return new t(e.__asset,e.__upload,e.__assetQuery,e.__error,e.__key)}exportJSON(){let e={type:"asset",version:1};if(this.__asset&&(e.__asset=this.__asset),this.__assetQuery&&(e.__assetQuery=this.__assetQuery),this.__upload&&"fileUrl"in this.__upload){let{fileUrl:n,suggestedAltText:r,suggestedCaption:o}=this.__upload;e.__upload={fileUrl:n,suggestedAltText:r,suggestedCaption:o}}return this.__error&&(e.__error=this.__error),e}static importJSON(e){return YO({asset:e.__asset,assetQuery:e.__assetQuery,upload:e.__upload,error:e.__error})}static importDOM(){return{img:()=>({conversion:e=>VDe(e,YO),priority:0}),figure:()=>({conversion:e=>UDe(e,YO),priority:0})}}createDOM(e){let n=document.createElement("span"),o=e.theme.image;return o!==void 0&&(n.className=o),n}updateDOM(){return!1}isInline(){return!1}};function YO({asset:t,upload:e,assetQuery:n,error:r}){return $t(new $b(t,e,n,r))}function Cie(t){return t.parentElement!=null&&t.parentElement.tagName==="LI"&&t.previousSibling===null&&t.getAttribute("aria-roledescription")==="checkbox"}function VDe(t,e){let n=t;if(n.src.startsWith("file:///")||Cie(n))return null;let{alt:r,src:o}=n;return{node:Sie({altText:r,src:o,createAssetNode:e})}}function UDe(t,e){let n=t,r=n.querySelector("img"),o=n.querySelector("figcaption");if(!r||r.src.startsWith("file:///")||Cie(r))return null;let{alt:i,src:s}=r;return s.startsWith("uniform://")?{node:e({assetQuery:{id:r.src.split("uniform://")[1],suggestedAltText:i,suggestedCaption:o?.textContent??void 0}})}:{node:Sie({altText:i,src:s,caption:o?.textContent??void 0,createAssetNode:e})}}function Sie({altText:t,src:e,caption:n,createAssetNode:r}){return r({asset:void 0,upload:{fileUrl:e,suggestedAltText:t,suggestedCaption:n},assetQuery:void 0})}var HDe=t=>new DOMParser().parseFromString(t,"text/html");function wie(t,e=HDe){let n=qV({nodes:[$a,Ta,UO,yg,bg,Fm,VW,jW,UW,jl,$b,s0]}),r=e(t);return n.update(()=>{b7("skip-dom-selection");let o=Xm(n,r);Tt().select(),As(o)},{discrete:!0}),n.getEditorState().toJSON()}function Eie({twee:t,nodeId:e,propertyId:n,propertyType:r,locale:o,propertyEdit:i,conditionIndex:s=-1,definitionIndex:a,domParser:l}){let c=t.getNodeById(e);if(!c)throw new Error(`Node with ID ${e} not found`);if(i.action==="clearValue")t.updateNodeProperty({nodeId:e,property:n,value:null,source:"ai",locale:o,conditionIndex:-1});else if(i.action==="resetOverride")t.resetPatternPropertyOverride(e,n,o);else if(i.action==="setValue"){if(r==="contentReference"){QDe({twee:t,nodeId:e,targetNode:c,propertyId:n,propertyType:r,propertyEdit:i,locale:o,conditionIndex:s,definitionIndex:a});return}let u=XDe({twee:t,targetNode:c,propertyId:n,propertyType:r,propertyEdit:i,domParser:l}),d=t.getNodeProperty(e,n);if(!o&&d?.locales)throw new Error(`The ${n} property is localized in ${Object.keys(d.locales).join(", ")}, but no locale was provided when setting its value. Please provide an explicit locale.`);if(n===GDe){let f=t.getParentInfo(e);if(f?.parentId){let p=t.getNodeProperty(f.parentId,WDe);if(p?.value!==Dk)throw new Error(`Cannot edit personalization criteria when the parent personalization component is not using the Strongest Variation Match selection method. Current selection method: ${p?.value||"Top-down criteria matching"}.`)}}t.updateNodeProperty({nodeId:e,property:n,value:()=>u,source:"ai",locale:o,conditionIndex:s,type:r})}}var XDe=({twee:t,targetNode:e,propertyId:n,propertyType:r,propertyEdit:o,domParser:i})=>{if(r==="richText")return wie(o.newValue??"",i);if(r==="number")return Number(o.newValue);if(n===KDe){if(JDe(e.value.type))throw new Error("Enrichment tags are not allowed in system components.");if(t.getParentInfo(e.nodeId)?.parentId===YDe)throw new Error("Enrichment tags are not allowed in personalization variants.")}return o.treatNewValueAsJson?JSON.parse(o.newValue):o.newValue};function QDe({twee:t,nodeId:e,targetNode:n,propertyId:r,propertyType:o,propertyEdit:i,locale:s,conditionIndex:a,definitionIndex:l}){let c=zp(n.nodeId,r,s,a),u;try{u=i.treatNewValueAsJson?JSON.parse(i.newValue):i.newValue}catch(y){throw new Error(`Invalid reference field data: ${y instanceof Error?y.message:"Unknown error"}`)}if(!u||typeof u!="object"||u.type!==ll)throw new Error("Invalid reference field definition received from AI");let d=u.variables?.entryIds;if(!d||typeof d!="string"||d.length===0){t.updateNode({nodeId:n.nodeId,updateDataResources:[{type:"remove",name:c}]}),t.updateNodeProperty({nodeId:e,property:r,value:null,source:"ai",locale:s,conditionIndex:a,type:o});return}let m=l[n.value.type]?.parameters?.find(({id:y})=>y===r)?.typeConfig?.isMulti??!1,g=Ek(d,{targetLocale:s,enabledLocales:t.getNodeById(t.rootNodeId)?.value._locales??[]});t.updateNode({nodeId:n.nodeId,updateDataResources:[{type:"set",name:c,value:g}]});let h=`/${c}/entries${m?"":"/0"}`,v=qDe(ZDe({syntax:"jptr",pointer:h}));t.updateNodeProperty({nodeId:e,property:r,value:()=>v,source:"ai",locale:s,conditionIndex:a,type:o})}import{validate as eLe}from"uuid";var _ie=t=>eLe(t)?t:btoa(t);function a0(t,e,n="Component instance"){let r=t.getNodeById(e);if(r)return r;let o=[];if(t.visitNodeAndDescendants(t.rootNodeId,i=>{i.nodeId!==e&&i.nodeId.includes(e)&&o.push(i.nodeId)}),o.length>0){let i=o.map(s=>`"${_ie(s)}"`).join(", ");throw new Error(`${n} with ID ${e} not found. You might have meant one of these IDs that does exist: ${i}. Component IDs should be used exactly as provided in the _id field.`)}throw new Error(`${n} with ID ${e} not found`)}async function JE({twee:t,slotUpdates:e,propertyUpdates:n,dataResourceUpdates:r,localeUpdates:o,nameUpdate:i,slugUpdate:s,descriptionUpdate:a,currentEditorLocale:l,referenceData:c,dataSourceVariant:u,onStatusUpdate:d,isEditingPattern:f,domParser:p}){let m=[],g=(i?1:0)+(s?1:0)+(a?1:0)+(e.createComponentInstances?.length??0)+(e.moveComponentInstances?.length??0)+(e.duplicateComponentInstances?.length??0)+(e.deleteComponentInstances?.length??0)+(o?.enableLocales?.length??0)+(o?.disableLocales?.length??0)+n.length,h=0,v=C=>{m.push(C),h++,d?.({completed:h,total:g})};i&&(t.updateRootNode({update:{_name:i}}),v({summary:"Updated name",success:!0})),s&&(t.updateRootNode({update:{_slug:s}}),v({summary:"Updated slug",success:!0})),a&&(t.updateRootMetadata({description:a}),v({summary:"Updated description",success:!0}));let y=await c.fetchDefinitions();await oLe({slotUpdates:e,twee:t,definitions:y,referenceData:c,addResult:v,isEditingPattern:f});let b=m.some(C=>!C.success);if(b?e.moveComponentInstances?.forEach(C=>{m.push({summary:`Skipped moving component ${C.componentId} because previous actions failed`,success:!1})}):await iLe({slotUpdates:e,twee:t,definitions:y,addResult:v,isEditingPattern:f}),b=m.some(C=>!C.success),e.duplicateComponentInstances)for(let C of e.duplicateComponentInstances)if(b)v({summary:`Skipped duplicating component ${C} because previous actions failed`,success:!1});else{let w=await t.duplicateNode(C,c.resolvePatternData);v({summary:`Duplicated component ${C}. The new duplicate has ID ${w} and is placed immediately after the original component in the same slot.`,success:!0})}return b=m.some(C=>!C.success),e.deleteComponentInstances?.forEach(C=>{b?v({summary:`Skipped deleting component ${C} because previous actions failed`,success:!1}):(t.deleteNode(C,!1),v({summary:`Deleted component ${C}`,success:!0}))}),b=m.some(C=>!C.success),o?.enableLocales?.forEach(C=>{b?v({summary:`Skipped enabling locale ${C} because previous actions failed`,success:!1}):(t.enableLocale(C),v({summary:`Enabled locale ${C}`,success:!0}))}),b=m.some(C=>!C.success),o?.disableLocales?.forEach(C=>{b?v({summary:`Skipped disabling locale ${C} because previous actions failed`,success:!1}):(t.disableLocale(C),v({summary:`Disabled locale ${C}`,success:!0}))}),b=m.some(C=>!C.success),b?n.length>0&&v({summary:`Skipped ${n.length} property updates because previous actions failed`,success:!1}):(await sLe({propertyUpdates:n,twee:t,currentEditorLocale:l,referenceData:c,definitions:y,addResult:v})).forEach(w=>{if(!w.result.success)return;let E="componentId"in w.update?w.update.componentId:t.rootNodeId,_=X5({twee:t,nodeId:E,currentEditorLocale:w.currentLocale,definition:w.propertyDefinition}),$=(t.getNodeById(t.rootNodeId)?.value)._locales??[];if(_&&!$.includes(_)){v({summary:`The ${_} locale is not enabled on this entity. Please enable it before setting values in this locale.`,success:!1});return}if(w.result.action!=="nothing")try{Eie({twee:t,nodeId:E,propertyId:w.propertyDefinition.id,propertyType:w.propertyDefinition.type,locale:_,propertyEdit:w.result,definitionIndex:y,domParser:p}),v({summary:`Updated value of ${w.propertyDefinition.id} on ${E}${_?` in ${_}`:""}`,success:!0})}catch(T){v({summary:`Failed to update value of ${w.propertyDefinition.id} on ${E}${_?` in ${_}`:""}: ${T instanceof Error?T.message:"Unknown error"}`,success:!1})}if("overridable"in w.update&&w.update.overridable!==void 0)if(w.propertyDefinition.type===tLe)v({summary:`Cannot set overridability for block property '${w.propertyDefinition.id}' - blocks do not support overrides`,success:!1});else{let T=w.update.overridable;t.updateNode({nodeId:E,updateComponent:N=>{N._overridability??={},N._overridability.parameters??={},N._overridability.parameters[w.propertyDefinition.id]=T}}),v({summary:`Updated overridability for ${E}`,success:!0})}}),b=m.some(C=>!C.success),b?r.length>0&&m.push({summary:`Skipped ${r.length} data resource updates because previous actions failed`,success:!1}):(await aLe({dataResourceUpdates:r,twee:t,referenceData:c,results:m,dataSourceVariant:u})).forEach(w=>{if(!w.result.success)return;let E=w.update.componentId;if(w.result.action==="resetOverride")t.updateNode({nodeId:E,updateDataResources:[{type:"reset",name:w.update.dataResourceName}]}),m.push({summary:`Reset data resource to pattern default for ${w.update.dataResourceName} on ${E}`,success:!0});else if(w.result.action==="setValue")try{_k({twee:t,nodeId:E,dataResourceName:w.update.dataResourceName,dataType:w.dataType,dataResourceEdit:w.result}),m.push({summary:`Updated data resource ${w.update.dataResourceName} on ${E}`,success:!0})}catch(_){m.push({summary:`Failed to update data resource ${w.update.dataResourceName} on ${E}: ${_ instanceof Error?_.message:"Unknown error"}`,success:!1})}}),{success:m.every(C=>C.success),actionsTaken:m}}async function oLe({slotUpdates:t,twee:e,definitions:n,referenceData:r,addResult:o,isEditingPattern:i}){(await Promise.allSettled(t.createComponentInstances?.map(async a=>{let l=a0(e,a.parentComponentId,"Parent component");if(!n[l.value.type])throw new Error(`Definition for parent component type ${l.value.type} not found`);let u=J5({twee:e,parentNodeId:a.parentComponentId,slotName:a.slotName,componentDefinitionsIndex:n});if(!u)throw new Error(`Can't find allowed components for slot ${a.slotName}`);if(a.instanceType==="component"){if(!a.componentType)throw new Error("componentType is required when inserting a component instance");if(!$x({type:a.componentType},u,i))throw new Error(`Component type ${a.componentType} is not allowed in slot ${a.slotName}`);e.insertNode({node:{type:a.componentType},overrideNodeId:a.newComponentInstanceUuid,parentNodeId:a.parentComponentId,parentSlot:a.slotName,targetIndexInSlot:a.slotIndex}),o({summary:`Inserted component ${a.componentType} in slot ${a.slotName} ${a.slotIndex!==void 0?`at index ${a.slotIndex}`:""}`,success:!0})}else{if(!a.componentPatternId)throw new Error("componentPatternId is required when inserting a component pattern instance");let d=await r.resolvePatternData(a.componentPatternId);if(!d)throw new Error(`Pattern definition with ID ${a.componentPatternId} not found`);if(!$x({type:d.type,_pattern:a.componentPatternId},u,!1))throw new Error(`Pattern ${a.componentPatternId} is not allowed in slot ${a.slotName}`);e.insertPattern({pattern:d,patternInstanceId:a.newComponentInstanceUuid,parentNodeId:a.parentComponentId,parentSlot:a.slotName,targetIndexInSlot:a.slotIndex}),o({summary:`Inserted pattern ${d._name} in slot ${a.slotName} ${a.slotIndex!==void 0?`at index ${a.slotIndex}`:""}`,success:!0})}})??[])).forEach((a,l)=>{if(a.status==="rejected"){let c=t.createComponentInstances?.[l];console.error("Error inserting component",a.reason),o({summary:`Failed to insert component ${c?.newComponentInstanceUuid}: ${"message"in a.reason?a.reason.message:"Unknown error"}`,success:!1})}})}async function iLe({slotUpdates:t,twee:e,definitions:n,addResult:r,isEditingPattern:o}){(await Promise.allSettled(t.moveComponentInstances?.map(async s=>{let a=a0(e,s.componentId,"Component to move"),l=a0(e,s.newParentComponentId,"Destination component");if(!n[l.value.type])throw new Error(`Definition for destination component type ${l.value.type} not found`);let u=J5({twee:e,parentNodeId:s.newParentComponentId,slotName:s.newSlotName,componentDefinitionsIndex:n});if(!u)throw new Error(`Can't find allowed components for slot ${s.newSlotName}`);if(!$x({type:a.value.type,_pattern:a.value._pattern},u,o))throw new Error(a.value._pattern?`Pattern ${a.value._pattern} is not allowed in slot ${s.newSlotName}`:`Component ${a.value.type} is not allowed in slot ${s.newSlotName}`);e.moveNode({movedNodeId:s.componentId,parentNodeId:s.newParentComponentId,parentSlot:s.newSlotName,targetIndexInSlot:s.newSlotIndex}),r({summary:`Moved component ${s.componentId} to ${s.newParentComponentId} in slot ${s.newSlotName} at index ${s.newSlotIndex}`,success:!0})})??[])).forEach((s,a)=>{if(s.status==="rejected"){let l=t.moveComponentInstances?.[a];console.error("Error moving component",s.reason),r({summary:`Failed to move component ${l?.componentId}: ${"message"in s.reason?s.reason.message:"Unknown error"}`,success:!1})}})}async function sLe({propertyUpdates:t,twee:e,currentEditorLocale:n,referenceData:r,definitions:o,addResult:i}){if(t.length===0)return[];let[s,a]=await Promise.all([r.fetchProjectGuidance(),r.getToolClient()]),l=await Promise.allSettled(t.map(async c=>(async()=>{let u="componentId"in c?c.componentId:e.rootNodeId,d=a0(e,u),f=o[d.value.type];if(!f)throw new Error(`Definition with ID ${d.value.type} not found`);let p="fieldId"in c?c.fieldId:c.parameterId,m=f.parameters?.find(w=>w.id===p),g=c.fromLocale??c.locale??n,h=c.locale??n,v=m??{id:p,type:"unknown"};if(c.editInstructions===void 0)return{result:{success:!0,newValue:"",treatNewValueAsJson:!1,action:"nothing"},update:c,propertyDefinition:v};if(c.editInstructions==="")return{result:{success:!0,newValue:"",treatNewValueAsJson:!1,action:"clearValue"},update:c,propertyDefinition:v};if(!m)throw new Error(`Property with ID ${p} not found`);if(m.type==="contentReference"){let w=X5({definition:m,twee:e,nodeId:u,currentEditorLocale:n}),E=zp(u,p,w,-1),_=d.value._dataResources?.[E],$=await a.invoke("createDataResourceEdit",{edit:c.editInstructions,dataType:ll,currentValue:_?.variables||{}});if(!$.success)throw new Error($.summary??"Failed to edit reference field data resource");return{result:{success:!0,newValue:JSON.stringify({type:ll,variables:$.newValue}),treatNewValueAsJson:!0,action:"setValue"},update:c,propertyDefinition:m,currentLocale:w}}let y=nLe({property:e.getNodeProperty(u,p),locale:g,conditionIndex:-1}),b,S=e.getNodeProperty(u,rLe);S?.value?.dim&&(b=await r.getDimensionGuidance(S.value.dim));let C=await a.invoke("createPropertyEdit",{edit:c.editInstructions,propertyDefinition:{id:p,name:m.name,type:m.type,guidance:m.guidance,typeConfig:m.typeConfig},outputLocale:h,documentContext:void 0,currentValue:y,projectGuidance:s,componentGuidance:f.description,audienceGuidance:b});if(!C.success)throw new Error(C.summary??"Failed to edit property");return{result:C,update:c,propertyDefinition:m,currentLocale:h}})()));return l.forEach((c,u)=>{if(c.status==="rejected"){let d=t[u],f="fieldId"in d?d.fieldId:d.parameterId;i({summary:`Failed to edit property ${f}: ${"message"in c.reason?c.reason.message:"Unknown error"}`,success:!1})}}),l.filter(c=>c.status==="fulfilled").map(c=>c.value)}async function aLe({dataResourceUpdates:t,twee:e,referenceData:n,results:r,dataSourceVariant:o}){if(t.length===0)return[];let i=await n.getToolClient(),s=await Promise.allSettled(t.map(async a=>(async()=>{let l=a.componentId,c=a0(e,l);if(a.editInstructions===void 0)return{result:{success:!0,newValue:{},action:"nothing"},update:a,dataType:"unknown"};if(a.editInstructions==="")return{result:{success:!0,newValue:{},action:"setValue"},update:a,dataType:"unknown"};let u=c.value._dataResources?.[a.dataResourceName],d=c.value._patternDataResources?.[a.dataResourceName];if(!d)throw new Error(`Pattern data resource ${a.dataResourceName} does not exist on the ${c.value._pattern} pattern`);let f=u?.variables??d.variables,p=d.type,m=await i.invoke("createDataResourceEdit",{edit:a.editInstructions,dataType:p,currentValue:f,dataSourceVariant:o});if(!m.success)throw new Error(m.summary??"Failed to edit data resource");return{result:m,update:a,dataType:p}})()));return s.forEach((a,l)=>{if(a.status==="rejected"){let c=t[l];r.push({summary:`Failed to edit data resource ${c.dataResourceName}: ${"message"in a.reason?a.reason.message:"Unknown error"}`,success:!1})}}),s.filter(a=>a.status==="fulfilled").map(a=>a.value)}import{CANVAS_BLOCK_PARAM_TYPE as Gs,CANVAS_ENRICHMENT_TAG_PARAM as sse,CANVAS_LOCALE_TAG_PARAM as Ab,CANVAS_LOCALIZATION_SLOT as iI,CANVAS_LOCALIZATION_TYPE as JLe,CANVAS_PERSONALIZATION_PARAM as Mb,CANVAS_PERSONALIZE_SLOT as ase,CANVAS_SLOT_SECTION_SLOT as XLe,CANVAS_SLOT_SECTION_TYPE as o5,CANVAS_TEST_SLOT as lse,CANVAS_TEST_VARIANT_PARAM as cse,CANVAS_VIZ_CONTROL_PARAM as Sd,convertToBindExpression as use,createVariableReference as dse,getEffectivePropertyValue as fse,getPropertiesValue as QLe,parseVariableExpression as pse,walkNodeTree as Cc,walkPropertyValues as eAe}from"@uniformdev/canvas";var Lp=I(ZO(),1),gse=I(E0(),1);import{produce as tr}from"immer";import{v4 as wd}from"uuid";import{v4 as dLe}from"uuid";async function Die({projectMapClient:t,compositionId:e,compositionName:n,nodePathSegment:r,parentNodeId:o,localePathSegments:i,allowedQueryStrings:s}){let l=(await t.getProjectMapDefinition({}))?.projectMaps[0]?.id;if(!l)throw new Error("No project map found for this project");let c=r||i?.[0]?.pathSegment,u,d=0;if(o){let h=(await t.getNodes({id:o})).nodes?.[0];if(!h)throw new Error("Parent node not found");let v=h.path;d=((await t.getNodes({path:v,depth:1,expanded:!1})).nodes?.filter(C=>C.path!==v)??[]).reduce((C,w)=>Math.max(C,w.order??0),-1)+100,u=`${v==="/"?"":v}/${c}`}else u=`/${c}`;let f=i?.reduce((g,{locale:h,pathSegment:v})=>(g[h]={pathSegment:v,name:v},g),{}),p=s?.map(({name:g,defaultValue:h})=>({name:g,...h!==void 0&&{value:h}})),m=dLe();return await t.upsertProjectMapNodes({projectMapId:l,nodes:[{node:{id:m,name:n,path:u,type:"composition",compositionId:e,order:d,...f&&{locales:f},...p&&{data:{queryStrings:p}}}}]}),{path:u,nodeId:m}}import{bindVariablesToObject as fLe}from"@uniformdev/canvas";var Nb="Untitled",Lie=60;function Aie({value:t,isNew:e,contentType:n}){let{result:r}=fLe({value:t,handleBinding:()=>"{token}",variables:{}}),o=n.entryName??"",i=(n.fields??[]).find(s=>s.id===o);if(typeof r=="string"){if(i?.type==="image")return r.length>0?`Image: ${mLe(r)}`:`${Nb} image`;if(r.length>0)return i?.type==="date"?hLe(r)?vLe(r):"Invalid date":Np(r)}else{if(typeof r=="number"||typeof r=="boolean")return r.toString();if(typeof r<"u"&&r!==null){if(i?.type==="link")return pLe(r);if(uk(r))return Np(Y5(r.root));if(i?.type==="datetime"&&r){let s=r;return s.datetime&&Mie(s.datetime)?yLe(s.datetime):"Invalid datetime"}else return Np(bLe(r).description)}}return e?`New entry: ${n.name}`:Nb}function pLe(t){return t?t.type==="projectMapNode"?t.path.length>0?`Link to ${Np(t.path)}`:`Link to project map node (${t.nodeId})`:t.path.length>0?`Link to ${Np(t.path)}`:`${Nb} link`:`${Nb} link`}function mLe(t){try{let{pathname:e,hostname:n}=new URL(t),r=e.split("/").filter(o=>o);return r.length>2?`/${r[0]}/.../${r[r.length-1]} (${Np(n)})`:`${e} (${Np(n)})`}catch{return t}}function Np(t){let e=t.split(" ").filter(i=>i).reverse();if(e.length<1)return Nb;let n="",r=e.pop(),o=()=>n.length+(r?.length??0)+(n.length>0?1:0);for(;r&&o()<Lie;)n+=n.length>0?` ${r}`:r,r=e.pop();return n.length<1?`${t.slice(0,Lie)}...`:e.length>0?`${n}...`:n}var gLe=/^[1-9][0-9]{3}-[0-1][0-9]-[0-3][0-9]$/;function hLe(t){return gLe.test(t)?Mie(t):!1}function Mie(t){let e=new Date(t);return e instanceof Date&&!isNaN(Number(e))}function vLe(t){return new Date(t).toLocaleDateString()}function yLe(t){return new Date(t).toLocaleString()}function bLe(t){let e=qO(t);return e?{description:e,named:!0}:{description:xLe(t).valuePreview,named:!1}}function xLe(t){if(typeof t>"u")return{valueIcon:"close-o",valuePreview:"undefined"};if(t===null)return{valueIcon:"close-o",valuePreview:"null"};if(Array.isArray(t))return{valuePreview:`array with ${t.length} item${t.length!==1?"s":""}`,valueIcon:"list"};if(typeof t=="boolean")return{valuePreview:t.toString(),valueIcon:t?"check-r":"close-r"};if(typeof t=="number"||typeof t=="bigint")return{valuePreview:t.toString(10),valueIcon:"number-input"};if(typeof t=="object"){let e=Object.keys(t);return{valuePreview:`object with ${e.length} ${e.length!==1?"properties":"property"}`,valueIcon:"shape-hexagon"}}return{valuePreview:t,valueIcon:"text-input"}}var CLe=["displayName","name","_name","title","heading","label","parameters","fields","properties","entry","slug","_slug","alt","alt_description","description","results","items","entries","hits","value","id","objectID","identifier"];function qO(t){if(typeof t=="string")return t;if(typeof t=="number")return t.toString(10);if(typeof t=="boolean")return t.toString();if(typeof t!="object"||t===null)return;if(Array.isArray(t)){if(t.length===0)return;let r=qO(t[0]);return r?t.length===1?r:`${r} and ${t.length-1} other${t.length>2?"s":""}`:void 0}let n=t;for(let r of CLe)if(r in n){let o=qO(n[r]);if(o)return o}}import{CANVAS_SLOT_SECTION_SLOT as SLe,walkNodeTree as wLe}from"@uniformdev/canvas";import{v4 as Oie}from"uuid";var Db="|";function XE(t,e){if(!t)return e??Oie();let n=t.split(Db),r=(e??Oie()).split(Db);return n.at(-1)===r[0]&&n.pop(),n.concat(r).join(Db)}function kie(t){let e=t.indexOf(Db);if(e<0)throw new Error(`Cannot remove pattern instance ID from ${t}`);return t.substring(e+1)}function QE(t,e,n=!1){wLe(t,({node:r,actions:{setDescendantsContext:o},context:i})=>{let s=!n&&!i?.currentParentPatternInstanceId,a="_pattern"in r&&!!r._pattern;if(i?.currentParentPatternInstanceId){let c=XE(i.currentParentPatternInstanceId,r._id);r._id=c}let l=i?.currentParentPatternInstanceId;a&&(l=r._id),"_overrides"in r&&r._overrides&&Iie(r._overrides,l,s),"_patternOverrides"in r&&r._patternOverrides&&Iie(r._patternOverrides,l,s),a&&o({currentParentPatternInstanceId:r._id})},{initialContext:{currentParentPatternInstanceId:e}})}var Iie=(t,e,n)=>{Object.entries(t).forEach(([r,o])=>{let i=n?r:XE(e,r);Object.entries(o.slots??{}).forEach(([s,a])=>{a.forEach(l=>{let{partOfNestedPattern:c}=e5(r??"");QE(l,s===SLe&&!c?void 0:e,!0)})}),i&&(delete t[r],t[i]=o)})};function e5(t){let e=t.split(Db);return e.length===1?{partOfPattern:void 0,partOfNestedPattern:void 0}:e.length===2?{partOfPattern:e[0],partOfNestedPattern:void 0}:{partOfPattern:e[0],partOfNestedPattern:e[e.length-2]}}import{CANVAS_SLOT_SECTION_SLOT as jie}from"@uniformdev/canvas";import{CANVAS_VIZ_CONTROL_PARAM as NLe}from"@uniformdev/canvas";import{CANVAS_ENRICHMENT_TAG_PARAM as Rie,CANVAS_INTENT_TAG_PARAM as ELe,CANVAS_LOCALE_TAG_PARAM as _Le,CANVAS_PERSONALIZATION_PARAM as Pie,CANVAS_TEST_VARIANT_PARAM as TLe,CANVAS_VIZ_CONTROL_PARAM as Fie}from"@uniformdev/canvas";var $Le="$internal_displayName",Bie=[{id:$Le,name:"Display Name",type:"text"},{id:ELe,name:"Intent Tag",type:"intentTag"},{id:_Le,name:"Locale Visibility",type:"localeSelect"},{id:Pie,name:"Personalization Criteria",type:Pie},{id:Rie,name:"Enrichment Tags",type:Rie,helpText:"Seeing this component will increase a visitor's score in these enrichments."},{id:TLe,name:"A/B Test",type:"testVariant"},{id:Fie,name:"Visibility Control",type:Fie}];var DLe=Bie.reduce((t,e)=>(e.id===NLe||t.add(e.id),t),new Set);function Dp(t,e){return DLe.has(e)?"yes":t?.parameters?.[e]??"no"}function JO(t,e){e&&Object.entries(e).forEach(([n,r])=>{let o=t[n];if(r.parameters||o?.parameters){t[n]??={};let i={...r?.parameters};Object.entries(o?.parameters??{}).forEach(([s,a])=>{let l=i[s];if(!l)i[s]=a;else if(a.locales||a.localesConditions||l.locales||l.localesConditions){let c={...l,...a};(a.locales||l.locales)&&(c.locales={...l.locales,...a.locales}),(a.localesConditions||l.localesConditions)&&(c.localesConditions={...l.localesConditions,...a.localesConditions}),i[s]=c}else i[s]={...l,...a}}),t[n].parameters=i}if((r.dataResources||o?.dataResources)&&(t[n]??={},t[n].dataResources={...r?.dataResources,...o?.dataResources}),r.slots||o?.slots){t[n]??={};let i=Object.entries(o?.slots??{}).reduce((s,[a,l])=>(s[a]&&Array.isArray(s[a])?s[a]=[...l,...s[a]]:s[a]=l,s),r.slots??{});t[n].slots=i}(r.variant!==void 0||o?.variant!==void 0)&&(t[n]=t[n]??{},t[n].variant=o?.variant??r?.variant)})}function zie({applyOverrideToNode:t}){let e=new Set,n={};return{visitNode(r){e.add(r._id),JO(n,r._overrides),JO(n,r._patternOverrides);let o=n[r._id];o&&(o.parameters&&Object.keys(o.parameters).forEach(i=>{Dp(r._overridability,i)==="no"&&(console.log(`[Override] Cleaned override from ${r._id} parameter ${i} because it is not overridable`),delete n[r._id].parameters?.[i])}),o.dataResources&&Object.keys(o.dataResources).forEach(i=>{r._patternDataResources?.[i]?.isPatternParameter||(console.log(`[Override] Cleaned override from ${r._id} data resource ${i} because it is not overridable`),delete n[r._id].dataResources?.[i])}),o.variant!==void 0&&(r._overridability?.variants||delete o.variant),t({node:r,overrides:o}))},overrides:n}}function XO(t){let{beforeApplyParameterOverride:e,beforeApplyDataResourceOverride:n}=t??{};return zie({applyOverrideToNode({node:r,overrides:o}){if(Object.entries(o.parameters??{}).map(([i,s])=>{r.parameters=r.parameters??{},e?.(r,i,s,r.parameters[i]);let a=r.parameters[i]??={type:s.type};s.locales||s.localesConditions?(a.locales??={},delete a.value,delete a.conditions,new Set([...Object.keys(s.locales??{}),...Object.keys(s.localesConditions??{})]).forEach(u=>{delete a.locales?.[u],delete a.localesConditions?.[u];let d=s.locales?.[u],f=s.localesConditions?.[u];d!=null&&(a.locales??={},a.locales[u]=d),f!=null&&(a.localesConditions??={},a.localesConditions[u]=f)}),a.locales&&Object.keys(a.locales).length===0&&delete a.locales,a.localesConditions&&Object.keys(a.localesConditions).length===0&&delete a.localesConditions):(delete a.locales,delete a.localesConditions,delete a.conditions,delete a.value,s.value!==null&&s.value!==void 0&&(a.value=s.value,a.connectedData=s.connectedData),s.conditions!==null&&s.conditions!==void 0&&(a.conditions=s.conditions)),!a.locales&&!a.localesConditions&&!a.conditions&&a.value===void 0&&delete r.parameters[i]}),Object.entries(o.dataResources??{}).forEach(([i,s])=>{n?.(r,i,s,r._dataResources?.[i]),r._dataResources??={},r._dataResources[i]=s}),o.variant!==void 0&&(r.variant=o.variant),o.slots){r.slots??={};let i=Object.keys(o.slots)[0];r.slots[jie]??=[],r.slots[jie]=[...o.slots[i]??[]]}}})}import{CANVAS_SLOT_SECTION_SLOT as LLe,CANVAS_SLOT_SECTION_TYPE as ALe}from"@uniformdev/canvas";var Vie=({preserveOwnSlotSections:t=!1,preserveChildrenSlotSections:e=!1}={})=>n=>{if(n.node.type!==ALe)return;let{partOfPattern:r,partOfNestedPattern:o}=e5(n.node._id??"");!r&&!o&&t||r&&!o&&e||MLe(n)},MLe=({node:t,type:e,actions:n})=>{e!=="entry"&&(n.insertAfter(t.slots?.[LLe]??[]),n.remove())};import{walkNodeTree as RLe}from"@uniformdev/canvas";import{produce as PLe}from"immer";import{v4 as FLe}from"uuid";import{CANVAS_SLOT_SECTION_SLOT as Uie,walkNodeTree as OLe}from"@uniformdev/canvas";import{produce as ILe}from"immer";import{v4 as kLe}from"uuid";function t5(t,e,n,r=kLe()){if(!t._pattern)throw new Error("Not a pattern");let o={};return OLe(t,({node:i,ancestorsAndSelf:s,actions:a})=>{let l=i._id,c=e[l];if(s.length===1)i._id=r;else{let d=s[0];d.type!=="slot"||d.parentSlot!==Uie?(i._id=kie(l),i._id=XE(r,i._id)):(a.replace({...o[l],_id:o[l]._id}),a.stopProcessingDescendants())}if(c){let d=ILe(c,f=>{f.slots&&Object.entries(f.slots).forEach(([p,m])=>{if(p!==Uie)throw new Error("Only slot section items are supported for duplication");m.forEach((g,h)=>{if(!g._id)return;let v=n5(g,e,n);o[g._id]=v,m[h]=v})})});n?.(i._id,d,l)}}),r}function n5(t,e,n){return PLe(t,r=>{RLe(r,({type:o,node:i,actions:{stopProcessingDescendants:s}})=>{o==="component"&&i._pattern?(t5(i,e,n),s()):i._id=FLe()})})}import{produce as BLe}from"immer";import{v4 as zLe}from"uuid";function Hie(t,e=zLe()){return BLe(t,n=>(n._pattern?t5(n,n._overrides??{},(r,o,i)=>{delete n._overrides[i],n._overrides[r]=o},e):n._id=e,n))}import{bindExpressionPrefix as Kie}from"@uniformdev/canvas";var jLe=new Set(["t","a","p","c"]),VLe=new Set(["w","e","i"]);function Wie(t){if(!t.startsWith(Kie))return;let[n,r,...o]=t.substring(Kie.length).split(":");if(n==="jptr"){if(!r)throw new Error(`Missing JSON pointer in dynamic token binding '${t}'`);let i="t",s="w",a;for(let l of o){let[c,u]=l.split("=");if(c==="fa"){if(!jLe.has(u))throw new Error(`Invalid failure action '${u}' in dynamic token binding '${t}'`);i=u}else if(c==="fl"){if(!VLe.has(u))throw new Error(`Invalid failure log level '${u}' in dynamic token binding '${t}'`);s=u}else if(c==="fd")a=HLe(u);else throw new Error(`Unsupported property '${l}' in dynamic token binding '${t}'`)}return{pointer:Gie(ULe(r)),syntax:n,failureAction:i,failureLogLevel:s,failureDefault:i==="t"?a:void 0}}throw new Error(`Unsupported dynamic token binding syntax '${n}'`)}function ULe(t){return t.replace(/\$\[([^}]+)\]/g,"${$1}")}function Gie(t){let e=t.split("\\");return e.map((n,r)=>{if(n==="")return r>0&&e[r-1]===""?"":"\\";let o=n[0],i=n.substring(1);return o===";"&&(o=":"),i?o+i:o}).join("")}function HLe(t){return Gie(t.replace("\\+","="))}function Yie(t){if(!t?.pointer)return;let e=t.pointer.indexOf("/",1);return e<0?{dataResource:t.pointer.substring(1)}:{dataResource:t.pointer.substring(1,e),dataExpression:t.pointer.substring(e)}}function r5({locale:t,conditionIndex:e,property:n}){if(t===void 0)if(e<0){if(delete n.value,!n.conditions?.length)return!1}else n.conditions?.splice(e,1);else e<0?delete n.locales?.[t]:n.localesConditions?.[t]?.splice(e,1);if(n.localesConditions){for(let[r,o]of Object.entries(n.localesConditions))if(o.length===0){delete n.localesConditions[r];break}Object.keys(n.localesConditions).length===0&&delete n.localesConditions}return n.locales&&Object.keys(n.locales).length===0&&delete n.locales,n.conditions&&n.conditions.length===0&&delete n.conditions,!!(n.value!==void 0||n.locales||n.conditions||n.localesConditions)}function QO({locale:t,conditionIndex:e,conditionDefinition:n,property:r,newPropertyValue:o}){t===void 0?e<0?r.value=o:(r.conditions??=[],Zie(r.conditions,e,n,o)):e<0?(r.locales??={},r.locales[t]=o):(r.localesConditions??={},r.localesConditions[t]??=[],Zie(r.localesConditions[t],e,n,o))}function Zie(t,e,n,r){if(e<0)throw new Error("Condition index must be greater than or equal to 0");let o=t[e];t[e]={when:n??o?.when??{clauses:[]},value:r===void 0?null:r,id:o?.id??KLe(t)}}function KLe(t){let e=new Set(t.map(r=>r.id)),n=0;for(;e.has(n);)n++;return n}function qie(t){let e=!1,n={};return"_pattern"in t&&t._patternDataResources&&Object.entries(t._patternDataResources).forEach(([r,o])=>{e=!0,n[r]={...o,source:"patternDataResource"}}),t._dataResources&&Object.entries(t._dataResources).forEach(([r,o])=>{n[r]?n[r].isPatternParameter&&(e=!0,n[r]={...o,source:"dataResource"}):(e=!0,n[r]={...o,source:"dataResource"})}),e?n:void 0}import{CANVAS_DRAFT_STATE as WLe,convertEntryToPutEntry as BEt,getPropertiesValue as VEt}from"@uniformdev/canvas";function Jie(t){let{fields:e,entryName:n,type:r="contentType",thumbnailField:o,...i}=t;return{...i,titleParameter:n,thumbnailParameter:o,parameters:e,canBeComposition:r==="block",permissions:t.permissions,useTeamPermissions:t.useTeamPermissions??!0,workflowId:t.workflowId}}function Xie(t){return{id:t.id,name:t.name,entryName:t.titleParameter,thumbnailField:t.thumbnailParameter,fields:t.parameters,icon:t.icon,description:t.description,slugSettings:t.slugSettings,type:t.canBeComposition?"block":"contentType",created:t.created,updated:t.updated,permissions:t.permissions,useTeamPermissions:t.useTeamPermissions,workflowId:t.workflowId||void 0}}function Lb(t){let{entry:{fields:e,...n},...r}=t;return{created:"",modified:"",composition:{_id:"",...n,_name:t.entry._name??"Untitled",parameters:e,_overridability:t.entry._overridability,_overrides:t.entry._overrides,_pattern:t.entry._pattern,_patternError:t.entry._patternError},pattern:!!t.pattern,previewImageUrl:t.entry._thumbnail,...r}}function Qie(t,e,n,r,o,i,s){let a=s??e.projectId;if(!a)throw new Error("projectId is required in currentEntry or explicitly");return{created:e.created??"",modified:e.modified??"",projectId:a,state:r??e.state??WLe,releaseId:o??e.releaseId,workflowId:n?.workflowId??e.workflowId,workflowStageId:n?.workflowStageId??e.workflowStageId,editionId:i,editionName:n?.editionName??e.editionName,editionPriority:n?.editionPriority??e.editionPriority,pattern:e.pattern,entry:{type:t.type,_id:t._id,_name:t._name,_slug:t._slug??"",fields:t.parameters,_thumbnail:n?.previewImageUrl??void 0,_dataResources:t._dataResources,_pattern:t._pattern,_patternError:t._patternError,_overridability:t._overridability,_overrides:t._overrides,_locales:t._locales,_author:t._author,_authorSubject:t._authorSubject,_creator:t._creator,_creatorSubject:t._creatorSubject,_patternDataResources:t._patternDataResources}}}function eI(t,e){let{parameters:n,...r}=t;return{...r,_id:e??r._id??"unknown",fields:n}}function tI(t){let{fields:e,...n}=t;return{...n,parameters:e}}function nI(t){let e=Wie(t);if(e)switch(e.syntax){case"jptr":return Yie(e);default:throw new Error(`Unsupported dynamic token binding syntax '${e.syntax}'`)}}import{CANVAS_VIZ_LOCALE_RULE as GLe}from"@uniformdev/canvas";import{produce as YLe}from"immer";function ese(t,e,n){let r=YLe(t.criteria,o=>tse(o,e,n));return r&&{...t,criteria:r}}function tse(t,e,n){if(!t)return t;let r=!1;for(let o of t.clauses)if("clauses"in o){let i=tse(o,e,n);if(i===null){if(t.op!=="|")return null;t.clauses.splice(t.clauses.indexOf(o),1),r=!0}else i!==void 0&&(t.clauses[t.clauses.indexOf(o)]=i,r=!0)}else if(o.rule===GLe){let i=Array.isArray(o.value)?o.value:[o.value],s=i.includes(e),a=i.includes(n);if(!s&&!a||s&&a)continue;if(i.length===1&&a&&!s)return null;s&&!a&&(o.value=i.concat(n),r=!0)}return r?t:void 0}var nse=I(ZO(),1);function rI(t,e){try{return(0,nse.get)(t,e)}catch{return}}function oI(t,e,n=0){let r=t.slice(n*4,n*4+4);if(!r)throw new Error("Failed to generate a default variation name");return`${e.startsWith("$")?e.slice(1):e}-${r}`}import{CANVAS_VIZ_LOCALE_RULE as ZLe}from"@uniformdev/canvas";import{produce as qLe}from"immer";function rse(t,e){let n=qLe(t.criteria,r=>ose(r,e));return n&&{...t,criteria:n}}function ose(t,e){if(!t)return t;for(let n=t.clauses.length-1;n>=0;n--){let r=t.clauses[n];if("clauses"in r){let o=ose(r,e);if(o)t.clauses[n]=o;else if(t.clauses.splice(n,1),o===null&&t.op!=="|")return null}else if(r.rule===ZLe){let o=Array.isArray(r.value)?r.value:[r.value],i=o.indexOf(e);if(i!==-1)if(Array.isArray(r.value)&&r.value.length>1)o.splice(i,1);else if(r.op.startsWith("!"))t.clauses.splice(n,1);else return null}}if(t.clauses.length!==0)return t}function ise(t,e){let n=w0();if(process.env.NODE_ENV==="development"&&!e){let r=new Error().stack?.split(`
|
|
5836
5844
|
`).slice(2).join(`
|
|
5837
5845
|
`).trimStart();n.on("*",(o,i)=>{console.debug(`\u26A1\uFE0F ${t}:${String(o)}`,{args:i,stack:r,subs:n.all.get(String(o))?.length??0})})}return n}var ps=(0,gse.default)(),tAe=!0,nAe="Twee",ol=class t{#e={};rootNodeId;#r={};#o={};#n;#i={};#t=ise(nAe,tAe);#c;#u;#g;#d;#a;#s;constructor(e,n){let{metadata:r,startDirty:o}=n||{};this.#a=r??{},this.#s={_name:e?._name??"",_slug:e?._slug??null},this.#d=!o;let i=tr(e,s=>{this.#v({composition:s,ignoreRootOverrides:!0,preserveChildrenSlotSections:!0}),delete s._author,delete s._authorSubject,delete s._creator,delete s._creatorSubject});this.rootNodeId=i._id??wd(),this.#c=this.rootNodeId,this.#l({componentTree:i,nodeId:this.rootNodeId}),this.#n=i._overrides??{}}events=this.#t;exportTree(e){return this.exportSubtree(this.rootNodeId,e)}exportMetadata(){return this.#a}exportRootNodeMetadata(){return this.#s}get pristine(){return this.#d}set pristine(e){this.#d!==e&&(this.#d=e,this.#t.emit("pristineChanged",{pristine:e}))}get selectedBlockIdStack(){return this.#u}set selectedBlockIdStack(e){this.#u=e,this.#t.emit("selectedBlockChanged",{selectedBlockIds:this.#u})}get selectedNodeId(){return this.#c}set selectedNodeId(e){this.#c!==e&&(this.#c=e,this.selectedParameterId=void 0,this.#t.emit("selectedNodeChanged",{selectedNodeId:e}))}get selectedParameterId(){return this.#g}set selectedParameterId(e){this.#g!==e&&(this.#g=e,this.#t.emit("selectedParameterChanged",{selectedParameterId:e}))}pushSelectedBlockId(e){this.selectedBlockIdStack=this.selectedBlockIdStack??[],this.selectedBlockIdStack?.push(e),this.#t.emit("selectedBlockChanged",{selectedBlockIds:this.selectedBlockIdStack})}popSelectedBlockId(){this.#u?.pop(),this.#t.emit("selectedBlockChanged",{selectedBlockIds:this.selectedBlockIdStack})}getNodeById(e){return this.#e[e]}getNodesIndex(){return this.#e}getBlockNodeValueById(e){return eI(this.exportSubtree(e),e)}getNodeChildren(e){let n=this.#r[e];if(n)return n}getNodeProperty(e,n){return rI(this.#o,[e,n])}getNodeProperties(e){return this.#o[e]??{}}insertNode({node:e,parentNodeId:n,parentSlot:r,targetIndexInSlot:o,overrideNodeId:i}){let s=i??wd();if(!this.#_(n))throw new Error("Cannot insert component into a read-only pattern slot unless it is within a slot section");let l={nodeId:s,parentId:n,value:t.#E(e),isExpandedInUI:!0,propertyValueLocalizability:{}};return this.#S({node:l,parentNodeId:n,parentSlot:r,targetIndexInSlot:o}),this.#m({nodeId:s,destinationParentId:n,destinationSlotName:r}),this.pristine=!1,this.#t.emit("nodeChanged",{changedNode:l,oldValue:void 0,type:"new"}),this.#t.emit("childrenChanged",{parentId:n,slotOrBlockName:r,newChildIds:this.#r[n][r],type:"slot"}),s}upsertBlockNode({nodeId:e,property:n,index:r,entry:o}){let i=this.#w({nodeId:e,property:n,index:r,entry:o});return this.pristine=!1,this.#t.emit("childrenChanged",{parentId:e,slotOrBlockName:n,newChildIds:this.#o[e]?.[n]?.value,type:"block"}),i}updateRootMetadata(e){let n={...this.#a};this.#a={...this.#a,...e},this.pristine=!1,this.#t.emit("metadataChanged",{metadata:this.#a,oldValue:n})}updateRootNode({update:e,doNotSetDirty:n}){let r={...this.#s};this.#s={...this.#s,...e},n||(this.pristine=!1),this.#t.emit("rootNodeMetadataChanged",{metadata:this.#s,oldValue:r})}insertPattern({parentNodeId:e,parentSlot:n,pattern:r,targetIndexInSlot:o,patternInstanceId:i}){let s=i??wd();if(this.#e[s])throw new Error(`Node with ID '${s}' already exists. Pattern nodes must have unique IDs. Did you mean to move or duplicate this pattern instead?`);let a=this.#b(r,s,!1);return this.#f({nodeId:a,parentNodeId:e,parentSlot:n,targetIndexInSlot:o}),this.#m({nodeId:a,destinationParentId:e,destinationSlotName:n}),this.pristine=!1,this.visitNodeAndDescendants(a,l=>{this.#t.emit("nodeChanged",{changedNode:l,oldValue:void 0,type:"new"})}),this.#t.emit("childrenChanged",{parentId:e,slotOrBlockName:n,newChildIds:this.#r[e][n],type:"slot"}),a}unlinkPattern(e){let n=this.#e[e];if(!n)throw new Error(`Node ${e} does not exist`);if(!n.value._pattern)throw new Error(`Node ${e} is not a pattern`);let r=n.value._patternDataResources||n.value._dataResources,o=qie(n.value),i=a=>{a.partOfNestedPattern||(this.updateNode({nodeId:a.nodeId,updateComponent:l=>{delete l._pattern,delete l._patternError,delete l._overrides},updateMetadata:l=>{delete l.partOfPattern,delete l.partOfNestedPattern},doNotSetDirty:!0,ignoreOverrides:!0}),this.#n[a.nodeId]&&(this.#n=tr(this.#n,l=>{delete l[a.nodeId]})))};this.visitNodeAndDescendants(e,i);let s=a=>{a.partOfNestedPattern&&this.updateNode({nodeId:a.nodeId,updateMetadata:l=>{l.partOfPattern=l.partOfNestedPattern,delete l.partOfNestedPattern},doNotSetDirty:!0,ignoreOverrides:!0})};this.visitNodeAndDescendants(e,s),r&&(this.updateNode({nodeId:this.rootNodeId,updateDataResources:a=>Object.entries(o??{}).filter(([l])=>!(l in(a??{}))).map(([l,c])=>{let{source:u,...d}=c;return{type:"set",name:l,value:d}})}),this.updateNode({nodeId:n.nodeId,updateComponent:a=>{delete a._patternDataResources},updateDataResources:"removeAll",doNotSetDirty:!0,ignoreOverrides:!0})),this.pristine=!1}convertToPattern({existingNodeId:e,pattern:n}){let r=this.#e[e],o=r?.parentId;if(!r)throw new Error(`Node ${e} does not exist`);let i=this.#b(n,e,!0);this.#e[i]=tr(this.#e[i],a=>{a.parentId=o}),this.pristine=!1;let s=this.#e[i];this.#t.emit("nodeChanged",{changedNode:s,oldValue:r,type:"new"}),Object.entries(this.#r[i]??{}).forEach(([a,l])=>{this.#t.emit("childrenChanged",{newChildIds:l,parentId:i,slotOrBlockName:a,type:"slot"})})}copyNodeToClipboard(e){let n=this.exportSubtree(e,{keepPatternData:!1}),r=this.exportSubtree(e,{keepPatternData:!0}),o=[];Cc(r,({node:a})=>{a._id&&o.push(a._id)}),Cc(n,({node:a})=>{a._id&&(a._overrides&&delete a._overrides,"_name"in a&&delete a._name,"_slug"in a&&delete a._slug)});let i=this.#h(),s=Object.entries(i??{}).reduce((a,[l,c])=>(o.some(u=>l.includes(u))&&(a[l]=c),a),{});return{format:"uniform/copied-component-subtree-1.0",componentData:n,overrides:Object.keys(s).length?s:void 0,pasteAs:this.getNodeById(e)?.isBlock?"block":void 0}}async pasteNodeFromClipboard({parentNodeId:e,parentSlot:n,targetIndexInParent:r,clipboard:o,resolvePattern:i}){let s=ps(o),a=async c=>{c._pattern&&l.push((async()=>{let u=await i(c._pattern);if(!u){console.debug(`Pasted pattern ${c._pattern} not found, skipping`);return}let d=this.#x(u,c._id);Object.assign(c,d)})())},l=[];return Cc(s.componentData,({node:c})=>{a(c)}),s.overrides&&Object.values(s.overrides).forEach(c=>{c.slots&&Object.values(c.slots).forEach(u=>{u.forEach(d=>{Cc(d,({node:f})=>{a(f)})})})}),await Promise.all(l),this.#T(s.componentData,{parentId:e,parentName:n,parentType:o.pasteAs==="block"?"block":"slot",targetIndexInParent:r},s.overrides)}enableLocale(e){this.updateNode({nodeId:this.rootNodeId,updateComponent:n=>{let r=n;r._locales??=[];let o=[...new Set([...r._locales,...Array.isArray(e)?e:[e]])];r._locales=o}})}disableLocale(e){this.updateNode({nodeId:this.rootNodeId,updateComponent:o=>{let i=o;i._locales=i._locales?.filter(s=>s!==e)}});let n=[],r=o=>{this.getNodeProperty(o.nodeId,Ab)?.value===e&&!o.partOfPattern&&n.push(o.nodeId);let s=this.getNodeProperties(o.nodeId);Object.entries(s).forEach(([l,c])=>{let u=c;l!==Sd&&(o.partOfPattern?this.isPatternPropertyOverridden(o.nodeId,l,e)&&this.resetPatternPropertyOverride(o.nodeId,l,e):(u?.localesConditions?.[e]?.forEach((d,f)=>{this.updateNodeProperty({nodeId:o.nodeId,property:l,value:void 0,source:"other",locale:e,conditionIndex:f,conditionDefinition:null})}),u?.locales?.[e]!==void 0&&this.updateNodeProperty({nodeId:o.nodeId,property:l,value:void 0,source:"other",locale:e,conditionIndex:-1})))});let a=this.getNodeProperty(o.nodeId,Sd);if(a?.value){let l=rse(a.value,e);if(l===null)n.push(o.nodeId);else if(l===void 0||!$r(a.value,l)){let c=!o.partOfPattern,u=Dp(o.value._overridability,Sd)==="yes";(c||u)&&this.updateNodeProperty({nodeId:o.nodeId,property:Sd,value:l?()=>l:void 0,source:"other",locale:void 0,conditionIndex:-1})}}};this.visitNodeAndDescendants(this.rootNodeId,r),n.forEach(o=>{this.deleteNode(o)})}copyValuesToLocalePlan({sourceLocale:e,destinationLocale:n,doNotCopyDescendants:r=!1,startingNodeId:o=this.rootNodeId,specificPropertyId:i}){let s=new Map,a=c=>{if(c.value.type===JLe&&!c.partOfPattern){let d=this.getNodeChildren(c.nodeId)?.[iI]??[],f=d.map(g=>this.getNodeProperty(g,Ab)),p=f.findIndex(g=>g?.value===n);if(p>=0){let g=d[p];Ed(s,g).actions.push({type:"deleteLocalizedNode"})}let m=f.findIndex(g=>g?.value===e);if(m>=0){let g=d[m];Ed(s,g).actions.push({type:"duplicateLocalizedNode",targetIndexInSlot:p})}}if(s.get(c.nodeId)?.actions.some(d=>d.type==="deleteLocalizedNode"))return;let u=i?{[i]:this.getNodeProperty(c.nodeId,i)}:this.getNodeProperties(c.nodeId);Object.entries(u).forEach(([d,f])=>{if(f===void 0)return;let p=!c.partOfPattern,m=Dp(c.value._overridability,d)==="yes";if(!(p||m))return;if(d===Sd){let w=ese(f.value,e,n);w===null?Ed(s,c.nodeId).actions.push({type:"deleteLocalizedNode"}):w&&Ed(s,c.nodeId).actions.push({type:"updateVisibilityCriteria",targetValue:w})}let h=f.locales?.[e],v=f.locales?.[n];(!h||!v||!$r(h,v))&&(h!==void 0?Ed(s,c.nodeId).actions.push({type:"copyPropertyValue",propertyId:d,sourceValue:h,targetValue:v,conditionIndex:-1}):v!==void 0&&Ed(s,c.nodeId).actions.push({type:"deletePropertyValue",propertyId:d,sourceValue:h,targetValue:v,conditionIndex:-1}));let y=f.localesConditions?.[e],b=f.localesConditions?.[n];y?.forEach((w,E)=>{let _=f.localesConditions?.[n]?.[E];(!w||!_||!$r(w,_))&&Ed(s,c.nodeId).actions.push({type:"copyPropertyValue",propertyId:d,sourceValue:w.value,targetValue:_,conditionIndex:E,conditionDefinition:w.when})});let S=y?.length??0,C=b?.length??0;if(S<C){let w=Ed(s,c.nodeId);for(let E=S;E<C;E++)w.actions.push({type:"deletePropertyValue",propertyId:d,sourceValue:y?.[E],targetValue:b?.[E],conditionIndex:E})}})},l=this.#e[o];if(!l)throw new Error(`Node ${o} does not exist`);return a(l),!i&&!r&&this.visitDescendants(l.nodeId,a),{nodePlans:Array.from(s.values()),sourceLocale:e,destinationLocale:n}}async copyValuesToLocaleExecute({resolvePattern:e,plan:{sourceLocale:n,destinationLocale:r,nodePlans:o}}){let i=`copyLocaleExecute: ${r}`;console.time(i);for(let{nodeId:s,actions:a}of o)for(let l of a)switch(l.type){case"copyPropertyValue":{let c=this.getNodeProperty(s,l.propertyId)?.type,u=l.sourceValue;c==="contentReference"&&(u=this.prepareContentReferenceWrite({nodeId:s,propertyId:l.propertyId,destinationLocale:r,conditionIndex:l.conditionIndex,sourceValue:l.sourceValue})),this.updateNodeProperty({nodeId:s,property:l.propertyId,source:"other",locale:r,value:()=>u,type:c,conditionIndex:l.conditionIndex,conditionDefinition:l.conditionDefinition});break}case"deletePropertyValue":{this.updateNodeProperty({nodeId:s,property:l.propertyId,source:"other",locale:r,value:void 0,conditionIndex:l.conditionIndex,conditionDefinition:null});break}case"deleteLocalizedNode":{this.deleteNode(s);break}case"duplicateLocalizedNode":{let c=await this.duplicateNode(s,e);this.updateNodeProperty({nodeId:c,locale:void 0,conditionIndex:-1,type:"localeSelect",property:Ab,source:"other",value:()=>r});let u=this.copyValuesToLocalePlan({sourceLocale:n,destinationLocale:r,startingNodeId:c});this.copyValuesToLocaleExecute({plan:u,resolvePattern:e}),l.targetIndexInSlot!==void 0&&this.moveNode({movedNodeId:c,parentNodeId:this.#e[s].parentId,parentSlot:iI,targetIndexInSlot:l.targetIndexInSlot});break}case"updateVisibilityCriteria":{this.updateNodeProperty({nodeId:s,property:Sd,source:"other",locale:void 0,conditionIndex:-1,value:()=>l.targetValue});break}default:throw new Error(`Unhandled action type ${l.type}`)}console.timeEnd(i)}updateNode({nodeId:e,updateComponent:n,updateDataResources:r,updateMetadata:o,doNotSetDirty:i,ignoreOverrides:s}){let a=this.#e[e];if(!a)throw new Error(`Update target node ID ${e} did not exist!`);let l=tr(a,f=>{if(o&&(o(f),f.nodeId=e,f.value=a.value,f.parentId=a.parentId),n){if(n(f.value),"slots"in f.value)throw new Error("Do not set `slots` on a Twee node, insert child nodes instead.");if("parameters"in f.value)throw new Error("Do not set `parameters` on a Twee node, use updateProperties option instead.")}if(r){let p=typeof r=="function"?r(f.value._dataResources):r;if(p==="removeAll")delete f.value._dataResources;else for(let m of p){let g=s?!1:f.nodeId!==this.rootNodeId&&f.value._pattern;switch(m.type){case"set":g&&(this.#n=tr(this.#n,h=>{h[e]??={},h[e].dataResources??={},h[e].dataResources[m.name]=m.value})),f.value._dataResources??={},f.value._dataResources[m.name]=m.value;break;case"remove":g&&(this.#n=tr(this.#n,h=>{delete h[e]?.dataResources?.[m.name]})),delete f.value._dataResources?.[m.name];break;case"reset":{let h=this.#i[e]?.dataResources?.[m.name];f.value._dataResources&&(h&&Object.keys(h).length>0?f.value._dataResources[m.name]=h:delete f.value._dataResources[m.name]),this.#n=tr(this.#n,v=>{delete v[e]?.dataResources?.[m.name]})}break;default:throw new Error(`Unhandled data resource action ${m?.type}`)}}}}),c=!!(a.partOfPattern&&!a.value._patternError),u=a.value.variant!==l.value.variant,d=a.value._overridability?.variants??!1;!s&&c&&u&&d&&(this.#n=tr(this.#n,f=>{f[e]??={},f[e].variant=l.value.variant})),this.#e[e]=l,i||(this.pristine=!1),this.#t.emit("nodeChanged",{changedNode:l,type:"update",oldValue:a})}updateNodeProperty({nodeId:e,property:n,value:r,source:o,locale:i,type:s,doNotSetDirty:a=!1,ignoreOverrides:l=!1,conditionIndex:c,conditionDefinition:u}){let d=this.#e[e];if(!d)throw new Error(`Update target node ID ${e} did not exist!`);if(c<0&&u)throw new Error("Condition definition provided for non-conditional value");let f=!!(d.partOfPattern&&!d.value._patternError),p=[e,n],m=rI(this.#o,p);if(!m&&r==null)return;let g=fse({locale:i,property:m,conditionIndex:c}),h=i?m?.localesConditions?.[i]?.[c]:m?.conditions?.[c],v=typeof r=="function"?tr(g,w=>r(w)):r,y=s??m?.type;if(!y)throw new Error(`Cannot add parameter ${n} to node ${e} without specifying a type`);let b={...m,type:y},S=!1;b=tr(b,w=>{v===void 0&&c<0?S=!r5({locale:i,property:w,conditionIndex:c}):u===null&&c>=0?S=!r5({locale:i,property:w,conditionIndex:c}):QO({locale:i,property:w,newPropertyValue:v,conditionIndex:c,conditionDefinition:u??h?.when??{clauses:[]}})}),S&&(b=void 0);let C=f&&Dp(d.value._overridability,n)==="yes";if(f&&!C&&!l)throw new Error(`Cannot override parameter ${n} on node ${e} because it is not marked as overridable on the pattern (${d.partOfPattern})`);if(C&&(this.#i[e]?.parameters?.[n]||(this.#i=tr(this.#i,E=>{E[e]??={parameters:{},dataResources:{}},E[e].parameters[n]=m??{type:y,value:null}}))),!l&&C){let w=this.#n[e]?.parameters?.[n];this.#n=tr(this.#n,E=>{let $=v==null||b===void 0?null:v,T=w??{type:b?.type??m?.type??"unknown",value:m?.value,conditions:m?.conditions,locales:i&&m?.locales?.[i]?{[i]:m.locales[i]}:void 0,localesConditions:i&&m?.localesConditions?.[i]?{[i]:m.localesConditions[i]}:void 0},N=tr(T,P=>{u===null&&c>=0?r5({locale:i,property:P,conditionIndex:c}):QO({locale:i,property:P,newPropertyValue:$,conditionIndex:c,conditionDefinition:u??h?.when??{clauses:[]}})});(0,Lp.set)(E,`/${e}/parameters/${n}`,N)}),w||this.#t.emit("propertyOverrideCreated",{nodeId:e,property:n})}v===null?(0,Lp.remove)(this.#o,p):(this.#o[e]??={},(0,Lp.set)(this.#o,p,b)),a||(this.pristine=!1),this.#t.emit("nodeParameterChanged",{nodeId:e,parameter:n,locale:i,conditionIndex:c,value:b,previousValue:m,type:r?m?"update":"new":"delete",conditionDefinition:u,source:o})}isPatternPropertyOverridden(e,n,r,o){let i=this.getNodeById(e);if(!i||Dp(i.value._overridability,n)==="no")return!1;let s=this.#n[e]?.parameters?.[n];return s?r?(o===void 0||o===!0)&&s.localesConditions?.[r]!==void 0||(o===void 0||o===!1)&&s.locales?.[r]!==void 0:(o===void 0||o===!0)&&s.conditions!==void 0||(o===void 0||o===!1)&&s.value!==void 0:!1}getPatternPropertyOverrideDefaultValue(e,n,r){let o=this.#i[e]?.parameters?.[n];if(!o)return{exists:!1};if(r&&o.locales?.[r])return{exists:!0,value:o,sourceLocale:r};if(o.value!==void 0)return{exists:!0,value:o,sourceLocale:void 0};let i=Object.keys(o.locales??{})[0];return i?{exists:!0,value:o,sourceLocale:i}:{exists:!1}}resetPatternPropertyOverride(e,n,r){let o=[-1];this.#n=tr(this.#n,s=>{let a=s[e]?.parameters?.[n];if(a)if(r){delete a.locales?.[r];let l=a.localesConditions?.[r];l&&(l.forEach((c,u)=>{o.push(u)}),delete a.localesConditions?.[r]),a.locales&&Object.keys(a.locales).length===0&&delete a.locales,a.localesConditions&&Object.keys(a.localesConditions).length===0&&delete a.localesConditions,Object.keys(a.locales??{}).length===0&&Object.keys(a.localesConditions??{}).length===0&&delete s[e]?.parameters?.[n]}else{let l=a.conditions;l&&l.forEach((c,u)=>{o.push(u)}),delete s[e].parameters?.[n]}});let i=this.getPatternPropertyOverrideDefaultValue(e,n,r);!i.exists||i.value===null?this.updateNodeProperty({nodeId:e,property:n,value:void 0,source:"reset",locale:r,ignoreOverrides:!0,doNotSetDirty:!1,conditionIndex:-1}):o.forEach(s=>{let a=fse({locale:i.sourceLocale,property:i.value,conditionIndex:s,strict:!0});this.updateNodeProperty({nodeId:e,property:n,value:a===void 0?void 0:()=>a,source:"reset",locale:r,type:i.value?.type,ignoreOverrides:!0,doNotSetDirty:!1,conditionIndex:s,conditionDefinition:(r?i.value?.localesConditions?.[r]?.[s]?.when:i.value?.conditions?.[s]?.when)??null})}),this.#t.emit("propertyOverrideReset",{nodeId:e,property:n,usedPatternDefault:i!==void 0})}async duplicateNode(e,n){let r=this.getParentInfo(e);if(!r)throw new Error("Cannot duplicate root node or parentless block");let o=this.copyNodeToClipboard(e);return await this.pasteNodeFromClipboard({parentNodeId:r.parentId,parentSlot:r.parentName,resolvePattern:n,targetIndexInParent:r.targetIndexInParent+1,clipboard:o})}moveNode({movedNodeId:e,parentNodeId:n,parentSlot:r,targetIndexInSlot:o}){if(!this.#e[e])throw new Error(`Cannot move node ${e} - it does not exist`);let s=this.getParentInfo(e);if(!s)throw new Error("Cannot move root node");this.#r[s.parentId][s.parentName].splice(s.targetIndexInParent,1),this.#y(s.parentId,e),this.#f({nodeId:e,parentNodeId:n,parentSlot:r,targetIndexInSlot:o}),this.#m({nodeId:e,destinationParentId:n,destinationSlotName:r,sourceSlotName:s.parentName}),this.pristine=!1,this.#t.emit("childrenChanged",{parentId:n,slotOrBlockName:r,newChildIds:this.#r[n][r],type:"slot"}),this.#t.emit("childrenChanged",{parentId:s.parentId,slotOrBlockName:s.parentName,newChildIds:this.#r[s.parentId][s.parentName],type:"slot"})}deleteNode(e,n){let r=this.getParentInfo(e);if(!r&&!n)throw new Error("Cannot delete root node");r&&!n&&(this.#r[r.parentId][r.parentName].splice(r.targetIndexInParent,1),this.#r[r.parentId][r.parentName].length===0&&delete this.#r[r.parentId][r.parentName],this.selectedNodeId===e&&(this.selectedNodeId=r.parentId),this.#y(r.parentId,e),this.#t.emit("childrenChanged",{parentId:r.parentId,slotOrBlockName:r.parentName,newChildIds:this.#r[r.parentId][r.parentName]??[],type:"slot"})),delete this.#e[e],this.#t.emit("nodeDeleted",{deletedNodeId:e}),this.pristine=!1}#y(e,n){this.#n=tr(this.#n,r=>{let o=r[e]?.slots;o&&Object.keys(o).forEach(i=>{o[i]=o[i].filter(({_id:s})=>s!==n),o[i].length===0&&delete o[i]})})}#h(){if(Object.keys(this.#n).length>0){let e=ps(this.#n);return Object.entries(e).forEach(([r,o])=>{let i=!0;if(!this.#e[r]){delete e[r];return}if(o.parameters){let s=Object.entries(o.parameters);s.forEach(([a,l])=>{let c=mse(l);c?(o.parameters[a]=c,i=!1):delete o.parameters[a]}),s.length===0&&delete o.parameters}o.slots&&Object.entries(o.slots).forEach(([a,l])=>{if(l.length){let c=l.filter(u=>u._id).map(u=>this.exportSubtree(u._id));c?(o.slots[a]=c,i=!1):delete o.slots[a]}else delete o.slots[a]}),o.variant!==void 0&&(i=!1),o.dataResources&&Object.keys(o.dataResources).length>0&&(i=!1),i&&delete e[r]}),Object.keys(e).length===0&&(e=void 0),e}}exportSubtree(e,n){let{keepPatternData:r=!1}=n??{},o=this.#e[e];if(!o)throw new Error(`Node ${e} to export is not found`);let i=ps(o);if(e===this.rootNodeId){let l=this.#h();l?i.value._overrides=l:delete i.value._overrides;let c=i.value;c._name=this.#s._name,this.#s._slug&&(c._slug=this.#s._slug)}let s=[i],a=new Set;for(;s.length>0;){let l=s.pop();if(a.has(l.nodeId))throw new Error("Circular reference detected in the composition tree with node ID "+l.nodeId);if(a.add(l.nodeId),l.value._id=l.nodeId,!r&&(delete l.value._patternDataResources,delete l.value._patternOverrides,l.value._pattern&&l.value._dataResources)){let d=!1;Object.keys(l.value._dataResources).forEach(f=>{i.value._overrides?.[l.nodeId]?.dataResources?.[f]?delete l.value._dataResources[f]:d=!0}),d||delete l.value._dataResources}let c=this.#o[l.nodeId];if(c&&(r||!l.partOfPattern)){let d={},f=!1;Object.entries(c).forEach(([p,m])=>{if(m?.type===Gs&&Array.isArray(m.value)){let g=m.value,h=[];g.forEach(v=>{let y=this.exportSubtree(v,n);h.push(eI(y,v))}),d[p]={value:h,type:Gs},f=!0}else{let g=mse(m);g&&(d[p]=g,f=!0)}}),f&&(l.value.parameters=d)}let u=this.#r[l.nodeId];!u||l.partOfPattern&&!r||Object.entries(u).forEach(([d,f])=>{f.forEach((p,m)=>{let g=this.#e[p];if(!g)throw new Error("Insanity detected.");let h=ps(g),v=l.value;v.slots=v.slots||{},(0,Lp.set)(l,["value","slots",d,m.toString(10)],h.value),s.push(h)})})}return this.#D(i.value),i.value}#S({parentNodeId:e,parentSlot:n,targetIndexInSlot:r,node:o}){if(!this.#e[e])throw new Error("Parent ID to insert under did not exist!");if(this.#e[o.nodeId])throw new Error(`Node with ID '${o.nodeId}' already exists. Nodes must have unique IDs. Did you mean to move or duplicate this node instead?`);this.#e[o.nodeId]=o,this.#f({nodeId:o.nodeId,parentNodeId:e,parentSlot:n,targetIndexInSlot:r})}#f({nodeId:e,parentNodeId:n,parentSlot:r,targetIndexInSlot:o}){let i=this.#e[n],s=this.#r[n]??={},a=s[r]??=[];typeof o<"u"?a.splice(o,0,e):a.push(e),i?.value.type===o5&&(this.#n=tr(this.#n,l=>{l[n]=l[n]??{},l[n].slots={[XLe]:a.map(c=>({_id:c,type:this.#e[c].value.type}))}})),this.#e[e]=tr(this.#e[e],l=>{l.parentId=n})}#w({nodeId:e,property:n,index:r,entry:o}){let i=this.getNodeById(e);if(!i)throw new Error("Node doesn't exist");let a={nodeId:o._id??wd(),value:{type:o.type,_dataResources:o._dataResources},isBlock:!0,parentId:e,propertyValueLocalizability:{}},l=this.getNodeProperty(i.nodeId,n);if(l&&l.type!==Gs)throw new Error("Parameter already exists and isn't a block parameter");let c=this.#e[a.nodeId];this.#e[a.nodeId]=a;let u=ps(this.getNodeProperty(i.nodeId,n)?.value?.filter(d=>this.getNodeById(d))??[]);if(typeof r<"u"){if(r<0)throw new Error("parameter index cannot be less than 0");let d=-1;if(u.forEach((f,p)=>{f===a.nodeId&&(d=p)}),r>u.length+(d===-1?1:0))throw new Error(`Parameter index ${r} outside current index bounds.`);d>-1&&d!==r&&(u=u.filter(f=>f!==a.nodeId),u.splice(r,0,a.nodeId))}else u.push(a.nodeId);return Object.entries(o?.fields??{}).forEach(([d,f])=>{if(f.type===Gs&&Array.isArray(f.value)){let p=f.value,m=[];p.forEach(g=>{let h=g._id??wd();this.#l({nodeId:h,componentTree:tI(g)}),this.#e[h].isBlock=!0,this.#e[h].parentId=a.nodeId,m.push(h)}),this.updateNodeProperty({nodeId:a.nodeId,property:d,type:f.type,value:()=>m,source:"other",locale:void 0,conditionIndex:-1})}else this.updateNodeProperty({nodeId:a.nodeId,property:d,type:f.type,value:()=>f.value,source:"other",locale:void 0,conditionIndex:-1})}),this.updateNodeProperty({nodeId:i.nodeId,property:n,type:Gs,value:()=>u,source:"other",locale:void 0,conditionIndex:-1}),this.#t.emit("nodeChanged",{changedNode:i,oldValue:void 0,type:c?"update":"new"}),this.#t.emit("nodeParameterChanged",{nodeId:i.nodeId,parameter:n,previousValue:l,source:"other",type:c?"update":"new",locale:void 0,conditionIndex:-1,conditionDefinition:void 0,value:{type:Gs,value:u}}),{blockIds:u}}#l({componentTree:e,nodeId:n,partOfPattern:r,partOfNestedPattern:o,resetUids:i,isBlock:s,allowReplacement:a}){let{slots:l,parameters:c,_id:u,_overrides:d,...f}=e,p=r??f._pattern,m=f._pattern&&f._pattern!==p?f._pattern:o,g=n??(i?void 0:u)??wd();if(this.#e[g]&&!a)throw new Error(`Node with ID '${g}' already exists. Nodes must have unique IDs.`);let h={nodeId:g,value:f,partOfPattern:p,partOfNestedPattern:m,isBlock:s,propertyValueLocalizability:Object.entries(c??{}).reduce((v,[y,b])=>(v[y]=Dx({definition:void 0,currentValue:b,lastUserChoice:void 0}),v),{})};return p&&(h.partOfPattern=p),this.#e[h.nodeId]=h,c&&Object.entries(c).forEach(([v,y])=>{let{connectedData:b,...S}=y,C=b?dse(use(b)):y.value;if(y?.type===Gs&&Array.isArray(C)){let w=C,E=[];w?.forEach(_=>{let $={..._,_id:i?wd():_._id??wd()};if(this.#e[$._id])throw new Error(`Block node with ID '${$._id}' already exists. Block nodes must have unique IDs.`);return E.push($._id),this.#e[$._id]={nodeId:$._id,value:{type:Gs},propertyValueLocalizability:{}},this.#l({componentTree:tI($),nodeId:$._id,allowReplacement:!0,partOfPattern:p,partOfNestedPattern:m}),this.#e[$._id].isBlock=!0,this.#e[$._id].parentId=h.nodeId,this.#e[$._id]}),C=E}this.#o[h.nodeId]=this.#o[h.nodeId]??{},(0,Lp.set)(this.#o,[h.nodeId,v],{...S,value:C})}),l&&Object.entries(l).forEach(([v,y])=>{let b=y.map(S=>{if(this.#e[S._id??""]?.isBlock)return;let C=this.#l({componentTree:S,partOfPattern:f.type===o5?void 0:p,partOfNestedPattern:f.type===o5?void 0:m,resetUids:i});return this.#e[C].parentId=h.nodeId,C});this.#r[h.nodeId]=this.#r[h.nodeId]??{},this.#r[h.nodeId][v]=b.filter(S=>S)}),h.nodeId}#b(e,n,r){let o=this.#x(e,n);return this.#l({componentTree:o,nodeId:n,allowReplacement:r})}#x(e,n){let r=ps(e);return this.#v({composition:r}),QE(r,n),r._pattern=e._id,delete r._id,delete r._name,delete r._slug,delete r._overrides,delete r._locales,delete r._author,delete r._authorSubject,delete r._creator,delete r._creatorSubject,r._dataResources&&(r._patternDataResources=ps(r._dataResources),delete r._dataResources),r}getParentInfo(e){let{parentId:n,isBlock:r}=this.#e[e]??{};if(!n)return;let o=this.#e[n];if(o)if(r)for(let[i,s]of Object.entries(this.#o[n]??{})){if(s?.type!==Gs)continue;let a=Array.isArray(s.value)?s.value:[],l=a.indexOf(e);if(l>=0)return{value:o.value,parentId:n,parentName:i,targetIndexInParent:l,parentChildIds:a,parentType:"block"}}else{let i=this.#r[n];if(!i&&!r)throw new Error("Sanity failed; parent had no children!");for(let[s,a]of Object.entries(i??{})){let l=a.indexOf(e);if(l>=0)return{value:o.value,parentId:n,parentName:s,targetIndexInParent:l,parentChildIds:a,parentType:"slot"}}return}}static#E(e){return tr(e,r=>{delete r.slots,delete r.parameters})}#_(e){let n=e;for(;n;){let r=this.getNodeById(n);if(!r)break;if(r.value._pattern)return!1;if(r.value.type===o5||!r.partOfPattern)return!0;n=r.parentId}return!0}#T(e,n,r){let i={...this.#h(),...r},s;if(this.#n=tr(this.#n,l=>{this.#i=tr(this.#i,c=>{s=n5(e,i,(u,d,f)=>{l[u]=d,c[u]=this.#i[f]})})}),!s)throw new Error("Failed to duplicate component");s=tr(s,l=>{l._overrides=ps(this.#n),this.#v({composition:l,preserveChildrenSlotSections:!0})});let a=this.#l({componentTree:s,isBlock:n.parentType==="block"});if(n.parentType==="block"){let l=this.getNodeProperty(n.parentId,n.parentName)?.value??[],c=[...l.slice(0,n.targetIndexInParent),a,...l.slice(n.targetIndexInParent)];this.updateNodeProperty({nodeId:n.parentId,property:n.parentName,type:Gs,value:()=>c,locale:void 0,conditionIndex:-1,source:"other"}),this.#e[a].parentId=n.parentId,this.#t.emit("nodeChanged",{changedNode:this.getNodeById(a),type:"new",oldValue:void 0}),this.#t.emit("childrenChanged",{parentId:n.parentId,slotOrBlockName:n.parentName,newChildIds:c,type:"block"})}else{this.#f({nodeId:a,parentNodeId:n.parentId,parentSlot:n.parentName,targetIndexInSlot:n.targetIndexInParent}),this.#m({nodeId:a,destinationParentId:n.parentId,destinationSlotName:n.parentName}),this.#t.emit("childrenChanged",{parentId:n.parentId,slotOrBlockName:n.parentName,newChildIds:this.#r[n.parentId][n.parentName],type:"slot"});let l=c=>{this.#t.emit("nodeChanged",{changedNode:c,type:"new",oldValue:void 0})};this.visitNodeAndDescendants(a,l)}return this.pristine=!1,a}#v({composition:e,ignoreRootOverrides:n,preserveChildrenSlotSections:r}){this.#i=tr(this.#i,i=>{let s=XO({beforeApplyParameterOverride(c,u,d){i[c._id]??={parameters:{},dataResources:{}},i[c._id].parameters[u]=ps(d)},beforeApplyDataResourceOverride(c,u,d){c._dataResources?.[u]?.ignorePatternParameterDefault||(i[c._id]??={parameters:{},dataResources:{}},i[c._id].dataResources[u]=ps(d))}}),a=XO({beforeApplyParameterOverride(c,u,d,f){i[c._id]?.parameters[u]||(i[c._id]??={parameters:{},dataResources:{}},i[c._id].parameters[u]=ps(f??null))},beforeApplyDataResourceOverride(c,u,d,f){c._dataResources?.[u]?.ignorePatternParameterDefault||i[c._id]?.dataResources[u]||(i[c._id]??={parameters:{},dataResources:{}},i[c._id].dataResources[u]=ps(f))}});if(n){let{_overrides:c,...u}=e;Cc(u,({node:d})=>{s.visitNode(d)})}let l=n?a:s;Cc(e,({node:c})=>{l.visitNode(c)})});let o=Vie({preserveOwnSlotSections:!0,preserveChildrenSlotSections:r});Cc(e,i=>{o(i)})}visitNodeAndDescendants(e,n){let r=this.getNodeById(e);if(!r)throw new Error("Insanity detected.");n(r),this.visitDescendants(e,n)}visitDescendants(e,n){let r=this.#p(e,new Set);for(let o of r)n(...o)}async visitDescendantsAsync(e,n){let r=this.#p(e,new Set);for(let o of r)await n(...o)}*#p(e,n){let r=this.#e[e],o=this.#r[e]??{},i=Object.entries(this.#o[e]??{}).filter(([,s])=>s?.type===Gs)??[];if(!r)throw new Error("Insanity detected.");n.add(e);for(let[s,a]of i){let l=a.value??[];for(let c=0;c<l.length;c++){let u=l[c],d=this.#e[u];if(d){if(n.has(u)){console.error(`Detected parent/child cycle in composition, ID ${u} exists more than once. The traversal of descendants will be aborted for the cycle subtree.`);continue}yield[d,r,s,c];for(let f of this.#p(u,n))yield f}}}for(let[s,a]of Object.entries(o))for(let l=0;l<a.length;l++){let c=a[l],u=this.#e[c];if(u){if(n.has(c)){console.error(`Detected parent/child cycle in composition, ID ${c} exists more than once. The traversal of descendants will be aborted for the cycle subtree.`);continue}yield[u,r,s,l];for(let d of this.#p(c,n))yield d}}}#m({nodeId:e,destinationParentId:n,destinationSlotName:r,sourceSlotName:o}){let i=r,s=o===ase,a=i===ase,l=o===lse,c=i===lse,u=i===iI,d=this.getNodeProperty(e,sse);a&&d&&this.updateNodeProperty({nodeId:e,property:sse,value:void 0,source:"other",locale:void 0,conditionIndex:-1});let f=this.getNodeProperty(e,Mb);!a&&f&&this.updateNodeProperty({nodeId:e,property:Mb,value:void 0,source:"other",locale:void 0,conditionIndex:-1}),a&&!s&&this.#C({nodeId:e,siblingIds:this.getNodeChildren(n)?.[r]??[],selectExistingName:g=>this.getNodeProperty(g,Mb)?.value?.name,setName:g=>this.updateNodeProperty({nodeId:e,property:Mb,value:h=>h&&typeof h=="object"&&h!==null?{...h,name:g}:{name:g,crit:[]},source:"other",locale:void 0,conditionIndex:-1,type:Mb})}),c&&!l&&this.#C({nodeId:e,siblingIds:this.getNodeChildren(n)?.[r]??[],selectExistingName:g=>this.getNodeProperty(g,cse)?.value?.id,setName:g=>this.updateNodeProperty({nodeId:e,property:cse,value:h=>h&&typeof h=="object"&&h!==null?{...h,id:g}:{id:g},source:"other",locale:void 0,conditionIndex:-1,type:"testVariant"})});let p=this.getNodeProperty(e,Ab);!u&&p&&this.updateNodeProperty({nodeId:e,property:Ab,value:void 0,source:"other",locale:void 0,conditionIndex:-1});let m=this.getNodeProperty(e,Sd);(a||u||c)&&m&&this.updateNodeProperty({nodeId:e,property:Sd,value:void 0,source:"other",locale:void 0,conditionIndex:-1})}#C({nodeId:e,siblingIds:n,selectExistingName:r,setName:o}){let i=r(e),s=d=>n.some(f=>f===e?!1:r(f)===d),a=i&&s(i);if(i&&!a)return;let l=this.getNodeById(e)?.value.type;if(!l)throw new Error("Insanity detected.");let c=0,u=oI(e,l,c);do u=oI(e,l,c),c++;while(s(u));o(u)}prepareContentReferenceWrite({nodeId:e,propertyId:n,destinationLocale:r,conditionIndex:o,sourceValue:i}){let s=this.#$({value:i,dataResources:this.#e[e]?.value._dataResources});if(!s)return i;let{dataResource:a,isSingleEntryReference:l}=s,c=zp(e,n,r==="${locale}"?void 0:r,o);this.updateNode({nodeId:e,updateDataResources:[{name:c,type:"set",value:{...a,variables:{...a?.variables,locale:r}}}]});let u=`/${c}/entries${l?"/0":""}`;return dse(use({syntax:"jptr",pointer:u}))}#$({value:e,dataResources:n}){if(typeof e!="string")return;let r;pse(e,(a,l)=>{l==="variable"&&(r=a)});let o=r?nI(r):void 0;if(!o)return;let i=o.dataResource,s=n?.[i];if(s)return{dataResource:s,dataResourceName:i,isSingleEntryReference:o.dataExpression?.endsWith("/0")}}#N(e){if(typeof e!="string")return;let n;return pse(e,(o,i)=>{i==="variable"&&(n=o)}),(n?nI(n):void 0)?.dataResource}#D(e){let n=new Set,r=[],o=({node:i})=>{let s=QLe(i),a=i._dataResources;if(a)for(let[l,c]of Object.entries(a))c.type===ll&&r.push({dataResources:a,dataResourceKey:l});if(s)for(let l of Object.values(s))l.type==="contentReference"&&eAe(l,({value:c})=>{let u=this.#N(c);u&&n.add(u)})};if(Cc(e,o),"_overrides"in e&&e._overrides)for(let[,i]of Object.entries(e._overrides))Cc({type:e.type,...i,_dataResources:i.dataResources},o);for(let{dataResources:i,dataResourceKey:s}of r)n.has(s)||delete i[s]}};function mse(t){return t?.value===void 0&&!t?.conditions&&!t?.locales&&!t?.localesConditions?null:t}function Ed(t,e){return rAe(t,e,()=>({nodeId:e,actions:[]}))}function rAe(t,e,n){return t.has(e)||t.set(e,n()),t.get(e)}import{CANVAS_DRAFT_STATE as a5,CanvasClient as aAe}from"@uniformdev/canvas";import{ProjectMapClient as lAe}from"@uniformdev/project-map";import{produce as cAe}from"immer";function hse(t){return t.reduce((e,n)=>(e[n._id]={id:n._id,type:n.type,name:n._name},e),{})}import{CANVAS_DRAFT_STATE as vse,CanvasClient as sI,ContentClient as yse,ProjectClient as bse}from"@uniformdev/canvas";function xse(t){let e,n,r;return{fetchProjectGuidance:async()=>(e!==void 0||(e=(await new bse(t).get({projectId:t.projectId}))?.guidance),e),fetchDefinitions:async()=>{if(n!==void 0)return n;let i=await new sI(t).getComponentDefinitions({limit:1e3,includeSystem:!0});return n=Object.fromEntries(i.componentDefinitions.map(s=>[s.id,s])),n},fetchPatterns:async()=>{if(r!==void 0)return r;let i=await new sI(t).getCompositionList({limit:1e3,pattern:!0,patternType:"component",resolveData:!1,skipPatternResolution:!0,skipOverridesResolution:!0,state:vse});return r=hse(i.compositions.map(s=>s.composition)),r},resolvePatternData:async o=>(await new sI(t).getCompositionById({compositionId:o,state:vse,skipPatternResolution:!1,skipOverridesResolution:!0,withComponentIDs:!0,skipDataResolution:!0,withWorkflowDefinition:!0,releaseId:void 0}))?.composition,getToolClient:async()=>t.toolInvoker,getDimensionGuidance:async()=>{}}}function Cse(t){let e,n;return{fetchProjectGuidance:async()=>(e!==void 0||(e=(await new bse(t).get({projectId:t.projectId}))?.guidance),e),fetchDefinitions:async()=>{if(n!==void 0)return n;let o=await new yse(t).getContentTypes({limit:1e3});return n=Object.fromEntries(o.contentTypes.map(i=>[i.id,Jie(i)])),n},fetchPatterns:async()=>({}),resolvePatternData:async r=>{let i=(await new yse(t).getEntries({entryIDs:[r],skipPatternResolution:!1,skipOverridesResolution:!0,withComponentIDs:!0,skipDataResolution:!0,withWorkflowDefinition:!0,releaseId:void 0}))?.entries[0];return Lb(i).composition},getToolClient:async()=>t.toolInvoker,getDimensionGuidance:async()=>{}}}import{parseHTML as oAe}from"linkedom/worker";function iAe(t){let e=Object.getPrototypeOf(t.body);for(;e&&!Object.getOwnPropertyDescriptor(e,"style");)e=Object.getPrototypeOf(e);let n=e?Object.getOwnPropertyDescriptor(e,"style"):void 0;if(!n?.get||e.__stylePatched)return;let r=n.get;Object.defineProperty(e,"style",{get(){let o=r.call(this);return new Proxy(o,{get(i,s){if(typeof s=="string"){let a=i[s];return typeof a=="function"?a.bind(i):a===void 0?"":a}return i[s]},set(i,s,a){return i[s]=a,!0}})},configurable:!0}),e.__stylePatched=!0}function i5(t){let e=`<!DOCTYPE html><html><body>${t}</body></html>`,{document:n}=oAe(e);return iAe(n),n}import{LocaleClient as sAe}from"@uniformdev/canvas";async function s5(t,e){if(!t||t.length===0)return;let o=(await new sAe(e).get()).results.map(s=>s.locale),i=t.filter(s=>!o.includes(s));if(i.length>0)throw new Error(`The following locales are not registered in your project: ${i.join(", ")}`)}async function l5({action:t,id:e,instructions:n,isPattern:r,patternId:o,projectMapNode:i,getEditUrl:s,env:a}){let l=new aAe(a),c,u,d=t==="update"?e:void 0,f={success:!0,actionsTaken:[]};if(t==="duplicate"){if(u=await l.getCompositionById({compositionId:e,state:a5,skipDataResolution:!0,skipPatternResolution:!1,withComponentIDs:!0,skipOverridesResolution:!0}),!u)throw new Error("Composition not found");let p=crypto.randomUUID(),m=Hie(u.composition,p),g=cAe(m,h=>{h._name=`${h._name} (copy)`,h._slug&&(h._slug=`${h._slug}-copy${h._slug?.endsWith("/")?"/":""}`)});c=new ol(g),e=p}else if(t==="create"){if(!n)throw new Error("Instructions are required for create");if(!n.name)throw new Error("Name is required for create");if(!n.type)throw new Error("Type is required for create");if(!o)c=new ol({_id:e,_name:n.name,type:n.type,_overridability:{hideLockedParameters:!0}});else{let p={composition:{_id:e,_name:n.name,type:n.type,_pattern:o},projectId:a.projectId,state:a5,pattern:!1};await l.updateComposition(p),d=e}}if(d){if(u=await l.getCompositionById({compositionId:e,state:a5,skipDataResolution:!0,skipPatternResolution:!1,withComponentIDs:!0,skipOverridesResolution:!0}),!u)throw new Error("Composition not found");c=new ol(u.composition)}if(t==="delete"&&await l.removeComposition({compositionId:e}),c){await s5(n?.localeUpdates?.enableLocales,a),f=await JE({twee:c,descriptionUpdate:void 0,slugUpdate:void 0,nameUpdate:n?.name,propertyUpdates:n?.parameterUpdates??[],dataResourceUpdates:n?.dataResourceUpdates??[],localeUpdates:n?.localeUpdates,slotUpdates:n??{},currentEditorLocale:void 0,referenceData:xse(a),isEditingPattern:r,domParser:i5});let p=c.exportTree(),m=c.exportMetadata(),g={composition:p,projectId:a.projectId,state:a5,pattern:r,releaseId:u?.releaseId,editionId:u?.editionId,...m};await l.updateComposition(g)}if(t==="create"&&!r&&(i?.nodePathSegment||i?.localePathSegments)&&n?.name){let p=new lAe({apiKey:a.apiKey,apiHost:a.apiHost,projectId:a.projectId}),{path:m,nodeId:g}=await Die({projectMapClient:p,compositionId:e,compositionName:n.name,nodePathSegment:i.nodePathSegment||"",parentNodeId:i.parentNodeId,localePathSegments:i.localePathSegments,allowedQueryStrings:i.allowedQueryStrings});return f.actionsTaken.push({success:!0,summary:`Created project map node at path: ${m}`}),{content:[{type:"text",text:JSON.stringify({...f,editUrl:s(e),projectMapNode:{path:m,nodeId:g}},null,2)}]}}return{content:[{type:"text",text:JSON.stringify({...f,editUrl:s(e)},null,2)}]}}function c5(t,e){return`${e.baseWebUrl}/dashboards/canvas/edit/${t}`}async function u5(t,e,n){return await n.toolInvoker.invoke("createFilterExpression",{...t,entityType:e})}var uAe={action:ro.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:ro.string().uuid().describe("UUID of the composition instance to create, update, delete, or duplicate"),patternId:ro.string().uuid().describe("Composition pattern ID to create the composition from. Omit when not creating, or when creating a composition without a composition pattern.").optional(),instructions:bk.describe("Modification instructions for the composition. Omit for delete and duplicate.").optional(),projectMapNode:ro.object({parentNodeId:ro.string().uuid().describe("UUID of the parent node from searchProjectMapNodes. If omitted, the node will be a child of the root node.").optional(),nodePathSegment:ro.string().describe('URL path segment for the node (e.g., "about-us", "products", ":productId" for dynamic matching). Use a slugified version of the name unless otherwise requested by the user. Omit if not creating a project map node.').optional(),localePathSegments:ro.array(ro.object({locale:ro.string().describe('Locale code (e.g., "en-US", "fr-FR")'),pathSegment:ro.string().describe("URL path segment for this locale")})).describe("Optional array of locale-specific path segments. Unspecified locales use the nodePathSegment. Do not use these for dynamic path segments.").optional(),allowedQueryStrings:ro.array(ro.object({name:ro.string().describe("Query parameter name"),defaultValue:ro.string().describe("Default value if not provided in the URL").optional()})).describe("Optional array of allowed query string parameters for this node").optional()}).describe("Attaches the new composition to a new node in the project map hierarchy. Omit to avoid creating a project map node, or if action is not create.").optional()};function Sse(t,e){t.tool("compositionAction","Creates, updates, or deletes a Uniform Composition",uAe,async n=>await l5({...n,isPattern:!1,getEditUrl:r=>c5(r,e),patternId:n.patternId,projectMapNode:n.projectMapNode,env:e}))}import*as On from"zod/v3";var dAe=On.object({field:On.string(),operator:On.string(),value:On.string().or(On.array(On.string()))}),fAe=On.object({filter:On.array(dAe),error:On.string().describe("An error message if the filter expression could not be created, otherwise an empty string"),sort:On.array(On.enum(["created_at_ASC","created_at_DESC","updated_at_ASC","updated_at_DESC","author_ASC","author_DESC","creator_ASC","creator_DESC","name_ASC","name_DESC","slug_ASC","slug_DESC"])),limit:On.number().min(1).max(100),offset:On.number().min(0),keyword:On.string(),locale:On.string().optional()}),Sc=On.object({searchExpressionPrompt:On.string().describe(`Describe what you are looking for, for example "created by me in the last week" or "type is article and headline contains breaking news" or "keyword search for breaking news".
|
|
5838
5846
|
You can specify multiple criteria (AND only).
|
|
5839
|
-
You can filter by date, number, or string properties on the definition, as well as name, created, modified, author, slug, enabled locales, type, and publish status.`),username:On.string().describe("The username of the current user. If you do not know the username, use an empty string"),locale:On.string().describe("The current locale. If there is no current locale, use an empty string")}),d_t={displayName:"Create filter expression",description:"Creates a Uniform search filter expression for searching entries, patterns, or compositions from a user prompt. Meant to be a callable tool only.",inputSchema:Sc.extend({entityType:On.enum(["composition","entry","componentPattern","compositionPattern","entryPattern"]).describe("The entity type we are creating a filter for")}),outputSchema:fAe,runsAt:"server",timeout:10,callable:!0};import*as Iae from"zod/v3";var wc=class extends Error{},d5=class extends wc{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},f5=class extends wc{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},p5=class extends wc{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Ys=class extends wc{},l0=class extends wc{constructor(e){super(`Invalid unit ${e}`)}},br=class extends wc{},Zs=class extends wc{constructor(){super("Zone is an abstract class")}};var ge="numeric",qs="short",zi="long",_d={year:ge,month:ge,day:ge},Ob={year:ge,month:qs,day:ge},aI={year:ge,month:qs,day:ge,weekday:qs},Ib={year:ge,month:zi,day:ge},kb={year:ge,month:zi,day:ge,weekday:zi},Rb={hour:ge,minute:ge},Pb={hour:ge,minute:ge,second:ge},Fb={hour:ge,minute:ge,second:ge,timeZoneName:qs},Bb={hour:ge,minute:ge,second:ge,timeZoneName:zi},zb={hour:ge,minute:ge,hourCycle:"h23"},jb={hour:ge,minute:ge,second:ge,hourCycle:"h23"},Vb={hour:ge,minute:ge,second:ge,hourCycle:"h23",timeZoneName:qs},Ub={hour:ge,minute:ge,second:ge,hourCycle:"h23",timeZoneName:zi},Hb={year:ge,month:ge,day:ge,hour:ge,minute:ge},Kb={year:ge,month:ge,day:ge,hour:ge,minute:ge,second:ge},Wb={year:ge,month:qs,day:ge,hour:ge,minute:ge},Gb={year:ge,month:qs,day:ge,hour:ge,minute:ge,second:ge},lI={year:ge,month:qs,day:ge,weekday:qs,hour:ge,minute:ge},Yb={year:ge,month:zi,day:ge,hour:ge,minute:ge,timeZoneName:qs},Zb={year:ge,month:zi,day:ge,hour:ge,minute:ge,second:ge,timeZoneName:qs},qb={year:ge,month:zi,day:ge,weekday:zi,hour:ge,minute:ge,timeZoneName:zi},Jb={year:ge,month:zi,day:ge,weekday:zi,hour:ge,minute:ge,second:ge,timeZoneName:zi};var yi=class{get type(){throw new Zs}get name(){throw new Zs}get ianaName(){return this.name}get isUniversal(){throw new Zs}offsetName(e,n){throw new Zs}formatOffset(e,n){throw new Zs}offset(e){throw new Zs}equals(e){throw new Zs}get isValid(){throw new Zs}};var cI=null,Td=class t extends yi{static get instance(){return cI===null&&(cI=new t),cI}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return g5(e,n,r)}formatOffset(e,n){return $d(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}};var v5={};function pAe(t){return v5[t]||(v5[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),v5[t]}var mAe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function gAe(t,e){let n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,s,a,l,c,u]=r;return[s,o,i,a,l,c,u]}function hAe(t,e){let n=t.formatToParts(e),r=[];for(let o=0;o<n.length;o++){let{type:i,value:s}=n[o],a=mAe[i];i==="era"?r[a]=s:He(a)||(r[a]=parseInt(s,10))}return r}var h5={},No=class t extends yi{static create(e){return h5[e]||(h5[e]=new t(e)),h5[e]}static resetCache(){h5={},v5={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return g5(e,n,r,this.name)}formatOffset(e,n){return $d(this.offset(e),n)}offset(e){let n=new Date(e);if(isNaN(n))return NaN;let r=pAe(this.name),[o,i,s,a,l,c,u]=r.formatToParts?hAe(r,n):gAe(r,n);a==="BC"&&(o=-Math.abs(o)+1);let f=c0({year:o,month:i,day:s,hour:l===24?0:l,minute:c,second:u,millisecond:0}),p=+n,m=p%1e3;return p-=m>=0?m:1e3+m,(f-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}};var wse={};function vAe(t,e={}){let n=JSON.stringify([t,e]),r=wse[n];return r||(r=new Intl.ListFormat(t,e),wse[n]=r),r}var uI={};function dI(t,e={}){let n=JSON.stringify([t,e]),r=uI[n];return r||(r=new Intl.DateTimeFormat(t,e),uI[n]=r),r}var fI={};function yAe(t,e={}){let n=JSON.stringify([t,e]),r=fI[n];return r||(r=new Intl.NumberFormat(t,e),fI[n]=r),r}var pI={};function bAe(t,e={}){let{base:n,...r}=e,o=JSON.stringify([t,r]),i=pI[o];return i||(i=new Intl.RelativeTimeFormat(t,e),pI[o]=i),i}var Xb=null;function xAe(){return Xb||(Xb=new Intl.DateTimeFormat().resolvedOptions().locale,Xb)}var Ese={};function CAe(t){let e=Ese[t];if(!e){let n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Ese[t]=e}return e}function SAe(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let n=t.indexOf("-u-");if(n===-1)return[t];{let r,o;try{r=dI(t).resolvedOptions(),o=t}catch{let l=t.substring(0,n);r=dI(l).resolvedOptions(),o=l}let{numberingSystem:i,calendar:s}=r;return[o,i,s]}}function wAe(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function EAe(t){let e=[];for(let n=1;n<=12;n++){let r=St.utc(2009,n,1);e.push(t(r))}return e}function _Ae(t){let e=[];for(let n=1;n<=7;n++){let r=St.utc(2016,11,13+n);e.push(t(r))}return e}function y5(t,e,n,r){let o=t.listingMode();return o==="error"?null:o==="en"?n(e):r(e)}function TAe(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var mI=class{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;let{padTo:o,floor:i,...s}=r;if(!n||Object.keys(s).length>0){let a={useGrouping:!1,...r};r.padTo>0&&(a.minimumIntegerDigits=r.padTo),this.inf=yAe(e,a)}}format(e){if(this.inf){let n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{let n=this.floor?Math.floor(e):u0(e,3);return Hn(n,this.padTo)}}},gI=class{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&No.create(a).valid?(o=a,this.dt=e):(o="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,o=e.zone.name):(o="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=dI(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){let r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},hI=class{constructor(e,n,r){this.opts={style:"long",...r},!n&&b5()&&(this.rtf=bAe(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):_se(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}},$Ae={firstDay:1,minimalDays:4,weekend:[6,7]},tn=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,o,i=!1){let s=e||Ut.defaultLocale,a=s||(i?"en-US":xAe()),l=n||Ut.defaultNumberingSystem,c=r||Ut.defaultOutputCalendar,u=Qb(o)||Ut.defaultWeekSettings;return new t(a,l,c,u,s)}static resetCache(){Xb=null,uI={},fI={},pI={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return t.create(e,n,r,o)}constructor(e,n,r,o,i){let[s,a,l]=SAe(e);this.locale=s,this.numberingSystem=n||a||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=wAe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=TAe(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Qb(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return y5(this,e,vI,()=>{let r=n?{month:e,day:"numeric"}:{month:e},o=n?"format":"standalone";return this.monthsCache[o][e]||(this.monthsCache[o][e]=EAe(i=>this.extract(i,r,"month"))),this.monthsCache[o][e]})}weekdays(e,n=!1){return y5(this,e,yI,()=>{let r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},o=n?"format":"standalone";return this.weekdaysCache[o][e]||(this.weekdaysCache[o][e]=_Ae(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][e]})}meridiems(){return y5(this,void 0,()=>bI,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[St.utc(2016,11,13,9),St.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return y5(this,e,xI,()=>{let n={era:e};return this.eraCache[e]||(this.eraCache[e]=[St.utc(-40,1,1),St.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){let o=this.dtFormatter(e,n),i=o.formatToParts(),s=i.find(a=>a.type.toLowerCase()===r);return s?s.value:null}numberFormatter(e={}){return new mI(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new gI(e,this.intl,n)}relFormatter(e={}){return new hI(this.intl,this.isEnglish(),e)}listFormatter(e={}){return vAe(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:x5()?CAe(this.locale):$Ae}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}};var SI=null,oo=class t extends yi{static get utcInstance(){return SI===null&&(SI=new t(0)),SI}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(Ap(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${$d(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${$d(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return $d(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}};var d0=class extends yi{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Js(t,e){let n;if(He(t)||t===null)return e;if(t instanceof yi)return t;if(Tse(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Td.instance:r==="utc"||r==="gmt"?oo.utcInstance:oo.parseSpecifier(r)||No.create(t)}else return il(t)?oo.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new d0(t)}var $se=()=>Date.now(),Nse="system",Dse=null,Lse=null,Ase=null,Mse=60,Ose,Ise=null,Ut=class{static get now(){return $se}static set now(e){$se=e}static set defaultZone(e){Nse=e}static get defaultZone(){return Js(Nse,Td.instance)}static get defaultLocale(){return Dse}static set defaultLocale(e){Dse=e}static get defaultNumberingSystem(){return Lse}static set defaultNumberingSystem(e){Lse=e}static get defaultOutputCalendar(){return Ase}static set defaultOutputCalendar(e){Ase=e}static get defaultWeekSettings(){return Ise}static set defaultWeekSettings(e){Ise=Qb(e)}static get twoDigitCutoffYear(){return Mse}static set twoDigitCutoffYear(e){Mse=e%100}static get throwOnInvalid(){return Ose}static set throwOnInvalid(e){Ose=e}static resetCaches(){tn.resetCache(),No.resetCache()}};var io=class{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var kse=[0,31,59,90,120,151,181,212,243,273,304,334],Rse=[0,31,60,91,121,152,182,213,244,274,305,335];function ms(t,e){return new io("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function C5(t,e,n){let r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let o=r.getUTCDay();return o===0?7:o}function Pse(t,e,n){return n+(Op(t)?Rse:kse)[e-1]}function Fse(t,e){let n=Op(t)?Rse:kse,r=n.findIndex(i=>i<e),o=e-n[r];return{month:r+1,day:o}}function S5(t,e){return(t-e+7)%7+1}function ex(t,e=4,n=1){let{year:r,month:o,day:i}=t,s=Pse(r,o,i),a=S5(C5(r,o,i),n),l=Math.floor((s-a+14-e)/7),c;return l<1?(c=r-1,l=Mp(c,e,n)):l>Mp(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:a,...nx(t)}}function wI(t,e=4,n=1){let{weekYear:r,weekNumber:o,weekday:i}=t,s=S5(C5(r,1,e),n),a=Nd(r),l=o*7+i-s-7+e,c;l<1?(c=r-1,l+=Nd(c)):l>a?(c=r+1,l-=Nd(r)):c=r;let{month:u,day:d}=Fse(c,l);return{year:c,month:u,day:d,...nx(t)}}function w5(t){let{year:e,month:n,day:r}=t,o=Pse(e,n,r);return{year:e,ordinal:o,...nx(t)}}function EI(t){let{year:e,ordinal:n}=t,{month:r,day:o}=Fse(e,n);return{year:e,month:r,day:o,...nx(t)}}function _I(t,e){if(!He(t.localWeekday)||!He(t.localWeekNumber)||!He(t.localWeekYear)){if(!He(t.weekday)||!He(t.weekNumber)||!He(t.weekYear))throw new Ys("Cannot mix locale-based week fields with ISO-based week fields");return He(t.localWeekday)||(t.weekday=t.localWeekday),He(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),He(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Bse(t,e=4,n=1){let r=tx(t.weekYear),o=ji(t.weekNumber,1,Mp(t.weekYear,e,n)),i=ji(t.weekday,1,7);return r?o?i?!1:ms("weekday",t.weekday):ms("week",t.weekNumber):ms("weekYear",t.weekYear)}function zse(t){let e=tx(t.year),n=ji(t.ordinal,1,Nd(t.year));return e?n?!1:ms("ordinal",t.ordinal):ms("year",t.year)}function TI(t){let e=tx(t.year),n=ji(t.month,1,12),r=ji(t.day,1,f0(t.year,t.month));return e?n?r?!1:ms("day",t.day):ms("month",t.month):ms("year",t.year)}function $I(t){let{hour:e,minute:n,second:r,millisecond:o}=t,i=ji(e,0,23)||e===24&&n===0&&r===0&&o===0,s=ji(n,0,59),a=ji(r,0,59),l=ji(o,0,999);return i?s?a?l?!1:ms("millisecond",o):ms("second",r):ms("minute",n):ms("hour",e)}function He(t){return typeof t>"u"}function il(t){return typeof t=="number"}function tx(t){return typeof t=="number"&&t%1===0}function Tse(t){return typeof t=="string"}function Vse(t){return Object.prototype.toString.call(t)==="[object Date]"}function b5(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function x5(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Use(t){return Array.isArray(t)?t:[t]}function NI(t,e,n){if(t.length!==0)return t.reduce((r,o)=>{let i=[e(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function Hse(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function Dd(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Qb(t){if(t==null)return null;if(typeof t!="object")throw new br("Week settings must be an object");if(!ji(t.firstDay,1,7)||!ji(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!ji(e,1,7)))throw new br("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function ji(t,e,n){return tx(t)&&t>=e&&t<=n}function NAe(t,e){return t-e*Math.floor(t/e)}function Hn(t,e=2){let n=t<0,r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Ec(t){if(!(He(t)||t===null||t===""))return parseInt(t,10)}function Ld(t){if(!(He(t)||t===null||t===""))return parseFloat(t)}function rx(t){if(!(He(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function u0(t,e,n=!1){let r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function Op(t){return t%4===0&&(t%100!==0||t%400===0)}function Nd(t){return Op(t)?366:365}function f0(t,e){let n=NAe(e-1,12)+1,r=t+(e-n)/12;return n===2?Op(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function c0(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function jse(t,e,n){return-S5(C5(t,1,e),n)+e-1}function Mp(t,e=4,n=1){let r=jse(t,e,n),o=jse(t+1,e,n);return(Nd(t)-r+o)/7}function ox(t){return t>99?t:t>Ut.twoDigitCutoffYear?1900+t:2e3+t}function g5(t,e,n,r=null){let o=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);let s={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,s).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Ap(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);let r=parseInt(e,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function DI(t){let e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new br(`Invalid unit value ${t}`);return e}function p0(t,e){let n={};for(let r in t)if(Dd(t,r)){let o=t[r];if(o==null)continue;n[e(r)]=DI(o)}return n}function $d(t,e){let n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${Hn(n,2)}:${Hn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Hn(n,2)}${Hn(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function nx(t){return Hse(t,["hour","minute","second","millisecond"])}var DAe=["January","February","March","April","May","June","July","August","September","October","November","December"],LI=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],LAe=["J","F","M","A","M","J","J","A","S","O","N","D"];function vI(t){switch(t){case"narrow":return[...LAe];case"short":return[...LI];case"long":return[...DAe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var AI=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],MI=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],AAe=["M","T","W","T","F","S","S"];function yI(t){switch(t){case"narrow":return[...AAe];case"short":return[...MI];case"long":return[...AI];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var bI=["AM","PM"],MAe=["Before Christ","Anno Domini"],OAe=["BC","AD"],IAe=["B","A"];function xI(t){switch(t){case"narrow":return[...IAe];case"short":return[...OAe];case"long":return[...MAe];default:return null}}function Kse(t){return bI[t.hour<12?0:1]}function Wse(t,e){return yI(e)[t.weekday-1]}function Gse(t,e){return vI(e)[t.month-1]}function Yse(t,e){return xI(e)[t.year<0?0:1]}function _se(t,e,n="always",r=!1){let o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){let d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${o[t][0]}`;case-1:return d?"yesterday":`last ${o[t][0]}`;case 0:return d?"today":`this ${o[t][0]}`;default:}}let s=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,c=o[t],u=r?l?c[1]:c[2]||c[1]:l?o[t][0]:t;return s?`${a} ${u} ago`:`in ${a} ${u}`}function Zse(t,e){let n="";for(let r of t)r.literal?n+=r.val:n+=e(r.val);return n}var kAe={D:_d,DD:Ob,DDD:Ib,DDDD:kb,t:Rb,tt:Pb,ttt:Fb,tttt:Bb,T:zb,TT:jb,TTT:Vb,TTTT:Ub,f:Hb,ff:Wb,fff:Yb,ffff:qb,F:Kb,FF:Gb,FFF:Zb,FFFF:Jb},so=class t{static create(e,n={}){return new t(e,n)}static parseFormat(e){let n=null,r="",o=!1,i=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);a==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||a===n?r+=a:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=a,n=a)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return kAe[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Hn(e,n);let r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){let r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(e,p,m),s=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",a=()=>r?Kse(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,m)=>r?Gse(e,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),c=(p,m)=>r?Wse(e,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{let m=t.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(e,m):p},d=p=>r?Yse(e,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return o?i({day:"numeric"},"day"):this.num(e.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(e.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(e.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(p)}};return Zse(t.parseFormat(n),f)}formatDurationFromString(e,n){let r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{let u=r(c);return u?this.num(l.get(u),c.length):c},i=t.parseFormat(n),s=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),a=e.shiftTo(...s.map(r).filter(l=>l));return Zse(i,o(a))}};var Jse=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function g0(...t){let e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function h0(...t){return e=>t.reduce(([n,r,o],i)=>{let[s,a,l]=i(e,o);return[{...n,...s},a||r,l]},[{},null,1]).slice(0,2)}function v0(t,...e){if(t==null)return[null,null];for(let[n,r]of e){let o=n.exec(t);if(o)return r(o)}return[null,null]}function Xse(...t){return(e,n)=>{let r={},o;for(o=0;o<t.length;o++)r[t[o]]=Ec(e[n+o]);return[r,null,n+o]}}var Qse=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,RAe=`(?:${Qse.source}?(?:\\[(${Jse.source})\\])?)?`,OI=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,eae=RegExp(`${OI.source}${RAe}`),II=RegExp(`(?:T${eae.source})?`),PAe=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,FAe=/(\d{4})-?W(\d\d)(?:-?(\d))?/,BAe=/(\d{4})-?(\d{3})/,zAe=Xse("weekYear","weekNumber","weekDay"),jAe=Xse("year","ordinal"),VAe=/(\d{4})-(\d\d)-(\d\d)/,tae=RegExp(`${OI.source} ?(?:${Qse.source}|(${Jse.source}))?`),UAe=RegExp(`(?: ${tae.source})?`);function m0(t,e,n){let r=t[e];return He(r)?n:Ec(r)}function HAe(t,e){return[{year:m0(t,e),month:m0(t,e+1,1),day:m0(t,e+2,1)},null,e+3]}function y0(t,e){return[{hours:m0(t,e,0),minutes:m0(t,e+1,0),seconds:m0(t,e+2,0),milliseconds:rx(t[e+3])},null,e+4]}function ix(t,e){let n=!t[e]&&!t[e+1],r=Ap(t[e+1],t[e+2]),o=n?null:oo.instance(r);return[{},o,e+3]}function sx(t,e){let n=t[e]?No.create(t[e]):null;return[{},n,e+1]}var KAe=RegExp(`^T?${OI.source}$`),WAe=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function GAe(t){let[e,n,r,o,i,s,a,l,c]=t,u=e[0]==="-",d=l&&l[0]==="-",f=(p,m=!1)=>p!==void 0&&(m||p&&u)?-p:p;return[{years:f(Ld(n)),months:f(Ld(r)),weeks:f(Ld(o)),days:f(Ld(i)),hours:f(Ld(s)),minutes:f(Ld(a)),seconds:f(Ld(l),l==="-0"),milliseconds:f(rx(c),d)}]}var YAe={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function kI(t,e,n,r,o,i,s){let a={year:e.length===2?ox(Ec(e)):Ec(e),month:LI.indexOf(n)+1,day:Ec(r),hour:Ec(o),minute:Ec(i)};return s&&(a.second=Ec(s)),t&&(a.weekday=t.length>3?AI.indexOf(t)+1:MI.indexOf(t)+1),a}var ZAe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function qAe(t){let[,e,n,r,o,i,s,a,l,c,u,d]=t,f=kI(e,o,r,n,i,s,a),p;return l?p=YAe[l]:c?p=0:p=Ap(u,d),[f,new oo(p)]}function JAe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var XAe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,QAe=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,eMe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qse(t){let[,e,n,r,o,i,s,a]=t;return[kI(e,o,r,n,i,s,a),oo.utcInstance]}function tMe(t){let[,e,n,r,o,i,s,a]=t;return[kI(e,a,n,r,o,i,s),oo.utcInstance]}var nMe=g0(PAe,II),rMe=g0(FAe,II),oMe=g0(BAe,II),iMe=g0(eae),nae=h0(HAe,y0,ix,sx),sMe=h0(zAe,y0,ix,sx),aMe=h0(jAe,y0,ix,sx),lMe=h0(y0,ix,sx);function rae(t){return v0(t,[nMe,nae],[rMe,sMe],[oMe,aMe],[iMe,lMe])}function oae(t){return v0(JAe(t),[ZAe,qAe])}function iae(t){return v0(t,[XAe,qse],[QAe,qse],[eMe,tMe])}function sae(t){return v0(t,[WAe,GAe])}var cMe=h0(y0);function aae(t){return v0(t,[KAe,cMe])}var uMe=g0(VAe,UAe),dMe=g0(tae),fMe=h0(y0,ix,sx);function lae(t){return v0(t,[uMe,nae],[dMe,fMe])}var cae="Invalid Duration",dae={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},pMe={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...dae},gs=146097/400,b0=146097/4800,mMe={years:{quarters:4,months:12,weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},quarters:{months:3,weeks:gs/28,days:gs/4,hours:gs*24/4,minutes:gs*24*60/4,seconds:gs*24*60*60/4,milliseconds:gs*24*60*60*1e3/4},months:{weeks:b0/7,days:b0,hours:b0*24,minutes:b0*24*60,seconds:b0*24*60*60,milliseconds:b0*24*60*60*1e3},...dae},Ip=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],gMe=Ip.slice(0).reverse();function Ad(t,e,n=!1){let r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Kn(r)}function fae(t,e){let n=e.milliseconds??0;for(let r of gMe.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function uae(t,e){let n=fae(t,e)<0?-1:1;Ip.reduceRight((r,o)=>{if(He(e[o]))return r;if(r){let i=e[r]*n,s=t[o][r],a=Math.floor(i/s);e[o]+=a*n,e[r]-=a*s*n}return o},null),Ip.reduce((r,o)=>{if(He(e[o]))return r;if(r){let i=e[r]%1;e[r]-=i,e[o]+=i*t[r][o]}return o},null)}function hMe(t){let e={};for(let[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}var Kn=class t{constructor(e){let n=e.conversionAccuracy==="longterm"||!1,r=n?mMe:pMe;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||tn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return t.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new br(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:p0(e,t.normalizeUnit),loc:tn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(il(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new br(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){let[r]=sae(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){let[r]=aae(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new br("need to specify a reason the Duration is invalid");let r=e instanceof io?e:new io(e,n);if(Ut.throwOnInvalid)throw new p5(r);return new t({invalid:r})}static normalizeUnit(e){let n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new l0(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){let r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?so.create(this.loc,r).formatDurationFromString(this,e):cae}toHuman(e={}){if(!this.isValid)return cae;let n=Ip.map(r=>{let o=this.values[r];return He(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=u0(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},St.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?fae(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e),r={};for(let o of Ip)(Dd(n.values,o)||Dd(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Ad(this,{values:r},!0)}minus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let n={};for(let r of Object.keys(this.values))n[r]=DI(e(this.values[r],r));return Ad(this,{values:n},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let n={...this.values,...p0(e,t.normalizeUnit)};return Ad(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Ad(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return uae(this.matrix,e),Ad(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=hMe(this.normalize().shiftToAll().toObject());return Ad(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let n={},r={},o=this.toObject(),i;for(let s of Ip)if(e.indexOf(s)>=0){i=s;let a=0;for(let c in r)a+=this.matrix[c][s]*r[c],r[c]=0;il(o[s])&&(a+=o[s]);let l=Math.trunc(a);n[s]=l,r[s]=(a*1e3-l*1e3)/1e3}else il(o[s])&&(r[s]=o[s]);for(let s in r)r[s]!==0&&(n[i]+=s===i?r[s]:r[s]/this.matrix[i][s]);return uae(this.matrix,n),Ad(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Ad(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(let r of Ip)if(!n(this.values[r],e.values[r]))return!1;return!0}};var x0="Invalid Interval";function vMe(t,e){return!t||!t.isValid?_c.invalid("missing or invalid start"):!e||!e.isValid?_c.invalid("missing or invalid end"):e<t?_c.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var _c=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new br("need to specify a reason the Interval is invalid");let r=e instanceof io?e:new io(e,n);if(Ut.throwOnInvalid)throw new f5(r);return new t({invalid:r})}static fromDateTimes(e,n){let r=C0(e),o=C0(n),i=vMe(r,o);return i??new t({start:r,end:o})}static after(e,n){let r=Kn.fromDurationLike(n),o=C0(e);return t.fromDateTimes(o,o.plus(r))}static before(e,n){let r=Kn.fromDurationLike(n),o=C0(e);return t.fromDateTimes(o.minus(r),o)}static fromISO(e,n){let[r,o]=(e||"").split("/",2);if(r&&o){let i,s;try{i=St.fromISO(r,n),s=i.isValid}catch{s=!1}let a,l;try{a=St.fromISO(o,n),l=a.isValid}catch{l=!1}if(s&&l)return t.fromDateTimes(i,a);if(s){let c=Kn.fromISO(o,n);if(c.isValid)return t.after(i,c)}else if(l){let c=Kn.fromISO(r,n);if(c.isValid)return t.before(a,c)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;let r=this.start.startOf(e,n),o;return n?.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(e,n),Math.floor(o.diff(r,e).get(e))+(o.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?t.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];let n=e.map(C0).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),r=[],{s:o}=this,i=0;for(;o<this.e;){let s=n[i]||this.e,a=+s>+this.e?this.e:s;r.push(t.fromDateTimes(o,a)),o=a,i+=1}return r}splitBy(e){let n=Kn.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i,s=[];for(;r<this.e;){let a=this.start.plus(n.mapUnits(l=>l*o));i=+a>+this.e?this.e:a,s.push(t.fromDateTimes(r,i)),r=i,o+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:t.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;let n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,r)}static merge(e){let[n,r]=e.sort((o,i)=>o.s-i.s).reduce(([o,i],s)=>i?i.overlaps(s)||i.abutsStart(s)?[o,i.union(s)]:[o.concat([i]),s]:[o,s],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0,o=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...i),a=s.sort((l,c)=>l.time-c.time);for(let l of a)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(t.fromDateTimes(n,l.time)),n=null);return t.merge(o)}difference(...e){return t.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:x0}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=_d,n={}){return this.isValid?so.create(this.s.loc.clone(n),e).formatInterval(this):x0}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:x0}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:x0}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:x0}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:x0}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Kn.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}};var Tc=class{static hasDST(e=Ut.defaultZone){let n=St.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return No.isValidZone(e)}static normalizeZone(e){return Js(e,Ut.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||tn.create(n,r,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||tn.create(n,r,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||tn.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||tn.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return tn.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return tn.create(n,null,"gregory").eras(e)}static features(){return{relative:b5(),localeWeek:x5()}}};function pae(t,e){let n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Kn.fromMillis(r).as("days"))}function yMe(t,e,n){let r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let u=pae(l,c);return(u-u%7)/7}],["days",pae]],o={},i=t,s,a;for(let[l,c]of r)n.indexOf(l)>=0&&(s=l,o[l]=c(t,e),a=i.plus(o),a>e?(o[l]--,t=i.plus(o),t>e&&(a=t,o[l]--,t=i.plus(o))):t=a);return[t,o,a,s]}function mae(t,e,n,r){let[o,i,s,a]=yMe(t,e,n),l=e-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(s<e&&(s=o.plus({[a]:1})),s!==o&&(i[a]=(i[a]||0)+l/(s-o)));let u=Kn.fromObject(i,r);return c.length>0?Kn.fromMillis(l,r).shiftTo(...c).plus(u):u}var RI={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},gae={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},bMe=RI.hanidec.replace(/[\[|\]]/g,"").split("");function hae(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(t[n].search(RI.hanidec)!==-1)e+=bMe.indexOf(t[n]);else for(let o in gae){let[i,s]=gae[o];r>=i&&r<=s&&(e+=r-i)}}return parseInt(e,10)}else return e}function hs({numberingSystem:t},e=""){return new RegExp(`${RI[t||"latn"]}${e}`)}var xMe="missing Intl.DateTimeFormat.formatToParts support";function Ht(t,e=n=>n){return{regex:t,deser:([n])=>e(hae(n))}}var CMe="\xA0",bae=`[ ${CMe}]`,xae=new RegExp(bae,"g");function SMe(t){return t.replace(/\./g,"\\.?").replace(xae,bae)}function vae(t){return t.replace(/\./g,"").replace(xae," ").toLowerCase()}function Xs(t,e){return t===null?null:{regex:RegExp(t.map(SMe).join("|")),deser:([n])=>t.findIndex(r=>vae(n)===vae(r))+e}}function yae(t,e){return{regex:t,deser:([,n,r])=>Ap(n,r),groups:e}}function E5(t){return{regex:t,deser:([e])=>e}}function wMe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function EMe(t,e){let n=hs(e),r=hs(e,"{2}"),o=hs(e,"{3}"),i=hs(e,"{4}"),s=hs(e,"{6}"),a=hs(e,"{1,2}"),l=hs(e,"{1,3}"),c=hs(e,"{1,6}"),u=hs(e,"{1,9}"),d=hs(e,"{2,4}"),f=hs(e,"{4,6}"),p=h=>({regex:RegExp(wMe(h.val)),deser:([v])=>v,literal:!0}),g=(h=>{if(t.literal)return p(h);switch(h.val){case"G":return Xs(e.eras("short"),0);case"GG":return Xs(e.eras("long"),0);case"y":return Ht(c);case"yy":return Ht(d,ox);case"yyyy":return Ht(i);case"yyyyy":return Ht(f);case"yyyyyy":return Ht(s);case"M":return Ht(a);case"MM":return Ht(r);case"MMM":return Xs(e.months("short",!0),1);case"MMMM":return Xs(e.months("long",!0),1);case"L":return Ht(a);case"LL":return Ht(r);case"LLL":return Xs(e.months("short",!1),1);case"LLLL":return Xs(e.months("long",!1),1);case"d":return Ht(a);case"dd":return Ht(r);case"o":return Ht(l);case"ooo":return Ht(o);case"HH":return Ht(r);case"H":return Ht(a);case"hh":return Ht(r);case"h":return Ht(a);case"mm":return Ht(r);case"m":return Ht(a);case"q":return Ht(a);case"qq":return Ht(r);case"s":return Ht(a);case"ss":return Ht(r);case"S":return Ht(l);case"SSS":return Ht(o);case"u":return E5(u);case"uu":return E5(a);case"uuu":return Ht(n);case"a":return Xs(e.meridiems(),0);case"kkkk":return Ht(i);case"kk":return Ht(d,ox);case"W":return Ht(a);case"WW":return Ht(r);case"E":case"c":return Ht(n);case"EEE":return Xs(e.weekdays("short",!1),1);case"EEEE":return Xs(e.weekdays("long",!1),1);case"ccc":return Xs(e.weekdays("short",!0),1);case"cccc":return Xs(e.weekdays("long",!0),1);case"Z":case"ZZ":return yae(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return yae(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return E5(/[a-z_+-/]{1,256}?/i);case" ":return E5(/[^\S\n\r]/);default:return p(h)}})(t)||{invalidReason:xMe};return g.token=t,g}var _Me={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function TMe(t,e,n){let{type:r,value:o}=t;if(r==="literal"){let l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}let i=e[r],s=r;r==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=n.hour12?"hour12":"hour24");let a=_Me[s];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function $Me(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function NMe(t,e,n){let r=t.match(e);if(r){let o={},i=1;for(let s in n)if(Dd(n,s)){let a=n[s],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function DMe(t){let e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},n=null,r;return He(t.z)||(n=No.create(t.z)),He(t.Z)||(n||(n=new oo(t.Z)),r=t.Z),He(t.q)||(t.M=(t.q-1)*3+1),He(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),He(t.u)||(t.S=rx(t.u)),[Object.keys(t).reduce((i,s)=>{let a=e(s);return a&&(i[a]=t[s]),i},{}),n,r]}var PI=null;function LMe(){return PI||(PI=St.fromMillis(1555555555555)),PI}function AMe(t,e){if(t.literal)return t;let n=so.macroTokenToFormatOpts(t.val),r=zI(n,e);return r==null||r.includes(void 0)?t:r}function FI(t,e){return Array.prototype.concat(...t.map(n=>AMe(n,e)))}function BI(t,e,n){let r=FI(so.parseFormat(n),t),o=r.map(s=>EMe(s,t)),i=o.find(s=>s.invalidReason);if(i)return{input:e,tokens:r,invalidReason:i.invalidReason};{let[s,a]=$Me(o),l=RegExp(s,"i"),[c,u]=NMe(e,l,a),[d,f,p]=u?DMe(u):[null,null,void 0];if(Dd(u,"a")&&Dd(u,"H"))throw new Ys("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:c,matches:u,result:d,zone:f,specificOffset:p}}}function Cae(t,e,n){let{result:r,zone:o,specificOffset:i,invalidReason:s}=BI(t,e,n);return[r,o,i,s]}function zI(t,e){if(!t)return null;let r=so.create(e,t).dtFormatter(LMe()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(s=>TMe(s,t,i))}var jI="Invalid DateTime",Sae=864e13;function _5(t){return new io("unsupported zone",`the zone "${t.name}" is not supported`)}function VI(t){return t.weekData===null&&(t.weekData=ex(t.c)),t.weekData}function UI(t){return t.localWeekData===null&&(t.localWeekData=ex(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function kp(t,e){let n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new St({...n,...e,old:n})}function Dae(t,e,n){let r=t-e*60*1e3,o=n.offset(r);if(e===o)return[r,e];r-=(o-e)*60*1e3;let i=n.offset(r);return o===i?[r,o]:[t-Math.min(o,i)*60*1e3,Math.max(o,i)]}function T5(t,e){t+=e*60*1e3;let n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function N5(t,e,n){return Dae(c0(t),e,n)}function wae(t,e){let n=t.o,r=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:r,month:o,day:Math.min(t.c.day,f0(r,o))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=Kn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=c0(i),[l,c]=Dae(a,n,t.zone);return s!==0&&(l+=s,c=t.zone.offset(l)),{ts:l,o:c}}function ax(t,e,n,r,o,i){let{setZone:s,zone:a}=n;if(t&&Object.keys(t).length!==0||e){let l=e||a,c=St.fromObject(t,{...n,zone:l,specificOffset:i});return s?c:c.setZone(a)}else return St.invalid(new io("unparsable",`the input "${o}" can't be parsed as ${r}`))}function $5(t,e,n=!0){return t.isValid?so.create(tn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function HI(t,e){let n=t.c.year>9999||t.c.year<0,r="";return n&&t.c.year>=0&&(r+="+"),r+=Hn(t.c.year,n?6:4),e?(r+="-",r+=Hn(t.c.month),r+="-",r+=Hn(t.c.day)):(r+=Hn(t.c.month),r+=Hn(t.c.day)),r}function Eae(t,e,n,r,o,i){let s=Hn(t.c.hour);return e?(s+=":",s+=Hn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(s+=":")):s+=Hn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(s+=Hn(t.c.second),(t.c.millisecond!==0||!r)&&(s+=".",s+=Hn(t.c.millisecond,3))),o&&(t.isOffsetFixed&&t.offset===0&&!i?s+="Z":t.o<0?(s+="-",s+=Hn(Math.trunc(-t.o/60)),s+=":",s+=Hn(Math.trunc(-t.o%60))):(s+="+",s+=Hn(Math.trunc(t.o/60)),s+=":",s+=Hn(Math.trunc(t.o%60)))),i&&(s+="["+t.zone.ianaName+"]"),s}var Lae={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},MMe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},OMe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Aae=["year","month","day","hour","minute","second","millisecond"],IMe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],kMe=["year","ordinal","hour","minute","second","millisecond"];function RMe(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l0(t);return e}function _ae(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return RMe(t)}}function Tae(t,e){let n=Js(e.zone,Ut.defaultZone),r=tn.fromObject(e),o=Ut.now(),i,s;if(He(t.year))i=o;else{for(let c of Aae)He(t[c])&&(t[c]=Lae[c]);let a=TI(t)||$I(t);if(a)return St.invalid(a);let l=n.offset(o);[i,s]=N5(t,l,n)}return new St({ts:i,zone:n,loc:r,o:s})}function $ae(t,e,n){let r=He(n.round)?!0:n.round,o=(s,a)=>(s=u0(s,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(s,a)),i=s=>n.calendary?e.hasSame(t,s)?0:e.startOf(s).diff(t.startOf(s),s).get(s):e.diff(t,s).get(s);if(n.unit)return o(i(n.unit),n.unit);for(let s of n.units){let a=i(s);if(Math.abs(a)>=1)return o(a,s)}return o(t>e?-0:0,n.units[n.units.length-1])}function Nae(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}var St=class t{constructor(e){let n=e.zone||Ut.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new io("invalid input"):null)||(n.isValid?null:_5(n));this.ts=He(e.ts)?Ut.now():e.ts;let o=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[o,i]=[e.old.c,e.old.o];else{let a=n.offset(this.ts);o=T5(this.ts,a),r=Number.isNaN(o.year)?new io("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=e.loc||tn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,n]=Nae(arguments),[r,o,i,s,a,l,c]=n;return Tae({year:r,month:o,day:i,hour:s,minute:a,second:l,millisecond:c},e)}static utc(){let[e,n]=Nae(arguments),[r,o,i,s,a,l,c]=n;return e.zone=oo.utcInstance,Tae({year:r,month:o,day:i,hour:s,minute:a,second:l,millisecond:c},e)}static fromJSDate(e,n={}){let r=Vse(e)?e.valueOf():NaN;if(Number.isNaN(r))return t.invalid("invalid input");let o=Js(n.zone,Ut.defaultZone);return o.isValid?new t({ts:r,zone:o,loc:tn.fromObject(n)}):t.invalid(_5(o))}static fromMillis(e,n={}){if(il(e))return e<-Sae||e>Sae?t.invalid("Timestamp out of range"):new t({ts:e,zone:Js(n.zone,Ut.defaultZone),loc:tn.fromObject(n)});throw new br(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(il(e))return new t({ts:e*1e3,zone:Js(n.zone,Ut.defaultZone),loc:tn.fromObject(n)});throw new br("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};let r=Js(n.zone,Ut.defaultZone);if(!r.isValid)return t.invalid(_5(r));let o=tn.fromObject(n),i=p0(e,_ae),{minDaysInFirstWeek:s,startOfWeek:a}=_I(i,o),l=Ut.now(),c=He(n.specificOffset)?r.offset(l):n.specificOffset,u=!He(i.ordinal),d=!He(i.year),f=!He(i.month)||!He(i.day),p=d||f,m=i.weekYear||i.weekNumber;if((p||u)&&m)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Ys("Can't mix ordinal dates with month/day");let g=m||i.weekday&&!p,h,v,y=T5(l,c);g?(h=IMe,v=MMe,y=ex(y,s,a)):u?(h=kMe,v=OMe,y=w5(y)):(h=Aae,v=Lae);let b=!1;for(let T of h){let N=i[T];He(N)?b?i[T]=v[T]:i[T]=y[T]:b=!0}let S=g?Bse(i,s,a):u?zse(i):TI(i),C=S||$I(i);if(C)return t.invalid(C);let w=g?wI(i,s,a):u?EI(i):i,[E,_]=N5(w,c,r),$=new t({ts:E,zone:r,o:_,loc:o});return i.weekday&&p&&e.weekday!==$.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${$.toISO()}`):$}static fromISO(e,n={}){let[r,o]=rae(e);return ax(r,o,n,"ISO 8601",e)}static fromRFC2822(e,n={}){let[r,o]=oae(e);return ax(r,o,n,"RFC 2822",e)}static fromHTTP(e,n={}){let[r,o]=iae(e);return ax(r,o,n,"HTTP",n)}static fromFormat(e,n,r={}){if(He(e)||He(n))throw new br("fromFormat requires an input string and a format");let{locale:o=null,numberingSystem:i=null}=r,s=tn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[a,l,c,u]=Cae(s,e,n);return u?t.invalid(u):ax(a,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return t.fromFormat(e,n,r)}static fromSQL(e,n={}){let[r,o]=lae(e);return ax(r,o,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new br("need to specify a reason the DateTime is invalid");let r=e instanceof io?e:new io(e,n);if(Ut.throwOnInvalid)throw new d5(r);return new t({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){let r=zI(e,tn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(e,n={}){return FI(so.parseFormat(e),tn.fromObject(n)).map(o=>o.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?VI(this).weekYear:NaN}get weekNumber(){return this.isValid?VI(this).weekNumber:NaN}get weekday(){return this.isValid?VI(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?UI(this).weekday:NaN}get localWeekNumber(){return this.isValid?UI(this).weekNumber:NaN}get localWeekYear(){return this.isValid?UI(this).weekYear:NaN}get ordinal(){return this.isValid?w5(this.c).ordinal:NaN}get monthShort(){return this.isValid?Tc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Tc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Tc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Tc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,n=6e4,r=c0(this.c),o=this.zone.offset(r-e),i=this.zone.offset(r+e),s=this.zone.offset(r-o*n),a=this.zone.offset(r-i*n);if(s===a)return[this];let l=r-s*n,c=r-a*n,u=T5(l,s),d=T5(c,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[kp(this,{ts:l}),kp(this,{ts:c})]:[this]}get isInLeapYear(){return Op(this.year)}get daysInMonth(){return f0(this.year,this.month)}get daysInYear(){return this.isValid?Nd(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mp(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mp(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:n,numberingSystem:r,calendar:o}=so.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(e=0,n={}){return this.setZone(oo.instance(e),n)}toLocal(){return this.setZone(Ut.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=Js(e,Ut.defaultZone),e.equals(this.zone))return this;if(e.isValid){let o=this.ts;if(n||r){let i=e.offset(this.ts),s=this.toObject();[o]=N5(s,i,e)}return kp(this,{ts:o,zone:e})}else return t.invalid(_5(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){let o=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return kp(this,{loc:o})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let n=p0(e,_ae),{minDaysInFirstWeek:r,startOfWeek:o}=_I(n,this.loc),i=!He(n.weekYear)||!He(n.weekNumber)||!He(n.weekday),s=!He(n.ordinal),a=!He(n.year),l=!He(n.month)||!He(n.day),c=a||l,u=n.weekYear||n.weekNumber;if((c||s)&&u)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new Ys("Can't mix ordinal dates with month/day");let d;i?d=wI({...ex(this.c,r,o),...n},r,o):He(n.ordinal)?(d={...this.toObject(),...n},He(n.day)&&(d.day=Math.min(f0(d.year,d.month),d.day))):d=EI({...w5(this.c),...n});let[f,p]=N5(d,this.o,this.zone);return kp(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let n=Kn.fromDurationLike(e);return kp(this,wae(this,n))}minus(e){if(!this.isValid)return this;let n=Kn.fromDurationLike(e).negate();return kp(this,wae(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;let r={},o=Kn.normalizeUnit(e);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break;case"milliseconds":break}if(o==="weeks")if(n){let i=this.loc.getStartOfWeek(),{weekday:s}=this;s<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){let i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?so.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):jI}toLocaleString(e=_d,n={}){return this.isValid?so.create(this.loc.clone(n),e).formatDateTime(this):jI}toLocaleParts(e={}){return this.isValid?so.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;let s=e==="extended",a=HI(this,s);return a+="T",a+=Eae(this,s,n,r,o,i),a}toISODate({format:e="extended"}={}){return this.isValid?HI(this,e==="extended"):null}toISOWeekDate(){return $5(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:s="extended"}={}){return this.isValid?(o?"T":"")+Eae(this,s==="extended",n,e,r,i):null}toRFC2822(){return $5(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return $5(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?HI(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||e)&&(r&&(o+=" "),n?o+="z":e&&(o+="ZZ")),$5(this,o,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():jI}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Kn.invalid("created by diffing an invalid DateTime");let o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=Use(n).map(Kn.normalizeUnit),s=e.valueOf()>this.valueOf(),a=s?this:e,l=s?e:this,c=mae(a,l,i,o);return s?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(t.now(),e,n)}until(e){return this.isValid?_c.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;let o=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let n=e.base||t.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0,o=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(o=e.unit,i=void 0),$ae(n,this.plus(r),{...e,numeric:"always",units:o,unit:i})}toRelativeCalendar(e={}){return this.isValid?$ae(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new br("min requires all arguments be DateTimes");return NI(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new br("max requires all arguments be DateTimes");return NI(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){let{locale:o=null,numberingSystem:i=null}=r,s=tn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return BI(s,e,n)}static fromStringExplain(e,n,r={}){return t.fromFormatExplain(e,n,r)}static get DATE_SHORT(){return _d}static get DATE_MED(){return Ob}static get DATE_MED_WITH_WEEKDAY(){return aI}static get DATE_FULL(){return Ib}static get DATE_HUGE(){return kb}static get TIME_SIMPLE(){return Rb}static get TIME_WITH_SECONDS(){return Pb}static get TIME_WITH_SHORT_OFFSET(){return Fb}static get TIME_WITH_LONG_OFFSET(){return Bb}static get TIME_24_SIMPLE(){return zb}static get TIME_24_WITH_SECONDS(){return jb}static get TIME_24_WITH_SHORT_OFFSET(){return Vb}static get TIME_24_WITH_LONG_OFFSET(){return Ub}static get DATETIME_SHORT(){return Hb}static get DATETIME_SHORT_WITH_SECONDS(){return Kb}static get DATETIME_MED(){return Wb}static get DATETIME_MED_WITH_SECONDS(){return Gb}static get DATETIME_MED_WITH_WEEKDAY(){return lI}static get DATETIME_FULL(){return Yb}static get DATETIME_FULL_WITH_SECONDS(){return Zb}static get DATETIME_HUGE(){return qb}static get DATETIME_HUGE_WITH_SECONDS(){return Jb}};function C0(t){if(St.isDateTime(t))return t;if(t&&t.valueOf&&il(t.valueOf()))return St.fromJSDate(t);if(t&&typeof t=="object")return St.fromObject(t);throw new br(`Unknown datetime argument: ${t}, of type ${typeof t}`)}function D5(t){return t.reduce((e,{field:n,operator:r,value:o})=>{if(!n||!r)return e;if(n==="updated_at"&&(n="modified"),n==="created_at"&&(n="created"),r==="def")return{...e,[`${n}[def]`]:"true"};if(r==="ndef")return{...e,[`${n}[def]`]:"false"};if(r==="checked")return{...e,[`${n}[eq]`]:"true"};if(r==="nchecked")return{...e,[`${n}[eq]`]:"false"};if(typeof o>"u"||o===null||o===""||Array.isArray(o)&&o.length<1)return e;if(r==="between"||r==="sys-date-between")if(Array.isArray(o)&&o.length===2){if(r==="between")return{...e,[`${n}[gte]`]:o[0],[`${n}[lte]`]:o[1]};{let i=St.fromISO(o[0],{zone:"system"}).setZone("utc").toISO(),s=St.fromISO(o[1],{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i&&s?{...e,[`${n}[gte]`]:i,[`${n}[lt]`]:s}:e}}else return e;if(r==="sys-date-eq")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).setZone("utc").toISO(),s=St.fromISO(o,{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i&&s?{...e,[`${n}[gte]`]:i,[`${n}[lt]`]:s}:e}else return e;if(r==="sys-date-gt")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i?{...e,[`${n}[gte]`]:i}:e}else return e;if(r==="sys-date-gte")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).setZone("utc").toISO();return i?{...e,[`${n}[gte]`]:i}:e}else return e;if(r==="sys-date-lt")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).setZone("utc").toISO();return i?{...e,[`${n}[lt]`]:i}:e}else return e;if(r==="sys-date-lte")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i?{...e,[`${n}[lt]`]:i}:e}else return e;if(r==="starts"&&typeof o=="string")return{...e,[`${n}[starts]`]:o.replaceAll(/[^a-zA-Z0-9_.\s-]/g,"").toLowerCase()};if(n==="workflowStageId"){let i=t.some(s=>s.field==="workflowId");if(r==="eq"||r==="neq"){let s=[];return Array.isArray(o)?s=o.map(l=>l.split("_")[1]):s=o.split("_"),{...e,...i?{}:{"workflowId[eq]":s[0]},[`${n}[${r}]`]:s[1]}}if(Array.isArray(o)){let s=o.map(c=>{let u=c.split("_")[0],d=c.split("_")[1];return{workflowId:u,workflowStage:d}}),a=s.map(c=>c.workflowId).join(","),l=s.map(c=>c.workflowStage).join(",");return{...e,...i?{}:{[`workflowId[${r}]`]:a},[`${n}[${r}]`]:l}}}return{...e,[`${n}[${r}]`]:Array.isArray(o)?o.join(","):o}},{})}import{CANVAS_DRAFT_STATE as Mae,CanvasClient as Oae}from"@uniformdev/canvas";async function L5({instanceType:t,searchExpressionPrompt:e,username:n,locale:r,getEditUrl:o,env:i}){let s=new Oae(i),a=await u5({searchExpressionPrompt:e,username:n,locale:r},t,i),{limit:l,offset:c,keyword:u,sort:d,filter:f}=a,m=(await s.getCompositionList({patternType:t==="composition"?void 0:t==="componentPattern"?"component":"composition",pattern:t!=="composition",resolveData:!1,withComponentIDs:!0,skipOverridesResolution:!0,limit:l,offset:c,search:u,filters:f?D5(f):void 0,orderBy:Array.isArray(d)?d:d?[d]:void 0,locale:r,skipPatternResolution:!0,state:Mae})).compositions.map(g=>({id:g.composition._id,name:g.composition._name,componentType:g.composition.type,editUrl:o(g.composition._id)}));return{content:[{type:"text",text:JSON.stringify({results:m,criteria:a},null,2)}]}}async function A5({id:t,env:e}){let r=await new Oae(e).getCompositionById({skipDataResolution:!0,withComponentIDs:!0,skipOverridesResolution:!0,skipPatternResolution:!1,compositionId:t,state:Mae});return{content:[{type:"text",text:JSON.stringify(r,null,2)}]}}var PMe={id:Iae.string()};function kae(t,e){t.tool("compositionList","Lists available Uniform compositions",Sc.shape,async n=>await L5({...n,instanceType:"composition",getEditUrl:r=>c5(r,e),env:e})),t.tool("compositionGet","Gets the full contents of a Uniform composition",PMe,async n=>await A5({...n,env:e}))}import{autoFixParameterGroups as Fae,ContentClient as FMe}from"@uniformdev/canvas";import*as O5 from"zod/v3";import*as Md from"zod/v3";var Rae=Md.object({name:Md.string().describe('Title-cased display name of the component. Ex: "Hero"'),id:Md.string().describe("Public ID of the content type, the camelCase version of name, using only alphanumeric characters"),description:Md.string().describe("Describe the purpose of the content type in 1-2 sentences."),fields:Md.array(Cx).describe("The fields of the content type. The key is the publicId of the field.").optional()});function Pae(t){let e=t.fields?.find(r=>r.type==="asset"&&typeof r.typeConfig=="object"&&r.typeConfig!==null&&"allowedTypes"in r.typeConfig&&Array.isArray(r.typeConfig.allowedTypes)&&r.typeConfig.allowedTypes?.includes("image"))?.id,n=t.fields?.find(r=>r.type==="text")?.id;return{...t,thumbnailField:e,entryName:n}}function M5(t,e){return`${e.baseWebUrl}/dashboards/canvas/content-types/${t}`}var BMe={action:O5.enum(["create","update","delete"]).describe("The action to perform"),publicId:O5.string().describe("Public ID of the component, the camelCase version of name, using only alphanumeric characters"),contentType:Rae.describe("Full content type definition to create. Omit for update or delete.").optional(),patches:bx.describe("JSON patch to apply to the existing component definition. Omit for create or delete.").optional()};function Bae(t,e){t.tool("contentTypeAction","Creates, updates, or deletes a Uniform Content Type definition",BMe,async({publicId:n,action:r,contentType:o,patches:i})=>{let s=new FMe(e),a=!1;if(r==="create"){if(!o)throw new Error("Content type definition is required for create");let l=Pae(o);l.fields&&(a=Fae(l.fields),Fp(l.fields)),await s.upsertContentType({contentType:l})}if(r==="update"){if(!i)throw new Error("Patches are required for update");let c=(await s.getContentTypes()).contentTypes.find(f=>f.id===n);if(!c)throw new Error(`Content Type with public ID ${n} does not exist, try creating it instead`);let u=c.fields?.filter(f=>f.type==="richText").map(f=>f.id),d=yx(c,i);if(d.fields){a=Fae(d.fields);let f=d.fields?.filter(p=>p.type==="richText").map(p=>p.id).filter(p=>!u?.includes(p));Fp(d.fields,f)}await s.upsertContentType({contentType:d})}return r==="delete"&&await s.deleteContentType({contentTypeId:n}),{content:[{type:"text",text:JSON.stringify({success:!0,editUrl:M5(n,e),warning:a?"Issues with field group order were fixed. Ensure definition data is re-fetched before any future updates.":void 0},null,2)}]}})}import{ContentClient as zae}from"@uniformdev/canvas";import*as jae from"zod/v3";var zMe={id:jae.string()};function Vae(t,e){t.tool("contentTypeList","Lists all Uniform Content Type definitions",async()=>{let o=(await new zae(e).getContentTypes()).contentTypes.map(i=>({id:i.id,name:i.name,description:i.description,editUrl:M5(i.id,e)}));return{content:[{type:"text",text:JSON.stringify(o,null,2)}]}}),t.tool("contentTypeGet","Gets a Uniform Content Type definition details (fields, etc.)",zMe,async({id:n})=>{let i=(await new zae(e).getContentTypes()).contentTypes.find(s=>s.id===n);if(!i)throw new Error(`Content Type with ID ${n} not found`);return{content:[{type:"text",text:JSON.stringify(i,null,2)}]}})}import{v4 as jMe}from"uuid";function Uae(t,e){t.tool("createUuid","Creates a new random UUID",async()=>({content:[{type:"text",text:jMe()}]}))}import*as lx from"zod/v3";import{CANVAS_DRAFT_STATE as I5,ContentClient as VMe,convertEntryToPutEntry as UMe,getEffectivePropertyValue as HMe}from"@uniformdev/canvas";async function KMe(t,e,n){let o=(await e.fetchDefinitions())[t.entry.type];if(!o)throw new Error("insanity");let i=Xie(o),s;i.entryName&&(s=t.entry._overrides?.[t.entry._id].parameters?.[i.entryName]??t.entry.fields?.[i.entryName]);let a=HMe({conditionIndex:-1,locale:"__any__",greedyLocaleMatching:!0,property:s}),l=Aie({value:a,isNew:n,contentType:i});t.entry._name=l}async function k5({action:t,id:e,instructions:n,isPattern:r,patternId:o,getEditUrl:i,env:s}){let a=new VMe(s),l,c,u=t==="update"?e:void 0,d={success:!0,actionsTaken:[]};if(t==="duplicate"){let p=(await a.getEntries({entryIDs:[e],pattern:r,state:I5,skipDataResolution:!0,skipPatternResolution:!1,withComponentIDs:!0,skipOverridesResolution:!0})).entries[0];if(!p)throw new Error("Entry not found");let m=crypto.randomUUID(),g={...p.entry,_id:m,_name:`${p.entry._name} (copy)`};g._slug&&(g._slug=`${g._slug}-copy${g._slug?.endsWith("/")?"/":""}`),delete g._thumbnail;let h=Lb({...p,entry:g});l=new ol(h.composition),e=m}else if(t==="create"){if(!n)throw new Error("Instructions are required for create");if(!n.type)throw new Error("Type is required for create");o?(await a.upsertEntry({state:I5,entry:{type:n.type,_id:e,fields:{},_pattern:o}}),u=e):l=new ol({_id:e,_name:"New Entry",type:n.type,_overridability:{hideLockedParameters:!0}})}if(u){if(c=(await a.getEntries({entryIDs:[e],pattern:r,state:I5,skipDataResolution:!0,skipPatternResolution:!1,withComponentIDs:!0,skipOverridesResolution:!0})).entries[0],!c)throw new Error("Entry not found");let p=Lb(c);l=new ol(p.composition)}t==="delete"&&await a.deleteEntry({entryId:e});let f=Cse(s);if(l){t!=="duplicate"&&(await s5(n?.localeUpdates?.enableLocales,s),d=await JE({twee:l,descriptionUpdate:void 0,slugUpdate:n&&"slug"in n?n.slug:void 0,nameUpdate:n&&"name"in n?n.name:void 0,propertyUpdates:n?.fieldUpdates??[],dataResourceUpdates:(n&&"dataResourceUpdates"in n?n.dataResourceUpdates:[])??[],slotUpdates:{},localeUpdates:n?.localeUpdates,currentEditorLocale:void 0,referenceData:f,isEditingPattern:r,domParser:i5}));let p=l.exportTree(),m=l.exportMetadata(),g=UMe(Qie(p,c??{projectId:s.projectId,pattern:r},m,I5,c?.releaseId,c?.editionId));r||await KMe(g,f,t==="create"),await a.upsertEntry(g)}return{content:[{type:"text",text:JSON.stringify({...d,editUrl:i(e)},null,2)}]}}function R5(t,e){return`${e.baseWebUrl}/dashboards/canvas/entries/${t}`}var WMe={action:lx.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:lx.string().uuid().describe("UUID of the entry to create, update, delete, or duplicate"),patternId:lx.string().uuid().describe("Entry pattern ID to create the entry from. Omit when not creating, or when creating an entry without an entry pattern.").optional(),instructions:xk.describe("Modification instructions for the entry. Omit for delete and duplicate.").optional()};function Hae(t,e){t.tool("entryAction","Creates, updates, or deletes a Uniform Entry",WMe,async n=>await k5({...n,isPattern:!1,getEditUrl:r=>R5(r,e),patternId:n.patternId,env:e}))}import*as Gae from"zod/v3";import{CANVAS_DRAFT_STATE as Kae,ContentClient as Wae}from"@uniformdev/canvas";async function P5({isPattern:t,searchExpressionPrompt:e,username:n,locale:r,getEditUrl:o,env:i}){let s=new Wae(i),a=await u5({searchExpressionPrompt:e,username:n,locale:r},t?"entryPattern":"entry",i),{limit:l,offset:c,keyword:u,sort:d,filter:f}=a,m=(await s.getEntries({limit:l,offset:c,pattern:t,skipDataResolution:!0,withTotalCount:!0,skipPatternResolution:!0,skipOverridesResolution:!0,state:Kae,search:u,filters:f?D5(f):void 0,orderBy:Array.isArray(d)?d:d?[d]:void 0,locale:r})).entries.map(g=>({id:g.entry._id,name:g.entry._name??"",contentType:g.entry.type,editUrl:o(g.entry._id)}));return{content:[{type:"text",text:JSON.stringify({results:m,criteria:a},null,2)}]}}async function F5({id:t,isPattern:e,env:n}){let o=await new Wae(n).getEntries({skipDataResolution:!0,withComponentIDs:!0,skipOverridesResolution:!0,skipPatternResolution:!1,pattern:e,entryIDs:[t],state:Kae});if(o.entries.length===0)throw new Error(`Entry with ID ${t} not found`);return{content:[{type:"text",text:JSON.stringify(o.entries[0],null,2)}]}}var GMe={id:Gae.string()};function Yae(t,e){t.tool("entryList","Lists available Uniform entries",Sc.shape,async n=>await P5({...n,isPattern:!1,getEditUrl:r=>R5(r,e),env:e})),t.tool("entryGet","Gets the full contents of a Uniform entry",GMe,async n=>await F5({...n,isPattern:!1,env:e}))}import*as z5 from"zod/v3";function B5(t,e){return`${e.baseWebUrl}/dashboards/canvas/entry-patterns/${t}`}var YMe={action:z5.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:z5.string().uuid().describe("UUID of the entry pattern to create, update, delete, or duplicate"),instructions:Ck.describe("Modification instructions for the entry pattern. Omit for delete and duplicate.").optional()};function Zae(t,e){t.tool("entryPatternAction","Creates, updates, or deletes a Uniform Entry Pattern",YMe,async n=>await k5({...n,isPattern:!0,getEditUrl:r=>B5(r,e),patternId:void 0,env:e}))}import*as qae from"zod/v3";var ZMe={id:qae.string()};function Jae(t,e){t.tool("entryPatternList","Lists available Uniform entry patterns",Sc.shape,async n=>await P5({...n,isPattern:!0,getEditUrl:r=>B5(r,e),env:e})),t.tool("entryPatternGet","Gets the full contents of a Uniform entry pattern",ZMe,async n=>await F5({...n,isPattern:!0,env:e}))}import{ProjectClient as qMe}from"@uniformdev/canvas";async function JMe(t){let e=await fetch(`${t.apiHost}/api/v1/member-profile`,{headers:{"x-api-key":t.apiKey,"Content-Type":"application/json"}});if(!e.ok)throw new Error(`Failed to fetch user profile: ${e.status} ${e.statusText}`);return(await e.json()).name}function Xae(t,e){t.tool("getUniformEnvironment","Get the connected Uniform Project name, edit URL, and current user",{},async()=>{try{let n=new qMe(e),[r,o]=await Promise.all([n.get({projectId:e.projectId}),JMe(e)]),i={projectName:r.name,teamName:r.teamName,projectUrl:e.baseWebUrl,currentIdentity:o};return{content:[{type:"text",text:JSON.stringify(i,null,2)}]}}catch(n){return{content:[{type:"text",text:JSON.stringify({error:"Failed to fetch project information",details:n instanceof Error?n.message:"Unknown error"},null,2)}]}}})}import{LocaleClient as XMe}from"@uniformdev/canvas";function Qae(t,e){t.tool("localeList","Lists all registered Uniform locales",async()=>{let r=await new XMe(e).get();return{content:[{type:"text",text:JSON.stringify({locales:r.results,editUrl:`${e.baseWebUrl}/settings/localization`},null,2)}]}})}import*as V5 from"zod/v3";function j5(t,e){return`${e.baseWebUrl}/dashboards/canvas/edit/${t}`}var QMe={action:V5.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:V5.string().uuid().describe("UUID of the pattern instance to create, update, delete, or duplicate"),instructions:yk.describe("Modification instructions for the pattern. Omit for delete and duplicate.").optional()};function ele(t,e){t.tool("patternAction","Creates, updates, or deletes a Uniform Component Pattern or Composition Pattern",QMe,async n=>await l5({...n,isPattern:!0,getEditUrl:r=>j5(r,e),patternId:void 0,env:e}))}import*as U5 from"zod/v3";var eOe={instanceType:U5.enum(["componentPattern","compositionPattern"]),...Sc.shape},tOe={id:U5.string()};function tle(t,e){t.tool("patternList","Lists available Uniform component patterns or composition patterns",eOe,async n=>await L5({...n,getEditUrl:r=>j5(r,e),env:e})),t.tool("patternGet","Gets the full contents of a Uniform component pattern or composition pattern",tOe,async n=>await A5({...n,env:e}))}import{ProjectMapClient as nOe}from"@uniformdev/project-map";import*as nle from"zod/v3";var rOe={query:nle.string().describe("Keyword to search for in node names and paths.")};function rle(t,e){t.tool("projectMapNodeSearch","Search for project map nodes by keyword. Use this to find the appropriate parent node when you need to create a composition attached to a specific location in the project map hierarchy.",rOe,async({query:n})=>{let r=new nOe({apiKey:e.apiKey,apiHost:e.apiHost,projectId:e.projectId}),i=(await r.getProjectMapDefinition({}))?.projectMaps[0]?.id;if(!i)throw new Error("No project map found for this project");let a=(await r.getNodes({search:n,includeAncestors:!1,expanded:!0,depth:1,projectMapId:i})).nodes?.map(l=>({id:l.id,name:l.name,path:l.path}))??[];return{content:[{type:"text",text:JSON.stringify({matches:a},null,2)}]}})}function ole(t,e){lk(t,e),mk(t,e),vk(t,e),Bae(t,e),Vae(t,e),Hae(t,e),Yae(t,e),Jae(t,e),Zae(t,e),tle(t,e),ele(t,e),Sse(t,e),kae(t,e),Uae(t,e),Xae(t,e),Qae(t,e),rle(t,e)}var ile=new oOe({name:"Uniform MCP",version:mx.version});ole(ile,sk);var sOe=new iOe;await ile.connect(sOe);process.stderr.write(`Uniform MCP server started
|
|
5847
|
+
You can filter by date, number, or string properties on the definition, as well as name, created, modified, author, slug, enabled locales, type, and publish status.`),username:On.string().describe("The username of the current user. If you do not know the username, use an empty string"),locale:On.string().describe("The current locale. If there is no current locale, use an empty string")}),f_t={displayName:"Create filter expression",description:"Creates a Uniform search filter expression for searching entries, patterns, or compositions from a user prompt. Meant to be a callable tool only.",inputSchema:Sc.extend({entityType:On.enum(["composition","entry","componentPattern","compositionPattern","entryPattern"]).describe("The entity type we are creating a filter for")}),outputSchema:fAe,runsAt:"server",timeout:10,callable:!0};import*as Iae from"zod/v3";var wc=class extends Error{},d5=class extends wc{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},f5=class extends wc{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},p5=class extends wc{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Ys=class extends wc{},l0=class extends wc{constructor(e){super(`Invalid unit ${e}`)}},br=class extends wc{},Zs=class extends wc{constructor(){super("Zone is an abstract class")}};var ge="numeric",qs="short",zi="long",_d={year:ge,month:ge,day:ge},Ob={year:ge,month:qs,day:ge},aI={year:ge,month:qs,day:ge,weekday:qs},Ib={year:ge,month:zi,day:ge},kb={year:ge,month:zi,day:ge,weekday:zi},Rb={hour:ge,minute:ge},Pb={hour:ge,minute:ge,second:ge},Fb={hour:ge,minute:ge,second:ge,timeZoneName:qs},Bb={hour:ge,minute:ge,second:ge,timeZoneName:zi},zb={hour:ge,minute:ge,hourCycle:"h23"},jb={hour:ge,minute:ge,second:ge,hourCycle:"h23"},Vb={hour:ge,minute:ge,second:ge,hourCycle:"h23",timeZoneName:qs},Ub={hour:ge,minute:ge,second:ge,hourCycle:"h23",timeZoneName:zi},Hb={year:ge,month:ge,day:ge,hour:ge,minute:ge},Kb={year:ge,month:ge,day:ge,hour:ge,minute:ge,second:ge},Wb={year:ge,month:qs,day:ge,hour:ge,minute:ge},Gb={year:ge,month:qs,day:ge,hour:ge,minute:ge,second:ge},lI={year:ge,month:qs,day:ge,weekday:qs,hour:ge,minute:ge},Yb={year:ge,month:zi,day:ge,hour:ge,minute:ge,timeZoneName:qs},Zb={year:ge,month:zi,day:ge,hour:ge,minute:ge,second:ge,timeZoneName:qs},qb={year:ge,month:zi,day:ge,weekday:zi,hour:ge,minute:ge,timeZoneName:zi},Jb={year:ge,month:zi,day:ge,weekday:zi,hour:ge,minute:ge,second:ge,timeZoneName:zi};var yi=class{get type(){throw new Zs}get name(){throw new Zs}get ianaName(){return this.name}get isUniversal(){throw new Zs}offsetName(e,n){throw new Zs}formatOffset(e,n){throw new Zs}offset(e){throw new Zs}equals(e){throw new Zs}get isValid(){throw new Zs}};var cI=null,Td=class t extends yi{static get instance(){return cI===null&&(cI=new t),cI}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return g5(e,n,r)}formatOffset(e,n){return $d(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}};var v5={};function pAe(t){return v5[t]||(v5[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),v5[t]}var mAe={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function gAe(t,e){let n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,s,a,l,c,u]=r;return[s,o,i,a,l,c,u]}function hAe(t,e){let n=t.formatToParts(e),r=[];for(let o=0;o<n.length;o++){let{type:i,value:s}=n[o],a=mAe[i];i==="era"?r[a]=s:He(a)||(r[a]=parseInt(s,10))}return r}var h5={},No=class t extends yi{static create(e){return h5[e]||(h5[e]=new t(e)),h5[e]}static resetCache(){h5={},v5={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return g5(e,n,r,this.name)}formatOffset(e,n){return $d(this.offset(e),n)}offset(e){let n=new Date(e);if(isNaN(n))return NaN;let r=pAe(this.name),[o,i,s,a,l,c,u]=r.formatToParts?hAe(r,n):gAe(r,n);a==="BC"&&(o=-Math.abs(o)+1);let f=c0({year:o,month:i,day:s,hour:l===24?0:l,minute:c,second:u,millisecond:0}),p=+n,m=p%1e3;return p-=m>=0?m:1e3+m,(f-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}};var wse={};function vAe(t,e={}){let n=JSON.stringify([t,e]),r=wse[n];return r||(r=new Intl.ListFormat(t,e),wse[n]=r),r}var uI={};function dI(t,e={}){let n=JSON.stringify([t,e]),r=uI[n];return r||(r=new Intl.DateTimeFormat(t,e),uI[n]=r),r}var fI={};function yAe(t,e={}){let n=JSON.stringify([t,e]),r=fI[n];return r||(r=new Intl.NumberFormat(t,e),fI[n]=r),r}var pI={};function bAe(t,e={}){let{base:n,...r}=e,o=JSON.stringify([t,r]),i=pI[o];return i||(i=new Intl.RelativeTimeFormat(t,e),pI[o]=i),i}var Xb=null;function xAe(){return Xb||(Xb=new Intl.DateTimeFormat().resolvedOptions().locale,Xb)}var Ese={};function CAe(t){let e=Ese[t];if(!e){let n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Ese[t]=e}return e}function SAe(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let n=t.indexOf("-u-");if(n===-1)return[t];{let r,o;try{r=dI(t).resolvedOptions(),o=t}catch{let l=t.substring(0,n);r=dI(l).resolvedOptions(),o=l}let{numberingSystem:i,calendar:s}=r;return[o,i,s]}}function wAe(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function EAe(t){let e=[];for(let n=1;n<=12;n++){let r=St.utc(2009,n,1);e.push(t(r))}return e}function _Ae(t){let e=[];for(let n=1;n<=7;n++){let r=St.utc(2016,11,13+n);e.push(t(r))}return e}function y5(t,e,n,r){let o=t.listingMode();return o==="error"?null:o==="en"?n(e):r(e)}function TAe(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var mI=class{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;let{padTo:o,floor:i,...s}=r;if(!n||Object.keys(s).length>0){let a={useGrouping:!1,...r};r.padTo>0&&(a.minimumIntegerDigits=r.padTo),this.inf=yAe(e,a)}}format(e){if(this.inf){let n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{let n=this.floor?Math.floor(e):u0(e,3);return Hn(n,this.padTo)}}},gI=class{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&No.create(a).valid?(o=a,this.dt=e):(o="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,o=e.zone.name):(o="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=dI(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){let r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},hI=class{constructor(e,n,r){this.opts={style:"long",...r},!n&&b5()&&(this.rtf=bAe(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):_se(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}},$Ae={firstDay:1,minimalDays:4,weekend:[6,7]},tn=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,o,i=!1){let s=e||Ut.defaultLocale,a=s||(i?"en-US":xAe()),l=n||Ut.defaultNumberingSystem,c=r||Ut.defaultOutputCalendar,u=Qb(o)||Ut.defaultWeekSettings;return new t(a,l,c,u,s)}static resetCache(){Xb=null,uI={},fI={},pI={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return t.create(e,n,r,o)}constructor(e,n,r,o,i){let[s,a,l]=SAe(e);this.locale=s,this.numberingSystem=n||a||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=wAe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=TAe(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Qb(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return y5(this,e,vI,()=>{let r=n?{month:e,day:"numeric"}:{month:e},o=n?"format":"standalone";return this.monthsCache[o][e]||(this.monthsCache[o][e]=EAe(i=>this.extract(i,r,"month"))),this.monthsCache[o][e]})}weekdays(e,n=!1){return y5(this,e,yI,()=>{let r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},o=n?"format":"standalone";return this.weekdaysCache[o][e]||(this.weekdaysCache[o][e]=_Ae(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][e]})}meridiems(){return y5(this,void 0,()=>bI,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[St.utc(2016,11,13,9),St.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return y5(this,e,xI,()=>{let n={era:e};return this.eraCache[e]||(this.eraCache[e]=[St.utc(-40,1,1),St.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){let o=this.dtFormatter(e,n),i=o.formatToParts(),s=i.find(a=>a.type.toLowerCase()===r);return s?s.value:null}numberFormatter(e={}){return new mI(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new gI(e,this.intl,n)}relFormatter(e={}){return new hI(this.intl,this.isEnglish(),e)}listFormatter(e={}){return vAe(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:x5()?CAe(this.locale):$Ae}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}};var SI=null,oo=class t extends yi{static get utcInstance(){return SI===null&&(SI=new t(0)),SI}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(Ap(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${$d(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${$d(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return $d(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}};var d0=class extends yi{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Js(t,e){let n;if(He(t)||t===null)return e;if(t instanceof yi)return t;if(Tse(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Td.instance:r==="utc"||r==="gmt"?oo.utcInstance:oo.parseSpecifier(r)||No.create(t)}else return il(t)?oo.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new d0(t)}var $se=()=>Date.now(),Nse="system",Dse=null,Lse=null,Ase=null,Mse=60,Ose,Ise=null,Ut=class{static get now(){return $se}static set now(e){$se=e}static set defaultZone(e){Nse=e}static get defaultZone(){return Js(Nse,Td.instance)}static get defaultLocale(){return Dse}static set defaultLocale(e){Dse=e}static get defaultNumberingSystem(){return Lse}static set defaultNumberingSystem(e){Lse=e}static get defaultOutputCalendar(){return Ase}static set defaultOutputCalendar(e){Ase=e}static get defaultWeekSettings(){return Ise}static set defaultWeekSettings(e){Ise=Qb(e)}static get twoDigitCutoffYear(){return Mse}static set twoDigitCutoffYear(e){Mse=e%100}static get throwOnInvalid(){return Ose}static set throwOnInvalid(e){Ose=e}static resetCaches(){tn.resetCache(),No.resetCache()}};var io=class{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var kse=[0,31,59,90,120,151,181,212,243,273,304,334],Rse=[0,31,60,91,121,152,182,213,244,274,305,335];function ms(t,e){return new io("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function C5(t,e,n){let r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let o=r.getUTCDay();return o===0?7:o}function Pse(t,e,n){return n+(Op(t)?Rse:kse)[e-1]}function Fse(t,e){let n=Op(t)?Rse:kse,r=n.findIndex(i=>i<e),o=e-n[r];return{month:r+1,day:o}}function S5(t,e){return(t-e+7)%7+1}function ex(t,e=4,n=1){let{year:r,month:o,day:i}=t,s=Pse(r,o,i),a=S5(C5(r,o,i),n),l=Math.floor((s-a+14-e)/7),c;return l<1?(c=r-1,l=Mp(c,e,n)):l>Mp(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:a,...nx(t)}}function wI(t,e=4,n=1){let{weekYear:r,weekNumber:o,weekday:i}=t,s=S5(C5(r,1,e),n),a=Nd(r),l=o*7+i-s-7+e,c;l<1?(c=r-1,l+=Nd(c)):l>a?(c=r+1,l-=Nd(r)):c=r;let{month:u,day:d}=Fse(c,l);return{year:c,month:u,day:d,...nx(t)}}function w5(t){let{year:e,month:n,day:r}=t,o=Pse(e,n,r);return{year:e,ordinal:o,...nx(t)}}function EI(t){let{year:e,ordinal:n}=t,{month:r,day:o}=Fse(e,n);return{year:e,month:r,day:o,...nx(t)}}function _I(t,e){if(!He(t.localWeekday)||!He(t.localWeekNumber)||!He(t.localWeekYear)){if(!He(t.weekday)||!He(t.weekNumber)||!He(t.weekYear))throw new Ys("Cannot mix locale-based week fields with ISO-based week fields");return He(t.localWeekday)||(t.weekday=t.localWeekday),He(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),He(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Bse(t,e=4,n=1){let r=tx(t.weekYear),o=ji(t.weekNumber,1,Mp(t.weekYear,e,n)),i=ji(t.weekday,1,7);return r?o?i?!1:ms("weekday",t.weekday):ms("week",t.weekNumber):ms("weekYear",t.weekYear)}function zse(t){let e=tx(t.year),n=ji(t.ordinal,1,Nd(t.year));return e?n?!1:ms("ordinal",t.ordinal):ms("year",t.year)}function TI(t){let e=tx(t.year),n=ji(t.month,1,12),r=ji(t.day,1,f0(t.year,t.month));return e?n?r?!1:ms("day",t.day):ms("month",t.month):ms("year",t.year)}function $I(t){let{hour:e,minute:n,second:r,millisecond:o}=t,i=ji(e,0,23)||e===24&&n===0&&r===0&&o===0,s=ji(n,0,59),a=ji(r,0,59),l=ji(o,0,999);return i?s?a?l?!1:ms("millisecond",o):ms("second",r):ms("minute",n):ms("hour",e)}function He(t){return typeof t>"u"}function il(t){return typeof t=="number"}function tx(t){return typeof t=="number"&&t%1===0}function Tse(t){return typeof t=="string"}function Vse(t){return Object.prototype.toString.call(t)==="[object Date]"}function b5(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function x5(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Use(t){return Array.isArray(t)?t:[t]}function NI(t,e,n){if(t.length!==0)return t.reduce((r,o)=>{let i=[e(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function Hse(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function Dd(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Qb(t){if(t==null)return null;if(typeof t!="object")throw new br("Week settings must be an object");if(!ji(t.firstDay,1,7)||!ji(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!ji(e,1,7)))throw new br("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function ji(t,e,n){return tx(t)&&t>=e&&t<=n}function NAe(t,e){return t-e*Math.floor(t/e)}function Hn(t,e=2){let n=t<0,r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Ec(t){if(!(He(t)||t===null||t===""))return parseInt(t,10)}function Ld(t){if(!(He(t)||t===null||t===""))return parseFloat(t)}function rx(t){if(!(He(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function u0(t,e,n=!1){let r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function Op(t){return t%4===0&&(t%100!==0||t%400===0)}function Nd(t){return Op(t)?366:365}function f0(t,e){let n=NAe(e-1,12)+1,r=t+(e-n)/12;return n===2?Op(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function c0(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function jse(t,e,n){return-S5(C5(t,1,e),n)+e-1}function Mp(t,e=4,n=1){let r=jse(t,e,n),o=jse(t+1,e,n);return(Nd(t)-r+o)/7}function ox(t){return t>99?t:t>Ut.twoDigitCutoffYear?1900+t:2e3+t}function g5(t,e,n,r=null){let o=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);let s={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,s).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Ap(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);let r=parseInt(e,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function DI(t){let e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new br(`Invalid unit value ${t}`);return e}function p0(t,e){let n={};for(let r in t)if(Dd(t,r)){let o=t[r];if(o==null)continue;n[e(r)]=DI(o)}return n}function $d(t,e){let n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${Hn(n,2)}:${Hn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Hn(n,2)}${Hn(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function nx(t){return Hse(t,["hour","minute","second","millisecond"])}var DAe=["January","February","March","April","May","June","July","August","September","October","November","December"],LI=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],LAe=["J","F","M","A","M","J","J","A","S","O","N","D"];function vI(t){switch(t){case"narrow":return[...LAe];case"short":return[...LI];case"long":return[...DAe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var AI=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],MI=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],AAe=["M","T","W","T","F","S","S"];function yI(t){switch(t){case"narrow":return[...AAe];case"short":return[...MI];case"long":return[...AI];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var bI=["AM","PM"],MAe=["Before Christ","Anno Domini"],OAe=["BC","AD"],IAe=["B","A"];function xI(t){switch(t){case"narrow":return[...IAe];case"short":return[...OAe];case"long":return[...MAe];default:return null}}function Kse(t){return bI[t.hour<12?0:1]}function Wse(t,e){return yI(e)[t.weekday-1]}function Gse(t,e){return vI(e)[t.month-1]}function Yse(t,e){return xI(e)[t.year<0?0:1]}function _se(t,e,n="always",r=!1){let o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){let d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${o[t][0]}`;case-1:return d?"yesterday":`last ${o[t][0]}`;case 0:return d?"today":`this ${o[t][0]}`;default:}}let s=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,c=o[t],u=r?l?c[1]:c[2]||c[1]:l?o[t][0]:t;return s?`${a} ${u} ago`:`in ${a} ${u}`}function Zse(t,e){let n="";for(let r of t)r.literal?n+=r.val:n+=e(r.val);return n}var kAe={D:_d,DD:Ob,DDD:Ib,DDDD:kb,t:Rb,tt:Pb,ttt:Fb,tttt:Bb,T:zb,TT:jb,TTT:Vb,TTTT:Ub,f:Hb,ff:Wb,fff:Yb,ffff:qb,F:Kb,FF:Gb,FFF:Zb,FFFF:Jb},so=class t{static create(e,n={}){return new t(e,n)}static parseFormat(e){let n=null,r="",o=!1,i=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);a==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||a===n?r+=a:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=a,n=a)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return kAe[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Hn(e,n);let r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){let r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(e,p,m),s=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",a=()=>r?Kse(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,m)=>r?Gse(e,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),c=(p,m)=>r?Wse(e,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{let m=t.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(e,m):p},d=p=>r?Yse(e,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return o?i({day:"numeric"},"day"):this.num(e.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(e.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(e.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(p)}};return Zse(t.parseFormat(n),f)}formatDurationFromString(e,n){let r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{let u=r(c);return u?this.num(l.get(u),c.length):c},i=t.parseFormat(n),s=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),a=e.shiftTo(...s.map(r).filter(l=>l));return Zse(i,o(a))}};var Jse=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function g0(...t){let e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function h0(...t){return e=>t.reduce(([n,r,o],i)=>{let[s,a,l]=i(e,o);return[{...n,...s},a||r,l]},[{},null,1]).slice(0,2)}function v0(t,...e){if(t==null)return[null,null];for(let[n,r]of e){let o=n.exec(t);if(o)return r(o)}return[null,null]}function Xse(...t){return(e,n)=>{let r={},o;for(o=0;o<t.length;o++)r[t[o]]=Ec(e[n+o]);return[r,null,n+o]}}var Qse=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,RAe=`(?:${Qse.source}?(?:\\[(${Jse.source})\\])?)?`,OI=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,eae=RegExp(`${OI.source}${RAe}`),II=RegExp(`(?:T${eae.source})?`),PAe=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,FAe=/(\d{4})-?W(\d\d)(?:-?(\d))?/,BAe=/(\d{4})-?(\d{3})/,zAe=Xse("weekYear","weekNumber","weekDay"),jAe=Xse("year","ordinal"),VAe=/(\d{4})-(\d\d)-(\d\d)/,tae=RegExp(`${OI.source} ?(?:${Qse.source}|(${Jse.source}))?`),UAe=RegExp(`(?: ${tae.source})?`);function m0(t,e,n){let r=t[e];return He(r)?n:Ec(r)}function HAe(t,e){return[{year:m0(t,e),month:m0(t,e+1,1),day:m0(t,e+2,1)},null,e+3]}function y0(t,e){return[{hours:m0(t,e,0),minutes:m0(t,e+1,0),seconds:m0(t,e+2,0),milliseconds:rx(t[e+3])},null,e+4]}function ix(t,e){let n=!t[e]&&!t[e+1],r=Ap(t[e+1],t[e+2]),o=n?null:oo.instance(r);return[{},o,e+3]}function sx(t,e){let n=t[e]?No.create(t[e]):null;return[{},n,e+1]}var KAe=RegExp(`^T?${OI.source}$`),WAe=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function GAe(t){let[e,n,r,o,i,s,a,l,c]=t,u=e[0]==="-",d=l&&l[0]==="-",f=(p,m=!1)=>p!==void 0&&(m||p&&u)?-p:p;return[{years:f(Ld(n)),months:f(Ld(r)),weeks:f(Ld(o)),days:f(Ld(i)),hours:f(Ld(s)),minutes:f(Ld(a)),seconds:f(Ld(l),l==="-0"),milliseconds:f(rx(c),d)}]}var YAe={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function kI(t,e,n,r,o,i,s){let a={year:e.length===2?ox(Ec(e)):Ec(e),month:LI.indexOf(n)+1,day:Ec(r),hour:Ec(o),minute:Ec(i)};return s&&(a.second=Ec(s)),t&&(a.weekday=t.length>3?AI.indexOf(t)+1:MI.indexOf(t)+1),a}var ZAe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function qAe(t){let[,e,n,r,o,i,s,a,l,c,u,d]=t,f=kI(e,o,r,n,i,s,a),p;return l?p=YAe[l]:c?p=0:p=Ap(u,d),[f,new oo(p)]}function JAe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var XAe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,QAe=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,eMe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qse(t){let[,e,n,r,o,i,s,a]=t;return[kI(e,o,r,n,i,s,a),oo.utcInstance]}function tMe(t){let[,e,n,r,o,i,s,a]=t;return[kI(e,a,n,r,o,i,s),oo.utcInstance]}var nMe=g0(PAe,II),rMe=g0(FAe,II),oMe=g0(BAe,II),iMe=g0(eae),nae=h0(HAe,y0,ix,sx),sMe=h0(zAe,y0,ix,sx),aMe=h0(jAe,y0,ix,sx),lMe=h0(y0,ix,sx);function rae(t){return v0(t,[nMe,nae],[rMe,sMe],[oMe,aMe],[iMe,lMe])}function oae(t){return v0(JAe(t),[ZAe,qAe])}function iae(t){return v0(t,[XAe,qse],[QAe,qse],[eMe,tMe])}function sae(t){return v0(t,[WAe,GAe])}var cMe=h0(y0);function aae(t){return v0(t,[KAe,cMe])}var uMe=g0(VAe,UAe),dMe=g0(tae),fMe=h0(y0,ix,sx);function lae(t){return v0(t,[uMe,nae],[dMe,fMe])}var cae="Invalid Duration",dae={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},pMe={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...dae},gs=146097/400,b0=146097/4800,mMe={years:{quarters:4,months:12,weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},quarters:{months:3,weeks:gs/28,days:gs/4,hours:gs*24/4,minutes:gs*24*60/4,seconds:gs*24*60*60/4,milliseconds:gs*24*60*60*1e3/4},months:{weeks:b0/7,days:b0,hours:b0*24,minutes:b0*24*60,seconds:b0*24*60*60,milliseconds:b0*24*60*60*1e3},...dae},Ip=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],gMe=Ip.slice(0).reverse();function Ad(t,e,n=!1){let r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Kn(r)}function fae(t,e){let n=e.milliseconds??0;for(let r of gMe.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function uae(t,e){let n=fae(t,e)<0?-1:1;Ip.reduceRight((r,o)=>{if(He(e[o]))return r;if(r){let i=e[r]*n,s=t[o][r],a=Math.floor(i/s);e[o]+=a*n,e[r]-=a*s*n}return o},null),Ip.reduce((r,o)=>{if(He(e[o]))return r;if(r){let i=e[r]%1;e[r]-=i,e[o]+=i*t[r][o]}return o},null)}function hMe(t){let e={};for(let[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}var Kn=class t{constructor(e){let n=e.conversionAccuracy==="longterm"||!1,r=n?mMe:pMe;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||tn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return t.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new br(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:p0(e,t.normalizeUnit),loc:tn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(il(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new br(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){let[r]=sae(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){let[r]=aae(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new br("need to specify a reason the Duration is invalid");let r=e instanceof io?e:new io(e,n);if(Ut.throwOnInvalid)throw new p5(r);return new t({invalid:r})}static normalizeUnit(e){let n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new l0(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){let r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?so.create(this.loc,r).formatDurationFromString(this,e):cae}toHuman(e={}){if(!this.isValid)return cae;let n=Ip.map(r=>{let o=this.values[r];return He(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=u0(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},St.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?fae(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e),r={};for(let o of Ip)(Dd(n.values,o)||Dd(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Ad(this,{values:r},!0)}minus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let n={};for(let r of Object.keys(this.values))n[r]=DI(e(this.values[r],r));return Ad(this,{values:n},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let n={...this.values,...p0(e,t.normalizeUnit)};return Ad(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Ad(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return uae(this.matrix,e),Ad(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=hMe(this.normalize().shiftToAll().toObject());return Ad(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let n={},r={},o=this.toObject(),i;for(let s of Ip)if(e.indexOf(s)>=0){i=s;let a=0;for(let c in r)a+=this.matrix[c][s]*r[c],r[c]=0;il(o[s])&&(a+=o[s]);let l=Math.trunc(a);n[s]=l,r[s]=(a*1e3-l*1e3)/1e3}else il(o[s])&&(r[s]=o[s]);for(let s in r)r[s]!==0&&(n[i]+=s===i?r[s]:r[s]/this.matrix[i][s]);return uae(this.matrix,n),Ad(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Ad(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(let r of Ip)if(!n(this.values[r],e.values[r]))return!1;return!0}};var x0="Invalid Interval";function vMe(t,e){return!t||!t.isValid?_c.invalid("missing or invalid start"):!e||!e.isValid?_c.invalid("missing or invalid end"):e<t?_c.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var _c=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new br("need to specify a reason the Interval is invalid");let r=e instanceof io?e:new io(e,n);if(Ut.throwOnInvalid)throw new f5(r);return new t({invalid:r})}static fromDateTimes(e,n){let r=C0(e),o=C0(n),i=vMe(r,o);return i??new t({start:r,end:o})}static after(e,n){let r=Kn.fromDurationLike(n),o=C0(e);return t.fromDateTimes(o,o.plus(r))}static before(e,n){let r=Kn.fromDurationLike(n),o=C0(e);return t.fromDateTimes(o.minus(r),o)}static fromISO(e,n){let[r,o]=(e||"").split("/",2);if(r&&o){let i,s;try{i=St.fromISO(r,n),s=i.isValid}catch{s=!1}let a,l;try{a=St.fromISO(o,n),l=a.isValid}catch{l=!1}if(s&&l)return t.fromDateTimes(i,a);if(s){let c=Kn.fromISO(o,n);if(c.isValid)return t.after(i,c)}else if(l){let c=Kn.fromISO(r,n);if(c.isValid)return t.before(a,c)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;let r=this.start.startOf(e,n),o;return n?.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(e,n),Math.floor(o.diff(r,e).get(e))+(o.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?t.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];let n=e.map(C0).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),r=[],{s:o}=this,i=0;for(;o<this.e;){let s=n[i]||this.e,a=+s>+this.e?this.e:s;r.push(t.fromDateTimes(o,a)),o=a,i+=1}return r}splitBy(e){let n=Kn.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i,s=[];for(;r<this.e;){let a=this.start.plus(n.mapUnits(l=>l*o));i=+a>+this.e?this.e:a,s.push(t.fromDateTimes(r,i)),r=i,o+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:t.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;let n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,r)}static merge(e){let[n,r]=e.sort((o,i)=>o.s-i.s).reduce(([o,i],s)=>i?i.overlaps(s)||i.abutsStart(s)?[o,i.union(s)]:[o.concat([i]),s]:[o,s],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0,o=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...i),a=s.sort((l,c)=>l.time-c.time);for(let l of a)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(t.fromDateTimes(n,l.time)),n=null);return t.merge(o)}difference(...e){return t.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:x0}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=_d,n={}){return this.isValid?so.create(this.s.loc.clone(n),e).formatInterval(this):x0}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:x0}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:x0}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:x0}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:x0}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Kn.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}};var Tc=class{static hasDST(e=Ut.defaultZone){let n=St.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return No.isValidZone(e)}static normalizeZone(e){return Js(e,Ut.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||tn.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||tn.create(n,r,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||tn.create(n,r,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||tn.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||tn.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return tn.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return tn.create(n,null,"gregory").eras(e)}static features(){return{relative:b5(),localeWeek:x5()}}};function pae(t,e){let n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Kn.fromMillis(r).as("days"))}function yMe(t,e,n){let r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let u=pae(l,c);return(u-u%7)/7}],["days",pae]],o={},i=t,s,a;for(let[l,c]of r)n.indexOf(l)>=0&&(s=l,o[l]=c(t,e),a=i.plus(o),a>e?(o[l]--,t=i.plus(o),t>e&&(a=t,o[l]--,t=i.plus(o))):t=a);return[t,o,a,s]}function mae(t,e,n,r){let[o,i,s,a]=yMe(t,e,n),l=e-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(s<e&&(s=o.plus({[a]:1})),s!==o&&(i[a]=(i[a]||0)+l/(s-o)));let u=Kn.fromObject(i,r);return c.length>0?Kn.fromMillis(l,r).shiftTo(...c).plus(u):u}var RI={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},gae={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},bMe=RI.hanidec.replace(/[\[|\]]/g,"").split("");function hae(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(t[n].search(RI.hanidec)!==-1)e+=bMe.indexOf(t[n]);else for(let o in gae){let[i,s]=gae[o];r>=i&&r<=s&&(e+=r-i)}}return parseInt(e,10)}else return e}function hs({numberingSystem:t},e=""){return new RegExp(`${RI[t||"latn"]}${e}`)}var xMe="missing Intl.DateTimeFormat.formatToParts support";function Ht(t,e=n=>n){return{regex:t,deser:([n])=>e(hae(n))}}var CMe="\xA0",bae=`[ ${CMe}]`,xae=new RegExp(bae,"g");function SMe(t){return t.replace(/\./g,"\\.?").replace(xae,bae)}function vae(t){return t.replace(/\./g,"").replace(xae," ").toLowerCase()}function Xs(t,e){return t===null?null:{regex:RegExp(t.map(SMe).join("|")),deser:([n])=>t.findIndex(r=>vae(n)===vae(r))+e}}function yae(t,e){return{regex:t,deser:([,n,r])=>Ap(n,r),groups:e}}function E5(t){return{regex:t,deser:([e])=>e}}function wMe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function EMe(t,e){let n=hs(e),r=hs(e,"{2}"),o=hs(e,"{3}"),i=hs(e,"{4}"),s=hs(e,"{6}"),a=hs(e,"{1,2}"),l=hs(e,"{1,3}"),c=hs(e,"{1,6}"),u=hs(e,"{1,9}"),d=hs(e,"{2,4}"),f=hs(e,"{4,6}"),p=h=>({regex:RegExp(wMe(h.val)),deser:([v])=>v,literal:!0}),g=(h=>{if(t.literal)return p(h);switch(h.val){case"G":return Xs(e.eras("short"),0);case"GG":return Xs(e.eras("long"),0);case"y":return Ht(c);case"yy":return Ht(d,ox);case"yyyy":return Ht(i);case"yyyyy":return Ht(f);case"yyyyyy":return Ht(s);case"M":return Ht(a);case"MM":return Ht(r);case"MMM":return Xs(e.months("short",!0),1);case"MMMM":return Xs(e.months("long",!0),1);case"L":return Ht(a);case"LL":return Ht(r);case"LLL":return Xs(e.months("short",!1),1);case"LLLL":return Xs(e.months("long",!1),1);case"d":return Ht(a);case"dd":return Ht(r);case"o":return Ht(l);case"ooo":return Ht(o);case"HH":return Ht(r);case"H":return Ht(a);case"hh":return Ht(r);case"h":return Ht(a);case"mm":return Ht(r);case"m":return Ht(a);case"q":return Ht(a);case"qq":return Ht(r);case"s":return Ht(a);case"ss":return Ht(r);case"S":return Ht(l);case"SSS":return Ht(o);case"u":return E5(u);case"uu":return E5(a);case"uuu":return Ht(n);case"a":return Xs(e.meridiems(),0);case"kkkk":return Ht(i);case"kk":return Ht(d,ox);case"W":return Ht(a);case"WW":return Ht(r);case"E":case"c":return Ht(n);case"EEE":return Xs(e.weekdays("short",!1),1);case"EEEE":return Xs(e.weekdays("long",!1),1);case"ccc":return Xs(e.weekdays("short",!0),1);case"cccc":return Xs(e.weekdays("long",!0),1);case"Z":case"ZZ":return yae(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return yae(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return E5(/[a-z_+-/]{1,256}?/i);case" ":return E5(/[^\S\n\r]/);default:return p(h)}})(t)||{invalidReason:xMe};return g.token=t,g}var _Me={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function TMe(t,e,n){let{type:r,value:o}=t;if(r==="literal"){let l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}let i=e[r],s=r;r==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=n.hour12?"hour12":"hour24");let a=_Me[s];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function $Me(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function NMe(t,e,n){let r=t.match(e);if(r){let o={},i=1;for(let s in n)if(Dd(n,s)){let a=n[s],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function DMe(t){let e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},n=null,r;return He(t.z)||(n=No.create(t.z)),He(t.Z)||(n||(n=new oo(t.Z)),r=t.Z),He(t.q)||(t.M=(t.q-1)*3+1),He(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),He(t.u)||(t.S=rx(t.u)),[Object.keys(t).reduce((i,s)=>{let a=e(s);return a&&(i[a]=t[s]),i},{}),n,r]}var PI=null;function LMe(){return PI||(PI=St.fromMillis(1555555555555)),PI}function AMe(t,e){if(t.literal)return t;let n=so.macroTokenToFormatOpts(t.val),r=zI(n,e);return r==null||r.includes(void 0)?t:r}function FI(t,e){return Array.prototype.concat(...t.map(n=>AMe(n,e)))}function BI(t,e,n){let r=FI(so.parseFormat(n),t),o=r.map(s=>EMe(s,t)),i=o.find(s=>s.invalidReason);if(i)return{input:e,tokens:r,invalidReason:i.invalidReason};{let[s,a]=$Me(o),l=RegExp(s,"i"),[c,u]=NMe(e,l,a),[d,f,p]=u?DMe(u):[null,null,void 0];if(Dd(u,"a")&&Dd(u,"H"))throw new Ys("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:c,matches:u,result:d,zone:f,specificOffset:p}}}function Cae(t,e,n){let{result:r,zone:o,specificOffset:i,invalidReason:s}=BI(t,e,n);return[r,o,i,s]}function zI(t,e){if(!t)return null;let r=so.create(e,t).dtFormatter(LMe()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(s=>TMe(s,t,i))}var jI="Invalid DateTime",Sae=864e13;function _5(t){return new io("unsupported zone",`the zone "${t.name}" is not supported`)}function VI(t){return t.weekData===null&&(t.weekData=ex(t.c)),t.weekData}function UI(t){return t.localWeekData===null&&(t.localWeekData=ex(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function kp(t,e){let n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new St({...n,...e,old:n})}function Dae(t,e,n){let r=t-e*60*1e3,o=n.offset(r);if(e===o)return[r,e];r-=(o-e)*60*1e3;let i=n.offset(r);return o===i?[r,o]:[t-Math.min(o,i)*60*1e3,Math.max(o,i)]}function T5(t,e){t+=e*60*1e3;let n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function N5(t,e,n){return Dae(c0(t),e,n)}function wae(t,e){let n=t.o,r=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:r,month:o,day:Math.min(t.c.day,f0(r,o))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=Kn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=c0(i),[l,c]=Dae(a,n,t.zone);return s!==0&&(l+=s,c=t.zone.offset(l)),{ts:l,o:c}}function ax(t,e,n,r,o,i){let{setZone:s,zone:a}=n;if(t&&Object.keys(t).length!==0||e){let l=e||a,c=St.fromObject(t,{...n,zone:l,specificOffset:i});return s?c:c.setZone(a)}else return St.invalid(new io("unparsable",`the input "${o}" can't be parsed as ${r}`))}function $5(t,e,n=!0){return t.isValid?so.create(tn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function HI(t,e){let n=t.c.year>9999||t.c.year<0,r="";return n&&t.c.year>=0&&(r+="+"),r+=Hn(t.c.year,n?6:4),e?(r+="-",r+=Hn(t.c.month),r+="-",r+=Hn(t.c.day)):(r+=Hn(t.c.month),r+=Hn(t.c.day)),r}function Eae(t,e,n,r,o,i){let s=Hn(t.c.hour);return e?(s+=":",s+=Hn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(s+=":")):s+=Hn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(s+=Hn(t.c.second),(t.c.millisecond!==0||!r)&&(s+=".",s+=Hn(t.c.millisecond,3))),o&&(t.isOffsetFixed&&t.offset===0&&!i?s+="Z":t.o<0?(s+="-",s+=Hn(Math.trunc(-t.o/60)),s+=":",s+=Hn(Math.trunc(-t.o%60))):(s+="+",s+=Hn(Math.trunc(t.o/60)),s+=":",s+=Hn(Math.trunc(t.o%60)))),i&&(s+="["+t.zone.ianaName+"]"),s}var Lae={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},MMe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},OMe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Aae=["year","month","day","hour","minute","second","millisecond"],IMe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],kMe=["year","ordinal","hour","minute","second","millisecond"];function RMe(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l0(t);return e}function _ae(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return RMe(t)}}function Tae(t,e){let n=Js(e.zone,Ut.defaultZone),r=tn.fromObject(e),o=Ut.now(),i,s;if(He(t.year))i=o;else{for(let c of Aae)He(t[c])&&(t[c]=Lae[c]);let a=TI(t)||$I(t);if(a)return St.invalid(a);let l=n.offset(o);[i,s]=N5(t,l,n)}return new St({ts:i,zone:n,loc:r,o:s})}function $ae(t,e,n){let r=He(n.round)?!0:n.round,o=(s,a)=>(s=u0(s,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(s,a)),i=s=>n.calendary?e.hasSame(t,s)?0:e.startOf(s).diff(t.startOf(s),s).get(s):e.diff(t,s).get(s);if(n.unit)return o(i(n.unit),n.unit);for(let s of n.units){let a=i(s);if(Math.abs(a)>=1)return o(a,s)}return o(t>e?-0:0,n.units[n.units.length-1])}function Nae(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}var St=class t{constructor(e){let n=e.zone||Ut.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new io("invalid input"):null)||(n.isValid?null:_5(n));this.ts=He(e.ts)?Ut.now():e.ts;let o=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[o,i]=[e.old.c,e.old.o];else{let a=n.offset(this.ts);o=T5(this.ts,a),r=Number.isNaN(o.year)?new io("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=e.loc||tn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,n]=Nae(arguments),[r,o,i,s,a,l,c]=n;return Tae({year:r,month:o,day:i,hour:s,minute:a,second:l,millisecond:c},e)}static utc(){let[e,n]=Nae(arguments),[r,o,i,s,a,l,c]=n;return e.zone=oo.utcInstance,Tae({year:r,month:o,day:i,hour:s,minute:a,second:l,millisecond:c},e)}static fromJSDate(e,n={}){let r=Vse(e)?e.valueOf():NaN;if(Number.isNaN(r))return t.invalid("invalid input");let o=Js(n.zone,Ut.defaultZone);return o.isValid?new t({ts:r,zone:o,loc:tn.fromObject(n)}):t.invalid(_5(o))}static fromMillis(e,n={}){if(il(e))return e<-Sae||e>Sae?t.invalid("Timestamp out of range"):new t({ts:e,zone:Js(n.zone,Ut.defaultZone),loc:tn.fromObject(n)});throw new br(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(il(e))return new t({ts:e*1e3,zone:Js(n.zone,Ut.defaultZone),loc:tn.fromObject(n)});throw new br("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};let r=Js(n.zone,Ut.defaultZone);if(!r.isValid)return t.invalid(_5(r));let o=tn.fromObject(n),i=p0(e,_ae),{minDaysInFirstWeek:s,startOfWeek:a}=_I(i,o),l=Ut.now(),c=He(n.specificOffset)?r.offset(l):n.specificOffset,u=!He(i.ordinal),d=!He(i.year),f=!He(i.month)||!He(i.day),p=d||f,m=i.weekYear||i.weekNumber;if((p||u)&&m)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Ys("Can't mix ordinal dates with month/day");let g=m||i.weekday&&!p,h,v,y=T5(l,c);g?(h=IMe,v=MMe,y=ex(y,s,a)):u?(h=kMe,v=OMe,y=w5(y)):(h=Aae,v=Lae);let b=!1;for(let T of h){let N=i[T];He(N)?b?i[T]=v[T]:i[T]=y[T]:b=!0}let S=g?Bse(i,s,a):u?zse(i):TI(i),C=S||$I(i);if(C)return t.invalid(C);let w=g?wI(i,s,a):u?EI(i):i,[E,_]=N5(w,c,r),$=new t({ts:E,zone:r,o:_,loc:o});return i.weekday&&p&&e.weekday!==$.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${$.toISO()}`):$}static fromISO(e,n={}){let[r,o]=rae(e);return ax(r,o,n,"ISO 8601",e)}static fromRFC2822(e,n={}){let[r,o]=oae(e);return ax(r,o,n,"RFC 2822",e)}static fromHTTP(e,n={}){let[r,o]=iae(e);return ax(r,o,n,"HTTP",n)}static fromFormat(e,n,r={}){if(He(e)||He(n))throw new br("fromFormat requires an input string and a format");let{locale:o=null,numberingSystem:i=null}=r,s=tn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[a,l,c,u]=Cae(s,e,n);return u?t.invalid(u):ax(a,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return t.fromFormat(e,n,r)}static fromSQL(e,n={}){let[r,o]=lae(e);return ax(r,o,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new br("need to specify a reason the DateTime is invalid");let r=e instanceof io?e:new io(e,n);if(Ut.throwOnInvalid)throw new d5(r);return new t({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){let r=zI(e,tn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(e,n={}){return FI(so.parseFormat(e),tn.fromObject(n)).map(o=>o.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?VI(this).weekYear:NaN}get weekNumber(){return this.isValid?VI(this).weekNumber:NaN}get weekday(){return this.isValid?VI(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?UI(this).weekday:NaN}get localWeekNumber(){return this.isValid?UI(this).weekNumber:NaN}get localWeekYear(){return this.isValid?UI(this).weekYear:NaN}get ordinal(){return this.isValid?w5(this.c).ordinal:NaN}get monthShort(){return this.isValid?Tc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Tc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Tc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Tc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,n=6e4,r=c0(this.c),o=this.zone.offset(r-e),i=this.zone.offset(r+e),s=this.zone.offset(r-o*n),a=this.zone.offset(r-i*n);if(s===a)return[this];let l=r-s*n,c=r-a*n,u=T5(l,s),d=T5(c,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[kp(this,{ts:l}),kp(this,{ts:c})]:[this]}get isInLeapYear(){return Op(this.year)}get daysInMonth(){return f0(this.year,this.month)}get daysInYear(){return this.isValid?Nd(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mp(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mp(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:n,numberingSystem:r,calendar:o}=so.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(e=0,n={}){return this.setZone(oo.instance(e),n)}toLocal(){return this.setZone(Ut.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=Js(e,Ut.defaultZone),e.equals(this.zone))return this;if(e.isValid){let o=this.ts;if(n||r){let i=e.offset(this.ts),s=this.toObject();[o]=N5(s,i,e)}return kp(this,{ts:o,zone:e})}else return t.invalid(_5(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){let o=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return kp(this,{loc:o})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let n=p0(e,_ae),{minDaysInFirstWeek:r,startOfWeek:o}=_I(n,this.loc),i=!He(n.weekYear)||!He(n.weekNumber)||!He(n.weekday),s=!He(n.ordinal),a=!He(n.year),l=!He(n.month)||!He(n.day),c=a||l,u=n.weekYear||n.weekNumber;if((c||s)&&u)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new Ys("Can't mix ordinal dates with month/day");let d;i?d=wI({...ex(this.c,r,o),...n},r,o):He(n.ordinal)?(d={...this.toObject(),...n},He(n.day)&&(d.day=Math.min(f0(d.year,d.month),d.day))):d=EI({...w5(this.c),...n});let[f,p]=N5(d,this.o,this.zone);return kp(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let n=Kn.fromDurationLike(e);return kp(this,wae(this,n))}minus(e){if(!this.isValid)return this;let n=Kn.fromDurationLike(e).negate();return kp(this,wae(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;let r={},o=Kn.normalizeUnit(e);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break;case"milliseconds":break}if(o==="weeks")if(n){let i=this.loc.getStartOfWeek(),{weekday:s}=this;s<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){let i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?so.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):jI}toLocaleString(e=_d,n={}){return this.isValid?so.create(this.loc.clone(n),e).formatDateTime(this):jI}toLocaleParts(e={}){return this.isValid?so.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;let s=e==="extended",a=HI(this,s);return a+="T",a+=Eae(this,s,n,r,o,i),a}toISODate({format:e="extended"}={}){return this.isValid?HI(this,e==="extended"):null}toISOWeekDate(){return $5(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:s="extended"}={}){return this.isValid?(o?"T":"")+Eae(this,s==="extended",n,e,r,i):null}toRFC2822(){return $5(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return $5(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?HI(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||e)&&(r&&(o+=" "),n?o+="z":e&&(o+="ZZ")),$5(this,o,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():jI}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Kn.invalid("created by diffing an invalid DateTime");let o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=Use(n).map(Kn.normalizeUnit),s=e.valueOf()>this.valueOf(),a=s?this:e,l=s?e:this,c=mae(a,l,i,o);return s?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(t.now(),e,n)}until(e){return this.isValid?_c.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;let o=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let n=e.base||t.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0,o=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(o=e.unit,i=void 0),$ae(n,this.plus(r),{...e,numeric:"always",units:o,unit:i})}toRelativeCalendar(e={}){return this.isValid?$ae(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new br("min requires all arguments be DateTimes");return NI(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new br("max requires all arguments be DateTimes");return NI(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){let{locale:o=null,numberingSystem:i=null}=r,s=tn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return BI(s,e,n)}static fromStringExplain(e,n,r={}){return t.fromFormatExplain(e,n,r)}static get DATE_SHORT(){return _d}static get DATE_MED(){return Ob}static get DATE_MED_WITH_WEEKDAY(){return aI}static get DATE_FULL(){return Ib}static get DATE_HUGE(){return kb}static get TIME_SIMPLE(){return Rb}static get TIME_WITH_SECONDS(){return Pb}static get TIME_WITH_SHORT_OFFSET(){return Fb}static get TIME_WITH_LONG_OFFSET(){return Bb}static get TIME_24_SIMPLE(){return zb}static get TIME_24_WITH_SECONDS(){return jb}static get TIME_24_WITH_SHORT_OFFSET(){return Vb}static get TIME_24_WITH_LONG_OFFSET(){return Ub}static get DATETIME_SHORT(){return Hb}static get DATETIME_SHORT_WITH_SECONDS(){return Kb}static get DATETIME_MED(){return Wb}static get DATETIME_MED_WITH_SECONDS(){return Gb}static get DATETIME_MED_WITH_WEEKDAY(){return lI}static get DATETIME_FULL(){return Yb}static get DATETIME_FULL_WITH_SECONDS(){return Zb}static get DATETIME_HUGE(){return qb}static get DATETIME_HUGE_WITH_SECONDS(){return Jb}};function C0(t){if(St.isDateTime(t))return t;if(t&&t.valueOf&&il(t.valueOf()))return St.fromJSDate(t);if(t&&typeof t=="object")return St.fromObject(t);throw new br(`Unknown datetime argument: ${t}, of type ${typeof t}`)}function D5(t){return t.reduce((e,{field:n,operator:r,value:o})=>{if(!n||!r)return e;if(n==="updated_at"&&(n="modified"),n==="created_at"&&(n="created"),r==="def")return{...e,[`${n}[def]`]:"true"};if(r==="ndef")return{...e,[`${n}[def]`]:"false"};if(r==="checked")return{...e,[`${n}[eq]`]:"true"};if(r==="nchecked")return{...e,[`${n}[eq]`]:"false"};if(typeof o>"u"||o===null||o===""||Array.isArray(o)&&o.length<1)return e;if(r==="between"||r==="sys-date-between")if(Array.isArray(o)&&o.length===2){if(r==="between")return{...e,[`${n}[gte]`]:o[0],[`${n}[lte]`]:o[1]};{let i=St.fromISO(o[0],{zone:"system"}).setZone("utc").toISO(),s=St.fromISO(o[1],{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i&&s?{...e,[`${n}[gte]`]:i,[`${n}[lt]`]:s}:e}}else return e;if(r==="sys-date-eq")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).setZone("utc").toISO(),s=St.fromISO(o,{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i&&s?{...e,[`${n}[gte]`]:i,[`${n}[lt]`]:s}:e}else return e;if(r==="sys-date-gt")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i?{...e,[`${n}[gte]`]:i}:e}else return e;if(r==="sys-date-gte")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).setZone("utc").toISO();return i?{...e,[`${n}[gte]`]:i}:e}else return e;if(r==="sys-date-lt")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).setZone("utc").toISO();return i?{...e,[`${n}[lt]`]:i}:e}else return e;if(r==="sys-date-lte")if(typeof o=="string"){let i=St.fromISO(o,{zone:"system"}).plus({day:1}).setZone("utc").toISO();return i?{...e,[`${n}[lt]`]:i}:e}else return e;if(r==="starts"&&typeof o=="string")return{...e,[`${n}[starts]`]:o.replaceAll(/[^a-zA-Z0-9_.\s-]/g,"").toLowerCase()};if(n==="workflowStageId"){let i=t.some(s=>s.field==="workflowId");if(r==="eq"||r==="neq"){let s=[];return Array.isArray(o)?s=o.map(l=>l.split("_")[1]):s=o.split("_"),{...e,...i?{}:{"workflowId[eq]":s[0]},[`${n}[${r}]`]:s[1]}}if(Array.isArray(o)){let s=o.map(c=>{let u=c.split("_")[0],d=c.split("_")[1];return{workflowId:u,workflowStage:d}}),a=s.map(c=>c.workflowId).join(","),l=s.map(c=>c.workflowStage).join(",");return{...e,...i?{}:{[`workflowId[${r}]`]:a},[`${n}[${r}]`]:l}}}return{...e,[`${n}[${r}]`]:Array.isArray(o)?o.join(","):o}},{})}import{CANVAS_DRAFT_STATE as Mae,CanvasClient as Oae}from"@uniformdev/canvas";async function L5({instanceType:t,searchExpressionPrompt:e,username:n,locale:r,getEditUrl:o,env:i}){let s=new Oae(i),a=await u5({searchExpressionPrompt:e,username:n,locale:r},t,i),{limit:l,offset:c,keyword:u,sort:d,filter:f}=a,m=(await s.getCompositionList({patternType:t==="composition"?void 0:t==="componentPattern"?"component":"composition",pattern:t!=="composition",resolveData:!1,withComponentIDs:!0,skipOverridesResolution:!0,limit:l,offset:c,search:u,filters:f?D5(f):void 0,orderBy:Array.isArray(d)?d:d?[d]:void 0,locale:r,skipPatternResolution:!0,state:Mae})).compositions.map(g=>({id:g.composition._id,name:g.composition._name,componentType:g.composition.type,editUrl:o(g.composition._id)}));return{content:[{type:"text",text:JSON.stringify({results:m,criteria:a},null,2)}]}}async function A5({id:t,env:e}){let r=await new Oae(e).getCompositionById({skipDataResolution:!0,withComponentIDs:!0,skipOverridesResolution:!0,skipPatternResolution:!1,compositionId:t,state:Mae});return{content:[{type:"text",text:JSON.stringify(r,null,2)}]}}var PMe={id:Iae.string()};function kae(t,e){t.tool("compositionList","Lists available Uniform compositions",Sc.shape,async n=>await L5({...n,instanceType:"composition",getEditUrl:r=>c5(r,e),env:e})),t.tool("compositionGet","Gets the full contents of a Uniform composition",PMe,async n=>await A5({...n,env:e}))}import{autoFixParameterGroups as Fae,ContentClient as FMe}from"@uniformdev/canvas";import*as O5 from"zod/v3";import*as Md from"zod/v3";var Rae=Md.object({name:Md.string().describe('Title-cased display name of the component. Ex: "Hero"'),id:Md.string().describe("Public ID of the content type, the camelCase version of name, using only alphanumeric characters"),description:Md.string().describe("Describe the purpose of the content type in 1-2 sentences."),fields:Md.array(Cx).describe("The fields of the content type. The key is the publicId of the field.").optional()});function Pae(t){let e=t.fields?.find(r=>r.type==="asset"&&typeof r.typeConfig=="object"&&r.typeConfig!==null&&"allowedTypes"in r.typeConfig&&Array.isArray(r.typeConfig.allowedTypes)&&r.typeConfig.allowedTypes?.includes("image"))?.id,n=t.fields?.find(r=>r.type==="text")?.id;return{...t,thumbnailField:e,entryName:n}}function M5(t,e){return`${e.baseWebUrl}/dashboards/canvas/content-types/${t}`}var BMe={action:O5.enum(["create","update","delete"]).describe("The action to perform"),publicId:O5.string().describe("Public ID of the component, the camelCase version of name, using only alphanumeric characters"),contentType:Rae.describe("Full content type definition to create. Omit for update or delete.").optional(),patches:bx.describe("JSON patch to apply to the existing component definition. Omit for create or delete.").optional()};function Bae(t,e){t.tool("contentTypeAction","Creates, updates, or deletes a Uniform Content Type definition",BMe,async({publicId:n,action:r,contentType:o,patches:i})=>{let s=new FMe(e),a=!1;if(r==="create"){if(!o)throw new Error("Content type definition is required for create");let l=Pae(o);l.fields&&(a=Fae(l.fields),Fp(l.fields)),await s.upsertContentType({contentType:l})}if(r==="update"){if(!i)throw new Error("Patches are required for update");let c=(await s.getContentTypes()).contentTypes.find(f=>f.id===n);if(!c)throw new Error(`Content Type with public ID ${n} does not exist, try creating it instead`);let u=c.fields?.filter(f=>f.type==="richText").map(f=>f.id),d=yx(c,i);if(d.fields){a=Fae(d.fields);let f=d.fields?.filter(p=>p.type==="richText").map(p=>p.id).filter(p=>!u?.includes(p));Fp(d.fields,f)}await s.upsertContentType({contentType:d})}return r==="delete"&&await s.deleteContentType({contentTypeId:n}),{content:[{type:"text",text:JSON.stringify({success:!0,editUrl:M5(n,e),warning:a?"Issues with field group order were fixed. Ensure definition data is re-fetched before any future updates.":void 0},null,2)}]}})}import{ContentClient as zae}from"@uniformdev/canvas";import*as jae from"zod/v3";var zMe={id:jae.string()};function Vae(t,e){t.tool("contentTypeList","Lists all Uniform Content Type definitions",async()=>{let o=(await new zae(e).getContentTypes()).contentTypes.map(i=>({id:i.id,name:i.name,description:i.description,editUrl:M5(i.id,e)}));return{content:[{type:"text",text:JSON.stringify(o,null,2)}]}}),t.tool("contentTypeGet","Gets a Uniform Content Type definition details (fields, etc.)",zMe,async({id:n})=>{let i=(await new zae(e).getContentTypes()).contentTypes.find(s=>s.id===n);if(!i)throw new Error(`Content Type with ID ${n} not found`);return{content:[{type:"text",text:JSON.stringify(i,null,2)}]}})}import{v4 as jMe}from"uuid";function Uae(t,e){t.tool("createUuid","Creates a new random UUID",async()=>({content:[{type:"text",text:jMe()}]}))}import*as lx from"zod/v3";import{CANVAS_DRAFT_STATE as I5,ContentClient as VMe,convertEntryToPutEntry as UMe,getEffectivePropertyValue as HMe}from"@uniformdev/canvas";async function KMe(t,e,n){let o=(await e.fetchDefinitions())[t.entry.type];if(!o)throw new Error("insanity");let i=Xie(o),s;i.entryName&&(s=t.entry._overrides?.[t.entry._id].parameters?.[i.entryName]??t.entry.fields?.[i.entryName]);let a=HMe({conditionIndex:-1,locale:"__any__",greedyLocaleMatching:!0,property:s}),l=Aie({value:a,isNew:n,contentType:i});t.entry._name=l}async function k5({action:t,id:e,instructions:n,isPattern:r,patternId:o,getEditUrl:i,env:s}){let a=new VMe(s),l,c,u=t==="update"?e:void 0,d={success:!0,actionsTaken:[]};if(t==="duplicate"){let p=(await a.getEntries({entryIDs:[e],pattern:r,state:I5,skipDataResolution:!0,skipPatternResolution:!1,withComponentIDs:!0,skipOverridesResolution:!0})).entries[0];if(!p)throw new Error("Entry not found");let m=crypto.randomUUID(),g={...p.entry,_id:m,_name:`${p.entry._name} (copy)`};g._slug&&(g._slug=`${g._slug}-copy${g._slug?.endsWith("/")?"/":""}`),delete g._thumbnail;let h=Lb({...p,entry:g});l=new ol(h.composition),e=m}else if(t==="create"){if(!n)throw new Error("Instructions are required for create");if(!n.type)throw new Error("Type is required for create");o?(await a.upsertEntry({state:I5,entry:{type:n.type,_id:e,fields:{},_pattern:o}}),u=e):l=new ol({_id:e,_name:"New Entry",type:n.type,_overridability:{hideLockedParameters:!0}})}if(u){if(c=(await a.getEntries({entryIDs:[e],pattern:r,state:I5,skipDataResolution:!0,skipPatternResolution:!1,withComponentIDs:!0,skipOverridesResolution:!0})).entries[0],!c)throw new Error("Entry not found");let p=Lb(c);l=new ol(p.composition)}t==="delete"&&await a.deleteEntry({entryId:e});let f=Cse(s);if(l){t!=="duplicate"&&(await s5(n?.localeUpdates?.enableLocales,s),d=await JE({twee:l,descriptionUpdate:void 0,slugUpdate:n&&"slug"in n?n.slug:void 0,nameUpdate:n&&"name"in n?n.name:void 0,propertyUpdates:n?.fieldUpdates??[],dataResourceUpdates:(n&&"dataResourceUpdates"in n?n.dataResourceUpdates:[])??[],slotUpdates:{},localeUpdates:n?.localeUpdates,currentEditorLocale:void 0,referenceData:f,isEditingPattern:r,domParser:i5}));let p=l.exportTree(),m=l.exportMetadata(),g=UMe(Qie(p,c??{projectId:s.projectId,pattern:r},m,I5,c?.releaseId,c?.editionId));r||await KMe(g,f,t==="create"),await a.upsertEntry(g)}return{content:[{type:"text",text:JSON.stringify({...d,editUrl:i(e)},null,2)}]}}function R5(t,e){return`${e.baseWebUrl}/dashboards/canvas/entries/${t}`}var WMe={action:lx.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:lx.string().uuid().describe("UUID of the entry to create, update, delete, or duplicate"),patternId:lx.string().uuid().describe("Entry pattern ID to create the entry from. Omit when not creating, or when creating an entry without an entry pattern.").optional(),instructions:xk.describe("Modification instructions for the entry. Omit for delete and duplicate.").optional()};function Hae(t,e){t.tool("entryAction","Creates, updates, or deletes a Uniform Entry",WMe,async n=>await k5({...n,isPattern:!1,getEditUrl:r=>R5(r,e),patternId:n.patternId,env:e}))}import*as Gae from"zod/v3";import{CANVAS_DRAFT_STATE as Kae,ContentClient as Wae}from"@uniformdev/canvas";async function P5({isPattern:t,searchExpressionPrompt:e,username:n,locale:r,getEditUrl:o,env:i}){let s=new Wae(i),a=await u5({searchExpressionPrompt:e,username:n,locale:r},t?"entryPattern":"entry",i),{limit:l,offset:c,keyword:u,sort:d,filter:f}=a,m=(await s.getEntries({limit:l,offset:c,pattern:t,skipDataResolution:!0,withTotalCount:!0,skipPatternResolution:!0,skipOverridesResolution:!0,state:Kae,search:u,filters:f?D5(f):void 0,orderBy:Array.isArray(d)?d:d?[d]:void 0,locale:r})).entries.map(g=>({id:g.entry._id,name:g.entry._name??"",contentType:g.entry.type,editUrl:o(g.entry._id)}));return{content:[{type:"text",text:JSON.stringify({results:m,criteria:a},null,2)}]}}async function F5({id:t,isPattern:e,env:n}){let o=await new Wae(n).getEntries({skipDataResolution:!0,withComponentIDs:!0,skipOverridesResolution:!0,skipPatternResolution:!1,pattern:e,entryIDs:[t],state:Kae});if(o.entries.length===0)throw new Error(`Entry with ID ${t} not found`);return{content:[{type:"text",text:JSON.stringify(o.entries[0],null,2)}]}}var GMe={id:Gae.string()};function Yae(t,e){t.tool("entryList","Lists available Uniform entries",Sc.shape,async n=>await P5({...n,isPattern:!1,getEditUrl:r=>R5(r,e),env:e})),t.tool("entryGet","Gets the full contents of a Uniform entry",GMe,async n=>await F5({...n,isPattern:!1,env:e}))}import*as z5 from"zod/v3";function B5(t,e){return`${e.baseWebUrl}/dashboards/canvas/entry-patterns/${t}`}var YMe={action:z5.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:z5.string().uuid().describe("UUID of the entry pattern to create, update, delete, or duplicate"),instructions:Ck.describe("Modification instructions for the entry pattern. Omit for delete and duplicate.").optional()};function Zae(t,e){t.tool("entryPatternAction","Creates, updates, or deletes a Uniform Entry Pattern",YMe,async n=>await k5({...n,isPattern:!0,getEditUrl:r=>B5(r,e),patternId:void 0,env:e}))}import*as qae from"zod/v3";var ZMe={id:qae.string()};function Jae(t,e){t.tool("entryPatternList","Lists available Uniform entry patterns",Sc.shape,async n=>await P5({...n,isPattern:!0,getEditUrl:r=>B5(r,e),env:e})),t.tool("entryPatternGet","Gets the full contents of a Uniform entry pattern",ZMe,async n=>await F5({...n,isPattern:!0,env:e}))}import{ProjectClient as qMe}from"@uniformdev/canvas";async function JMe(t){let e=await fetch(`${t.apiHost}/api/v1/member-profile`,{headers:{"x-api-key":t.apiKey,"Content-Type":"application/json"}});if(!e.ok)throw new Error(`Failed to fetch user profile: ${e.status} ${e.statusText}`);return(await e.json()).name}function Xae(t,e){t.tool("getUniformEnvironment","Get the connected Uniform Project name, edit URL, and current user",{},async()=>{try{let n=new qMe(e),[r,o]=await Promise.all([n.get({projectId:e.projectId}),JMe(e)]),i={projectName:r.name,teamName:r.teamName,projectUrl:e.baseWebUrl,currentIdentity:o};return{content:[{type:"text",text:JSON.stringify(i,null,2)}]}}catch(n){return{content:[{type:"text",text:JSON.stringify({error:"Failed to fetch project information",details:n instanceof Error?n.message:"Unknown error"},null,2)}]}}})}import{LocaleClient as XMe}from"@uniformdev/canvas";function Qae(t,e){t.tool("localeList","Lists all registered Uniform locales",async()=>{let r=await new XMe(e).get();return{content:[{type:"text",text:JSON.stringify({locales:r.results,editUrl:`${e.baseWebUrl}/settings/localization`},null,2)}]}})}import*as V5 from"zod/v3";function j5(t,e){return`${e.baseWebUrl}/dashboards/canvas/edit/${t}`}var QMe={action:V5.enum(["create","update","delete","duplicate"]).describe("The action to perform"),id:V5.string().uuid().describe("UUID of the pattern instance to create, update, delete, or duplicate"),instructions:yk.describe("Modification instructions for the pattern. Omit for delete and duplicate.").optional()};function ele(t,e){t.tool("patternAction","Creates, updates, or deletes a Uniform Component Pattern or Composition Pattern",QMe,async n=>await l5({...n,isPattern:!0,getEditUrl:r=>j5(r,e),patternId:void 0,env:e}))}import*as U5 from"zod/v3";var eOe={instanceType:U5.enum(["componentPattern","compositionPattern"]),...Sc.shape},tOe={id:U5.string()};function tle(t,e){t.tool("patternList","Lists available Uniform component patterns or composition patterns",eOe,async n=>await L5({...n,getEditUrl:r=>j5(r,e),env:e})),t.tool("patternGet","Gets the full contents of a Uniform component pattern or composition pattern",tOe,async n=>await A5({...n,env:e}))}import{ProjectMapClient as nOe}from"@uniformdev/project-map";import*as nle from"zod/v3";var rOe={query:nle.string().describe("Keyword to search for in node names and paths.")};function rle(t,e){t.tool("projectMapNodeSearch","Search for project map nodes by keyword. Use this to find the appropriate parent node when you need to create a composition attached to a specific location in the project map hierarchy.",rOe,async({query:n})=>{let r=new nOe({apiKey:e.apiKey,apiHost:e.apiHost,projectId:e.projectId}),i=(await r.getProjectMapDefinition({}))?.projectMaps[0]?.id;if(!i)throw new Error("No project map found for this project");let a=(await r.getNodes({search:n,includeAncestors:!1,expanded:!0,depth:1,projectMapId:i})).nodes?.map(l=>({id:l.id,name:l.name,path:l.path}))??[];return{content:[{type:"text",text:JSON.stringify({matches:a},null,2)}]}})}function ole(t,e){lk(t,e),mk(t,e),vk(t,e),Bae(t,e),Vae(t,e),Hae(t,e),Yae(t,e),Jae(t,e),Zae(t,e),tle(t,e),ele(t,e),Sse(t,e),kae(t,e),Uae(t,e),Xae(t,e),Qae(t,e),rle(t,e)}var ile=new oOe({name:"Uniform MCP",version:mx.version});ole(ile,sk);var sOe=new iOe;await ile.connect(sOe);process.stderr.write(`Uniform MCP server started
|
|
5840
5848
|
`);
|
|
5841
5849
|
/*! Bundled license information:
|
|
5842
5850
|
|