@paroicms/site-generator-plugin 0.24.0 → 0.24.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.
@@ -66,14 +66,15 @@ function templateOfMainMenu(ctx) {
66
66
  const menuItems = homeType.routingChildren?.filter((typeName) => typeName !== "search" && typeName !== "searchPage");
67
67
  if (!menuItems || menuItems.length === 0)
68
68
  return;
69
- const variableTemplates = menuItems.map((typeName) => `{% getDoc ${typeName} id: site.home.${typeName}.id %}`);
70
- const itemTemplates = menuItems.map((typeName) => `<a
71
- data-menu-item-id="{{ ${typeName}.id }}"
72
- href="{{ ${typeName}.url }}">
73
- {{ ${typeName}.title }}
74
- </a>`);
75
- return `${variableTemplates.join("\n")}
76
- <nav
69
+ const itemTemplates = menuItems.map((typeName) => `{% if site.home.${typeName} %}
70
+ {% assign ${typeName} = site.home.${typeName}.doc %}
71
+ <a
72
+ data-menu-item-id="{{ ${typeName}.id }}"
73
+ href="{{ ${typeName}.url }}">
74
+ {{ ${typeName}.title }}
75
+ </a>
76
+ {% endif %}`);
77
+ return `<nav
77
78
  data-activate-menu-items="{{ doc.id | activateMenuItemsData }}"
78
79
  data-mobile-menu-part="content"
79
80
  data-mobile-menu-action="move">
@@ -87,11 +88,13 @@ function templateOfSearchOpener(ctx) {
87
88
  if (!typeName)
88
89
  return;
89
90
  return `<div class="Row center">
90
- {% getDoc ${typeName} id: site.home.${typeName}.id %}
91
- <span
92
- data-effect="paSearchOpener"
93
- data-search-url="{{ ${typeName}.url }}"
94
- data-icon-color="#fff"></span>
91
+ {% if site.home.${typeName} %}
92
+ {% assign ${typeName} = site.home.${typeName}.doc %}
93
+ <span
94
+ data-effect="paSearchOpener"
95
+ data-search-url="{{ ${typeName}.url }}"
96
+ data-icon-color="#fff"></span>
97
+ {% endif %}
95
98
  <div data-mobile-menu="button"></div>
96
99
  </div>`;
97
100
  }
@@ -99,22 +99,26 @@ function templateOfRoutingChild(ctx, child, parentIdKeyProvider) {
99
99
  const { typeName, regularChildrenSorting } = child;
100
100
  const variableName = `${typeName}Doc`;
101
101
  const idKeyProvider = parentIdKeyProvider.createForRoutingChild(typeName);
102
- const idKey = idKeyProvider.idKey;
102
+ const key = idKeyProvider.key;
103
103
  if (!hasTemporalChildren(siteSchema, child) || regularChildrenSorting !== "publishDate desc") {
104
- const buttonTemplate = `{% getDoc ${variableName} id: ${idKey} %}
105
- <a class="Button" href="{{ ${variableName}.url }}">{{ ${variableName}.title }}</a>`;
104
+ const buttonTemplate = `{% if ${key} %}
105
+ {% assign ${variableName} = ${key}.doc %}
106
+ <a class="Button" href="{{ ${variableName}.url }}">{{ ${variableName}.title }}</a>
107
+ {% endif %}`;
106
108
  return buttonTemplate;
107
109
  }
108
110
  const tilesTemplate = templateOfRegularDocumentTiles(ctx, child, idKeyProvider, {
109
111
  mode: "sampleOnly",
110
112
  });
111
- return `{% getDoc ${variableName} id: ${idKey} %}
113
+ return `{% if ${key} %}
114
+ {% assign ${variableName} = ${key}.doc %}
112
115
  <div class="Pt">
113
116
  <h2>
114
117
  <a class="TextLink" href="{{ ${variableName}.url }}">{{ ${variableName}.title }}</a>
115
118
  </h2>
116
119
  ${indent(tilesTemplate, 1, { skipFirst: true })}
117
- </div>`;
120
+ </div>
121
+ {% endif %}`;
118
122
  }
119
123
  function templateOfRegularDocumentTiles(ctx, parentType, parentIdKeyProvider, { mode }) {
120
124
  const { siteSchema, addLiquidFile } = ctx;
@@ -1,14 +1,16 @@
1
1
  export function createIdKeyProvider() {
2
2
  return {
3
+ key: "doc",
3
4
  idKey: "doc.id",
4
- getChildRoutingIdKey: (typeName) => `doc.routingIds.${typeName}.id`,
5
- createForRoutingChild: (routingTypeName) => createChildIdKeyProvider(`doc.routingIds.${routingTypeName}`),
5
+ getChildRoutingKey: (typeName) => `doc.routing.${typeName}`,
6
+ createForRoutingChild: (routingTypeName) => createChildIdKeyProvider(`doc.routing.${routingTypeName}`),
6
7
  };
7
8
  }
8
9
  function createChildIdKeyProvider(key) {
9
10
  return {
11
+ key,
10
12
  idKey: `${key}.id`,
11
- getChildRoutingIdKey: (typeName) => `${key}.${typeName}.id`,
13
+ getChildRoutingKey: (typeName) => `${key}.${typeName}`,
12
14
  createForRoutingChild: (typeName) => createChildIdKeyProvider(`${key}.${typeName}`),
13
15
  };
14
16
  }
@@ -181,6 +181,8 @@ MissingTemplate:
181
181
  RemoteAsset:
182
182
  enabled: false
183
183
  UnknownFilter:
184
+ enabled: false
185
+ VariableName:
184
186
  enabled: false`;
185
187
  }
186
188
  async function ensureDirectory(dirPath, { recursive = false } = {}) {
@@ -113,10 +113,10 @@ ${i}</tr>
113
113
  `}tablecell(i){const n=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+n+`</${r}>
114
114
  `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Pt(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:n,tokens:r}){const s=this.parser.parseInline(r),o=tm(i);if(o===null)return s;i=o;let f='<a href="'+i+'"';return n&&(f+=' title="'+Pt(n)+'"'),f+=">"+s+"</a>",f}image({href:i,title:n,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));const o=tm(i);if(o===null)return Pt(r);i=o;let f=`<img src="${i}" alt="${r}"`;return n&&(f+=` title="${Pt(n)}"`),f+=">",f}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Pt(i.text)}},pc=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},ma=class Zo{constructor(n){Oe(this,"options");Oe(this,"renderer");Oe(this,"textRenderer");this.options=n||mn,this.options.renderer=this.options.renderer||new ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pc}static parse(n,r){return new Zo(r).parse(n)}static parseInline(n,r){return new Zo(r).parseInline(n)}parse(n,r=!0){var o,f;let s="";for(let p=0;p<n.length;p++){const h=n[p];if((f=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&f[h.type]){const d=h,v=this.options.extensions.renderers[d.type].call({parser:this},d);if(v!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){s+=v||"";continue}}const m=h;switch(m.type){case"space":{s+=this.renderer.space(m);continue}case"hr":{s+=this.renderer.hr(m);continue}case"heading":{s+=this.renderer.heading(m);continue}case"code":{s+=this.renderer.code(m);continue}case"table":{s+=this.renderer.table(m);continue}case"blockquote":{s+=this.renderer.blockquote(m);continue}case"list":{s+=this.renderer.list(m);continue}case"html":{s+=this.renderer.html(m);continue}case"paragraph":{s+=this.renderer.paragraph(m);continue}case"text":{let d=m,v=this.renderer.text(d);for(;p+1<n.length&&n[p+1].type==="text";)d=n[++p],v+=`
115
115
  `+this.renderer.text(d);r?s+=this.renderer.paragraph({type:"paragraph",raw:v,text:v,tokens:[{type:"text",raw:v,text:v,escaped:!0}]}):s+=v;continue}default:{const d='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return s}parseInline(n,r=this.renderer){var o,f;let s="";for(let p=0;p<n.length;p++){const h=n[p];if((f=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&f[h.type]){const d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){s+=d||"";continue}}const m=h;switch(m.type){case"escape":{s+=r.text(m);break}case"html":{s+=r.html(m);break}case"link":{s+=r.link(m);break}case"image":{s+=r.image(m);break}case"strong":{s+=r.strong(m);break}case"em":{s+=r.em(m);break}case"codespan":{s+=r.codespan(m);break}case"br":{s+=r.br(m);break}case"del":{s+=r.del(m);break}case"text":{s+=r.text(m);break}default:{const d='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return s}},Mo,Xr=(Mo=class{constructor(i){Oe(this,"options");Oe(this,"block");this.options=i||mn}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?pa.lex:pa.lexInline}provideParser(){return this.block?ma.parse:ma.parseInline}},Oe(Mo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mo),fN=class{constructor(...i){Oe(this,"defaults",rc());Oe(this,"options",this.setOptions);Oe(this,"parse",this.parseMarkdown(!0));Oe(this,"parseInline",this.parseMarkdown(!1));Oe(this,"Parser",ma);Oe(this,"Renderer",ts);Oe(this,"TextRenderer",pc);Oe(this,"Lexer",pa);Oe(this,"Tokenizer",es);Oe(this,"Hooks",Xr);this.use(...i)}walkTokens(i,n){var s,o;let r=[];for(const f of i)switch(r=r.concat(n.call(this,f)),f.type){case"table":{const p=f;for(const h of p.header)r=r.concat(this.walkTokens(h.tokens,n));for(const h of p.rows)for(const m of h)r=r.concat(this.walkTokens(m.tokens,n));break}case"list":{const p=f;r=r.concat(this.walkTokens(p.items,n));break}default:{const p=f;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[p.type]?this.defaults.extensions.childTokens[p.type].forEach(h=>{const m=p[h].flat(1/0);r=r.concat(this.walkTokens(m,n))}):p.tokens&&(r=r.concat(this.walkTokens(p.tokens,n)))}}return r}use(...i){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(r=>{const s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const f=n.renderers[o.name];f?n.renderers[o.name]=function(...p){let h=o.renderer.apply(this,p);return h===!1&&(h=f.apply(this,p)),h}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const f=n[o.level];f?f.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),s.extensions=n),r.renderer){const o=this.defaults.renderer||new ts(this.defaults);for(const f in r.renderer){if(!(f in o))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;const p=f,h=r.renderer[p],m=o[p];o[p]=(...d)=>{let v=h.apply(o,d);return v===!1&&(v=m.apply(o,d)),v||""}}s.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new es(this.defaults);for(const f in r.tokenizer){if(!(f in o))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;const p=f,h=r.tokenizer[p],m=o[p];o[p]=(...d)=>{let v=h.apply(o,d);return v===!1&&(v=m.apply(o,d)),v}}s.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Xr;for(const f in r.hooks){if(!(f in o))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;const p=f,h=r.hooks[p],m=o[p];Xr.passThroughHooks.has(f)?o[p]=d=>{if(this.defaults.async)return Promise.resolve(h.call(o,d)).then(S=>m.call(o,S));const v=h.call(o,d);return m.call(o,v)}:o[p]=(...d)=>{let v=h.apply(o,d);return v===!1&&(v=m.apply(o,d)),v}}s.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,f=r.walkTokens;s.walkTokens=function(p){let h=[];return h.push(f.call(this,p)),o&&(h=h.concat(o.call(this,p))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,n){return pa.lex(i,n??this.defaults)}parser(i,n){return ma.parse(i,n??this.defaults)}parseMarkdown(i){return(r,s)=>{const o={...s},f={...this.defaults,...o},p=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&o.async===!1)return p(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return p(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return p(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));f.hooks&&(f.hooks.options=f,f.hooks.block=i);const h=f.hooks?f.hooks.provideLexer():i?pa.lex:pa.lexInline,m=f.hooks?f.hooks.provideParser():i?ma.parse:ma.parseInline;if(f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(r):r).then(d=>h(d,f)).then(d=>f.hooks?f.hooks.processAllTokens(d):d).then(d=>f.walkTokens?Promise.all(this.walkTokens(d,f.walkTokens)).then(()=>d):d).then(d=>m(d,f)).then(d=>f.hooks?f.hooks.postprocess(d):d).catch(p);try{f.hooks&&(r=f.hooks.preprocess(r));let d=h(r,f);f.hooks&&(d=f.hooks.processAllTokens(d)),f.walkTokens&&this.walkTokens(d,f.walkTokens);let v=m(d,f);return f.hooks&&(v=f.hooks.postprocess(v)),v}catch(d){return p(d)}}}onError(i,n){return r=>{if(r.message+=`
116
- Please report this to https://github.com/markedjs/marked.`,i){const s="<p>An error occurred:</p><pre>"+Pt(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},dn=new fN;function Re(i,n){return dn.parse(i,n)}Re.options=Re.setOptions=function(i){return dn.setOptions(i),Re.defaults=dn.defaults,km(Re.defaults),Re};Re.getDefaults=rc;Re.defaults=mn;Re.use=function(...i){return dn.use(...i),Re.defaults=dn.defaults,km(Re.defaults),Re};Re.walkTokens=function(i,n){return dn.walkTokens(i,n)};Re.parseInline=dn.parseInline;Re.Parser=ma;Re.parser=ma.parse;Re.Renderer=ts;Re.TextRenderer=pc;Re.Lexer=pa;Re.lexer=pa.lex;Re.Tokenizer=es;Re.Hooks=Xr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;ma.parse;pa.lex;function dN(i){if(!i)return"";try{return Re.parse(i,{async:!1,gfm:!0,breaks:!0})}catch(n){return console.error("Error rendering markdown:",n),i}}function Ni({content:i,title:n,variant:r="default",className:s="",children:o}){const f=["Explanation",`Explanation-${r}`,s].filter(Boolean).join(" ");return b.jsxs("div",{className:f,children:[n&&b.jsx("h3",{className:"Explanation-title",children:n}),b.jsx("div",{className:"Explanation-content markdown-content",dangerouslySetInnerHTML:{__html:dN(i)}}),o]})}function hN({isOpen:i,title:n,message:r,confirmLabel:s,cancelLabel:o,onConfirm:f,onCancel:p}){const{t:h}=ot(),[m,d]=w.useState(!0);if(!i)return null;const v=async()=>{await f({withSampleData:m})},S=x=>{x.key==="Escape"&&p()};return b.jsxs("div",{className:"ConfirmDialog",children:[b.jsx("div",{className:"ConfirmDialog-backdrop",onClick:p,onKeyDown:S,tabIndex:0,role:"button","aria-label":"Close dialog"}),b.jsxs("div",{className:"ConfirmDialog-container",children:[b.jsx("div",{className:"ConfirmDialog-header",children:b.jsx("h3",{className:"ConfirmDialog-title",children:n})}),b.jsxs("div",{className:"ConfirmDialog-body",children:[b.jsx("p",{children:r}),b.jsx("div",{className:"ConfirmDialog-checkbox mt-3",children:b.jsxs("label",{children:[b.jsx("input",{type:"checkbox",checked:m,onChange:x=>d(x.target.checked)}),b.jsx("span",{className:"ml-2",children:h("generateSiteWithData")})]})})]}),b.jsxs("div",{className:"ConfirmDialog-footer",children:[b.jsx(rt,{onClick:p,severity:"secondary",className:"ConfirmDialog-button",children:o||h("cancel")}),b.jsx(rt,{onClick:v,className:"ConfirmDialog-button",children:s||h("confirm")})]})]})]})}function U(){return U=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var s in r)({}).hasOwnProperty.call(r,s)&&(i[s]=r[s])}return i},U.apply(null,arguments)}function ge(i,n){if(i==null)return{};var r={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(n.indexOf(s)!==-1)continue;r[s]=i[s]}return r}var qm={},Gm=w.createContext(qm),pN=(i,n)=>U({},i,n),mN=()=>w.useContext(Gm),mc=w.createContext(()=>{});mc.displayName="JVR.DispatchShowTools";function gN(){return w.useReducer(pN,qm)}function Ym(){return w.useContext(mc)}var Qm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Gm.Provider,{value:n,children:b.jsx(mc.Provider,{value:r,children:s})})};Qm.displayName="JVR.ShowTools";var Zm={},Km=w.createContext(Zm),vN=(i,n)=>U({},i,n),us=()=>w.useContext(Km),gc=w.createContext(()=>{});gc.displayName="JVR.DispatchExpands";function yN(){return w.useReducer(vN,Zm)}function bN(){return w.useContext(gc)}var Xm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Km.Provider,{value:n,children:b.jsx(gc.Provider,{value:r,children:s})})};Xm.displayName="JVR.Expands";var Jm={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},Fm=w.createContext(Jm),xN=(i,n)=>U({},i,n),Le=()=>w.useContext(Fm),vc=w.createContext(()=>{});vc.displayName="JVR.DispatchTypes";function SN(){return w.useReducer(xN,Jm)}function NN(){return w.useContext(vc)}function Pm(i){var{initial:n,dispatch:r,children:s}=i;return b.jsx(Fm.Provider,{value:n,children:b.jsx(vc.Provider,{value:r,children:s})})}Pm.displayName="JVR.Types";var EN=["style"];function Wm(i){var{style:n}=i,r=ge(i,EN),s=U({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},n);return b.jsx("svg",U({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:s},r,{children:b.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}Wm.displayName="JVR.TriangleArrow";var Im={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:b.jsx(Wm,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},eg=w.createContext(Im),RN=(i,n)=>U({},i,n),mt=()=>w.useContext(eg),yc=w.createContext(()=>{});yc.displayName="JVR.DispatchSymbols";function wN(){return w.useReducer(RN,Im)}function TN(){return w.useContext(yc)}var tg=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(eg.Provider,{value:n,children:b.jsx(yc.Provider,{value:r,children:s})})};tg.displayName="JVR.Symbols";var ag={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},ng=w.createContext(ag),CN=(i,n)=>U({},i,n),Bt=()=>w.useContext(ng),bc=w.createContext(()=>{});bc.displayName="JVR.DispatchSection";function jN(){return w.useReducer(CN,ag)}function AN(){return w.useContext(bc)}var lg=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(ng.Provider,{value:n,children:b.jsx(bc.Provider,{value:r,children:s})})};lg.displayName="JVR.Section";var ig={objectSortKeys:!1,indentWidth:15},xc=w.createContext(ig);xc.displayName="JVR.Context";var rg=w.createContext(()=>{});rg.displayName="JVR.DispatchContext";function ON(i,n){return U({},i,n)}var gn=()=>w.useContext(xc),sg=i=>{var{children:n,initialState:r,initialTypes:s}=i,[o,f]=w.useReducer(ON,Object.assign({},ig,r)),[p,h]=gN(),[m,d]=yN(),[v,S]=SN(),[x,C]=wN(),[E,L]=jN();return w.useEffect(()=>f(U({},r)),[r]),b.jsx(xc.Provider,{value:o,children:b.jsx(rg.Provider,{value:f,children:b.jsx(Qm,{initial:p,dispatch:h,children:b.jsx(Xm,{initial:m,dispatch:d,children:b.jsx(Pm,{initial:U({},v,s),dispatch:S,children:b.jsx(tg,{initial:x,dispatch:C,children:b.jsx(lg,{initial:E,dispatch:L,children:n})})})})})})})};sg.displayName="JVR.Provider";function kN(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var LN=["isNumber","value","parentValue","keyName","keys"],zN=["as","render"],DN=["as","render"],_N=["as","render"],MN=["as","style","render"],UN=["as","render"],BN=["as","render"],HN=["as","render"],VN=["as","render"],Ko=i=>{var{Quote:n={}}=mt(),{isNumber:r,value:s,parentValue:o,keyName:f,keys:p}=i,h=ge(i,LN);if(r)return null;var{as:m,render:d}=n,v=ge(n,zN),S=m||"span",x=U({},h,v),C={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])},E=d&&typeof d=="function"&&d(x,C);return E||b.jsx(S,U({},x))};Ko.displayName="JVR.Quote";var yi=i=>{var{ValueQuote:n={}}=mt(),r=U({},(kN(i),i)),{as:s,render:o}=n,f=ge(n,DN),p=s||"span",h=U({},r,f),m=o&&typeof o=="function"&&o(h,{});return m||b.jsx(p,U({},h))};yi.displayName="JVR.ValueQuote";var ug=i=>{var{value:n,parentValue:r,keyName:s,keys:o}=i,{Colon:f={}}=mt(),{as:p,render:h}=f,m=ge(f,_N),d=p||"span",v=h&&typeof h=="function"&&h(m,{value:n,parentValue:r,keyName:s,keys:o||(s?[s]:[])});return v||b.jsx(d,U({},m))};ug.displayName="JVR.Colon";var og=i=>{var{Arrow:n={}}=mt(),r=us(),{expandKey:s,style:o,value:f,parentValue:p,keyName:h,keys:m}=i,d=!!r[s],{as:v,style:S,render:x}=n,C=ge(n,MN),E=v||"span",L=x&&typeof x=="function",V=U({},C,{"data-expanded":d,style:U({},S,o)}),M={value:f,parentValue:p,keyName:h,keys:m||(h?[h]:[])},D=L&&x(V,M);return D||b.jsx(E,U({},C,{style:U({},S,o)}))};og.displayName="JVR.Arrow";var cg=i=>{var{isBrackets:n,value:r,parentValue:s,keyName:o,keys:f}=i,{BracketsLeft:p={},BraceLeft:h={}}=mt(),m={value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])};if(n){var{as:d,render:v}=p,S=ge(p,UN),x=d||"span",C=v&&typeof v=="function"&&v(S,m);return C||b.jsx(x,U({},S))}var{as:E,render:L}=h,V=ge(h,BN),M=E||"span",D=L&&typeof L=="function"&&L(V,m);return D||b.jsx(M,U({},V))};cg.displayName="JVR.BracketsOpen";var Sc=i=>{var{isBrackets:n,isVisiable:r,value:s,parentValue:o,keyName:f,keys:p}=i,h={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])};if(!r)return null;var{BracketsRight:m={},BraceRight:d={}}=mt();if(n){var{as:v,render:S}=m,x=ge(m,HN),C=v||"span",E=S&&typeof S=="function"&&S(x,h);return E||b.jsx(C,U({},x))}var{as:L,render:V}=d,M=ge(d,VN),D=L||"span",G=V&&typeof V=="function"&&V(M,h);return G||b.jsx(D,U({},M))};Sc.displayName="JVR.BracketsClose";var fg=i=>{var n,{value:r,expandKey:s,level:o,keys:f=[]}=i,p=us(),h=Array.isArray(r),{collapsed:m,shouldExpandNodeInitially:d}=gn(),v=r instanceof Set,S=typeof m=="boolean"?m:typeof m=="number"?o>m:!1,x=(n=p[s])!=null?n:S,C=Object.keys(r).length,E=d&&d(!x,{value:r,keys:f,level:o});if(p[s]===void 0&&d&&!E||x||C===0)return null;var L={paddingLeft:4};return b.jsx("div",{style:L,children:b.jsx(Sc,{isBrackets:h||v,isVisiable:!0})})};fg.displayName="JVR.NestedClose";var $N=["as","render"],qN=["as","render"],GN=["as","render"],YN=["as","render"],QN=["as","render"],ZN=["as","render"],KN=["as","render"],XN=["as","render"],JN=["as","render"],FN=["as","render"],PN=["as","render"],WN=["as","render"],IN=["as","render"],Xo=i=>{if(i===void 0)return"0n";if(typeof i=="string")try{i=BigInt(i)}catch{return"0n"}return i?i.toString()+"n":"0n"},dg=i=>{var{value:n,keyName:r}=i,{Set:s={},displayDataTypes:o}=Le(),f=n instanceof Set;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,$N),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var S=p||"span";return b.jsx(S,U({},m))};dg.displayName="JVR.SetComp";var hg=i=>{var{value:n,keyName:r}=i,{Map:s={},displayDataTypes:o}=Le(),f=n instanceof Map;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,qN),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var S=p||"span";return b.jsx(S,U({},m))};hg.displayName="JVR.MapComp";var Yt={opacity:.75,paddingRight:4},pg=i=>{var{children:n="",keyName:r}=i,{Str:s={},displayDataTypes:o}=Le(),{shortenTextAfterLength:f=30,stringEllipsis:p="..."}=gn(),{as:h,render:m}=s,d=ge(s,GN),v=n,[S,x]=w.useState(f&&v.length>f);w.useEffect(()=>x(f&&v.length>f),[f]);var C=h||"span",E=U({},Yt,s.style||{});f>0&&(d.style=U({},d.style,{cursor:v.length<=f?"initial":"pointer"}),v.length>f&&(d.onClick=()=>{x(!S)}));var L=S?""+v.slice(0,f)+p:v,V=m&&typeof m=="function",M=V&&m(U({},d,{style:E}),{type:"type",value:n,keyName:r}),D=S?"w-rjv-value w-rjv-value-short":"w-rjv-value",G=V&&m(U({},d,{children:L,className:D}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(M||b.jsx(C,U({},d,{style:E}))),G||b.jsxs(w.Fragment,{children:[b.jsx(yi,{}),b.jsx(C,U({},d,{className:D,children:L})),b.jsx(yi,{})]})]})};pg.displayName="JVR.TypeString";var mg=i=>{var{children:n,keyName:r}=i,{True:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,YN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};mg.displayName="JVR.TypeTrue";var gg=i=>{var{children:n,keyName:r}=i,{False:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,QN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};gg.displayName="JVR.TypeFalse";var vg=i=>{var{children:n,keyName:r}=i,{Float:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,ZN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};vg.displayName="JVR.TypeFloat";var yg=i=>{var{children:n,keyName:r}=i,{Int:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,KN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};yg.displayName="JVR.TypeInt";var bg=i=>{var{children:n,keyName:r}=i,{Bigint:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,XN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:Xo(n==null?void 0:n.toString())}))]})};bg.displayName="JVR.TypeFloat";var xg=i=>{var{children:n,keyName:r}=i,{Url:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,JN),m=f||"span",d=U({},Yt,s.style),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n==null?void 0:n.href,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsxs("a",U({href:n==null?void 0:n.href,target:"_blank"},h,{className:"w-rjv-value",children:[b.jsx(yi,{}),n==null?void 0:n.href,b.jsx(yi,{})]}))]})};xg.displayName="JVR.TypeUrl";var Sg=i=>{var{children:n,keyName:r}=i,{Date:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,FN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=n instanceof Date?n.toLocaleString():n,C=v&&p(U({},h,{children:x,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),C||b.jsx(m,U({},h,{className:"w-rjv-value",children:x}))]})};Sg.displayName="JVR.TypeDate";var Ng=i=>{var{children:n,keyName:r}=i,{Undefined:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,PN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Ng.displayName="JVR.TypeUndefined";var Eg=i=>{var{children:n,keyName:r}=i,{Null:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,WN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Eg.displayName="JVR.TypeNull";var Rg=i=>{var{children:n,keyName:r}=i,{Nan:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,IN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n==null?void 0:n.toString(),className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Rg.displayName="JVR.TypeNan";var eE=i=>Number(i)===i&&i%1!==0||isNaN(i),wg=i=>{var{value:n,keyName:r}=i,s={keyName:r};return n instanceof URL?b.jsx(xg,U({},s,{children:n})):typeof n=="string"?b.jsx(pg,U({},s,{children:n})):n===!0?b.jsx(mg,U({},s,{children:n})):n===!1?b.jsx(gg,U({},s,{children:n})):n===null?b.jsx(Eg,U({},s,{children:n})):n===void 0?b.jsx(Ng,U({},s,{children:n})):n instanceof Date?b.jsx(Sg,U({},s,{children:n})):typeof n=="number"&&isNaN(n)?b.jsx(Rg,U({},s,{children:n})):typeof n=="number"&&eE(n)?b.jsx(vg,U({},s,{children:n})):typeof n=="bigint"?b.jsx(bg,U({},s,{children:n})):typeof n=="number"?b.jsx(yg,U({},s,{children:n})):null};wg.displayName="JVR.Value";function Qa(i,n,r){var s=TN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}function Ct(i,n,r){var s=NN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}function sl(i,n,r){var s=AN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}var tE=["as","render"],Tg=i=>{var{KeyName:n={}}=Bt();return sl(n,i,"KeyName"),null};Tg.displayName="JVR.KeyName";var Cg=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=typeof n=="number",h={color:p?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:m={}}=Bt(),{as:d,render:v}=m,S=ge(m,tE);S.style=U({},S.style,h);var x=d||"span",C=v&&typeof v=="function"&&v(U({},S,{children:n}),{value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])});return C||b.jsx(x,U({},S,{children:n}))};Cg.displayName="JVR.KeyNameComp";var aE=["children","value","parentValue","keyName","keys"],nE=["as","render","children"],jg=i=>{var{Row:n={}}=Bt();return sl(n,i,"Row"),null};jg.displayName="JVR.Row";var Ag=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=ge(i,aE),{Row:h={}}=Bt(),{as:m,render:d}=h,v=ge(h,nE),S=m||"div",x=d&&typeof d=="function"&&d(U({},p,v,{children:n}),{value:r,keyName:o,parentValue:s,keys:f});return x||b.jsx(S,U({},p,v,{children:n}))};Ag.displayName="JVR.RowComp";function lE(i){var n=w.useRef();return w.useEffect(()=>{n.current=i}),n.current}function iE(i){var{value:n,highlightUpdates:r,highlightContainer:s}=i,o=lE(n),f=w.useMemo(()=>{if(!r||o===void 0)return!1;if(typeof n!=typeof o)return!0;if(typeof n=="number")return isNaN(n)&&isNaN(o)?!1:n!==o;if(Array.isArray(n)!==Array.isArray(o))return!0;if(typeof n=="object"||typeof n=="function")return!1;if(n!==o)return!0},[r,n]);w.useEffect(()=>{s&&s.current&&f&&"animate"in s.current&&s.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[f,n,s])}var rE=["keyName","value","parentValue","expandKey","keys"],sE=["as","render"],Nc=i=>{var{keyName:n,value:r,parentValue:s,expandKey:o,keys:f}=i,p=ge(i,rE),{onCopied:h,enableClipboard:m}=gn(),d=mN(),v=d[o],[S,x]=w.useState(!1),{Copied:C={}}=Bt();if(m===!1||!v)return null;var E=K=>{K.stopPropagation();var se="";typeof r=="number"&&r===1/0?se="Infinity":typeof r=="number"&&isNaN(r)?se="NaN":typeof r=="bigint"?se=Xo(r):r instanceof Date?se=r.toLocaleString():se=JSON.stringify(r,(ee,F)=>typeof F=="bigint"?Xo(F):F,2),h&&h(se,r),x(!0);var re=navigator.clipboard||{writeText(ee){return new Promise((F,ne)=>{var pe=document.createElement("textarea");pe.style.position="absolute",pe.style.opacity="0",pe.style.left="-99999999px",pe.value=ee,document.body.appendChild(pe),pe.select(),document.execCommand("copy")?F():ne(),pe.remove()})}};re.writeText(se).then(()=>{var ee=setTimeout(()=>{x(!1),clearTimeout(ee)},3e3)}).catch(ee=>{})},L={style:{display:"inline-flex"},fill:S?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:E},{render:V}=C,M=ge(C,sE),D=U({},M,p,L,{style:U({},M.style,p.style,L.style)}),G=V&&typeof V=="function",X=G&&V(U({},D,{"data-copied":S}),{value:r,keyName:n,keys:f,parentValue:s});return X||(S?b.jsx("svg",U({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):b.jsx("svg",U({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};Nc.displayName="JVR.Copied";function Og(){var i=w.useRef(null);return i.current===null&&(i.current="custom-id-"+Math.random().toString(36).substr(2,9)),i.current}var kg=i=>{var n,{value:r,expandKey:s="",level:o,keys:f=[]}=i,p=us(),{objectSortKeys:h,indentWidth:m,collapsed:d,shouldExpandNodeInitially:v}=gn(),S=Array.isArray(r),x=typeof d=="boolean"?d:typeof d=="number"?o>d:!1,C=(n=p[s])!=null?n:x,E=v&&v(!C,{value:r,keys:f,level:o});if(p[s]===void 0&&v&&!E||C)return null;var L=S?Object.entries(r).map(M=>[Number(M[0]),M[1]]):Object.entries(r);h&&(L=h===!0?L.sort((M,D)=>{var[G]=M,[X]=D;return typeof G=="string"&&typeof X=="string"?G.localeCompare(X):0}):L.sort((M,D)=>{var[G,X]=M,[K,se]=D;return typeof G=="string"&&typeof K=="string"?h(G,K,X,se):0}));var V={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:m,marginLeft:6};return b.jsx("div",{className:"w-rjv-wrap",style:V,children:L.map((M,D)=>{var[G,X]=M;return b.jsx(Lg,{parentValue:r,keyName:G,keys:[...f,G],value:X,level:o},D)})})};kg.displayName="JVR.KeyValues";var Ec=i=>{var{keyName:n,parentValue:r,keys:s,value:o}=i,{highlightUpdates:f}=gn(),p=typeof n=="number",h=w.useRef(null);iE({value:o,highlightUpdates:f,highlightContainer:h});var m={keyName:n,value:o,keys:s,parentValue:r};return b.jsxs(w.Fragment,{children:[b.jsxs("span",{ref:h,children:[b.jsx(Ko,U({isNumber:p,"data-placement":"left"},m)),b.jsx(Cg,U({},m,{children:n})),b.jsx(Ko,U({isNumber:p,"data-placement":"right"},m))]}),b.jsx(ug,U({},m))]})};Ec.displayName="JVR.KayName";var Lg=i=>{var{keyName:n,value:r,parentValue:s,level:o=0,keys:f=[]}=i,p=Ym(),h=Og(),m=Array.isArray(r),d=r instanceof Set,v=r instanceof Map,S=r instanceof Date,x=r instanceof URL,C=r&&typeof r=="object"&&!m&&!d&&!v&&!S&&!x,E=C||m||d||v;if(E){var L=d?Array.from(r):v?Object.fromEntries(r):r;return b.jsx(Rc,{keyName:n,value:L,parentValue:s,initialValue:r,keys:f,level:o+1})}var V={onMouseEnter:()=>p({[h]:!0}),onMouseLeave:()=>p({[h]:!1})};return b.jsxs(Ag,U({className:"w-rjv-line",value:r,keyName:n,keys:f,parentValue:s},V,{children:[b.jsx(Ec,{keyName:n,value:r,keys:f,parentValue:s}),b.jsx(wg,{keyName:n,value:r}),b.jsx(Nc,{keyName:n,value:r,keys:f,parentValue:s,expandKey:h})]}))};Lg.displayName="JVR.KeyValuesItem";var uE=["value","keyName"],oE=["as","render"],zg=i=>{var{CountInfoExtra:n={}}=Bt();return sl(n,i,"CountInfoExtra"),null};zg.displayName="JVR.CountInfoExtra";var Dg=i=>{var{value:n={},keyName:r}=i,s=ge(i,uE),{CountInfoExtra:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,oE);if(!p&&!h.children)return null;var m=f||"span",d=p&&typeof p=="function",v=U({},h,s),S=d&&p(v,{value:n,keyName:r});return S||b.jsx(m,U({},v))};Dg.displayName="JVR.CountInfoExtraComps";var cE=["value","keyName"],fE=["as","render"],_g=i=>{var{CountInfo:n={}}=Bt();return sl(n,i,"CountInfo"),null};_g.displayName="JVR.CountInfo";var Mg=i=>{var{value:n={},keyName:r}=i,s=ge(i,cE),{displayObjectSize:o}=gn(),{CountInfo:f={}}=Bt();if(!o)return null;var{as:p,render:h}=f,m=ge(f,fE),d=p||"span";m.style=U({},m.style,i.style);var v=Object.keys(n).length;m.children||(m.children=v+" item"+(v===1?"":"s"));var S=U({},m,s),x=h&&typeof h=="function",C=x&&h(U({},S,{"data-length":v}),{value:n,keyName:r});return C||b.jsx(d,U({},S))};Mg.displayName="JVR.CountInfoComp";var dE=["as","render"],Ug=i=>{var{Ellipsis:n={}}=Bt();return sl(n,i,"Ellipsis"),null};Ug.displayName="JVR.Ellipsis";var Bg=i=>{var{isExpanded:n,value:r,keyName:s}=i,{Ellipsis:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,dE),m=f||"span",d=p&&typeof p=="function"&&p(U({},h,{"data-expanded":n}),{value:r,keyName:s});return d||(!n||typeof r=="object"&&Object.keys(r).length==0?null:b.jsx(m,U({},h)))};Bg.displayName="JVR.EllipsisComp";var Hg=i=>{var n,{keyName:r,expandKey:s,keys:o=[],initialValue:f,value:p,parentValue:h,level:m}=i,d=us(),v=bN(),{onExpand:S,collapsed:x,shouldExpandNodeInitially:C}=gn(),E=Array.isArray(p),L=p instanceof Set,V=typeof x=="boolean"?x:typeof x=="number"?m>x:!1,M=typeof p=="object",D=(n=d[s])!=null?n:V,G=C&&C(!D,{value:p,keys:o,level:m});d[s]===void 0&&C&&!G&&(D=!G);var X=()=>{var pe={expand:!D,value:p,keyid:s,keyName:r};S&&S(pe),v({[s]:pe.expand})},K={display:"inline-flex",alignItems:"center"},se={transform:"rotate("+(D?"-90":"0")+"deg)",transition:"all 0.3s"},re=Object.keys(p).length,ee=re!==0&&(E||L||M),F={style:K};ee&&(F.onClick=X);var ne={keyName:r,value:p,keys:o,parentValue:h};return b.jsxs("span",U({},F,{children:[ee&&b.jsx(og,U({style:se,expandKey:s},ne)),(r||typeof r=="number")&&b.jsx(Ec,U({},ne)),b.jsx(dg,{value:f,keyName:r}),b.jsx(hg,{value:f,keyName:r}),b.jsx(cg,U({isBrackets:E||L},ne)),b.jsx(Bg,{keyName:r,value:p,isExpanded:D}),b.jsx(Sc,U({isVisiable:D||!ee,isBrackets:E||L},ne)),b.jsx(Mg,{value:p,keyName:r}),b.jsx(Dg,{value:p,keyName:r}),b.jsx(Nc,{keyName:r,value:p,expandKey:s,parentValue:h,keys:o})]}))};Hg.displayName="JVR.NestedOpen";var hE=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],Rc=w.forwardRef((i,n)=>{var{className:r="",parentValue:s,level:o=1,value:f,initialValue:p,keys:h,keyName:m}=i,d=ge(i,hE),v=Ym(),S=Og(),x=[r,"w-rjv-inner"].filter(Boolean).join(" "),C={onMouseEnter:()=>v({[S]:!0}),onMouseLeave:()=>v({[S]:!1})};return b.jsxs("div",U({className:x,ref:n},d,C,{children:[b.jsx(Hg,{expandKey:S,value:f,level:o,keys:h,parentValue:s,keyName:m,initialValue:p}),b.jsx(kg,{expandKey:S,value:f,level:o,keys:h,parentValue:s,keyName:m}),b.jsx(fg,{expandKey:S,value:f,level:o,keys:h})]}))});Rc.displayName="JVR.Container";var Vg=i=>{var{BraceLeft:n={}}=mt();return Qa(n,i,"BraceLeft"),null};Vg.displayName="JVR.BraceLeft";var $g=i=>{var{BraceRight:n={}}=mt();return Qa(n,i,"BraceRight"),null};$g.displayName="JVR.BraceRight";var qg=i=>{var{BracketsLeft:n={}}=mt();return Qa(n,i,"BracketsLeft"),null};qg.displayName="JVR.BracketsLeft";var Gg=i=>{var{BracketsRight:n={}}=mt();return Qa(n,i,"BracketsRight"),null};Gg.displayName="JVR.BracketsRight";var Yg=i=>{var{Arrow:n={}}=mt();return Qa(n,i,"Arrow"),null};Yg.displayName="JVR.Arrow";var Qg=i=>{var{Colon:n={}}=mt();return Qa(n,i,"Colon"),null};Qg.displayName="JVR.Colon";var Zg=i=>{var{Quote:n={}}=mt();return Qa(n,i,"Quote"),null};Zg.displayName="JVR.Quote";var Kg=i=>{var{ValueQuote:n={}}=mt();return Qa(n,i,"ValueQuote"),null};Kg.displayName="JVR.ValueQuote";var Xg=i=>{var{Bigint:n={}}=Le();return Ct(n,i,"Bigint"),null};Xg.displayName="JVR.Bigint";var Jg=i=>{var{Date:n={}}=Le();return Ct(n,i,"Date"),null};Jg.displayName="JVR.Date";var Fg=i=>{var{False:n={}}=Le();return Ct(n,i,"False"),null};Fg.displayName="JVR.False";var Pg=i=>{var{Float:n={}}=Le();return Ct(n,i,"Float"),null};Pg.displayName="JVR.Float";var Wg=i=>{var{Int:n={}}=Le();return Ct(n,i,"Int"),null};Wg.displayName="JVR.Int";var Ig=i=>{var{Map:n={}}=Le();return Ct(n,i,"Map"),null};Ig.displayName="JVR.Map";var ev=i=>{var{Nan:n={}}=Le();return Ct(n,i,"Nan"),null};ev.displayName="JVR.Nan";var tv=i=>{var{Null:n={}}=Le();return Ct(n,i,"Null"),null};tv.displayName="JVR.Null";var av=i=>{var{Set:n={}}=Le();return Ct(n,i,"Set"),null};av.displayName="JVR.Set";var nv=i=>{var{Str:n={}}=Le();return Ct(n,i,"Str"),null};nv.displayName="JVR.StringText";var lv=i=>{var{True:n={}}=Le();return Ct(n,i,"True"),null};lv.displayName="JVR.True";var iv=i=>{var{Undefined:n={}}=Le();return Ct(n,i,"Undefined"),null};iv.displayName="JVR.Undefined";var rv=i=>{var{Url:n={}}=Le();return Ct(n,i,"Url"),null};rv.displayName="JVR.Url";var sv=i=>{var{Copied:n={}}=Bt();return sl(n,i,"Copied"),null};sv.displayName="JVR.Copied";var pE=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],we=w.forwardRef((i,n)=>{var{className:r="",style:s,value:o,children:f,collapsed:p,shouldExpandNodeInitially:h,indentWidth:m=15,displayObjectSize:d=!0,shortenTextAfterLength:v=30,stringEllipsis:S,highlightUpdates:x=!0,enableClipboard:C=!0,displayDataTypes:E=!0,objectSortKeys:L=!1,onExpand:V,onCopied:M}=i,D=ge(i,pE),G=U({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},s),X=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return b.jsxs(sg,{initialState:{value:o,objectSortKeys:L,indentWidth:m,shouldExpandNodeInitially:h,displayObjectSize:d,collapsed:p,enableClipboard:C,shortenTextAfterLength:v,stringEllipsis:S,highlightUpdates:x,onCopied:M,onExpand:V},initialTypes:{displayDataTypes:E},children:[b.jsx(Rc,U({value:o},D,{ref:n,className:X,style:G})),f]})});we.Bigint=Xg;we.Date=Jg;we.False=Fg;we.Float=Pg;we.Int=Wg;we.Map=Ig;we.Nan=ev;we.Null=tv;we.Set=av;we.String=nv;we.True=lv;we.Undefined=iv;we.Url=rv;we.ValueQuote=Kg;we.Arrow=Yg;we.Colon=Qg;we.Quote=Zg;we.Ellipsis=Ug;we.BraceLeft=Vg;we.BraceRight=$g;we.BracketsLeft=qg;we.BracketsRight=Gg;we.Copied=sv;we.CountInfo=_g;we.CountInfoExtra=zg;we.KeyName=Tg;we.Row=jg;we.displayName="JVR.JsonView";var lm={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};function mE(i){const n=Object.keys(i),r=n.length>0?n[0]:void 0;return(s,o,f={})=>{if(!r)return f.default??s;const p=i[o]??i[r],h=s.split(".");let m=p;for(const d of h){if(typeof m=="string"||!m||!Object.hasOwn(m,d))return f.default??s;m=m[d]}return typeof m=="string"?m:f.default??s}}function gE({siteSchema:i,schemaTranslate:n}){const r=new Set;return b.jsx("ul",{children:b.jsx(Jo,{schema:i,schemaT:n,typeName:"home",displayedNodeTypeNames:r})})}function Jo({schema:i,schemaT:n,typeName:r,depth:s=0,displayedNodeTypeNames:o}){const{i18n:f}=ot(),p=vE(i,r);if(!p)return null;const h=p.routingChildren||[],m=p.regularChildren||[],d=p.lists||[],v=p.documentKind==="routing",S=n(`nodeTypes.${r}.label`,f.language,{default:r});return o.has(r)?b.jsx("li",{children:b.jsxs("div",{children:[v?b.jsx("strong",{children:S}):S," (",b.jsx("code",{children:r}),")"]})}):(o.add(r),b.jsxs("li",{children:[b.jsxs("div",{children:[v?b.jsx("strong",{children:S}):S," (",b.jsx("code",{children:r}),")"]}),d.map(x=>b.jsxs("div",{style:{marginLeft:"30px",color:"#999",fontStyle:"italic"},children:[n(`nodeTypes.${r}.lists.${x.listName}.label`,f.language,{default:x.listName})," ","(",b.jsx("code",{children:x.listName})," [",b.jsx("code",{children:x.parts.join("</code>, <code>")}),"])"]},x.listName)),h.length>0&&b.jsx("ul",{children:h.map(x=>b.jsx(Jo,{schema:i,schemaT:n,typeName:x,depth:s+1,displayedNodeTypeNames:o},x))}),m.length>0&&b.jsx("ul",{children:m.map(x=>b.jsx(Jo,{schema:i,schemaT:n,typeName:x,depth:s+1,displayedNodeTypeNames:o},x))})]}))}function vE(i,n){var r;return(r=i.nodeTypes)==null?void 0:r.find(s=>s.kind==="document"&&s.typeName===n)}const Gr=we;function yE({step:i}){const{t:n}=ot(),[r,s]=w.useState("tree"),{siteSchema:o,l10n:f}=i,p=mE(f),h=(m,d)=>d.keys.length===1&&d.keys[0]==="plugins";return b.jsxs("div",{className:"SchemaViewer",children:[b.jsxs("div",{className:"SchemaViewer-tabs",children:[b.jsx(rt,{className:`SchemaViewer-tab ${r==="tree"?"active":""}`,onClick:()=>s("tree"),children:n("treeView")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="schema"?"active":""}`,onClick:()=>s("schema"),children:n("siteSchema")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="locales"?"active":""}`,onClick:()=>s("locales"),children:n("labels")})]}),b.jsxs("div",{className:"SchemaViewer-main",children:[b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="tree"?"block":"none"},children:b.jsx(gE,{siteSchema:o,schemaTranslate:p})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="locales"?"block":"none"},children:b.jsx(Gr,{value:f,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="schema"?"block":"none"},children:b.jsxs(Gr,{value:o,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0,shouldExpandNodeInitially:h,children:[b.jsx(Gr.Colon,{render:(m,{parentValue:d})=>Array.isArray(d)&&m.children===":"?b.jsx("span",{}):b.jsx("span",{...m})}),b.jsx(Gr.KeyName,{render:({...m},{parentValue:d})=>Array.isArray(d)&&Number.isFinite(m.children)?b.jsx("span",{}):b.jsx("span",{...m})})]})})]})]})}function bE({step:i}){const{t:n}=ot(),{workSession:r,appendNewStep:s}=pn(),[o,f]=w.useState(!1),[p,h]=w.useState(!1),[m,d]=w.useState(!1),[v,S]=w.useState(void 0),x=rl(),C=()=>{f(!o)},E=async V=>{if(!r)return;d(!0),S(void 0);const M=vi();if(!M){S(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"updateSiteSchema",sessionToken:M,prompt:V,fromStepNumber:i.stepNumber});D.success&&D.result?(f(!1),s(D.result),await x(`/step/${D.result.stepNumber}`)):S(n("promptSubmissionFailed"))}catch(D){console.error("Error updating schema:",D),S(n("errorOccurred"))}finally{d(!1)}},L=async({withSampleData:V})=>{if(!r)return;d(!0),S(void 0),h(!1);const M=vi();if(!M){S(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"generateSite",sessionToken:M,fromStepNumber:i.stepNumber,withSampleData:V});D.success&&D.result?(s(D.result),await x(`/step/${D.result.stepNumber}`)):S(n("generationFailed"))}catch(D){console.error("Error generating site:",D),S(n("errorOccurred"))}finally{d(!1)}};return b.jsx(Tt,{children:b.jsxs("div",{className:"CompletedStep",children:[b.jsx(yE,{step:i}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation")}),b.jsxs("div",{className:"CompletedStep-actions",children:[b.jsx(rt,{onClick:C,className:"CompletedStep-button",children:n("modifySchema")}),b.jsx(rt,{onClick:()=>h(!0),className:"CompletedStep-button",children:n("generateTheWebsite")})]}),o&&b.jsxs("div",{className:"CompletedStep-updateForm",children:[b.jsx("h3",{children:n("updateSchema")}),b.jsx(Om,{placeholder:n("updatePromptPlaceholder"),submitLabel:n("modifySchema"),onSubmit:E,isLoading:m,error:v})]}),b.jsx(hN,{isOpen:p,title:n("generateTheWebsite"),message:n("aboutToGenerateWebsite"),confirmLabel:n("confirm"),onConfirm:L,onCancel:()=>h(!1)}),v&&!o&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:v})})]})})}function xE({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message",children:n("stepFailed")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"error"})]})})}function SE({step:i}){const{t:n}=ot(),r=()=>{const s=`
116
+ Please report this to https://github.com/markedjs/marked.`,i){const s="<p>An error occurred:</p><pre>"+Pt(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},dn=new fN;function Re(i,n){return dn.parse(i,n)}Re.options=Re.setOptions=function(i){return dn.setOptions(i),Re.defaults=dn.defaults,km(Re.defaults),Re};Re.getDefaults=rc;Re.defaults=mn;Re.use=function(...i){return dn.use(...i),Re.defaults=dn.defaults,km(Re.defaults),Re};Re.walkTokens=function(i,n){return dn.walkTokens(i,n)};Re.parseInline=dn.parseInline;Re.Parser=ma;Re.parser=ma.parse;Re.Renderer=ts;Re.TextRenderer=pc;Re.Lexer=pa;Re.lexer=pa.lex;Re.Tokenizer=es;Re.Hooks=Xr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;ma.parse;pa.lex;function dN(i){if(!i)return"";try{return Re.parse(i,{async:!1,gfm:!0,breaks:!0})}catch(n){return console.error("Error rendering markdown:",n),i}}function Ni({content:i,title:n,variant:r="default",className:s="",children:o}){const f=["Explanation",`Explanation-${r}`,s].filter(Boolean).join(" ");return b.jsxs("div",{className:f,children:[n&&b.jsx("h3",{className:"Explanation-title",children:n}),b.jsx("div",{className:"Explanation-content markdown-content",dangerouslySetInnerHTML:{__html:dN(i)}}),o]})}function hN({isOpen:i,title:n,message:r,confirmLabel:s,cancelLabel:o,onConfirm:f,onCancel:p}){const{t:h}=ot(),[m,d]=w.useState(!0);if(!i)return null;const v=async()=>{await f({withSampleData:m})},S=x=>{x.key==="Escape"&&p()};return b.jsxs("div",{className:"ConfirmDialog",children:[b.jsx("div",{className:"ConfirmDialog-backdrop",onClick:p,onKeyDown:S,tabIndex:0,role:"button","aria-label":"Close dialog"}),b.jsxs("div",{className:"ConfirmDialog-container",children:[b.jsx("div",{className:"ConfirmDialog-header",children:b.jsx("h3",{className:"ConfirmDialog-title",children:n})}),b.jsxs("div",{className:"ConfirmDialog-body",children:[b.jsx("p",{children:r}),b.jsx("div",{className:"ConfirmDialog-checkbox mt-3",children:b.jsxs("label",{children:[b.jsx("input",{type:"checkbox",checked:m,onChange:x=>d(x.target.checked)}),b.jsx("span",{className:"ml-2",children:h("generateSiteWithData")})]})})]}),b.jsxs("div",{className:"ConfirmDialog-footer",children:[b.jsx(rt,{onClick:p,severity:"secondary",className:"ConfirmDialog-button",children:o||h("cancel")}),b.jsx(rt,{onClick:v,className:"ConfirmDialog-button",children:s||h("confirm")})]})]})]})}function U(){return U=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var s in r)({}).hasOwnProperty.call(r,s)&&(i[s]=r[s])}return i},U.apply(null,arguments)}function ge(i,n){if(i==null)return{};var r={};for(var s in i)if({}.hasOwnProperty.call(i,s)){if(n.indexOf(s)!==-1)continue;r[s]=i[s]}return r}var qm={},Gm=w.createContext(qm),pN=(i,n)=>U({},i,n),mN=()=>w.useContext(Gm),mc=w.createContext(()=>{});mc.displayName="JVR.DispatchShowTools";function gN(){return w.useReducer(pN,qm)}function Ym(){return w.useContext(mc)}var Qm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Gm.Provider,{value:n,children:b.jsx(mc.Provider,{value:r,children:s})})};Qm.displayName="JVR.ShowTools";var Zm={},Km=w.createContext(Zm),vN=(i,n)=>U({},i,n),us=()=>w.useContext(Km),gc=w.createContext(()=>{});gc.displayName="JVR.DispatchExpands";function yN(){return w.useReducer(vN,Zm)}function bN(){return w.useContext(gc)}var Xm=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(Km.Provider,{value:n,children:b.jsx(gc.Provider,{value:r,children:s})})};Xm.displayName="JVR.Expands";var Jm={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},Fm=w.createContext(Jm),xN=(i,n)=>U({},i,n),Le=()=>w.useContext(Fm),vc=w.createContext(()=>{});vc.displayName="JVR.DispatchTypes";function SN(){return w.useReducer(xN,Jm)}function NN(){return w.useContext(vc)}function Pm(i){var{initial:n,dispatch:r,children:s}=i;return b.jsx(Fm.Provider,{value:n,children:b.jsx(vc.Provider,{value:r,children:s})})}Pm.displayName="JVR.Types";var EN=["style"];function Wm(i){var{style:n}=i,r=ge(i,EN),s=U({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},n);return b.jsx("svg",U({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:s},r,{children:b.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}Wm.displayName="JVR.TriangleArrow";var Im={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:b.jsx(Wm,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},eg=w.createContext(Im),RN=(i,n)=>U({},i,n),mt=()=>w.useContext(eg),yc=w.createContext(()=>{});yc.displayName="JVR.DispatchSymbols";function wN(){return w.useReducer(RN,Im)}function TN(){return w.useContext(yc)}var tg=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(eg.Provider,{value:n,children:b.jsx(yc.Provider,{value:r,children:s})})};tg.displayName="JVR.Symbols";var ag={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},ng=w.createContext(ag),CN=(i,n)=>U({},i,n),Bt=()=>w.useContext(ng),bc=w.createContext(()=>{});bc.displayName="JVR.DispatchSection";function jN(){return w.useReducer(CN,ag)}function AN(){return w.useContext(bc)}var lg=i=>{var{initial:n,dispatch:r,children:s}=i;return b.jsx(ng.Provider,{value:n,children:b.jsx(bc.Provider,{value:r,children:s})})};lg.displayName="JVR.Section";var ig={objectSortKeys:!1,indentWidth:15},xc=w.createContext(ig);xc.displayName="JVR.Context";var rg=w.createContext(()=>{});rg.displayName="JVR.DispatchContext";function ON(i,n){return U({},i,n)}var gn=()=>w.useContext(xc),sg=i=>{var{children:n,initialState:r,initialTypes:s}=i,[o,f]=w.useReducer(ON,Object.assign({},ig,r)),[p,h]=gN(),[m,d]=yN(),[v,S]=SN(),[x,C]=wN(),[E,L]=jN();return w.useEffect(()=>f(U({},r)),[r]),b.jsx(xc.Provider,{value:o,children:b.jsx(rg.Provider,{value:f,children:b.jsx(Qm,{initial:p,dispatch:h,children:b.jsx(Xm,{initial:m,dispatch:d,children:b.jsx(Pm,{initial:U({},v,s),dispatch:S,children:b.jsx(tg,{initial:x,dispatch:C,children:b.jsx(lg,{initial:E,dispatch:L,children:n})})})})})})})};sg.displayName="JVR.Provider";function kN(i){if(i==null)throw new TypeError("Cannot destructure "+i)}var LN=["isNumber","value","parentValue","keyName","keys"],zN=["as","render"],DN=["as","render"],_N=["as","render"],MN=["as","style","render"],UN=["as","render"],BN=["as","render"],HN=["as","render"],VN=["as","render"],Ko=i=>{var{Quote:n={}}=mt(),{isNumber:r,value:s,parentValue:o,keyName:f,keys:p}=i,h=ge(i,LN);if(r)return null;var{as:m,render:d}=n,v=ge(n,zN),S=m||"span",x=U({},h,v),C={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])},E=d&&typeof d=="function"&&d(x,C);return E||b.jsx(S,U({},x))};Ko.displayName="JVR.Quote";var yi=i=>{var{ValueQuote:n={}}=mt(),r=U({},(kN(i),i)),{as:s,render:o}=n,f=ge(n,DN),p=s||"span",h=U({},r,f),m=o&&typeof o=="function"&&o(h,{});return m||b.jsx(p,U({},h))};yi.displayName="JVR.ValueQuote";var ug=i=>{var{value:n,parentValue:r,keyName:s,keys:o}=i,{Colon:f={}}=mt(),{as:p,render:h}=f,m=ge(f,_N),d=p||"span",v=h&&typeof h=="function"&&h(m,{value:n,parentValue:r,keyName:s,keys:o||(s?[s]:[])});return v||b.jsx(d,U({},m))};ug.displayName="JVR.Colon";var og=i=>{var{Arrow:n={}}=mt(),r=us(),{expandKey:s,style:o,value:f,parentValue:p,keyName:h,keys:m}=i,d=!!r[s],{as:v,style:S,render:x}=n,C=ge(n,MN),E=v||"span",L=x&&typeof x=="function",V=U({},C,{"data-expanded":d,style:U({},S,o)}),M={value:f,parentValue:p,keyName:h,keys:m||(h?[h]:[])},D=L&&x(V,M);return D||b.jsx(E,U({},C,{style:U({},S,o)}))};og.displayName="JVR.Arrow";var cg=i=>{var{isBrackets:n,value:r,parentValue:s,keyName:o,keys:f}=i,{BracketsLeft:p={},BraceLeft:h={}}=mt(),m={value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])};if(n){var{as:d,render:v}=p,S=ge(p,UN),x=d||"span",C=v&&typeof v=="function"&&v(S,m);return C||b.jsx(x,U({},S))}var{as:E,render:L}=h,V=ge(h,BN),M=E||"span",D=L&&typeof L=="function"&&L(V,m);return D||b.jsx(M,U({},V))};cg.displayName="JVR.BracketsOpen";var Sc=i=>{var{isBrackets:n,isVisiable:r,value:s,parentValue:o,keyName:f,keys:p}=i,h={value:s,parentValue:o,keyName:f,keys:p||(f?[f]:[])};if(!r)return null;var{BracketsRight:m={},BraceRight:d={}}=mt();if(n){var{as:v,render:S}=m,x=ge(m,HN),C=v||"span",E=S&&typeof S=="function"&&S(x,h);return E||b.jsx(C,U({},x))}var{as:L,render:V}=d,M=ge(d,VN),D=L||"span",G=V&&typeof V=="function"&&V(M,h);return G||b.jsx(D,U({},M))};Sc.displayName="JVR.BracketsClose";var fg=i=>{var n,{value:r,expandKey:s,level:o,keys:f=[]}=i,p=us(),h=Array.isArray(r),{collapsed:m,shouldExpandNodeInitially:d}=gn(),v=r instanceof Set,S=typeof m=="boolean"?m:typeof m=="number"?o>m:!1,x=(n=p[s])!=null?n:S,C=Object.keys(r).length,E=d&&d(!x,{value:r,keys:f,level:o});if(p[s]===void 0&&d&&!E||x||C===0)return null;var L={paddingLeft:4};return b.jsx("div",{style:L,children:b.jsx(Sc,{isBrackets:h||v,isVisiable:!0})})};fg.displayName="JVR.NestedClose";var $N=["as","render"],qN=["as","render"],GN=["as","render"],YN=["as","render"],QN=["as","render"],ZN=["as","render"],KN=["as","render"],XN=["as","render"],JN=["as","render"],FN=["as","render"],PN=["as","render"],WN=["as","render"],IN=["as","render"],Xo=i=>{if(i===void 0)return"0n";if(typeof i=="string")try{i=BigInt(i)}catch{return"0n"}return i?i.toString()+"n":"0n"},dg=i=>{var{value:n,keyName:r}=i,{Set:s={},displayDataTypes:o}=Le(),f=n instanceof Set;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,$N),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var S=p||"span";return b.jsx(S,U({},m))};dg.displayName="JVR.SetComp";var hg=i=>{var{value:n,keyName:r}=i,{Map:s={},displayDataTypes:o}=Le(),f=n instanceof Map;if(!f||!o)return null;var{as:p,render:h}=s,m=ge(s,qN),d=h&&typeof h=="function",v=d&&h(m,{type:"type",value:n,keyName:r});if(v)return v;var S=p||"span";return b.jsx(S,U({},m))};hg.displayName="JVR.MapComp";var Yt={opacity:.75,paddingRight:4},pg=i=>{var{children:n="",keyName:r}=i,{Str:s={},displayDataTypes:o}=Le(),{shortenTextAfterLength:f=30,stringEllipsis:p="..."}=gn(),{as:h,render:m}=s,d=ge(s,GN),v=n,[S,x]=w.useState(f&&v.length>f);w.useEffect(()=>x(f&&v.length>f),[f]);var C=h||"span",E=U({},Yt,s.style||{});f>0&&(d.style=U({},d.style,{cursor:v.length<=f?"initial":"pointer"}),v.length>f&&(d.onClick=()=>{x(!S)}));var L=S?""+v.slice(0,f)+p:v,V=m&&typeof m=="function",M=V&&m(U({},d,{style:E}),{type:"type",value:n,keyName:r}),D=S?"w-rjv-value w-rjv-value-short":"w-rjv-value",G=V&&m(U({},d,{children:L,className:D}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(M||b.jsx(C,U({},d,{style:E}))),G||b.jsxs(w.Fragment,{children:[b.jsx(yi,{}),b.jsx(C,U({},d,{className:D,children:L})),b.jsx(yi,{})]})]})};pg.displayName="JVR.TypeString";var mg=i=>{var{children:n,keyName:r}=i,{True:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,YN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};mg.displayName="JVR.TypeTrue";var gg=i=>{var{children:n,keyName:r}=i,{False:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,QN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};gg.displayName="JVR.TypeFalse";var vg=i=>{var{children:n,keyName:r}=i,{Float:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,ZN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};vg.displayName="JVR.TypeFloat";var yg=i=>{var{children:n,keyName:r}=i,{Int:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,KN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:n==null?void 0:n.toString()}))]})};yg.displayName="JVR.TypeInt";var bg=i=>{var{children:n,keyName:r}=i,{Bigint:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,XN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsx(m,U({},h,{className:"w-rjv-value",children:Xo(n==null?void 0:n.toString())}))]})};bg.displayName="JVR.TypeFloat";var xg=i=>{var{children:n,keyName:r}=i,{Url:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,JN),m=f||"span",d=U({},Yt,s.style),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n==null?void 0:n.href,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x||b.jsxs("a",U({href:n==null?void 0:n.href,target:"_blank"},h,{className:"w-rjv-value",children:[b.jsx(yi,{}),n==null?void 0:n.href,b.jsx(yi,{})]}))]})};xg.displayName="JVR.TypeUrl";var Sg=i=>{var{children:n,keyName:r}=i,{Date:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,FN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=n instanceof Date?n.toLocaleString():n,C=v&&p(U({},h,{children:x,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),C||b.jsx(m,U({},h,{className:"w-rjv-value",children:x}))]})};Sg.displayName="JVR.TypeDate";var Ng=i=>{var{children:n,keyName:r}=i,{Undefined:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,PN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Ng.displayName="JVR.TypeUndefined";var Eg=i=>{var{children:n,keyName:r}=i,{Null:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,WN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n,className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Eg.displayName="JVR.TypeNull";var Rg=i=>{var{children:n,keyName:r}=i,{Nan:s={},displayDataTypes:o}=Le(),{as:f,render:p}=s,h=ge(s,IN),m=f||"span",d=U({},Yt,s.style||{}),v=p&&typeof p=="function",S=v&&p(U({},h,{style:d}),{type:"type",value:n,keyName:r}),x=v&&p(U({},h,{children:n==null?void 0:n.toString(),className:"w-rjv-value"}),{type:"value",value:n,keyName:r});return b.jsxs(w.Fragment,{children:[o&&(S||b.jsx(m,U({},h,{style:d}))),x]})};Rg.displayName="JVR.TypeNan";var eE=i=>Number(i)===i&&i%1!==0||isNaN(i),wg=i=>{var{value:n,keyName:r}=i,s={keyName:r};return n instanceof URL?b.jsx(xg,U({},s,{children:n})):typeof n=="string"?b.jsx(pg,U({},s,{children:n})):n===!0?b.jsx(mg,U({},s,{children:n})):n===!1?b.jsx(gg,U({},s,{children:n})):n===null?b.jsx(Eg,U({},s,{children:n})):n===void 0?b.jsx(Ng,U({},s,{children:n})):n instanceof Date?b.jsx(Sg,U({},s,{children:n})):typeof n=="number"&&isNaN(n)?b.jsx(Rg,U({},s,{children:n})):typeof n=="number"&&eE(n)?b.jsx(vg,U({},s,{children:n})):typeof n=="bigint"?b.jsx(bg,U({},s,{children:n})):typeof n=="number"?b.jsx(yg,U({},s,{children:n})):null};wg.displayName="JVR.Value";function Qa(i,n,r){var s=TN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}function Ct(i,n,r){var s=NN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}function sl(i,n,r){var s=AN(),o=[i.className,n.className].filter(Boolean).join(" "),f=U({},i,n,{className:o,style:U({},i.style,n.style),children:n.children||i.children});w.useEffect(()=>s({[r]:f}),[n])}var tE=["as","render"],Tg=i=>{var{KeyName:n={}}=Bt();return sl(n,i,"KeyName"),null};Tg.displayName="JVR.KeyName";var Cg=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=typeof n=="number",h={color:p?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:m={}}=Bt(),{as:d,render:v}=m,S=ge(m,tE);S.style=U({},S.style,h);var x=d||"span",C=v&&typeof v=="function"&&v(U({},S,{children:n}),{value:r,parentValue:s,keyName:o,keys:f||(o?[o]:[])});return C||b.jsx(x,U({},S,{children:n}))};Cg.displayName="JVR.KeyNameComp";var aE=["children","value","parentValue","keyName","keys"],nE=["as","render","children"],jg=i=>{var{Row:n={}}=Bt();return sl(n,i,"Row"),null};jg.displayName="JVR.Row";var Ag=i=>{var{children:n,value:r,parentValue:s,keyName:o,keys:f}=i,p=ge(i,aE),{Row:h={}}=Bt(),{as:m,render:d}=h,v=ge(h,nE),S=m||"div",x=d&&typeof d=="function"&&d(U({},p,v,{children:n}),{value:r,keyName:o,parentValue:s,keys:f});return x||b.jsx(S,U({},p,v,{children:n}))};Ag.displayName="JVR.RowComp";function lE(i){var n=w.useRef();return w.useEffect(()=>{n.current=i}),n.current}function iE(i){var{value:n,highlightUpdates:r,highlightContainer:s}=i,o=lE(n),f=w.useMemo(()=>{if(!r||o===void 0)return!1;if(typeof n!=typeof o)return!0;if(typeof n=="number")return isNaN(n)&&isNaN(o)?!1:n!==o;if(Array.isArray(n)!==Array.isArray(o))return!0;if(typeof n=="object"||typeof n=="function")return!1;if(n!==o)return!0},[r,n]);w.useEffect(()=>{s&&s.current&&f&&"animate"in s.current&&s.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[f,n,s])}var rE=["keyName","value","parentValue","expandKey","keys"],sE=["as","render"],Nc=i=>{var{keyName:n,value:r,parentValue:s,expandKey:o,keys:f}=i,p=ge(i,rE),{onCopied:h,enableClipboard:m}=gn(),d=mN(),v=d[o],[S,x]=w.useState(!1),{Copied:C={}}=Bt();if(m===!1||!v)return null;var E=K=>{K.stopPropagation();var se="";typeof r=="number"&&r===1/0?se="Infinity":typeof r=="number"&&isNaN(r)?se="NaN":typeof r=="bigint"?se=Xo(r):r instanceof Date?se=r.toLocaleString():se=JSON.stringify(r,(ee,F)=>typeof F=="bigint"?Xo(F):F,2),h&&h(se,r),x(!0);var re=navigator.clipboard||{writeText(ee){return new Promise((F,ne)=>{var pe=document.createElement("textarea");pe.style.position="absolute",pe.style.opacity="0",pe.style.left="-99999999px",pe.value=ee,document.body.appendChild(pe),pe.select(),document.execCommand("copy")?F():ne(),pe.remove()})}};re.writeText(se).then(()=>{var ee=setTimeout(()=>{x(!1),clearTimeout(ee)},3e3)}).catch(ee=>{})},L={style:{display:"inline-flex"},fill:S?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:E},{render:V}=C,M=ge(C,sE),D=U({},M,p,L,{style:U({},M.style,p.style,L.style)}),G=V&&typeof V=="function",X=G&&V(U({},D,{"data-copied":S}),{value:r,keyName:n,keys:f,parentValue:s});return X||(S?b.jsx("svg",U({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):b.jsx("svg",U({viewBox:"0 0 32 36"},D,{children:b.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};Nc.displayName="JVR.Copied";function Og(){var i=w.useRef(null);return i.current===null&&(i.current="custom-id-"+Math.random().toString(36).substr(2,9)),i.current}var kg=i=>{var n,{value:r,expandKey:s="",level:o,keys:f=[]}=i,p=us(),{objectSortKeys:h,indentWidth:m,collapsed:d,shouldExpandNodeInitially:v}=gn(),S=Array.isArray(r),x=typeof d=="boolean"?d:typeof d=="number"?o>d:!1,C=(n=p[s])!=null?n:x,E=v&&v(!C,{value:r,keys:f,level:o});if(p[s]===void 0&&v&&!E||C)return null;var L=S?Object.entries(r).map(M=>[Number(M[0]),M[1]]):Object.entries(r);h&&(L=h===!0?L.sort((M,D)=>{var[G]=M,[X]=D;return typeof G=="string"&&typeof X=="string"?G.localeCompare(X):0}):L.sort((M,D)=>{var[G,X]=M,[K,se]=D;return typeof G=="string"&&typeof K=="string"?h(G,K,X,se):0}));var V={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:m,marginLeft:6};return b.jsx("div",{className:"w-rjv-wrap",style:V,children:L.map((M,D)=>{var[G,X]=M;return b.jsx(Lg,{parentValue:r,keyName:G,keys:[...f,G],value:X,level:o},D)})})};kg.displayName="JVR.KeyValues";var Ec=i=>{var{keyName:n,parentValue:r,keys:s,value:o}=i,{highlightUpdates:f}=gn(),p=typeof n=="number",h=w.useRef(null);iE({value:o,highlightUpdates:f,highlightContainer:h});var m={keyName:n,value:o,keys:s,parentValue:r};return b.jsxs(w.Fragment,{children:[b.jsxs("span",{ref:h,children:[b.jsx(Ko,U({isNumber:p,"data-placement":"left"},m)),b.jsx(Cg,U({},m,{children:n})),b.jsx(Ko,U({isNumber:p,"data-placement":"right"},m))]}),b.jsx(ug,U({},m))]})};Ec.displayName="JVR.KayName";var Lg=i=>{var{keyName:n,value:r,parentValue:s,level:o=0,keys:f=[]}=i,p=Ym(),h=Og(),m=Array.isArray(r),d=r instanceof Set,v=r instanceof Map,S=r instanceof Date,x=r instanceof URL,C=r&&typeof r=="object"&&!m&&!d&&!v&&!S&&!x,E=C||m||d||v;if(E){var L=d?Array.from(r):v?Object.fromEntries(r):r;return b.jsx(Rc,{keyName:n,value:L,parentValue:s,initialValue:r,keys:f,level:o+1})}var V={onMouseEnter:()=>p({[h]:!0}),onMouseLeave:()=>p({[h]:!1})};return b.jsxs(Ag,U({className:"w-rjv-line",value:r,keyName:n,keys:f,parentValue:s},V,{children:[b.jsx(Ec,{keyName:n,value:r,keys:f,parentValue:s}),b.jsx(wg,{keyName:n,value:r}),b.jsx(Nc,{keyName:n,value:r,keys:f,parentValue:s,expandKey:h})]}))};Lg.displayName="JVR.KeyValuesItem";var uE=["value","keyName"],oE=["as","render"],zg=i=>{var{CountInfoExtra:n={}}=Bt();return sl(n,i,"CountInfoExtra"),null};zg.displayName="JVR.CountInfoExtra";var Dg=i=>{var{value:n={},keyName:r}=i,s=ge(i,uE),{CountInfoExtra:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,oE);if(!p&&!h.children)return null;var m=f||"span",d=p&&typeof p=="function",v=U({},h,s),S=d&&p(v,{value:n,keyName:r});return S||b.jsx(m,U({},v))};Dg.displayName="JVR.CountInfoExtraComps";var cE=["value","keyName"],fE=["as","render"],_g=i=>{var{CountInfo:n={}}=Bt();return sl(n,i,"CountInfo"),null};_g.displayName="JVR.CountInfo";var Mg=i=>{var{value:n={},keyName:r}=i,s=ge(i,cE),{displayObjectSize:o}=gn(),{CountInfo:f={}}=Bt();if(!o)return null;var{as:p,render:h}=f,m=ge(f,fE),d=p||"span";m.style=U({},m.style,i.style);var v=Object.keys(n).length;m.children||(m.children=v+" item"+(v===1?"":"s"));var S=U({},m,s),x=h&&typeof h=="function",C=x&&h(U({},S,{"data-length":v}),{value:n,keyName:r});return C||b.jsx(d,U({},S))};Mg.displayName="JVR.CountInfoComp";var dE=["as","render"],Ug=i=>{var{Ellipsis:n={}}=Bt();return sl(n,i,"Ellipsis"),null};Ug.displayName="JVR.Ellipsis";var Bg=i=>{var{isExpanded:n,value:r,keyName:s}=i,{Ellipsis:o={}}=Bt(),{as:f,render:p}=o,h=ge(o,dE),m=f||"span",d=p&&typeof p=="function"&&p(U({},h,{"data-expanded":n}),{value:r,keyName:s});return d||(!n||typeof r=="object"&&Object.keys(r).length==0?null:b.jsx(m,U({},h)))};Bg.displayName="JVR.EllipsisComp";var Hg=i=>{var n,{keyName:r,expandKey:s,keys:o=[],initialValue:f,value:p,parentValue:h,level:m}=i,d=us(),v=bN(),{onExpand:S,collapsed:x,shouldExpandNodeInitially:C}=gn(),E=Array.isArray(p),L=p instanceof Set,V=typeof x=="boolean"?x:typeof x=="number"?m>x:!1,M=typeof p=="object",D=(n=d[s])!=null?n:V,G=C&&C(!D,{value:p,keys:o,level:m});d[s]===void 0&&C&&!G&&(D=!G);var X=()=>{var pe={expand:!D,value:p,keyid:s,keyName:r};S&&S(pe),v({[s]:pe.expand})},K={display:"inline-flex",alignItems:"center"},se={transform:"rotate("+(D?"-90":"0")+"deg)",transition:"all 0.3s"},re=Object.keys(p).length,ee=re!==0&&(E||L||M),F={style:K};ee&&(F.onClick=X);var ne={keyName:r,value:p,keys:o,parentValue:h};return b.jsxs("span",U({},F,{children:[ee&&b.jsx(og,U({style:se,expandKey:s},ne)),(r||typeof r=="number")&&b.jsx(Ec,U({},ne)),b.jsx(dg,{value:f,keyName:r}),b.jsx(hg,{value:f,keyName:r}),b.jsx(cg,U({isBrackets:E||L},ne)),b.jsx(Bg,{keyName:r,value:p,isExpanded:D}),b.jsx(Sc,U({isVisiable:D||!ee,isBrackets:E||L},ne)),b.jsx(Mg,{value:p,keyName:r}),b.jsx(Dg,{value:p,keyName:r}),b.jsx(Nc,{keyName:r,value:p,expandKey:s,parentValue:h,keys:o})]}))};Hg.displayName="JVR.NestedOpen";var hE=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],Rc=w.forwardRef((i,n)=>{var{className:r="",parentValue:s,level:o=1,value:f,initialValue:p,keys:h,keyName:m}=i,d=ge(i,hE),v=Ym(),S=Og(),x=[r,"w-rjv-inner"].filter(Boolean).join(" "),C={onMouseEnter:()=>v({[S]:!0}),onMouseLeave:()=>v({[S]:!1})};return b.jsxs("div",U({className:x,ref:n},d,C,{children:[b.jsx(Hg,{expandKey:S,value:f,level:o,keys:h,parentValue:s,keyName:m,initialValue:p}),b.jsx(kg,{expandKey:S,value:f,level:o,keys:h,parentValue:s,keyName:m}),b.jsx(fg,{expandKey:S,value:f,level:o,keys:h})]}))});Rc.displayName="JVR.Container";var Vg=i=>{var{BraceLeft:n={}}=mt();return Qa(n,i,"BraceLeft"),null};Vg.displayName="JVR.BraceLeft";var $g=i=>{var{BraceRight:n={}}=mt();return Qa(n,i,"BraceRight"),null};$g.displayName="JVR.BraceRight";var qg=i=>{var{BracketsLeft:n={}}=mt();return Qa(n,i,"BracketsLeft"),null};qg.displayName="JVR.BracketsLeft";var Gg=i=>{var{BracketsRight:n={}}=mt();return Qa(n,i,"BracketsRight"),null};Gg.displayName="JVR.BracketsRight";var Yg=i=>{var{Arrow:n={}}=mt();return Qa(n,i,"Arrow"),null};Yg.displayName="JVR.Arrow";var Qg=i=>{var{Colon:n={}}=mt();return Qa(n,i,"Colon"),null};Qg.displayName="JVR.Colon";var Zg=i=>{var{Quote:n={}}=mt();return Qa(n,i,"Quote"),null};Zg.displayName="JVR.Quote";var Kg=i=>{var{ValueQuote:n={}}=mt();return Qa(n,i,"ValueQuote"),null};Kg.displayName="JVR.ValueQuote";var Xg=i=>{var{Bigint:n={}}=Le();return Ct(n,i,"Bigint"),null};Xg.displayName="JVR.Bigint";var Jg=i=>{var{Date:n={}}=Le();return Ct(n,i,"Date"),null};Jg.displayName="JVR.Date";var Fg=i=>{var{False:n={}}=Le();return Ct(n,i,"False"),null};Fg.displayName="JVR.False";var Pg=i=>{var{Float:n={}}=Le();return Ct(n,i,"Float"),null};Pg.displayName="JVR.Float";var Wg=i=>{var{Int:n={}}=Le();return Ct(n,i,"Int"),null};Wg.displayName="JVR.Int";var Ig=i=>{var{Map:n={}}=Le();return Ct(n,i,"Map"),null};Ig.displayName="JVR.Map";var ev=i=>{var{Nan:n={}}=Le();return Ct(n,i,"Nan"),null};ev.displayName="JVR.Nan";var tv=i=>{var{Null:n={}}=Le();return Ct(n,i,"Null"),null};tv.displayName="JVR.Null";var av=i=>{var{Set:n={}}=Le();return Ct(n,i,"Set"),null};av.displayName="JVR.Set";var nv=i=>{var{Str:n={}}=Le();return Ct(n,i,"Str"),null};nv.displayName="JVR.StringText";var lv=i=>{var{True:n={}}=Le();return Ct(n,i,"True"),null};lv.displayName="JVR.True";var iv=i=>{var{Undefined:n={}}=Le();return Ct(n,i,"Undefined"),null};iv.displayName="JVR.Undefined";var rv=i=>{var{Url:n={}}=Le();return Ct(n,i,"Url"),null};rv.displayName="JVR.Url";var sv=i=>{var{Copied:n={}}=Bt();return sl(n,i,"Copied"),null};sv.displayName="JVR.Copied";var pE=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","stringEllipsis","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],we=w.forwardRef((i,n)=>{var{className:r="",style:s,value:o,children:f,collapsed:p,shouldExpandNodeInitially:h,indentWidth:m=15,displayObjectSize:d=!0,shortenTextAfterLength:v=30,stringEllipsis:S,highlightUpdates:x=!0,enableClipboard:C=!0,displayDataTypes:E=!0,objectSortKeys:L=!1,onExpand:V,onCopied:M}=i,D=ge(i,pE),G=U({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},s),X=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return b.jsxs(sg,{initialState:{value:o,objectSortKeys:L,indentWidth:m,shouldExpandNodeInitially:h,displayObjectSize:d,collapsed:p,enableClipboard:C,shortenTextAfterLength:v,stringEllipsis:S,highlightUpdates:x,onCopied:M,onExpand:V},initialTypes:{displayDataTypes:E},children:[b.jsx(Rc,U({value:o},D,{ref:n,className:X,style:G})),f]})});we.Bigint=Xg;we.Date=Jg;we.False=Fg;we.Float=Pg;we.Int=Wg;we.Map=Ig;we.Nan=ev;we.Null=tv;we.Set=av;we.String=nv;we.True=lv;we.Undefined=iv;we.Url=rv;we.ValueQuote=Kg;we.Arrow=Yg;we.Colon=Qg;we.Quote=Zg;we.Ellipsis=Ug;we.BraceLeft=Vg;we.BraceRight=$g;we.BracketsLeft=qg;we.BracketsRight=Gg;we.Copied=sv;we.CountInfo=_g;we.CountInfoExtra=zg;we.KeyName=Tg;we.Row=jg;we.displayName="JVR.JsonView";var lm={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};function mE(i){const n=Object.keys(i),r=n.length>0?n[0]:void 0;return(s,o,f={})=>{if(!r)return f.default??s;const p=i[o]??i[r],h=s.split(".");let m=p;for(const d of h){if(typeof m=="string"||!m||!Object.hasOwn(m,d))return f.default??s;m=m[d]}return typeof m=="string"?m:f.default??s}}function gE({siteSchema:i,schemaTranslate:n}){const r=new Set;return b.jsx("ul",{children:b.jsx(Jo,{schema:i,schemaT:n,typeName:"home",displayedNodeTypeNames:r})})}function Jo({schema:i,schemaT:n,typeName:r,depth:s=0,displayedNodeTypeNames:o}){const{i18n:f}=ot(),p=vE(i,r);if(!p)return null;const h=p.routingChildren||[],m=p.regularChildren||[],d=p.lists||[],v=p.documentKind==="routing",S=n(`nodeTypes.${r}.label`,f.language,{default:r});return o.has(r)?b.jsx("li",{children:b.jsxs("div",{children:[v?b.jsx("strong",{children:S}):S," (",b.jsx("code",{children:r}),")"]})}):(o.add(r),b.jsxs("li",{children:[b.jsxs("div",{children:[v?b.jsx("strong",{children:S}):S," (",b.jsx("code",{children:r}),")"]}),d.map(x=>b.jsxs("div",{style:{marginLeft:"30px",color:"#999",fontStyle:"italic"},children:[n(`nodeTypes.${r}.lists.${x.listName}.label`,f.language,{default:x.listName})," ","(",b.jsx("code",{children:x.listName})," [",b.jsx("code",{children:x.parts.join("</code>, <code>")}),"])"]},x.listName)),h.length>0&&b.jsx("ul",{children:h.map(x=>b.jsx(Jo,{schema:i,schemaT:n,typeName:x,depth:s+1,displayedNodeTypeNames:o},x))}),m.length>0&&b.jsx("ul",{children:m.map(x=>b.jsx(Jo,{schema:i,schemaT:n,typeName:x,depth:s+1,displayedNodeTypeNames:o},x))})]}))}function vE(i,n){var r;return(r=i.nodeTypes)==null?void 0:r.find(s=>s.kind==="document"&&s.typeName===n)}const Gr=we;function yE({step:i}){const{t:n}=ot(),[r,s]=w.useState("tree"),{siteSchema:o,l10n:f}=i,p=mE(f),h=(m,d)=>d.keys.length===1&&d.keys[0]==="plugins";return b.jsxs("div",{className:"SchemaViewer",children:[b.jsxs("div",{className:"SchemaViewer-tabs",children:[b.jsx(rt,{className:`SchemaViewer-tab ${r==="tree"?"active":""}`,onClick:()=>s("tree"),children:n("treeView")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="schema"?"active":""}`,onClick:()=>s("schema"),children:n("siteSchema")}),b.jsx(rt,{className:`SchemaViewer-tab ${r==="locales"?"active":""}`,onClick:()=>s("locales"),children:n("labels")})]}),b.jsxs("div",{className:"SchemaViewer-main",children:[b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="tree"?"block":"none"},children:b.jsx(gE,{siteSchema:o,schemaTranslate:p})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="locales"?"block":"none"},children:b.jsx(Gr,{value:f,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0})}),b.jsx("div",{className:"SchemaViewer-content",style:{display:r==="schema"?"block":"none"},children:b.jsxs(Gr,{value:o,style:lm,enableClipboard:!1,displayObjectSize:!1,displayDataTypes:!1,shortenTextAfterLength:0,shouldExpandNodeInitially:h,children:[b.jsx(Gr.Colon,{render:(m,{parentValue:d})=>Array.isArray(d)&&m.children===":"?b.jsx("span",{}):b.jsx("span",{...m})}),b.jsx(Gr.KeyName,{render:({...m},{parentValue:d})=>Array.isArray(d)&&Number.isFinite(m.children)?b.jsx("span",{}):b.jsx("span",{...m})})]})})]})]})}function bE({step:i}){const{t:n}=ot(),{workSession:r,appendNewStep:s}=pn(),[o,f]=w.useState(!1),[p,h]=w.useState(!1),[m,d]=w.useState(!1),[v,S]=w.useState(void 0),x=rl(),C=()=>{f(!o)},E=async V=>{if(!r)return;d(!0),S(void 0);const M=vi();if(!M){S(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"updateSiteSchema",sessionToken:M,prompt:V,fromStepNumber:i.stepNumber});D.success&&D.result?(f(!1),s(D.result),await x(`/step/${D.result.stepNumber}`)):S(n("promptSubmissionFailed"))}catch(D){console.error("Error updating schema:",D),S(n("errorOccurred"))}finally{d(!1)}},L=async({withSampleData:V})=>{if(!r)return;d(!0),S(void 0),h(!1);const M=vi();if(!M){S(n("sessionExpired")),d(!1);return}try{const D=await Ga({command:"generateSite",sessionToken:M,fromStepNumber:i.stepNumber,withSampleData:V});D.success&&D.result?(s(D.result),await x(`/step/${D.result.stepNumber}`)):S(n("generationFailed"))}catch(D){console.error("Error generating site:",D),S(n("errorOccurred"))}finally{d(!1)}};return b.jsx(Tt,{children:b.jsxs("div",{className:"CompletedStep",children:[b.jsx(yE,{step:i}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation")}),b.jsxs("div",{className:"CompletedStep-actions",children:[b.jsx(rt,{onClick:C,className:"CompletedStep-button",children:n("modifySchema")}),b.jsx(rt,{onClick:()=>h(!0),className:"CompletedStep-button",children:n("generateTheWebsite")})]}),o&&b.jsxs("div",{className:"CompletedStep-updateForm",children:[b.jsx("h3",{children:n("updateSchema")}),b.jsx(Om,{placeholder:n("updatePromptPlaceholder"),submitLabel:n("modifySchema"),onSubmit:E,isLoading:m,error:v})]}),b.jsx(hN,{isOpen:p,title:n("generateTheWebsite"),message:n("aboutToGenerateWebsite"),confirmLabel:n("confirm"),onConfirm:L,onCancel:()=>h(!1)}),v&&!o&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:v})})]})})}function xE({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message",children:n("stepFailed")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"error"})]})})}function SE({step:i}){const{t:n}=ot(),r=`${i.adminUiUrl}?local=1`,s=()=>{const o=`
117
117
  ${n("siteGenerated")}
118
118
  ${n("loginEmail")}: ${i.loginEmail}
119
119
  ${n("loginPassword")}: ${i.loginPassword}
120
120
  ${n("siteUrl")}: ${i.siteUrl}
121
- ${n("adminUrl")}: ${i.adminUiUrl}
122
- `.trim();navigator.clipboard.writeText(s)};return b.jsx(Tt,{children:b.jsxs("div",{className:"GeneratedSite",children:[i.status==="pending"&&b.jsxs("div",{className:"GeneratedSite-pending",children:[b.jsx(is,{size:"small"}),b.jsx("p",{children:n("generatingContent")})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"}),b.jsx("div",{className:"GeneratedSite-header",children:b.jsx("h2",{className:"GeneratedSite-title",children:n("generatedSite")})}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("userManual")}}),b.jsxs("div",{className:"GeneratedSite-information",children:[b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginEmail")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginEmail,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginPassword")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginPassword,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("adminUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.adminUiUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.adminUiUrl,"_blank")},"aria-label":n("administration"),children:"↗"})]})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("siteUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.siteUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.siteUrl,"_blank")},"aria-label":n("viewSite"),children:"↗"})]})]})]}),b.jsx("div",{className:"GeneratedSite-actions",children:b.jsx(rt,{onClick:r,className:"GeneratedSite-copy-button",children:n("copyToClipboard")})})]})})}function NE({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message ErrorStep-message-warning",children:n("stepNoEffect")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"warning"})]})})}function im({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"PendingStep",children:[b.jsx("div",{className:"PendingStep-header",children:b.jsx("h2",{children:n("stepTitle",{stepNumber:i.stepNumber,kind:n(i.kind)})})}),b.jsx("div",{className:"PendingStep-spinner",children:b.jsx(is,{size:"large"})}),i.currentActivity&&b.jsxs("div",{className:"PendingStep-activity",children:[b.jsx("h3",{children:n("currentActivity")}),b.jsx("p",{children:n(`activity.${i.currentActivity}`)})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"})]})})}function EE({step:i}){if(i.status==="failed")return b.jsx(xE,{step:i});if(i.status==="noEffect")return b.jsx(NE,{step:i});if(i.kind==="initialSchema"||i.kind==="updateSchema")return i.status==="pending"?b.jsx(im,{step:i}):b.jsx(bE,{step:i});if(i.kind==="generateSite")return i.status==="pending"&&!A2(i)?b.jsx(im,{step:i}):b.jsx(SE,{step:i});throw new Error(`Unknown step kind: ${i.kind}`)}function RE(){const{t:i}=ot(),n=rl(),{stepNumber:r}=x1(),{workSession:s,setActiveStepNumber:o}=pn(),f=r===void 0?void 0:Number.parseInt(r,10);if(w.useEffect(()=>(o(f),()=>o(void 0)),[f,o]),hm(async()=>{if(!s||!s.steps)return;s.steps.some(m=>m.stepNumber===f)||await n("/")},[f,s,n]),!s||!s.steps)return b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(Tt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("noSessionData")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]});const p=s.steps.find(h=>h.stepNumber===f);return p?b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(EE,{step:p})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]}):b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(Tt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("stepNotFound")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]})}function wE({sessionToken:i,onSessionExpired:n}){const{workSession:r,isLoading:s,error:o,setWorkSession:f,setIsLoading:p,setError:h,resetSession:m}=pn();return w.useEffect(()=>()=>{ic()},[]),hm(async()=>{p(!0),h(void 0);try{const d=await Ga({command:"loadWorkSession",sessionToken:i});d.success&&d.result?(f(d.result),at.changeLanguage(d.result.language)):(h(d.userMessage||"Failed to load session"),d.success||(m(),E2(),n()))}catch(d){h("Error connecting to server"),console.error(d)}finally{p(!1)}},[i,f,p,h,n]),s?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Loading session..."})})})}):o?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:o})})})}):r?b.jsx(r2,{children:b.jsxs(M1,{children:[b.jsx(Yr,{path:"/",element:b.jsx(j2,{})}),b.jsx(Yr,{path:"/step/:stepNumber",element:b.jsx(RE,{})}),b.jsx(Yr,{path:"*",element:b.jsx(D1,{to:"/",replace:!0})})]})}):b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Session not available."})})})})}function TE({sessionToken:i}){const{t:n,i18n:r}=ot(),s=async o=>{const f=o.target.value;await r.changeLanguage(f),i&&await Ga({command:"setLanguage",sessionToken:i,language:f})};return b.jsxs("footer",{className:"App-footer",children:[b.jsx("span",{className:"InlineText",dangerouslySetInnerHTML:{__html:n("footerText")}}),b.jsx("span",{className:"LanguageSelector",children:b.jsxs("select",{className:"LanguageSelector-select",value:r.language,onChange:s,"aria-label":"Select language",children:[b.jsx("option",{value:"en",children:"English"}),b.jsx("option",{value:"fr",children:"Français"})]})})]})}function uv({onTokenReceived:i}){const[n,r]=w.useState(!!window.grecaptcha),s=Do;return w.useEffect(()=>{if(s){if(window.onRecaptchaSubmitted=o=>{i(o)},window.onRecaptchaExpired=()=>{i("")},n===!1&&!window.grecaptcha){r("loading");const o=document.createElement("script");o.src="https://www.google.com/recaptcha/api.js",o.async=!0,o.defer=!0,o.onload=()=>r(!0),document.head.appendChild(o)}else r(!0);return()=>{window.onRecaptchaSubmitted=void 0,window.onRecaptchaExpired=void 0}}},[s,i]),b.jsx(b.Fragment,{children:Do&&n===!0?b.jsx("div",{className:"g-recaptcha","data-sitekey":Do,"data-callback":"onRecaptchaSubmitted","data-expired-callback":"onRecaptchaExpired"}):b.jsx("div",{className:"RecaptchaBox",children:b.jsx(is,{})})})}function CE({onVerified:i}){const{t:n,i18n:r}=ot(),[s,o]=w.useState(""),[f,p]=w.useState(),h=async()=>{var m;if(s){p(void 0);try{const d=await Ga({command:"newSession",recaptchaToken:s,language:r.language});d.success&&((m=d.result)!=null&&m.token)?i(d.result.token):p("Failed to create session")}catch(d){p("Error connecting to server"),console.error(d)}}};return b.jsx("div",{className:"Layout-center p-4",children:b.jsxs(Tt,{className:"max-w-2xl p-4",children:[b.jsx("h2",{className:"AppTitle mb-4 text-center",children:n("title")}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("introduction")}}),f&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:f})}),b.jsxs("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap",children:[b.jsx(uv,{onTokenReceived:o}),b.jsx(rt,{label:n("agree"),onClick:h,disabled:!s})]})]})})}function jE({expiredToken:i,onTokenRefreshed:n}){const{t:r}=ot(),[s,o]=w.useState(),f=async p=>{var h;if(p){o(void 0);try{const m=await Ga({command:"renewSession",sessionToken:i,recaptchaToken:p});m.success&&((h=m.result)!=null&&h.token)?n(m.result.token):o(r("sessionRenewalFailed"))}catch(m){o(r("errorConnectingToServer")),console.error(m)}}};return b.jsx("div",{className:"Dialog-backdrop",children:b.jsx("div",{className:"Dialog-container",children:b.jsxs(Tt,{className:"p-4",children:[b.jsx("h2",{className:"mb-4 text-center",children:r("extendYourSession")}),s&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:s})}),b.jsx("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap my-4",children:b.jsx(uv,{onTokenReceived:f})}),b.jsx("p",{className:"InfoText",children:r("newTabRestartMessage")})]})})})}function AE(i){if(!i)return!1;try{const n=i.split(".");if(n.length!==3)return!1;const r=JSON.parse(atob(n[1]));if(!r.exp)return!1;const s=r.exp*1e3;return Date.now()<s?!0:"expired"}catch(n){return console.error("Error checking JWT token validity:",n),!1}}function OE(){const[i,n]=w.useState(),[r,s]=w.useState(),o=pn(h=>h.resetSession);w.useEffect(()=>{const h=vi(),m=AE(h);if(!h||!m){o();return}m==="expired"?s(h):n(h)},[o]);const f=h=>{Wp(h),n(h)},p=h=>{Wp(h),n(h),s(void 0)};return b.jsxs("div",{className:"App",children:[b.jsx("div",{className:"App-content",children:i?b.jsx(wE,{sessionToken:i,onSessionExpired:()=>n(void 0)}):r?b.jsx(jE,{expiredToken:r,onTokenRefreshed:p}):b.jsx(CE,{onVerified:f})}),b.jsx(TE,{sessionToken:i})]})}async function kE(){const i=document.getElementById("site-generator-app");i&&GS.createRoot(i).render(b.jsx(Bo.StrictMode,{children:b.jsx(OE,{})}))}kE().catch(i=>console.error(i));
121
+ ${n("adminUrl")}: ${r}
122
+ `.trim();navigator.clipboard.writeText(o)};return b.jsx(Tt,{children:b.jsxs("div",{className:"GeneratedSite",children:[i.status==="pending"&&b.jsxs("div",{className:"GeneratedSite-pending",children:[b.jsx(is,{size:"small"}),b.jsx("p",{children:n("generatingContent")})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"}),b.jsx("div",{className:"GeneratedSite-header",children:b.jsx("h2",{className:"GeneratedSite-title",children:n("generatedSite")})}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("userManual")}}),b.jsxs("div",{className:"GeneratedSite-information",children:[b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginEmail")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginEmail,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("loginPassword")}),b.jsx("div",{className:"GeneratedSite-value",children:b.jsx("input",{type:"text",value:i.loginPassword,readOnly:!0,className:"GeneratedSite-input"})})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("adminUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:r,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(r,"_blank")},"aria-label":n("administration"),children:"↗"})]})]}),b.jsxs("div",{className:"GeneratedSite-field",children:[b.jsx("div",{className:"GeneratedSite-label",children:n("siteUrl")}),b.jsxs("div",{className:"GeneratedSite-value",children:[b.jsx("input",{type:"text",value:i.siteUrl,readOnly:!0,className:"GeneratedSite-input"}),b.jsx(rt,{className:"GeneratedSite-link-button",onClick:()=>{window.open(i.siteUrl,"_blank")},"aria-label":n("viewSite"),children:"↗"})]})]})]}),b.jsx("div",{className:"GeneratedSite-actions",children:b.jsx(rt,{onClick:s,className:"GeneratedSite-copy-button",children:n("copyToClipboard")})})]})})}function NE({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"ErrorStep",children:[b.jsx("p",{className:"ErrorStep-message ErrorStep-message-warning",children:n("stepNoEffect")}),i.explanation&&b.jsx(Ni,{content:i.explanation,variant:"warning"})]})})}function im({step:i}){const{t:n}=ot();return b.jsx(Tt,{children:b.jsxs("div",{className:"PendingStep",children:[b.jsx("div",{className:"PendingStep-header",children:b.jsx("h2",{children:n("stepTitle",{stepNumber:i.stepNumber,kind:n(i.kind)})})}),b.jsx("div",{className:"PendingStep-spinner",children:b.jsx(is,{size:"large"})}),i.currentActivity&&b.jsxs("div",{className:"PendingStep-activity",children:[b.jsx("h3",{children:n("currentActivity")}),b.jsx("p",{children:n(`activity.${i.currentActivity}`)})]}),i.explanation&&b.jsx(Ni,{content:i.explanation,title:n("explanation"),variant:"info"})]})})}function EE({step:i}){if(i.status==="failed")return b.jsx(xE,{step:i});if(i.status==="noEffect")return b.jsx(NE,{step:i});if(i.kind==="initialSchema"||i.kind==="updateSchema")return i.status==="pending"?b.jsx(im,{step:i}):b.jsx(bE,{step:i});if(i.kind==="generateSite")return i.status==="pending"&&!A2(i)?b.jsx(im,{step:i}):b.jsx(SE,{step:i});throw new Error(`Unknown step kind: ${i.kind}`)}function RE(){const{t:i}=ot(),n=rl(),{stepNumber:r}=x1(),{workSession:s,setActiveStepNumber:o}=pn(),f=r===void 0?void 0:Number.parseInt(r,10);if(w.useEffect(()=>(o(f),()=>o(void 0)),[f,o]),hm(async()=>{if(!s||!s.steps)return;s.steps.some(m=>m.stepNumber===f)||await n("/")},[f,s,n]),!s||!s.steps)return b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(Tt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("noSessionData")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]});const p=s.steps.find(h=>h.stepNumber===f);return p?b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(EE,{step:p})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]}):b.jsxs("div",{className:"RouteLayout",children:[b.jsx("div",{className:"RouteLayout-main",children:b.jsx(Tt,{className:"p-4",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:i("stepNotFound")})})})}),b.jsx("div",{className:"RouteLayout-sidebar",children:b.jsx(Kr,{activeStep:f})})]})}function wE({sessionToken:i,onSessionExpired:n}){const{workSession:r,isLoading:s,error:o,setWorkSession:f,setIsLoading:p,setError:h,resetSession:m}=pn();return w.useEffect(()=>()=>{ic()},[]),hm(async()=>{p(!0),h(void 0);try{const d=await Ga({command:"loadWorkSession",sessionToken:i});d.success&&d.result?(f(d.result),at.changeLanguage(d.result.language)):(h(d.userMessage||"Failed to load session"),d.success||(m(),E2(),n()))}catch(d){h("Error connecting to server"),console.error(d)}finally{p(!1)}},[i,f,p,h,n]),s?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Loading session..."})})})}):o?b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Alert error",children:b.jsx("p",{children:o})})})}):r?b.jsx(r2,{children:b.jsxs(M1,{children:[b.jsx(Yr,{path:"/",element:b.jsx(j2,{})}),b.jsx(Yr,{path:"/step/:stepNumber",element:b.jsx(RE,{})}),b.jsx(Yr,{path:"*",element:b.jsx(D1,{to:"/",replace:!0})})]})}):b.jsx("div",{className:"Layout-center p-4",children:b.jsx(Tt,{className:"p-4 max-w-2xl",children:b.jsx("div",{className:"Text text-center",children:b.jsx("p",{children:"Session not available."})})})})}function TE({sessionToken:i}){const{t:n,i18n:r}=ot(),s=async o=>{const f=o.target.value;await r.changeLanguage(f),i&&await Ga({command:"setLanguage",sessionToken:i,language:f})};return b.jsxs("footer",{className:"App-footer",children:[b.jsx("span",{className:"InlineText",dangerouslySetInnerHTML:{__html:n("footerText")}}),b.jsx("span",{className:"LanguageSelector",children:b.jsxs("select",{className:"LanguageSelector-select",value:r.language,onChange:s,"aria-label":"Select language",children:[b.jsx("option",{value:"en",children:"English"}),b.jsx("option",{value:"fr",children:"Français"})]})})]})}function uv({onTokenReceived:i}){const[n,r]=w.useState(!!window.grecaptcha),s=Do;return w.useEffect(()=>{if(s){if(window.onRecaptchaSubmitted=o=>{i(o)},window.onRecaptchaExpired=()=>{i("")},n===!1&&!window.grecaptcha){r("loading");const o=document.createElement("script");o.src="https://www.google.com/recaptcha/api.js",o.async=!0,o.defer=!0,o.onload=()=>r(!0),document.head.appendChild(o)}else r(!0);return()=>{window.onRecaptchaSubmitted=void 0,window.onRecaptchaExpired=void 0}}},[s,i]),b.jsx(b.Fragment,{children:Do&&n===!0?b.jsx("div",{className:"g-recaptcha","data-sitekey":Do,"data-callback":"onRecaptchaSubmitted","data-expired-callback":"onRecaptchaExpired"}):b.jsx("div",{className:"RecaptchaBox",children:b.jsx(is,{})})})}function CE({onVerified:i}){const{t:n,i18n:r}=ot(),[s,o]=w.useState(""),[f,p]=w.useState(),h=async()=>{var m;if(s){p(void 0);try{const d=await Ga({command:"newSession",recaptchaToken:s,language:r.language});d.success&&((m=d.result)!=null&&m.token)?i(d.result.token):p("Failed to create session")}catch(d){p("Error connecting to server"),console.error(d)}}};return b.jsx("div",{className:"Layout-center p-4",children:b.jsxs(Tt,{className:"max-w-2xl p-4",children:[b.jsx("h2",{className:"AppTitle mb-4 text-center",children:n("title")}),b.jsx("div",{className:"Text my-4",dangerouslySetInnerHTML:{__html:n("introduction")}}),f&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:f})}),b.jsxs("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap",children:[b.jsx(uv,{onTokenReceived:o}),b.jsx(rt,{label:n("agree"),onClick:h,disabled:!s})]})]})})}function jE({expiredToken:i,onTokenRefreshed:n}){const{t:r}=ot(),[s,o]=w.useState(),f=async p=>{var h;if(p){o(void 0);try{const m=await Ga({command:"renewSession",sessionToken:i,recaptchaToken:p});m.success&&((h=m.result)!=null&&h.token)?n(m.result.token):o(r("sessionRenewalFailed"))}catch(m){o(r("errorConnectingToServer")),console.error(m)}}};return b.jsx("div",{className:"Dialog-backdrop",children:b.jsx("div",{className:"Dialog-container",children:b.jsxs(Tt,{className:"p-4",children:[b.jsx("h2",{className:"mb-4 text-center",children:r("extendYourSession")}),s&&b.jsx("div",{className:"Alert error",children:b.jsx("p",{className:"m-0",children:s})}),b.jsx("div",{className:"Layout-flex Layout-align-center Layout-gap Layout-justify-center Layout-wrap my-4",children:b.jsx(uv,{onTokenReceived:f})}),b.jsx("p",{className:"InfoText",children:r("newTabRestartMessage")})]})})})}function AE(i){if(!i)return!1;try{const n=i.split(".");if(n.length!==3)return!1;const r=JSON.parse(atob(n[1]));if(!r.exp)return!1;const s=r.exp*1e3;return Date.now()<s?!0:"expired"}catch(n){return console.error("Error checking JWT token validity:",n),!1}}function OE(){const[i,n]=w.useState(),[r,s]=w.useState(),o=pn(h=>h.resetSession);w.useEffect(()=>{const h=vi(),m=AE(h);if(!h||!m){o();return}m==="expired"?s(h):n(h)},[o]);const f=h=>{Wp(h),n(h)},p=h=>{Wp(h),n(h),s(void 0)};return b.jsxs("div",{className:"App",children:[b.jsx("div",{className:"App-content",children:i?b.jsx(wE,{sessionToken:i,onSessionExpired:()=>n(void 0)}):r?b.jsx(jE,{expiredToken:r,onTokenRefreshed:p}):b.jsx(CE,{onVerified:f})}),b.jsx(TE,{sessionToken:i})]})}async function kE(){const i=document.getElementById("site-generator-app");i&&GS.createRoot(i).render(b.jsx(Bo.StrictMode,{children:b.jsx(OE,{})}))}kE().catch(i=>console.error(i));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/site-generator-plugin",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "description": "ParoiCMS Site Generator Plugin",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@anthropic-ai/sdk": "~0.54.0",
32
32
  "@mistralai/mistralai": "~1.7.2",
33
- "@paroicms/script-lib": "0.2.1",
33
+ "@paroicms/script-lib": "0.2.2",
34
34
  "arktype": "~2.1.20",
35
35
  "jsonwebtoken": "~9.0.2",
36
36
  "knex": "~3.1.0",
@@ -44,9 +44,9 @@
44
44
  "@paroicms/public-server-lib": "0"
45
45
  },
46
46
  "devDependencies": {
47
- "@paroicms/internal-anywhere-lib": "1.34.0",
48
- "@paroicms/internal-server-lib": "1.20.1",
49
- "@paroicms/public-server-lib": "0.45.0",
47
+ "@paroicms/internal-anywhere-lib": "1.34.1",
48
+ "@paroicms/internal-server-lib": "1.20.3",
49
+ "@paroicms/public-server-lib": "0.45.1",
50
50
  "@types/node": "~24.0.1",
51
51
  "marked": "~15.0.12",
52
52
  "nodemon": "~3.1.10",