import './async-Djx13DAD.js';
import { g as attr_style, d as attr_class, j as stringify, a as attr, e as ensure_array_like } from './index-B7gr0Dsc.js';
import { e } from './Check-THd8EJll.js';
import { h } from './Copy-DNPvPwdp.js';
import './MarkdownCode.svelte_svelte_type_style_lang-DJRtJayx.js';
import { w as w$1 } from './IconButton-7VBZdgpA.js';
import { p } from './Empty-uaeWNu3s.js';
import './2-CeYbpaU1.js';
import { y } from './IconButtonWrapper-DlgTGGi-.js';
import { e as escape_html } from './escaping-CBnpiEl5.js';

function J(c){c.push('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--mdi" width="100%" height="100%" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M5 3h2v2H5v5a2 2 0 0 1-2 2a2 2 0 0 1 2 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 0 0-2-2H0v-2h1a2 2 0 0 0 2-2V5a2 2 0 0 1 2-2m14 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2a2 2 0 0 1-2-2V5h-2V3h2m-7 12a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m8 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1Z"></path></svg>');}function w(c,b){c.component(s$1=>{let{value:t,depth:n=0,is_root:g=false,is_last_item:f=true,key:y=null,open:_=false,theme_mode:m="system",show_indices:h=false,interactive:v=true}=b,o=_?false:n>=3,u=[];function i(l){return l!==null&&(typeof l=="object"||Array.isArray(l))}function d(l){return Array.isArray(l)?`Array(${l.length})`:typeof l=="object"&&l!==null?`Object(${Object.keys(l).length})`:String(l)}if(s$1.push(`<div${attr_class("json-node svelte-1olemhd",void 0,{root:g,"dark-mode":m==="dark"})}${attr_style(`--depth: ${stringify(n)};`)}><div${attr_class("line svelte-1olemhd",void 0,{collapsed:o})}><span class="line-number svelte-1olemhd"></span> <span class="content svelte-1olemhd">`),i(t)?(s$1.push("<!--[-->"),s$1.push(`<button${attr("data-pseudo-content",v?o?"▶":"▼":"")}${attr("aria-label",o?"Expand":"Collapse")} class="toggle svelte-1olemhd"${attr("disabled",!v,true)}></button>`)):s$1.push("<!--[!-->"),s$1.push("<!--]--> "),y!==null?(s$1.push("<!--[-->"),s$1.push(`<span class="key svelte-1olemhd">"${escape_html(y)}"</span><span class="punctuation colon svelte-1olemhd">:</span>`)):s$1.push("<!--[!-->"),s$1.push("<!--]--> "),i(t)?(s$1.push("<!--[-->"),s$1.push(`<span${attr_class("punctuation bracket svelte-1olemhd",void 0,{"square-bracket":Array.isArray(t)})}>${escape_html(Array.isArray(t)?"[":"{")}</span> `),o?(s$1.push("<!--[-->"),s$1.push(`<button class="preview svelte-1olemhd">${escape_html(d(t))}</button> <span${attr_class("punctuation bracket svelte-1olemhd",void 0,{"square-bracket":Array.isArray(t)})}>${escape_html(Array.isArray(t)?"]":"}")}</span>`)):s$1.push("<!--[!-->"),s$1.push("<!--]-->")):(s$1.push("<!--[!-->"),typeof t=="string"?(s$1.push("<!--[-->"),s$1.push(`<span class="value string svelte-1olemhd">"${escape_html(t)}"</span>`)):(s$1.push("<!--[!-->"),typeof t=="number"?(s$1.push("<!--[-->"),s$1.push(`<span class="value number svelte-1olemhd">${escape_html(t)}</span>`)):(s$1.push("<!--[!-->"),typeof t=="boolean"?(s$1.push("<!--[-->"),s$1.push(`<span class="value bool svelte-1olemhd">${escape_html(t.toString())}</span>`)):(s$1.push("<!--[!-->"),t===null?(s$1.push("<!--[-->"),s$1.push('<span class="value null svelte-1olemhd">null</span>')):(s$1.push("<!--[!-->"),s$1.push(`<span>${escape_html(t)}</span>`)),s$1.push("<!--]-->")),s$1.push("<!--]-->")),s$1.push("<!--]-->")),s$1.push("<!--]-->")),s$1.push("<!--]--> "),!f&&(!i(t)||o)?(s$1.push("<!--[-->"),s$1.push('<span class="punctuation svelte-1olemhd">,</span>')):s$1.push("<!--[!-->"),s$1.push("<!--]--></span></div> "),i(t)){s$1.push("<!--[-->"),s$1.push(`<div${attr_class("children svelte-1olemhd",void 0,{hidden:o})}><!--[-->`);const l=ensure_array_like(u);for(let e=0,p=l.length;e<p;e++){let[k,A]=l[e];w(s$1,{value:A,depth:n+1,is_last_item:e===u.length-1,key:Array.isArray(t)&&!h?null:k,open:_,theme_mode:m,show_indices:h,interactive:v});}s$1.push(`<!--]--> <div class="line svelte-1olemhd"><span class="line-number svelte-1olemhd"></span> <span class="content svelte-1olemhd"><span${attr_class("punctuation bracket svelte-1olemhd",void 0,{"square-bracket":Array.isArray(t)})}>${escape_html(Array.isArray(t)?"]":"}")}</span> `),f?s$1.push("<!--[!-->"):(s$1.push("<!--[-->"),s$1.push('<span class="punctuation svelte-1olemhd">,</span>')),s$1.push("<!--]--></span></div></div>");}else s$1.push("<!--[!-->");s$1.push("<!--]--></div>");});}function P(c,b){c.component(s$1=>{let{value:t={},open:n=false,theme_mode:g="system",show_indices:f=false,label_height:y$1,interactive:_=true,show_copy_button:m=true,buttons:h$1=null,on_custom_button_click:v=null}=b,o=`calc(100% - ${y$1}px)`,u=false,i;function d(){u=true,i&&clearTimeout(i),i=setTimeout(()=>{u=false;},1e3);}async function l(){"clipboard"in navigator&&(await navigator.clipboard.writeText(JSON.stringify(t,null,2)),d());}function e$1(p){return p&&Object.keys(p).length===0&&Object.getPrototypeOf(p)===Object.prototype&&JSON.stringify(p)===JSON.stringify({})}t&&t!=='""'&&!e$1(t)?(s$1.push("<!--[-->"),m||h$1&&h$1.some(p=>typeof p!="string")?(s$1.push("<!--[-->"),y(s$1,{buttons:h$1,on_custom_button_click:v,children:p=>{m?(p.push("<!--[-->"),w$1(p,{show_label:false,label:u?"Copied":"Copy",Icon:u?e:h,onclick:()=>l()})):p.push("<!--[!-->"),p.push("<!--]-->");}})):s$1.push("<!--[!-->"),s$1.push(`<!--]--> <div class="json-holder svelte-1lc38wd"${attr_style("",{"max-height":o})}>`),w(s$1,{value:t,depth:0,is_root:true,open:n,theme_mode:g,show_indices:f,interactive:_}),s$1.push("<!----></div>")):(s$1.push("<!--[!-->"),s$1.push('<div class="empty-wrapper svelte-1lc38wd">'),p(s$1,{children:p=>{J(p);},$$slots:{default:true}}),s$1.push("<!----></div>")),s$1.push("<!--]-->");});}

export { J, P };
//# sourceMappingURL=JSON-tGH46T_l.js.map
