@ragrails/api-playground-react 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,17 +1,16 @@
1
1
  const __RAGRAILS_API_PLAYGROUND_CSS__="/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-green-500:oklch(72.3% .219 149.579);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--font-heading:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-2{right:calc(var(--spacing) * 2)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-px{bottom:-1px}.left-0{left:0}.isolate{isolation:isolate}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.\\[field-sizing\\:content\\]{field-sizing:content}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-full{height:100%}.min-h-0{min-height:0}.min-h-10{min-height:calc(var(--spacing) * 10)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-11{width:calc(var(--spacing) * 11)}.w-full{width:100%}.w-max{width:max-content}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-\\[7rem\\]{min-width:7rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.-skew-x-12{--tw-skew-x:skewX(calc(12deg * -1));transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[shimmer_2s_linear_infinite\\]{animation:2s linear infinite shimmer}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[auto_1fr_auto\\]{grid-template-columns:auto 1fr auto}.\\[grid-template-rows\\:1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[\\#52b788\\]\\/25{border-color:oklab(70.6413% -.111726 .0387149/.25)}.border-\\[\\#FC7070\\]\\/20{border-color:oklab(71.4755% .158854 .0655041/.2)}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-primary,.border-primary\\/30{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\\/30{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-red-500\\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/60{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.border-sky-500\\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.border-sky-500\\/30{border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.border-transparent{border-color:#0000}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#4A0F0F\\]{background-color:#4a0f0f}.bg-\\[\\#52b788\\]\\/15{background-color:oklab(70.6413% -.111726 .0387149/.15)}.bg-\\[\\#EF5350\\]{background-color:#ef5350}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-bg{background-color:var(--bg)}.bg-primary{background-color:var(--primary)}.bg-primary-soft{background-color:var(--primary-soft)}.bg-sky-500\\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\\/15{background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-muted{--tw-gradient-from:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-content{--tw-gradient-via:var(--text);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/5{--tw-gradient-via:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.via-white\\/5{--tw-gradient-via:color-mix(in oklab, var(--color-white) 5%, transparent)}}.via-white\\/5{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/10{--tw-gradient-via:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.via-white\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-white) 10%, transparent)}}.via-white\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/25{--tw-gradient-via:#ffffff40}@supports (color:color-mix(in lab, red, red)){.via-white\\/25{--tw-gradient-via:color-mix(in oklab, var(--color-white) 25%, transparent)}}.via-white\\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-muted{--tw-gradient-to:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.pr-28{padding-right:calc(var(--spacing) * 28)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-heading{font-family:var(--font-heading)}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-\\[550\\]{--tw-font-weight:550;font-weight:550}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre{white-space:pre}.text-\\[\\#52b788\\]{color:#52b788}.text-\\[\\#FC7070\\]{color:#fc7070}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-content{color:var(--text)}.text-green-500{color:var(--color-green-500)}.text-muted,.text-muted\\/60{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/60{color:color-mix(in oklab, var(--text-muted) 60%, transparent)}}.text-primary{color:var(--primary)}.text-primary-contrast{color:var(--primary-contrast)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-sky-400{color:var(--color-sky-400)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\:text-transparent:is(:where(.group):hover *){color:#0000}.group-hover\\:duration-\\[1200ms\\]:is(:where(.group):hover *){--tw-duration:1.2s;transition-duration:1.2s}.group-hover\\/seg\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group\\/seg):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\/seg\\:text-transparent:is(:where(.group\\/seg):hover *){color:#0000}}.group-disabled\\:hidden:is(:where(.group):disabled *){display:none}.placeholder\\:text-muted::placeholder,.placeholder\\:text-muted\\/50::placeholder{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-muted\\/50::placeholder{color:color-mix(in oklab, var(--text-muted) 50%, transparent)}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-default:read-only{cursor:default}.focus-within\\:border-primary:focus-within,.focus-within\\:border-primary\\/60:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/60:focus-within{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus-within\\:border-primary\\/70:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/70:focus-within{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 15%, transparent)}}.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}@media (hover:hover){.hover\\:border-primary\\/70:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-primary\\/70:hover{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.hover\\:bg-\\[\\#e53935\\]:hover{background-color:#e53935}.hover\\:bg-border:hover{background-color:var(--border)}.hover\\:bg-primary-hover:hover{background-color:var(--primary-hover)}.hover\\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\\:text-content:hover{color:var(--text)}.hover\\:text-primary-hover:hover{color:var(--primary-hover)}}.focus\\:border-primary\\/60:focus{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:border-primary\\/60:focus{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-primary\\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.active\\:scale-105:active{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[dropdown-expand_0\\.2s_ease-out\\]{animation:.2s ease-out dropdown-expand}.motion-safe\\:animate-\\[dropdown-expand_0\\.18s_ease-in_reverse_forwards\\]{animation:.18s ease-in reverse forwards dropdown-expand}.motion-safe\\:animate-\\[fade-in_0\\.6s_ease-out_both\\]{animation:.6s ease-out both fade-in}.motion-safe\\:animate-\\[widget-slide-in_180ms_ease-out\\]{animation:.18s ease-out widget-slide-in}}@media (prefers-reduced-motion:reduce){.motion-reduce\\:active\\:scale-100:active{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@media (min-width:40rem){.sm\\:inline{display:inline}}@media (min-width:48rem){.md\\:col-start-auto{grid-column-start:auto}.md\\:row-span-1{grid-row:span 1/span 1}.md\\:inline{display:inline}.md\\:grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.md\\:grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.md\\:grid-cols-\\[auto_1fr_1fr_auto\\]{grid-template-columns:auto 1fr 1fr auto}.md\\:grid-cols-\\[minmax\\(0\\,0\\.7fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}}.\\[\\&_button\\]\\:text-\\[14px\\] button{font-size:14px}[data-theme=light]{--bg:#f2f4f7;--surface:#fff;--surface-2:#e7ebf3;--border:#d2d7df;--text:#0f1216;--text-muted:#4b5563;--primary:#7855ff;--primary-contrast:#fff}[data-theme=dark]{--bg:#16171d;--surface:#1f2028;--surface-2:#2a2c36;--border:#2e303a;--text:#f3f4f6;--text-muted:#9ca3af;--primary:#7855ff;--primary-contrast:#fff}[data-theme]{--primary-hover:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-hover:color-mix(in srgb, var(--primary) 86%, #000)}}[data-theme]{--primary-soft:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-soft:color-mix(in srgb, var(--primary) 16%, transparent)}}@keyframes shimmer{to{transform:translate(100%)}}@keyframes text-shimmer{0%{background-position:200%}to{background-position:-200%}}@keyframes dropdown-expand{0%{opacity:0;grid-template-rows:0fr}to{opacity:1;grid-template-rows:1fr}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes widget-slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:var(--text-muted);font-style:italic}.token.punctuation{color:var(--text-muted)}.token.property,.token.tag,.token.symbol,.token.deleted{color:#7aa2f7}.token.number{color:#e5c07b}.token.boolean,.token.null,.token.keyword,.token.atrule,.token.important{color:var(--primary)}.token.string,.token.char,.token.attr-name,.token.attr-value,.token.regex,.token.inserted,.token.selector{color:#9ece6a}.token.operator,.token.entity,.token.url,.token.variable{color:var(--text)}.token.function,.token.class-name{color:#61afef}.token.builtin{color:#56b6c2}[data-theme=light] .token.property,[data-theme=light] .token.tag,[data-theme=light] .token.symbol,[data-theme=light] .token.deleted{color:#0550ae}[data-theme=light] .token.number{color:#953800}[data-theme=light] .token.string,[data-theme=light] .token.char,[data-theme=light] .token.attr-name,[data-theme=light] .token.attr-value,[data-theme=light] .token.regex,[data-theme=light] .token.inserted,[data-theme=light] .token.selector{color:#116329}[data-theme=light] .token.function,[data-theme=light] .token.class-name{color:#1f6feb}[data-theme=light] .token.builtin{color:#0e7490}@layer base{[data-theme] button:not(:disabled),[data-theme] [role=button]:not([aria-disabled=true]){cursor:pointer}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-ordinal{syntax:\"*\";inherits:false}@property --tw-slashed-zero{syntax:\"*\";inherits:false}@property --tw-numeric-figure{syntax:\"*\";inherits:false}@property --tw-numeric-spacing{syntax:\"*\";inherits:false}@property --tw-numeric-fraction{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}";
2
2
  if(typeof document!=="undefined"&&!document.getElementById("ragrails-api-playground-react-styles")){const style=document.createElement("style");style.id="ragrails-api-playground-react-styles";style.textContent=__RAGRAILS_API_PLAYGROUND_CSS__;(document.head||document.documentElement).appendChild(style);}
3
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require("react");l=c(l,1);let u=require("react/jsx-runtime");function d(...e){return e.filter(Boolean).join(` `)}var f={copy:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`path`,{fill:`currentColor`,d:`M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593s1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.6 3.6 0 0 0 15.24 2`}),(0,u.jsx)(`path`,{fill:`currentColor`,d:`M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847S21 8.671 21 11.397v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936z`})]}),check:(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m4 12.9l3.143 3.6L15 7.5m5 .063l-8.572 9L11 16`}),download:(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M3 15c0 2.828 0 4.243.879 5.121C4.757 21 6.172 21 9 21h6c2.828 0 4.243 0 5.121-.879C21 19.243 21 17.828 21 15M12 3v13m0 0l4-4.375M12 16l-4-4.375`}),send:(0,u.jsxs)(`g`,{fill:`none`,children:[(0,u.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,d:`m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z`}),(0,u.jsx)(`path`,{fill:`currentColor`,d:`M16.212 8.848a.75.75 0 0 0-1.055-1.066zm-5.55 5.488l5.55-5.488l-1.055-1.066l-5.55 5.488z`})]}),share:(0,u.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,children:[(0,u.jsx)(`path`,{strokeLinejoin:`round`,d:`M22 7h-8c-1.818 0-2.913.892-3.32 1.3q-.187.19-.19.19q0 .003-.19.19C9.892 9.087 9 10.182 9 12v3m13-8l-5-5m5 5l-5 5`}),(0,u.jsx)(`path`,{d:`M3.465 20.535C4.93 22 7.287 22 12.003 22c4.715 0 7.073 0 8.537-1.465c1.242-1.241 1.431-3.123 1.46-6.537M3.465 20.535C2 19.07 2 16.713 2 11.997m1.465 8.538C4.929 22 7.286 22 12 22s7.071 0 8.535-1.465c1.241-1.24 1.43-3.122 1.46-6.536m-18.53 6.536C2 19.071 2 16.714 2 12m1.465-8.54C4.706 2.218 6.588 2.029 10.002 2M2.055 8c.11-2.193.436-3.562 1.41-4.536c1.24-1.24 3.122-1.43 6.535-1.459`})]}),code:(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,d:`m17 7.83l1.697 1.526c1.542 1.389 2.313 2.083 2.313 2.974c0 .89-.771 1.585-2.314 2.973L17 16.83M13.987 5L12 12.415l-1.987 7.415M7 7.83L5.304 9.356C3.76 10.745 2.99 11.44 2.99 12.33s.771 1.585 2.314 2.973L7 16.83`}),"arrow-left":(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M20 12H4m0 0l6-6m-6 6l6 6`}),"arrow-right":(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M4 12h16m0 0l-6-6m6 6l-6 6`}),"chevron-down":(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m19 9l-7 6l-7-6`}),trash:(0,u.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,u.jsx)(`path`,{strokeLinecap:`round`,d:`M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5`}),(0,u.jsx)(`path`,{d:`M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6`})]}),plus:(0,u.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,u.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,u.jsx)(`path`,{strokeLinecap:`round`,d:`M15 12h-3m0 0H9m3 0V9m0 3v3`})]}),moon:(0,u.jsx)(`path`,{fill:`currentColor`,d:`M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10`}),sun:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`path`,{fill:`currentColor`,d:`M17 12a5 5 0 1 1-10 0a5 5 0 0 1 10 0`}),(0,u.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M12 1.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M3.669 3.716a.75.75 0 0 1 1.06-.047L6.95 5.7a.75.75 0 1 1-1.012 1.107L3.716 4.776a.75.75 0 0 1-.047-1.06m16.662 0a.75.75 0 0 1-.047 1.06l-2.222 2.031A.75.75 0 0 1 17.05 5.7l2.222-2.031a.75.75 0 0 1 1.06.047M1.25 12a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m18 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75m-2.224 5.025a.75.75 0 0 1 1.06 0l2.222 2.223a.75.75 0 0 1-1.06 1.06l-2.222-2.222a.75.75 0 0 1 0-1.06m-10.051 0a.75.75 0 0 1 0 1.061l-2.223 2.222a.75.75 0 0 1-1.06-1.06l2.222-2.223a.75.75 0 0 1 1.06 0M12 19.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75`,clipRule:`evenodd`})]}),palette:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`mask`,{id:`solar-palette-a`,fill:`#fff`,children:(0,u.jsx)(`path`,{d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,u.jsx)(`mask`,{id:`solar-palette-b`,fill:`#fff`,children:(0,u.jsx)(`path`,{d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,u.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,children:[(0,u.jsx)(`path`,{strokeWidth:`1.5`,d:`M2 12.026c0 5.146 3.867 9.387 8.847 9.96c.735.085 1.447-.228 1.97-.753a1.68 1.68 0 0 0 0-2.372c-.523-.525-.95-1.307-.555-1.934c1.576-2.508 9.738 3.251 9.738-4.9C22 6.488 17.523 2 12 2S2 6.489 2 12.026Z`}),(0,u.jsx)(`circle`,{cx:`17.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,u.jsx)(`circle`,{cx:`6.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,u.jsx)(`path`,{strokeWidth:`3`,d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-a)`}),(0,u.jsx)(`path`,{strokeWidth:`3`,d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-b)`})]})]}),magic:(0,u.jsx)(`path`,{fill:`currentColor`,d:`M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51l.038-.04l4-4l.04-.038l-1.588-1.587a2.883 2.883 0 0 0-4.077 0m6.723 2.645l-.038.04l-4 4l-.04.038l9.588 9.588a2.884 2.884 0 0 0 4.078-4.078zM16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274zm3.867 6.823a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273zM5.133 15.307a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z`}),restart:(0,u.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m18.364 8.05l-.707-.707a8 8 0 1 0 2.28 4.658m-1.573-3.95h-4.243m4.243 0V3.807`}),close:(0,u.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,u.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,u.jsx)(`path`,{strokeLinecap:`round`,d:`m14.5 9.5l-5 5m0-5l5 5`})]}),eye:(0,u.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,u.jsx)(`path`,{d:`M3.275 15.296C2.425 14.192 2 13.639 2 12c0-1.64.425-2.191 1.275-3.296C4.972 6.5 7.818 4 12 4s7.028 2.5 8.725 4.704C21.575 9.81 22 10.361 22 12c0 1.64-.425 2.191-1.275 3.296C19.028 17.5 16.182 20 12 20s-7.028-2.5-8.725-4.704Z`}),(0,u.jsx)(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z`})]}),"eye-closed":(0,u.jsx)(`path`,{fill:`currentColor`,d:`M2.69 6.705a.75.75 0 0 0-1.38.59zm12.897 6.624l-.274-.698zm-6.546.409a.75.75 0 1 0-1.257-.818zm-2.67 1.353a.75.75 0 1 0 1.258.818zM22.69 7.295a.75.75 0 0 0-1.378-.59zM19 11.13l-.513-.547zm.97 2.03a.75.75 0 1 0 1.06-1.06zm-8.72 3.34a.75.75 0 0 0 1.5 0zm5.121-.591a.75.75 0 1 0 1.258-.818zm-10.84-4.25A.75.75 0 0 0 4.47 10.6zm-2.561.44a.75.75 0 0 0 1.06 1.06zM12 13.25c-3.224 0-5.539-1.605-7.075-3.26a13.6 13.6 0 0 1-1.702-2.28a12 12 0 0 1-.507-.946l-.022-.049l-.004-.01l-.001-.001L2 7l-.69.296h.001l.001.003l.003.006l.04.088q.039.088.117.243c.103.206.256.496.462.841c.41.69 1.035 1.61 1.891 2.533C5.54 12.855 8.224 14.75 12 14.75zm3.313-.62c-.97.383-2.071.62-3.313.62v1.5c1.438 0 2.725-.276 3.862-.723zm-7.529.29l-1.413 2.17l1.258.818l1.412-2.171zM22 7l-.69-.296h.001v.002l-.007.013l-.028.062a12 12 0 0 1-.64 1.162a13.3 13.3 0 0 1-2.15 2.639l1.027 1.094a14.8 14.8 0 0 0 3.122-4.26l.039-.085l.01-.024l.004-.007v-.003h.001v-.001zm-3.513 3.582c-.86.806-1.913 1.552-3.174 2.049l.549 1.396c1.473-.58 2.685-1.444 3.651-2.351zm-.017 1.077l1.5 1.5l1.06-1.06l-1.5-1.5zM11.25 14v2.5h1.5V14zm3.709-.262l1.412 2.171l1.258-.818l-1.413-2.171zm-10.49-3.14l-1.5 1.5L4.03 13.16l1.5-1.5z`})},p=({name:e,size:t,className:n,...r})=>(0,u.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t??`1em`,height:t??`1em`,className:d(`inline-block shrink-0`,n),"aria-hidden":r[`aria-label`]?void 0:!0,...r,children:f[e]}),m={primary:`bg-primary text-primary-contrast hover:bg-primary-hover`,secondary:`bg-surface-2 text-content border border-border hover:bg-border`,ghost:`bg-transparent text-muted hover:text-content`,danger:`bg-[#EF5350] text-white hover:bg-[#e53935]`},h={sm:`text-[12px] px-3 py-1.5`,md:`text-[14px] px-4 py-2`,lg:`text-[16px] px-5 py-2.5`},g={sm:`gap-1.5`,md:`gap-2`,lg:`gap-2`},_=({variant:e=`primary`,size:t=`md`,isLoading:n=!1,leftIcon:r,rightIcon:i,className:a,children:o,disabled:s,...c})=>(0,u.jsxs)(`button`,{className:d(`group relative isolate overflow-hidden rounded-lg font-heading font-medium`,`inline-flex items-center justify-center`,`transition duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`active:scale-105 motion-reduce:active:scale-100`,`disabled:opacity-50 disabled:cursor-not-allowed`,m[e],h[t],a),disabled:s||n,...c,children:[e!==`ghost`&&(0,u.jsx)(`span`,{"aria-hidden":`true`,className:d(`pointer-events-none absolute inset-0 -z-10 -translate-x-full -skew-x-12`,`bg-gradient-to-r from-transparent via-white/25 to-transparent`,`transition-transform duration-0 ease-out`,`group-hover:translate-x-full group-hover:duration-[1200ms] group-disabled:hidden`)}),(0,u.jsxs)(`span`,{className:d(`inline-flex items-center`,g[t]),children:[n?(0,u.jsx)(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`}):r,(0,u.jsx)(`span`,{className:d(e===`ghost`&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover:text-transparent group-hover:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:o}),!n&&i]})]}),v={ghost:`text-muted hover:bg-surface-2 hover:text-content`,surface:`bg-surface-2 text-muted border border-border hover:text-content`,solid:`bg-primary text-primary-contrast hover:bg-primary-hover`},y={sm:`h-7 w-7`,md:`h-9 w-9`},b=({variant:e=`ghost`,size:t=`md`,className:n,children:r,...i})=>(0,u.jsx)(`button`,{className:d(`inline-flex items-center justify-center rounded-lg transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:opacity-50 disabled:cursor-not-allowed`,v[e],y[t],n),...i,children:r});async function x(e){try{if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard API failed, trying fallback:`,e)}let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,t.value.length);try{let e=document.execCommand(`copy`);return document.body.removeChild(t),e}catch(e){return console.error(`execCommand copy failed:`,e),document.body.removeChild(t),!1}}catch(e){return console.error(`Failed to copy text:`,e),!1}}function S(e=2e3){let[t,n]=l.default.useState(!1),r=l.default.useRef(null);return l.default.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),{copy:async t=>{let i=await x(t);return i&&(n(!0),r.current&&clearTimeout(r.current),r.current=window.setTimeout(()=>{n(!1)},e)),i},copied:t}}var C=({value:e,variant:t=`surface`,size:n=`md`,className:r,label:i=`Copy to clipboard`})=>{let{copy:a,copied:o}=S(),s=n===`sm`?14:16;return(0,u.jsx)(b,{"aria-label":o?`Copied`:i,variant:t,size:n,className:r,onClick:()=>a(e),children:o?(0,u.jsx)(p,{name:`check`,size:s,className:`text-green-500`}):(0,u.jsx)(p,{name:`copy`,size:s})})},w={neutral:`bg-surface-2 text-muted border border-border`,primary:`bg-primary-soft text-primary border border-primary/30`,success:`bg-[#52b788]/15 text-[#52b788] border border-[#52b788]/25`,error:`bg-[#4A0F0F] text-[#FC7070] border border-[#FC7070]/20`,warning:`bg-amber-500/15 text-amber-500 border border-amber-500/30`,info:`bg-sky-500/15 text-sky-400 border border-sky-500/30`},T=({tone:e=`neutral`,className:t,children:n})=>(0,u.jsx)(`span`,{className:d(`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-heading font-[550]`,w[e],t),children:n}),E={GET:`success`,POST:`info`,PUT:`warning`,PATCH:`primary`,DELETE:`error`},D=({method:e,className:t})=>(0,u.jsx)(T,{tone:E[e],className:t,children:e}),O=({status:e,statusText:t,className:n})=>(0,u.jsxs)(T,{tone:e>=200&&e<300?`success`:e>=300&&e<400?`warning`:`error`,className:n,children:[e,` `,t]}),k={sm:`h-4 w-4 rounded`,md:`h-5 w-5 rounded-md`},A={sm:`h-3 w-3`,md:`h-3.5 w-3.5`},j={sm:`text-xs`,md:`text-sm`},M=({checked:e,onChange:t,label:n,disabled:r,size:i=`md`,className:a,"aria-label":o})=>{let s=(0,u.jsx)(`button`,{type:`button`,role:`checkbox`,"aria-checked":e,"aria-label":o??n,disabled:r,onClick:()=>t(!e),className:d(`inline-flex shrink-0 items-center justify-center border transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-50`,k[i],e?`border-primary bg-primary text-primary-contrast`:`border-border bg-surface-2 text-transparent hover:border-primary/70`),children:(0,u.jsx)(p,{name:`check`,className:A[i]})});return n?(0,u.jsxs)(`label`,{className:d(`inline-flex cursor-pointer select-none items-center gap-2`,a),children:[s,(0,u.jsx)(`span`,{className:d(`text-content`,j[i]),children:n})]}):(0,u.jsx)(`span`,{className:a,children:s})},N=({label:e,flush:t,className:n,children:r})=>(0,u.jsxs)(`div`,{className:`w-full`,children:[e&&(0,u.jsx)(`div`,{className:`mb-2 text-sm text-muted`,children:e}),(0,u.jsx)(`div`,{className:d(`rounded-xl border border-border bg-surface`,!t&&`p-3`,n),children:r})]}),P=({items:e,activeId:t,onChange:n,variant:r=`underline`,size:i=`md`,className:a})=>{let o=(0,l.useRef)({}),[s,c]=(0,l.useState)({left:0,top:0,width:0,height:0});return(0,l.useLayoutEffect)(()=>{let e=o.current[t];e&&c({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})},[t,e]),(0,l.useEffect)(()=>{let e=()=>{let e=o.current[t];e&&c({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[t]),r===`segmented`?(0,u.jsxs)(`div`,{className:d(`relative inline-flex gap-1 rounded-lg border border-border bg-surface-2 p-1`,a),children:[(0,u.jsx)(`span`,{className:`pointer-events-none absolute z-0 rounded-md bg-primary transition-all duration-300 ease-out`,style:{left:s.left,top:s.top,width:s.width,height:s.height}}),e.map(e=>{let r=e.id===t;return(0,u.jsx)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:d(`group/seg relative z-10 cursor-pointer rounded-md font-heading transition-colors duration-150`,i===`sm`?`px-2.5 py-1 text-[12px]`:`px-3 py-1.5 text-[14px]`,r?`text-primary-contrast`:`text-muted`),children:(0,u.jsxs)(`span`,{className:d(`relative z-10`,!r&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover/seg:text-transparent group-hover/seg:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:[e.label,e.badge!==void 0&&(0,u.jsx)(`span`,{className:`ml-1.5 opacity-70`,children:e.badge})]})},e.id)})]}):(0,u.jsxs)(`div`,{className:d(`relative flex gap-1 border-b border-border`,a),children:[e.map(e=>{let r=e.id===t;return(0,u.jsxs)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:d(`inline-flex cursor-pointer items-center gap-1.5 font-heading transition-colors duration-150`,i===`sm`?`px-2 py-2 text-[12px]`:`px-3 py-2.5 text-[14px]`,r?`text-content`:`text-muted hover:text-content`),children:[e.label,e.badge!==void 0&&(0,u.jsx)(`span`,{className:`text-xs text-muted`,children:e.badge})]},e.id)}),(0,u.jsx)(`span`,{className:`pointer-events-none absolute -bottom-px h-0.5 rounded-full bg-primary transition-all duration-300 ease-out`,style:{left:s.left,width:s.width}})]})},F={sm:`gap-1.5 rounded-md px-2.5`,md:`gap-2 rounded-lg px-3`,lg:`gap-2.5 rounded-lg px-4`},I={sm:`py-1.5 text-[12px]`,md:`py-2 text-sm`,lg:`py-2.5 text-base`},L={sm:`mb-1 text-xs`,md:`mb-1.5 text-sm`,lg:`mb-2 text-sm`},R={sm:`mt-1 text-[11px]`,md:`mt-1 text-xs`,lg:`mt-1.5 text-xs`},z=({label:e,error:t,hint:n,size:r=`md`,leftSlot:i,rightSlot:a,className:o,containerClassName:s,id:c,...f})=>{let p=(0,l.useId)(),m=c??p;return(0,u.jsxs)(`div`,{className:d(`w-full`,s),children:[e&&(0,u.jsx)(`label`,{htmlFor:m,className:d(`block font-medium text-muted`,L[r]),children:e}),(0,u.jsxs)(`div`,{className:d(`flex items-center border bg-surface-2`,`focus-within:border-primary/70 focus-within:ring-2 focus-within:ring-primary/15`,F[r],t?`border-red-500`:`border-border`),children:[i,(0,u.jsx)(`input`,{id:m,className:d(`w-full bg-transparent text-content placeholder:text-muted`,`focus:outline-none disabled:cursor-not-allowed disabled:opacity-60`,I[r],o),...f}),a]}),t?(0,u.jsx)(`p`,{className:d(`text-red-500`,R[r]),children:t}):n?(0,u.jsx)(`p`,{className:d(`text-muted`,R[r]),children:n}):null]})},ee={sm:`gap-1.5 px-2.5 py-1.5 text-[12px]`,md:`gap-1 px-2 py-1.5 text-[14px]`},te={sm:`px-2.5 py-1.5 text-[12px]`,md:`px-3 py-1.5 text-[14px]`};function ne({items:e,value:t,onChange:n,size:r=`md`,disabled:i,minWidthClassName:a=`min-w-[7rem]`,className:o}){let[s,c]=(0,l.useState)(!1),[f,m]=(0,l.useState)(!1),h=(0,l.useRef)(null),g=e.find(e=>e.id===t)??e[0];(0,l.useEffect)(()=>{if(s){m(!0);return}let e=window.setTimeout(()=>m(!1),200);return()=>window.clearTimeout(e)},[s]),(0,l.useEffect)(()=>{if(!s)return;let e=e=>{h.current&&!h.current.contains(e.target)&&c(!1)},t=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let _=e=>{i||(n(e),c(!1))};return(0,u.jsxs)(`div`,{ref:h,className:d(`relative inline-flex`,o),children:[(0,u.jsxs)(`button`,{type:`button`,"aria-haspopup":`listbox`,"aria-expanded":s,disabled:i,onClick:()=>c(e=>!e),className:d(`inline-flex cursor-pointer items-center rounded-md font-heading transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-60`,ee[r],g?.className??`text-content hover:bg-surface-2`),children:[g?.label,(0,u.jsx)(p,{name:`chevron-down`,className:d(`h-4 w-4 text-muted transition-transform duration-200`,s&&`rotate-180`)})]}),f&&(0,u.jsx)(`div`,{className:d(`absolute left-0 top-full z-20 mt-1 grid overflow-hidden rounded-lg border border-border bg-surface shadow-lg [grid-template-rows:1fr]`,a,s?`motion-safe:animate-[dropdown-expand_0.2s_ease-out]`:`motion-safe:animate-[dropdown-expand_0.18s_ease-in_reverse_forwards]`),children:(0,u.jsx)(`ul`,{role:`listbox`,className:`min-h-0 overflow-hidden p-1`,children:e.map(e=>{let n=e.id===t;return(0,u.jsx)(`li`,{role:`option`,"aria-selected":n,children:(0,u.jsxs)(`button`,{type:`button`,onClick:()=>_(e.id),className:d(`flex w-full cursor-pointer items-center justify-between rounded-md font-heading transition-colors duration-150 hover:bg-surface-2`,te[r],e.className??`text-muted hover:text-content`,n&&`bg-surface-2`),children:[e.label,n&&(0,u.jsx)(p,{name:`check`,className:`h-4 w-4`})]})},e.id)})})})]})}var re=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],ie={GET:`text-[#52b788]`,POST:`text-sky-400`,PUT:`text-amber-400`,PATCH:`text-primary`,DELETE:`text-red-400`},ae=e=>e.map(e=>({id:e,label:e,className:`${ie[e]} font-semibold`})),oe=({value:e,onChange:t,methods:n=re,disabled:r,className:i})=>(0,u.jsx)(ne,{value:e,onChange:t,items:ae(n),disabled:r,minWidthClassName:`min-w-[7rem]`,className:i}),se=o(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(!(!n||!n.length))for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof a)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),P=C+w.length;d&&P>d.reach&&(d.reach=P);var F=S.prev;M&&(F=l(t,F,M),C+=M.length),u(t,F,T);var I=new a(f,g?i.tokenize(j,g):j,y,j);if(S=l(t,F,I),N&&l(t,S,N),T>1){var L={cause:f+`,`+m,reach:P};s(e,t,n,S.prev,C,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
4
- `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}));(function(e){var t=`\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b`,n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:`punctuation`,inside:null},r={bash:n,environment:{pattern:RegExp(`\\$`+t),alias:`constant`},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp(`(\\{)`+t),lookbehind:!0,alias:`constant`}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:`important`},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:`function`},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:`function`}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:`variable`,lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp(`(^|[\\s;|&]|[<>]\\()`+t),lookbehind:!0,alias:`constant`}},alias:`variable`,lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:`variable`,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp(`\\$?`+t),alias:`constant`},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:`class-name`},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:`important`},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:`important`}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=[`comment`,`function-name`,`for-or-select`,`assign-left`,`parameter`,`string`,`environment`,`function`,`keyword`,`builtin`,`boolean`,`file-descriptor`,`operator`,`punctuation`,`number`],a=r.variable[1].inside,o=0;o<i.length;o++)a[i[o]]=e.languages.bash[i[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},Prism.languages.webmanifest=Prism.languages.json,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:`punctuation`},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:`string`},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:[`annotation`,`punctuation`],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python[`string-interpolation`].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,Prism.languages.go=Prism.languages.extend(`clike`,{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore(`go`,`string`,{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go[`class-name`];var B=c(se(),1),ce={json:B.default.languages.json,bash:B.default.languages.bash,javascript:B.default.languages.javascript,python:B.default.languages.python,go:B.default.languages.go};function V(e,t){if(typeof e==`string`)return e;let n=Array.isArray(e.content)?e.content.map((e,t)=>V(e,t)):V(e.content,0);return(0,u.jsx)(`span`,{className:`token ${e.type}`,children:n},t)}function le(e,t){let n=t===`plain`?void 0:ce[t];return!n||!e?e:B.default.tokenize(e,n).map((e,t)=>V(e,t))}var H=({code:e,language:t=`plain`,showLineNumbers:n=!1,copyable:r=!0,maxHeight:i,reveal:a=!1,revealStagger:o=70,className:s})=>{let c=(0,l.useMemo)(()=>e.replace(/\n$/,``).split(`
5
- `),[e]),f=String(c.length).length;return(0,u.jsxs)(`div`,{className:d(`group relative w-full overflow-hidden rounded-lg border border-border bg-surface-2`,s),children:[r&&(0,u.jsx)(`div`,{className:`absolute right-2 top-2 z-10`,children:(0,u.jsx)(C,{value:e,size:`sm`})}),(0,u.jsx)(`div`,{className:`overflow-auto`,style:i?{maxHeight:i}:void 0,children:(0,u.jsx)(`pre`,{className:`w-max min-w-full p-3 font-mono text-[14px] leading-relaxed text-content`,children:(0,u.jsx)(`code`,{className:`flex flex-col bg-transparent p-0 text-[14px] text-content`,children:c.map((e,r)=>(0,u.jsxs)(`span`,{className:d(`flex`,a&&`motion-safe:animate-[fade-in_0.6s_ease-out_both]`),style:a?{animationDelay:`${r*o}ms`}:void 0,children:[n&&(0,u.jsx)(`span`,{className:`mr-4 shrink-0 select-none text-right text-muted`,style:{width:`${f}ch`},children:r+1}),(0,u.jsx)(`span`,{className:`whitespace-pre`,children:le(e,t)||` `})]},r))})})})]})},ue=new Set([`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`]);function de(e){return!e.auth||e.auth.type===`none`?null:e.auth.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.auth.token}`}:{key:e.auth.key,value:e.auth.value}}function fe(e){let t=new Headers;for(let n of e.headers??[])n.key.trim()&&(ue.has(n.key.trim().toLowerCase())||t.set(n.key,n.value));let n=de(e);return n&&!ue.has(n.key.toLowerCase())&&t.set(n.key,n.value),t}function pe(e){return[...e.entries()].map(([e,t])=>({key:e,value:t}))}function me(e){let t=new TextEncoder().encode(e).length;return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function he(e,t){if(!(t?.includes(`json`)||/^[\s\n]*(?:\[|\{)/.test(e)))return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function ge(e){return e instanceof Error?e.message:`Request failed`}function U(e,t=performance.now()){let n=ge(e);return{status:0,statusText:`Network Error`,headers:[],body:JSON.stringify({error:n,hint:`The browser may have blocked this request because of CORS or network policy.`},null,2),timeMs:Math.round(performance.now()-t),size:`0 B`,error:n}}async function _e(e){let t=performance.now();try{let n=await fetch(e.url,{method:e.method,headers:fe(e),body:e.body&&e.method!==`GET`?e.body:void 0}),r=await n.text(),i=he(r,n.headers.get(`content-type`));return{status:n.status,statusText:n.statusText||(n.ok?`OK`:`Error`),headers:pe(n.headers),body:i,timeMs:Math.round(performance.now()-t),size:me(r)}}catch(e){return U(e,t)}}function ve(e){let t=e.sampleResponse??JSON.stringify({ok:!0,request:e.title},null,2);return{status:200,statusText:`OK`,headers:[{key:`content-type`,value:`application/json`},{key:`cache-control`,value:`no-store`}],body:t,timeMs:142,size:me(t)}}var W=`Authorization`,ye=`Bearer `,be=[{key:`Content-Type`,value:`application/json`,enabled:!0}];function xe(e){return e.type===`none`?null:e.type===`bearer`?{key:W,value:`${ye}${e.token}`,enabled:!0}:{key:e.key,value:e.value,enabled:!0}}function G(e,t){return e.toLowerCase()===t.toLowerCase()}function Se(e){return e.toLowerCase().startsWith(ye.toLowerCase())}function Ce(e){return Se(e)?e.slice(7):e}function we(e){return e?G(e.key,W)&&Se(e.value)?{type:`bearer`,token:Ce(e.value)}:{type:`apiKey`,key:e.key||W,value:e.value,in:`header`}:{type:`none`}}function Te(e){return e.type===`apiKey`?e.key:W}function K(e,t){return t.type===`none`?G(e.key,W):G(e.key,Te(t))}function Ee(e){return e.auth?e.auth:we(e.headers?.find(e=>G(e.key,W)))}function De(e,t){let n=(e.headers?.length?e.headers:be).filter(e=>!K(e,t)).map(e=>({...e,enabled:!0})),r=xe(t);return r?[...n,r]:n}function Oe(e,t,n){if(t.type===`none`)return e.map(e=>K(e,n)||G(e.key,W)?{...e,enabled:!1}:e);let r=xe(t);return r?[...e.filter(e=>!K(e,n)&&!K(e,t)),r]:e}function ke(e,t){return e.filter(e=>e.enabled&&e.key.trim()&&!K(e,t)).map(({key:e,value:t})=>({key:e,value:t}))}function q(e){return JSON.stringify({method:e.method,url:e.url,headers:e.headers??[],auth:e.auth??{type:`none`},body:e.body??``})}function Ae(e,t){let n=t.body.trim()?t.body:void 0;return{...e,method:t.method,url:t.url,body:n,auth:t.auth,headers:ke(t.headers,t.auth)}}var je=`{
3
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react");c=s(c,1);let l=require("react/jsx-runtime");function u(...e){return e.filter(Boolean).join(` `)}var d={copy:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593s1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.6 3.6 0 0 0 15.24 2`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847S21 8.671 21 11.397v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936z`})]}),check:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m4 12.9l3.143 3.6L15 7.5m5 .063l-8.572 9L11 16`}),download:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M3 15c0 2.828 0 4.243.879 5.121C4.757 21 6.172 21 9 21h6c2.828 0 4.243 0 5.121-.879C21 19.243 21 17.828 21 15M12 3v13m0 0l4-4.375M12 16l-4-4.375`}),send:(0,l.jsxs)(`g`,{fill:`none`,children:[(0,l.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,d:`m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M16.212 8.848a.75.75 0 0 0-1.055-1.066zm-5.55 5.488l5.55-5.488l-1.055-1.066l-5.55 5.488z`})]}),share:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{strokeLinejoin:`round`,d:`M22 7h-8c-1.818 0-2.913.892-3.32 1.3q-.187.19-.19.19q0 .003-.19.19C9.892 9.087 9 10.182 9 12v3m13-8l-5-5m5 5l-5 5`}),(0,l.jsx)(`path`,{d:`M3.465 20.535C4.93 22 7.287 22 12.003 22c4.715 0 7.073 0 8.537-1.465c1.242-1.241 1.431-3.123 1.46-6.537M3.465 20.535C2 19.07 2 16.713 2 11.997m1.465 8.538C4.929 22 7.286 22 12 22s7.071 0 8.535-1.465c1.241-1.24 1.43-3.122 1.46-6.536m-18.53 6.536C2 19.071 2 16.714 2 12m1.465-8.54C4.706 2.218 6.588 2.029 10.002 2M2.055 8c.11-2.193.436-3.562 1.41-4.536c1.24-1.24 3.122-1.43 6.535-1.459`})]}),code:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,d:`m17 7.83l1.697 1.526c1.542 1.389 2.313 2.083 2.313 2.974c0 .89-.771 1.585-2.314 2.973L17 16.83M13.987 5L12 12.415l-1.987 7.415M7 7.83L5.304 9.356C3.76 10.745 2.99 11.44 2.99 12.33s.771 1.585 2.314 2.973L7 16.83`}),"arrow-left":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M20 12H4m0 0l6-6m-6 6l6 6`}),"arrow-right":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M4 12h16m0 0l-6-6m6 6l-6 6`}),"chevron-down":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m19 9l-7 6l-7-6`}),trash:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5`}),(0,l.jsx)(`path`,{d:`M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6`})]}),plus:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`M15 12h-3m0 0H9m3 0V9m0 3v3`})]}),moon:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10`}),sun:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M17 12a5 5 0 1 1-10 0a5 5 0 0 1 10 0`}),(0,l.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M12 1.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M3.669 3.716a.75.75 0 0 1 1.06-.047L6.95 5.7a.75.75 0 1 1-1.012 1.107L3.716 4.776a.75.75 0 0 1-.047-1.06m16.662 0a.75.75 0 0 1-.047 1.06l-2.222 2.031A.75.75 0 0 1 17.05 5.7l2.222-2.031a.75.75 0 0 1 1.06.047M1.25 12a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m18 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75m-2.224 5.025a.75.75 0 0 1 1.06 0l2.222 2.223a.75.75 0 0 1-1.06 1.06l-2.222-2.222a.75.75 0 0 1 0-1.06m-10.051 0a.75.75 0 0 1 0 1.061l-2.223 2.222a.75.75 0 0 1-1.06-1.06l2.222-2.223a.75.75 0 0 1 1.06 0M12 19.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75`,clipRule:`evenodd`})]}),palette:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`mask`,{id:`solar-palette-a`,fill:`#fff`,children:(0,l.jsx)(`path`,{d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,l.jsx)(`mask`,{id:`solar-palette-b`,fill:`#fff`,children:(0,l.jsx)(`path`,{d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,children:[(0,l.jsx)(`path`,{strokeWidth:`1.5`,d:`M2 12.026c0 5.146 3.867 9.387 8.847 9.96c.735.085 1.447-.228 1.97-.753a1.68 1.68 0 0 0 0-2.372c-.523-.525-.95-1.307-.555-1.934c1.576-2.508 9.738 3.251 9.738-4.9C22 6.488 17.523 2 12 2S2 6.489 2 12.026Z`}),(0,l.jsx)(`circle`,{cx:`17.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,l.jsx)(`circle`,{cx:`6.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,l.jsx)(`path`,{strokeWidth:`3`,d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-a)`}),(0,l.jsx)(`path`,{strokeWidth:`3`,d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-b)`})]})]}),magic:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51l.038-.04l4-4l.04-.038l-1.588-1.587a2.883 2.883 0 0 0-4.077 0m6.723 2.645l-.038.04l-4 4l-.04.038l9.588 9.588a2.884 2.884 0 0 0 4.078-4.078zM16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274zm3.867 6.823a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273zM5.133 15.307a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z`}),restart:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m18.364 8.05l-.707-.707a8 8 0 1 0 2.28 4.658m-1.573-3.95h-4.243m4.243 0V3.807`}),close:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`m14.5 9.5l-5 5m0-5l5 5`})]}),eye:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{d:`M3.275 15.296C2.425 14.192 2 13.639 2 12c0-1.64.425-2.191 1.275-3.296C4.972 6.5 7.818 4 12 4s7.028 2.5 8.725 4.704C21.575 9.81 22 10.361 22 12c0 1.64-.425 2.191-1.275 3.296C19.028 17.5 16.182 20 12 20s-7.028-2.5-8.725-4.704Z`}),(0,l.jsx)(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z`})]}),"eye-closed":(0,l.jsx)(`path`,{fill:`currentColor`,d:`M2.69 6.705a.75.75 0 0 0-1.38.59zm12.897 6.624l-.274-.698zm-6.546.409a.75.75 0 1 0-1.257-.818zm-2.67 1.353a.75.75 0 1 0 1.258.818zM22.69 7.295a.75.75 0 0 0-1.378-.59zM19 11.13l-.513-.547zm.97 2.03a.75.75 0 1 0 1.06-1.06zm-8.72 3.34a.75.75 0 0 0 1.5 0zm5.121-.591a.75.75 0 1 0 1.258-.818zm-10.84-4.25A.75.75 0 0 0 4.47 10.6zm-2.561.44a.75.75 0 0 0 1.06 1.06zM12 13.25c-3.224 0-5.539-1.605-7.075-3.26a13.6 13.6 0 0 1-1.702-2.28a12 12 0 0 1-.507-.946l-.022-.049l-.004-.01l-.001-.001L2 7l-.69.296h.001l.001.003l.003.006l.04.088q.039.088.117.243c.103.206.256.496.462.841c.41.69 1.035 1.61 1.891 2.533C5.54 12.855 8.224 14.75 12 14.75zm3.313-.62c-.97.383-2.071.62-3.313.62v1.5c1.438 0 2.725-.276 3.862-.723zm-7.529.29l-1.413 2.17l1.258.818l1.412-2.171zM22 7l-.69-.296h.001v.002l-.007.013l-.028.062a12 12 0 0 1-.64 1.162a13.3 13.3 0 0 1-2.15 2.639l1.027 1.094a14.8 14.8 0 0 0 3.122-4.26l.039-.085l.01-.024l.004-.007v-.003h.001v-.001zm-3.513 3.582c-.86.806-1.913 1.552-3.174 2.049l.549 1.396c1.473-.58 2.685-1.444 3.651-2.351zm-.017 1.077l1.5 1.5l1.06-1.06l-1.5-1.5zM11.25 14v2.5h1.5V14zm3.709-.262l1.412 2.171l1.258-.818l-1.413-2.171zm-10.49-3.14l-1.5 1.5L4.03 13.16l1.5-1.5z`})},f=({name:e,size:t,className:n,...r})=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t??`1em`,height:t??`1em`,className:u(`inline-block shrink-0`,n),"aria-hidden":r[`aria-label`]?void 0:!0,...r,children:d[e]}),p={primary:`bg-primary text-primary-contrast hover:bg-primary-hover`,secondary:`bg-surface-2 text-content border border-border hover:bg-border`,ghost:`bg-transparent text-muted hover:text-content`,danger:`bg-[#EF5350] text-white hover:bg-[#e53935]`},m={sm:`text-[12px] px-3 py-1.5`,md:`text-[14px] px-4 py-2`,lg:`text-[16px] px-5 py-2.5`},h={sm:`gap-1.5`,md:`gap-2`,lg:`gap-2`},g=({variant:e=`primary`,size:t=`md`,isLoading:n=!1,leftIcon:r,rightIcon:i,className:a,children:o,disabled:s,...c})=>(0,l.jsxs)(`button`,{className:u(`group relative isolate overflow-hidden rounded-lg font-heading font-medium`,`inline-flex items-center justify-center`,`transition duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`active:scale-105 motion-reduce:active:scale-100`,`disabled:opacity-50 disabled:cursor-not-allowed`,p[e],m[t],a),disabled:s||n,...c,children:[e!==`ghost`&&(0,l.jsx)(`span`,{"aria-hidden":`true`,className:u(`pointer-events-none absolute inset-0 -z-10 -translate-x-full -skew-x-12`,`bg-gradient-to-r from-transparent via-white/25 to-transparent`,`transition-transform duration-0 ease-out`,`group-hover:translate-x-full group-hover:duration-[1200ms] group-disabled:hidden`)}),(0,l.jsxs)(`span`,{className:u(`inline-flex items-center`,h[t]),children:[n?(0,l.jsx)(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`}):r,(0,l.jsx)(`span`,{className:u(e===`ghost`&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover:text-transparent group-hover:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:o}),!n&&i]})]}),_={ghost:`text-muted hover:bg-surface-2 hover:text-content`,surface:`bg-surface-2 text-muted border border-border hover:text-content`,solid:`bg-primary text-primary-contrast hover:bg-primary-hover`},v={sm:`h-7 w-7`,md:`h-9 w-9`},y=({variant:e=`ghost`,size:t=`md`,className:n,children:r,...i})=>(0,l.jsx)(`button`,{className:u(`inline-flex items-center justify-center rounded-lg transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:opacity-50 disabled:cursor-not-allowed`,_[e],v[t],n),...i,children:r});async function b(e){try{if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard API failed, trying fallback:`,e)}let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,t.value.length);try{let e=document.execCommand(`copy`);return document.body.removeChild(t),e}catch(e){return console.error(`execCommand copy failed:`,e),document.body.removeChild(t),!1}}catch(e){return console.error(`Failed to copy text:`,e),!1}}function x(e=2e3){let[t,n]=c.default.useState(!1),r=c.default.useRef(null);return c.default.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),{copy:async t=>{let i=await b(t);return i&&(n(!0),r.current&&clearTimeout(r.current),r.current=window.setTimeout(()=>{n(!1)},e)),i},copied:t}}var S=({value:e,variant:t=`surface`,size:n=`md`,className:r,label:i=`Copy to clipboard`})=>{let{copy:a,copied:o}=x(),s=n===`sm`?14:16;return(0,l.jsx)(y,{"aria-label":o?`Copied`:i,variant:t,size:n,className:r,onClick:()=>a(e),children:o?(0,l.jsx)(f,{name:`check`,size:s,className:`text-green-500`}):(0,l.jsx)(f,{name:`copy`,size:s})})},C={neutral:`bg-surface-2 text-muted border border-border`,primary:`bg-primary-soft text-primary border border-primary/30`,success:`bg-[#52b788]/15 text-[#52b788] border border-[#52b788]/25`,error:`bg-[#4A0F0F] text-[#FC7070] border border-[#FC7070]/20`,warning:`bg-amber-500/15 text-amber-500 border border-amber-500/30`,info:`bg-sky-500/15 text-sky-400 border border-sky-500/30`},w=({tone:e=`neutral`,className:t,children:n})=>(0,l.jsx)(`span`,{className:u(`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-heading font-[550]`,C[e],t),children:n}),T={GET:`success`,POST:`info`,PUT:`warning`,PATCH:`primary`,DELETE:`error`},ee=({method:e,className:t})=>(0,l.jsx)(w,{tone:T[e],className:t,children:e}),E=({status:e,statusText:t,className:n})=>(0,l.jsxs)(w,{tone:e>=200&&e<300?`success`:e>=300&&e<400?`warning`:`error`,className:n,children:[e,` `,t]}),D={sm:`h-4 w-4 rounded`,md:`h-5 w-5 rounded-md`},O={sm:`h-3 w-3`,md:`h-3.5 w-3.5`},k={sm:`text-xs`,md:`text-sm`},te=({checked:e,onChange:t,label:n,disabled:r,size:i=`md`,className:a,"aria-label":o})=>{let s=(0,l.jsx)(`button`,{type:`button`,role:`checkbox`,"aria-checked":e,"aria-label":o??n,disabled:r,onClick:()=>t(!e),className:u(`inline-flex shrink-0 items-center justify-center border transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-50`,D[i],e?`border-primary bg-primary text-primary-contrast`:`border-border bg-surface-2 text-transparent hover:border-primary/70`),children:(0,l.jsx)(f,{name:`check`,className:O[i]})});return n?(0,l.jsxs)(`label`,{className:u(`inline-flex cursor-pointer select-none items-center gap-2`,a),children:[s,(0,l.jsx)(`span`,{className:u(`text-content`,k[i]),children:n})]}):(0,l.jsx)(`span`,{className:a,children:s})},A=({label:e,flush:t,className:n,children:r})=>(0,l.jsxs)(`div`,{className:`w-full`,children:[e&&(0,l.jsx)(`div`,{className:`mb-2 text-sm text-muted`,children:e}),(0,l.jsx)(`div`,{className:u(`rounded-xl border border-border bg-surface`,!t&&`p-3`,n),children:r})]}),j=({items:e,activeId:t,onChange:n,variant:r=`underline`,size:i=`md`,className:a})=>{let o=(0,c.useRef)({}),[s,d]=(0,c.useState)({left:0,top:0,width:0,height:0});return(0,c.useLayoutEffect)(()=>{let e=o.current[t];e&&d({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})},[t,e]),(0,c.useEffect)(()=>{let e=()=>{let e=o.current[t];e&&d({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[t]),r===`segmented`?(0,l.jsxs)(`div`,{className:u(`relative inline-flex gap-1 rounded-lg border border-border bg-surface-2 p-1`,a),children:[(0,l.jsx)(`span`,{className:`pointer-events-none absolute z-0 rounded-md bg-primary transition-all duration-300 ease-out`,style:{left:s.left,top:s.top,width:s.width,height:s.height}}),e.map(e=>{let r=e.id===t;return(0,l.jsx)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:u(`group/seg relative z-10 cursor-pointer rounded-md font-heading transition-colors duration-150`,i===`sm`?`px-2.5 py-1 text-[12px]`:`px-3 py-1.5 text-[14px]`,r?`text-primary-contrast`:`text-muted`),children:(0,l.jsxs)(`span`,{className:u(`relative z-10`,!r&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover/seg:text-transparent group-hover/seg:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:[e.label,e.badge!==void 0&&(0,l.jsx)(`span`,{className:`ml-1.5 opacity-70`,children:e.badge})]})},e.id)})]}):(0,l.jsxs)(`div`,{className:u(`relative flex gap-1 border-b border-border`,a),children:[e.map(e=>{let r=e.id===t;return(0,l.jsxs)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:u(`inline-flex cursor-pointer items-center gap-1.5 font-heading transition-colors duration-150`,i===`sm`?`px-2 py-2 text-[12px]`:`px-3 py-2.5 text-[14px]`,r?`text-content`:`text-muted hover:text-content`),children:[e.label,e.badge!==void 0&&(0,l.jsx)(`span`,{className:`text-xs text-muted`,children:e.badge})]},e.id)}),(0,l.jsx)(`span`,{className:`pointer-events-none absolute -bottom-px h-0.5 rounded-full bg-primary transition-all duration-300 ease-out`,style:{left:s.left,width:s.width}})]})},M={sm:`gap-1.5 rounded-md px-2.5`,md:`gap-2 rounded-lg px-3`,lg:`gap-2.5 rounded-lg px-4`},N={sm:`py-1.5 text-[12px]`,md:`py-2 text-sm`,lg:`py-2.5 text-base`},ne={sm:`mb-1 text-xs`,md:`mb-1.5 text-sm`,lg:`mb-2 text-sm`},P={sm:`mt-1 text-[11px]`,md:`mt-1 text-xs`,lg:`mt-1.5 text-xs`},F=({label:e,error:t,hint:n,size:r=`md`,leftSlot:i,rightSlot:a,className:o,containerClassName:s,id:d,...f})=>{let p=(0,c.useId)(),m=d??p;return(0,l.jsxs)(`div`,{className:u(`w-full`,s),children:[e&&(0,l.jsx)(`label`,{htmlFor:m,className:u(`block font-medium text-muted`,ne[r]),children:e}),(0,l.jsxs)(`div`,{className:u(`flex items-center border bg-surface-2`,`focus-within:border-primary/70 focus-within:ring-2 focus-within:ring-primary/15`,M[r],t?`border-red-500`:`border-border`),children:[i,(0,l.jsx)(`input`,{id:m,className:u(`w-full bg-transparent text-content placeholder:text-muted`,`focus:outline-none disabled:cursor-not-allowed disabled:opacity-60`,N[r],o),...f}),a]}),t?(0,l.jsx)(`p`,{className:u(`text-red-500`,P[r]),children:t}):n?(0,l.jsx)(`p`,{className:u(`text-muted`,P[r]),children:n}):null]})},re={sm:`gap-1.5 px-2.5 py-1.5 text-[12px]`,md:`gap-1 px-2 py-1.5 text-[14px]`},ie={sm:`px-2.5 py-1.5 text-[12px]`,md:`px-3 py-1.5 text-[14px]`};function ae({items:e,value:t,onChange:n,size:r=`md`,disabled:i,minWidthClassName:a=`min-w-[7rem]`,className:o}){let[s,d]=(0,c.useState)(!1),[p,m]=(0,c.useState)(!1),h=(0,c.useRef)(null),g=e.find(e=>e.id===t)??e[0];(0,c.useEffect)(()=>{if(s){m(!0);return}let e=window.setTimeout(()=>m(!1),200);return()=>window.clearTimeout(e)},[s]),(0,c.useEffect)(()=>{if(!s)return;let e=e=>{h.current&&!h.current.contains(e.target)&&d(!1)},t=e=>{e.key===`Escape`&&d(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let _=e=>{i||(n(e),d(!1))};return(0,l.jsxs)(`div`,{ref:h,className:u(`relative inline-flex`,o),children:[(0,l.jsxs)(`button`,{type:`button`,"aria-haspopup":`listbox`,"aria-expanded":s,disabled:i,onClick:()=>d(e=>!e),className:u(`inline-flex cursor-pointer items-center rounded-md font-heading transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-60`,re[r],g?.className??`text-content hover:bg-surface-2`),children:[g?.label,(0,l.jsx)(f,{name:`chevron-down`,className:u(`h-4 w-4 text-muted transition-transform duration-200`,s&&`rotate-180`)})]}),p&&(0,l.jsx)(`div`,{className:u(`absolute left-0 top-full z-20 mt-1 grid overflow-hidden rounded-lg border border-border bg-surface shadow-lg [grid-template-rows:1fr]`,a,s?`motion-safe:animate-[dropdown-expand_0.2s_ease-out]`:`motion-safe:animate-[dropdown-expand_0.18s_ease-in_reverse_forwards]`),children:(0,l.jsx)(`ul`,{role:`listbox`,className:`min-h-0 overflow-hidden p-1`,children:e.map(e=>{let n=e.id===t;return(0,l.jsx)(`li`,{role:`option`,"aria-selected":n,children:(0,l.jsxs)(`button`,{type:`button`,onClick:()=>_(e.id),className:u(`flex w-full cursor-pointer items-center justify-between rounded-md font-heading transition-colors duration-150 hover:bg-surface-2`,ie[r],e.className??`text-muted hover:text-content`,n&&`bg-surface-2`),children:[e.label,n&&(0,l.jsx)(f,{name:`check`,className:`h-4 w-4`})]})},e.id)})})})]})}var oe=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],se={GET:`text-[#52b788]`,POST:`text-sky-400`,PUT:`text-amber-400`,PATCH:`text-primary`,DELETE:`text-red-400`},ce=e=>e.map(e=>({id:e,label:e,className:`${se[e]} font-semibold`})),le=({value:e,onChange:t,methods:n=oe,disabled:r,className:i})=>(0,l.jsx)(ae,{value:e,onChange:t,items:ce(n),disabled:r,minWidthClassName:`min-w-[7rem]`,className:i}),ue={json:[{type:`property`,pattern:/"(?:\\.|[^"\\])*"(?=\s*:)/y},{type:`string`,pattern:/"(?:\\.|[^"\\])*"/y},{type:`number`,pattern:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/iy},{type:`boolean`,pattern:/\b(?:true|false)\b/y},{type:`keyword`,pattern:/\bnull\b/y},{type:`operator`,pattern:/:/y},{type:`punctuation`,pattern:/[{}[\],]/y}],bash:[{type:`comment`,pattern:/#.*/y},{type:`string`,pattern:/'(?:[^']*)'|"(?:\\.|[^"\\])*"/y},{type:`function`,pattern:/\b(?:curl|wget|fetch|http|httpie)\b/y},{type:`variable`,pattern:/\$[A-Za-z_][\w]*|\$\{[^}]+\}/y},{type:`keyword`,pattern:/\b(?:if|then|else|fi|for|do|done|while|case|esac)\b/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/&&|\|\||[|&;=<>]/y},{type:`punctuation`,pattern:/\\|[()[\]{}]/y},{type:`builtin`,pattern:/-{1,2}[A-Za-z][\w-]*/y}],javascript:[{type:`comment`,pattern:/\/\/.*|\/\*.*?\*\//y},{type:`string`,pattern:/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`/y},{type:`keyword`,pattern:/\b(?:await|async|const|let|var|return|if|else|for|while|try|catch|throw|new|import|export|from|function|class)\b/y},{type:`boolean`,pattern:/\b(?:true|false|null|undefined)\b/y},{type:`function`,pattern:/\b[A-Za-z_$][\w$]*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/=>|===|!==|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!?:]/y},{type:`punctuation`,pattern:/[()[\]{}.,;]/y}],python:[{type:`comment`,pattern:/#.*/y},{type:`string`,pattern:/'''[\s\S]*?'''|"""[\s\S]*?"""|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y},{type:`keyword`,pattern:/\b(?:import|from|as|def|class|return|if|elif|else|for|while|try|except|with|lambda|pass|None|True|False|and|or|not|in|is)\b/y},{type:`function`,pattern:/\b[A-Za-z_]\w*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/==|!=|<=|>=|:=|[+\-*/%=<>]/y},{type:`punctuation`,pattern:/[()[\]{}.,:;]/y}],go:[{type:`comment`,pattern:/\/\/.*|\/\*.*?\*\//y},{type:`string`,pattern:/`[^`]*`|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y},{type:`keyword`,pattern:/\b(?:package|import|func|var|const|type|struct|interface|return|if|else|for|range|go|defer|select|case|switch|default|nil|true|false)\b/y},{type:`builtin`,pattern:/\b(?:append|bool|byte|cap|close|complex64|complex128|copy|delete|error|float32|float64|int|int8|int16|int32|int64|len|make|new|panic|print|println|real|recover|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\b/y},{type:`function`,pattern:/\b[A-Za-z_]\w*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/:=|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!&|]/y},{type:`punctuation`,pattern:/[()[\]{}.,;:]/y}]};function de(e,t,n){for(let r of n){r.pattern.lastIndex=t;let n=r.pattern.exec(e);if(n?.index===t&&n[0])return{type:r.type,value:n[0]}}return null}function fe(e,t){if(t===`plain`||!e)return e;let n=ue[t],r=[],i=``,a=0,o=0;for(;a<e.length;){let t=de(e,a,n);if(!t){i+=e[a],a+=1;continue}i&&=(r.push(i),``),r.push((0,l.jsx)(`span`,{className:`token ${t.type}`,children:t.value},o)),o+=1,a+=t.value.length}return i&&r.push(i),r}var I=({code:e,language:t=`plain`,showLineNumbers:n=!1,copyable:r=!0,maxHeight:i,reveal:a=!1,revealStagger:o=70,className:s})=>{let d=(0,c.useMemo)(()=>e.replace(/\n$/,``).split(`
4
+ `),[e]),f=String(d.length).length;return(0,l.jsxs)(`div`,{className:u(`group relative w-full overflow-hidden rounded-lg border border-border bg-surface-2`,s),children:[r&&(0,l.jsx)(`div`,{className:`absolute right-2 top-2 z-10`,children:(0,l.jsx)(S,{value:e,size:`sm`})}),(0,l.jsx)(`div`,{className:`overflow-auto`,style:i?{maxHeight:i}:void 0,children:(0,l.jsx)(`pre`,{className:`w-max min-w-full p-3 font-mono text-[14px] leading-relaxed text-content`,children:(0,l.jsx)(`code`,{className:`flex flex-col bg-transparent p-0 text-[14px] text-content`,children:d.map((e,r)=>(0,l.jsxs)(`span`,{className:u(`flex`,a&&`motion-safe:animate-[fade-in_0.6s_ease-out_both]`),style:a?{animationDelay:`${r*o}ms`}:void 0,children:[n&&(0,l.jsx)(`span`,{className:`mr-4 shrink-0 select-none text-right text-muted`,style:{width:`${f}ch`},children:r+1}),(0,l.jsx)(`span`,{className:`whitespace-pre`,children:fe(e,t)||` `})]},r))})})})]})},L=new Set([`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`]);function pe(e){return!e.auth||e.auth.type===`none`?null:e.auth.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.auth.token}`}:{key:e.auth.key,value:e.auth.value}}function me(e){let t=new Headers;for(let n of e.headers??[])n.key.trim()&&(L.has(n.key.trim().toLowerCase())||t.set(n.key,n.value));let n=pe(e);return n&&!L.has(n.key.toLowerCase())&&t.set(n.key,n.value),t}function he(e){return[...e.entries()].map(([e,t])=>({key:e,value:t}))}function R(e){let t=new TextEncoder().encode(e).length;return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function ge(e,t){if(!(t?.includes(`json`)||/^[\s\n]*(?:\[|\{)/.test(e)))return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function _e(e){return e instanceof Error?e.message:`Request failed`}function z(e,t=performance.now()){let n=_e(e);return{status:0,statusText:`Network Error`,headers:[],body:JSON.stringify({error:n,hint:`The browser may have blocked this request because of CORS or network policy.`},null,2),timeMs:Math.round(performance.now()-t),size:`0 B`,error:n}}async function B(e){let t=performance.now();try{let n=await fetch(e.url,{method:e.method,headers:me(e),body:e.body&&e.method!==`GET`?e.body:void 0}),r=await n.text(),i=ge(r,n.headers.get(`content-type`));return{status:n.status,statusText:n.statusText||(n.ok?`OK`:`Error`),headers:he(n.headers),body:i,timeMs:Math.round(performance.now()-t),size:R(r)}}catch(e){return z(e,t)}}function V(e){let t=e.sampleResponse??JSON.stringify({ok:!0,request:e.title},null,2);return{status:200,statusText:`OK`,headers:[{key:`content-type`,value:`application/json`},{key:`cache-control`,value:`no-store`}],body:t,timeMs:142,size:R(t)}}var H=`Authorization`,U=`Bearer `,ve=[{key:`Content-Type`,value:`application/json`,enabled:!0}];function ye(e){return e.type===`none`?null:e.type===`bearer`?{key:H,value:`${U}${e.token}`,enabled:!0}:{key:e.key,value:e.value,enabled:!0}}function W(e,t){return e.toLowerCase()===t.toLowerCase()}function be(e){return e.toLowerCase().startsWith(U.toLowerCase())}function xe(e){return be(e)?e.slice(7):e}function Se(e){return e?W(e.key,H)&&be(e.value)?{type:`bearer`,token:xe(e.value)}:{type:`apiKey`,key:e.key||H,value:e.value,in:`header`}:{type:`none`}}function Ce(e){return e.type===`apiKey`?e.key:H}function G(e,t){return t.type===`none`?W(e.key,H):W(e.key,Ce(t))}function we(e){return e.auth?e.auth:Se(e.headers?.find(e=>W(e.key,H)))}function Te(e,t){let n=(e.headers?.length?e.headers:ve).filter(e=>!G(e,t)).map(e=>({...e,enabled:!0})),r=ye(t);return r?[...n,r]:n}function Ee(e,t,n){if(t.type===`none`)return e.map(e=>G(e,n)||W(e.key,H)?{...e,enabled:!1}:e);let r=ye(t);return r?[...e.filter(e=>!G(e,n)&&!G(e,t)),r]:e}function De(e,t){return e.filter(e=>e.enabled&&e.key.trim()&&!G(e,t)).map(({key:e,value:t})=>({key:e,value:t}))}function K(e){return JSON.stringify({method:e.method,url:e.url,headers:e.headers??[],auth:e.auth??{type:`none`},body:e.body??``})}function Oe(e,t){let n=t.body.trim()?t.body:void 0;return{...e,method:t.method,url:t.url,body:n,auth:t.auth,headers:De(t.headers,t.auth)}}var ke=`{
6
5
 
7
- }`,J=`Authorization`,Me=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],Ne=[{id:`body`,label:`Body`},{id:`headers`,label:`Headers`},{id:`auth`,label:`Auth`}],Pe=[{id:`response`,label:`Response`},{id:`history`,label:`History`}],Fe=[`body`,`headers`],Ie=[{id:`none`,label:`None`,className:`font-semibold text-content hover:bg-surface-2`},{id:`bearer`,label:`Bearer`,className:`font-semibold text-content hover:bg-surface-2`},{id:`apiKey`,label:`API key`,className:`font-semibold text-content hover:bg-surface-2`}];function Le(e){return Math.max(3,e.split(`
8
- `).length)}function Re(e){return JSON.stringify(JSON.parse(e),null,2)}function ze(e){try{return Re(e)}catch{return e}}var Be=({children:e,className:t})=>(0,u.jsx)(`div`,{className:d(`flex min-h-10 items-center rounded-md border border-transparent bg-surface-2 px-3 text-sm text-content`,`focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20`,t),children:e}),Ve=({value:e,onChange:t})=>(0,u.jsx)(`div`,{className:`inline-flex items-center gap-4`,children:Fe.map(n=>(0,u.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:d(`text-xs font-medium capitalize transition-colors`,e===n?`text-content`:`text-muted hover:text-content`),children:n},n))}),He=({method:e,url:t,isSending:n,editable:r,onMethodChange:i,onUrlChange:a,onSend:o})=>(0,u.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[1fr_auto]`,children:[(0,u.jsxs)(Be,{className:`min-w-0`,children:[(0,u.jsx)(oe,{value:e,onChange:i,methods:Me,disabled:!r}),(0,u.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),readOnly:!r,"aria-label":`Request URL`,className:`min-w-0 flex-1 bg-transparent px-2 py-2 font-mono text-[14px] text-muted outline-none read-only:cursor-default`})]}),(0,u.jsx)(_,{size:`md`,variant:`primary`,isLoading:n,onClick:o,rightIcon:(0,u.jsx)(p,{name:`send`,className:`h-4 w-4`}),className:`min-h-10 px-7`,children:`Send`})]}),Ue=({header:e,index:t,editable:n,onUpdate:r,onRemove:i})=>(0,u.jsxs)(`div`,{className:`grid grid-cols-[auto_1fr_auto] gap-3 md:grid-cols-[auto_1fr_1fr_auto]`,children:[(0,u.jsx)(`span`,{className:`flex h-8 items-center`,children:(0,u.jsx)(M,{size:`sm`,checked:e.enabled,onChange:e=>r(t,{enabled:e}),disabled:!n,"aria-label":`Enable ${e.key}`})}),(0,u.jsx)(z,{size:`sm`,value:e.key,onChange:e=>r(t,{key:e.target.value}),readOnly:!n,"aria-label":`Header name`,className:`font-mono`}),(0,u.jsx)(z,{size:`sm`,value:e.value,onChange:e=>r(t,{value:e.target.value}),readOnly:!n,"aria-label":`Header value`,containerClassName:`col-start-2 md:col-start-auto`,className:`font-mono`}),(0,u.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.key}`,onClick:()=>i(t),disabled:!n,className:`row-span-2 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-2 hover:text-content disabled:cursor-not-allowed disabled:opacity-40 md:row-span-1`,children:(0,u.jsx)(p,{name:`trash`,className:`h-4 w-4`})})]}),We=({body:e,error:t,editable:n,onBodyChange:r,onClearError:i})=>(0,u.jsxs)(`div`,{className:`space-y-2`,children:[t&&(0,u.jsx)(`div`,{className:`text-xs text-muted`,children:t}),(0,u.jsx)(`textarea`,{value:e,onChange:e=>{r(e.target.value),t&&i()},readOnly:!n,"aria-label":`Request body`,spellCheck:!1,rows:Le(e),className:d(`w-full resize-none overflow-hidden rounded-lg border border-border bg-surface-2 p-3 [field-sizing:content]`,`font-mono text-[13px] leading-relaxed text-content outline-none placeholder:text-muted read-only:cursor-default`)})]}),Ge=({auth:e,editable:t,onChange:n})=>{let[r,i]=(0,l.useState)(!1),a=(0,u.jsx)(`button`,{type:`button`,"aria-label":r?`Hide secret`:`Show secret`,onClick:()=>i(e=>!e),className:`inline-flex h-6 w-6 items-center justify-center rounded-md text-muted transition-colors hover:text-content`,children:(0,u.jsx)(p,{name:r?`eye-closed`:`eye`,className:`h-4 w-4`})});return(0,u.jsxs)(`div`,{className:`grid items-start gap-3 md:grid-cols-[auto_1fr]`,children:[(0,u.jsx)(ne,{value:e.type,onChange:t=>{t===`none`&&n({type:`none`}),t===`bearer`&&n({type:`bearer`,token:e.type===`bearer`?e.token:``}),t===`apiKey`&&n({type:`apiKey`,key:e.type===`apiKey`?e.key:J,value:e.type===`apiKey`?e.value:``,in:`header`})},items:Ie,size:`md`,disabled:!t,minWidthClassName:`min-w-28`}),e.type===`none`&&(0,u.jsx)(`div`,{className:`rounded-lg border border-border bg-surface-2 p-2.5 text-xs text-muted`,children:`Auth is disabled for this request.`}),e.type===`bearer`&&(0,u.jsx)(z,{size:`sm`,type:r?`text`:`password`,value:e.token,onChange:e=>n({type:`bearer`,token:e.target.value}),readOnly:!t,rightSlot:a,className:`font-mono`}),e.type===`apiKey`&&(0,u.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,0.7fr)_minmax(0,1fr)]`,children:[(0,u.jsx)(z,{size:`sm`,value:e.key,onChange:t=>n({type:`apiKey`,key:t.target.value,value:e.value,in:`header`}),readOnly:!t,className:`font-mono`}),(0,u.jsx)(z,{size:`sm`,type:r?`text`:`password`,value:e.value,onChange:t=>n({type:`apiKey`,key:e.key,value:t.target.value,in:`header`}),readOnly:!t,rightSlot:a,className:`font-mono`})]})]})},Ke=({activeTab:e,auth:t,headers:n,body:r,bodyError:i,editable:a,onAuthChange:o,onHeaderUpdate:s,onHeaderRemove:c,onHeaderAdd:l,onBodyChange:d,onBodyErrorClear:f})=>e===`body`?(0,u.jsx)(We,{body:r,error:i,editable:a,onBodyChange:d,onClearError:f}):e===`auth`?(0,u.jsx)(Ge,{auth:t,editable:a,onChange:o}):(0,u.jsxs)(`div`,{className:`space-y-2.5`,children:[n.map((e,t)=>(0,u.jsx)(Ue,{header:e,index:t,editable:a,onUpdate:s,onRemove:c},`${e.key}-${t}`)),(0,u.jsxs)(`button`,{type:`button`,onClick:l,disabled:!a,className:`inline-flex items-center gap-1.5 rounded-md px-1 py-1 text-xs font-medium text-primary transition-colors hover:text-primary-hover disabled:cursor-not-allowed disabled:opacity-40`,children:[(0,u.jsx)(p,{name:`plus`,className:`h-4 w-4`}),`Add header`]})]}),qe=({responsePanel:e,response:t})=>{let n=e===`body`,r=t.headers.map(e=>`${e.key}: ${e.value}`).join(`
9
- `),i=n?t.body:r||`No response headers`;return(0,u.jsxs)(`div`,{className:`relative p-3`,children:[(0,u.jsxs)(`div`,{className:`absolute right-5 top-5 z-10 flex items-center gap-1`,children:[(0,u.jsx)(b,{"aria-label":`Download response`,variant:`surface`,size:`sm`,onClick:()=>{let e=new Blob([i],{type:n?`application/json`:`text/plain`}),t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=n?`response.json`:`response-headers.txt`,r.click(),URL.revokeObjectURL(t)},children:(0,u.jsx)(p,{name:`download`,size:14})}),(0,u.jsx)(b,{"aria-label":`Share response`,variant:`surface`,size:`sm`,onClick:async()=>{if(navigator.share)try{await navigator.share({title:`API response`,text:i})}catch{}else await navigator.clipboard?.writeText(i)},children:(0,u.jsx)(p,{name:`share`,size:14})}),(0,u.jsx)(C,{value:i,size:`sm`})]}),(0,u.jsx)(H,{code:i,language:n?`json`:`plain`,copyable:!1,reveal:!0,className:`pr-28`})]})};function Je(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}var Ye=({entries:e,onSelect:t,onClear:n})=>e.length===0?(0,u.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-6 py-10 text-center`,children:[(0,u.jsx)(p,{name:`restart`,className:`h-6 w-6 text-muted`}),(0,u.jsx)(`p`,{className:`text-sm font-medium text-content`,children:`No requests yet`}),(0,u.jsx)(`p`,{className:`text-xs text-muted`,children:`Requests you send will show up here.`})]}):(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsxs)(`div`,{className:`flex items-center justify-between px-0.5`,children:[(0,u.jsxs)(`span`,{className:`text-xs text-muted`,children:[e.length,` request`,e.length===1?``:`s`]}),(0,u.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs text-muted transition-colors hover:text-content`,children:`Clear`})]}),(0,u.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border`,children:e.map(e=>(0,u.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,u.jsxs)(`button`,{type:`button`,onClick:()=>t(e),className:`flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-surface-2`,children:[(0,u.jsx)(D,{method:e.request.method,className:`shrink-0`}),(0,u.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[13px] text-content`,children:e.request.url}),(0,u.jsx)(O,{status:e.response.status,statusText:e.response.statusText,className:`shrink-0`}),(0,u.jsxs)(`span`,{className:`hidden shrink-0 tabular-nums text-xs text-muted sm:inline`,children:[e.response.timeMs,`ms`]}),(0,u.jsx)(`span`,{className:`hidden shrink-0 text-xs text-muted md:inline`,children:Je(e.at)})]})},q(e.request)))})]});async function Xe(e,t){let n=performance.now();try{return t?await t(e):await _e(e)}catch(e){return U(e,n)}}var Ze=({request:e,onRequestChange:t,onSend:n,editable:r=!0,onBack:i,onImport:a,className:o})=>{let s=(0,l.useMemo)(()=>Ee(e),[e]),c=(0,l.useMemo)(()=>De(e,s),[e,s]),f=ze(e.body??je),m=e.body??``,[h,g]=(0,l.useState)(`body`),[v,y]=(0,l.useState)(`response`),[b,x]=(0,l.useState)(`body`),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)([]),[E,D]=(0,l.useState)(null),[k,A]=(0,l.useState)(null),j=(0,l.useMemo)(()=>ve(e),[e]),M=k??j,F=c.filter(e=>e.enabled).length,I=Ne.map(e=>e.id===`headers`?{...e,badge:F}:e),L=n=>{if(!r)return;let i=Ae(e,{method:e.method,url:e.url,body:m,auth:s,headers:c,...n});t?.(i)};return(0,u.jsxs)(`div`,{className:d(`space-y-3`,o),children:[(0,u.jsxs)(N,{flush:!0,children:[(0,u.jsxs)(`div`,{className:`p-3`,children:[(0,u.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,u.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[i&&(0,u.jsx)(`button`,{type:`button`,"aria-label":`Back to request snippets`,onClick:i,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,u.jsx)(p,{name:`arrow-left`,className:`h-5 w-5`})}),(0,u.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Try it Out`})]}),r&&a&&(0,u.jsx)(_,{type:`button`,size:`sm`,variant:`ghost`,onClick:a,leftIcon:(0,u.jsx)(p,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,u.jsx)(He,{method:e.method,url:e.url,isSending:S,editable:r,onMethodChange:e=>L({method:e}),onUrlChange:e=>L({url:e}),onSend:async()=>{let t=Ae(e,{method:e.method,url:e.url,body:m,auth:s,headers:c}),r=q(t);C(!0);let i=await Xe(t,n);C(!1),A(i),y(`response`),T(e=>[{request:t,response:i,at:Date.now()},...e.filter(e=>q(e.request)!==r)].slice(0,25))}})]}),(0,u.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-y border-border px-3`,children:[(0,u.jsx)(P,{items:I,activeId:h,onChange:e=>g(e),className:`border-b-0`}),h===`body`&&(0,u.jsx)(_,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{try{L({body:Re(f)}),D(null)}catch{D(`Invalid JSON`)}},disabled:!r,leftIcon:(0,u.jsx)(p,{name:`magic`,className:`h-4 w-4`}),children:`Format`})]}),(0,u.jsx)(`div`,{className:`p-3`,children:(0,u.jsx)(Ke,{activeTab:h,auth:s,headers:c,body:f,bodyError:E,editable:r,onAuthChange:e=>{L({auth:e,headers:Oe(c,e,s)})},onHeaderUpdate:(e,t)=>{let n=c[e],r=c.map((n,r)=>r===e?{...n,...t}:n),i=r[e];L({auth:i&&(n&&K(n,s)||K(i,s)||G(i.key,J))?i.enabled?we(i):{type:`none`}:s,headers:r})},onHeaderRemove:e=>{let t=c[e];L({auth:t&&(K(t,s)||G(t.key,J))?{type:`none`}:s,headers:c.filter((t,n)=>n!==e)})},onHeaderAdd:()=>{L({headers:[...c,{key:``,value:``,enabled:!0}]})},onBodyChange:e=>L({body:e}),onBodyErrorClear:()=>D(null)})})]}),(0,u.jsxs)(N,{flush:!0,children:[(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border px-3`,children:[(0,u.jsx)(P,{items:Pe,activeId:v,onChange:e=>y(e),className:`border-b-0`}),v===`response`&&(0,u.jsx)(Ve,{value:b,onChange:x})]}),v===`response`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5 border-b border-border px-3 py-3 text-xs text-muted`,children:[(0,u.jsx)(O,{status:M.status,statusText:M.statusText}),(0,u.jsxs)(`span`,{children:[M.timeMs,`ms`]}),(0,u.jsx)(`span`,{children:M.size})]}),(0,u.jsx)(qe,{responsePanel:b,response:M})]}):(0,u.jsx)(`div`,{className:`p-3`,children:(0,u.jsx)(Ye,{entries:w,onSelect:e=>{t?.(e.request),A(e.response),y(`response`)},onClear:()=>T([])})})]})]})},Qe=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],$e=new Set([`-d`,`--data`,`--data-raw`,`--data-binary`,`--data-ascii`]),et=new Set([`-H`,`--header`]),tt=new Set([`-X`,`--request`]),nt=new Set([`--url`]),rt=`authorization`,it=`Bearer `;function at(e){return e.replace(/\\\s*\n\s*/g,` `).trim()}function ot(e){return e.trim().replace(/^```(?:bash|sh|shell|zsh|curl)?\s*/i,``).replace(/\s*```$/i,``).replace(/^\s*[$>]\s*/gm,``).replace(/\\n/g,`
10
- `).replace(/\\"/g,`"`).replace(/\\'/g,`'`)}function st(e){let t=[],n=``,r=null,i=!1,a=at(ot(e)),o=()=>{n&&=(t.push(n),``)};for(let e=0;e<a.length;e++){let t=a[e];if(i){n+=t,i=!1;continue}if(t===`\\`&&r!==`'`){let t=a[e+1];if(!r&&t===`n`){o(),e++;continue}if(!r&&t&&/\s/.test(t)){for(o();e+1<a.length&&/\s/.test(a[e+1]);)e++;continue}i=!0;continue}if((t===`"`||t===`'`)&&(!r||r===t)){r=r?null:t;continue}if(!r&&/\s/.test(t)){o();continue}n+=t}return i&&(n+=`\\`),o(),t}function ct(e){let t=e.findIndex(e=>e===`curl`||e.endsWith(`/curl`));return t>=0?e.slice(t+1):e}function lt(e){return/^(?:https?:\/\/\S+|\/\S*|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\S*)$/.test(e)}function Y(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)?e:`https://${e}`}function ut(e){let t=e.toUpperCase();return Qe.includes(t)?t:null}function X(e){let t=e.indexOf(`:`);return t<0?null:{key:e.slice(0,t).trim(),value:e.slice(t+1).trim()}}function dt(e){let t=e.find(e=>e.key.toLowerCase()===rt);if(t)return t.value.toLowerCase().startsWith(it.toLowerCase())?{type:`bearer`,token:t.value.slice(7)}:{type:`apiKey`,key:t.key,value:t.value,in:`header`}}function ft(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Z(e){let t=ct(st(e));if(t.length===0)return null;let n=[],r=[],i=null,a=``;for(let e=0;e<t.length;e++){let o=t[e],s=t[e+1];if(tt.has(o)&&s){i=ut(s)??i,e++;continue}if(o.startsWith(`-X`)&&o.length>2){i=ut(o.slice(2))??i;continue}if(et.has(o)&&s){let t=X(s);t&&n.push(t),e++;continue}if(o.startsWith(`-H`)&&o.length>2){let e=X(o.slice(2));e&&n.push(e);continue}if($e.has(o)&&s!==void 0){r.push(s),e++;continue}let c=[...$e].find(e=>o.startsWith(`${e}=`));if(c){r.push(o.slice(c.length+1));continue}if(nt.has(o)&&s){a=Y(s),e++;continue}if(o.startsWith(`--url=`)){a=Y(o.slice(6));continue}!o.startsWith(`-`)&&lt(o)&&(a=Y(o))}if(!a)return null;let o=r.length?ft(r.join(`&`)):``,s=i??(o?`POST`:`GET`),c=dt(n);return{title:`Imported request`,method:s,url:a,headers:c?n.filter(e=>e.key.toLowerCase()!==rt):n,auth:c,body:o||void 0}}var pt=`curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\
6
+ }`,q=`Authorization`,Ae=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],je=[{id:`body`,label:`Body`},{id:`headers`,label:`Headers`},{id:`auth`,label:`Auth`}],Me=[{id:`response`,label:`Response`},{id:`history`,label:`History`}],Ne=[`body`,`headers`],Pe=[{id:`none`,label:`None`,className:`font-semibold text-content hover:bg-surface-2`},{id:`bearer`,label:`Bearer`,className:`font-semibold text-content hover:bg-surface-2`},{id:`apiKey`,label:`API key`,className:`font-semibold text-content hover:bg-surface-2`}];function Fe(e){return Math.max(3,e.split(`
7
+ `).length)}function Ie(e){return JSON.stringify(JSON.parse(e),null,2)}function Le(e){try{return Ie(e)}catch{return e}}var Re=({children:e,className:t})=>(0,l.jsx)(`div`,{className:u(`flex min-h-10 items-center rounded-md border border-transparent bg-surface-2 px-3 text-sm text-content`,`focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20`,t),children:e}),ze=({value:e,onChange:t})=>(0,l.jsx)(`div`,{className:`inline-flex items-center gap-4`,children:Ne.map(n=>(0,l.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:u(`text-xs font-medium capitalize transition-colors`,e===n?`text-content`:`text-muted hover:text-content`),children:n},n))}),Be=({method:e,url:t,isSending:n,editable:r,onMethodChange:i,onUrlChange:a,onSend:o})=>(0,l.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[1fr_auto]`,children:[(0,l.jsxs)(Re,{className:`min-w-0`,children:[(0,l.jsx)(le,{value:e,onChange:i,methods:Ae,disabled:!r}),(0,l.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),readOnly:!r,"aria-label":`Request URL`,className:`min-w-0 flex-1 bg-transparent px-2 py-2 font-mono text-[14px] text-muted outline-none read-only:cursor-default`})]}),(0,l.jsx)(g,{size:`md`,variant:`primary`,isLoading:n,onClick:o,rightIcon:(0,l.jsx)(f,{name:`send`,className:`h-4 w-4`}),className:`min-h-10 px-7`,children:`Send`})]}),Ve=({header:e,index:t,editable:n,onUpdate:r,onRemove:i})=>(0,l.jsxs)(`div`,{className:`grid grid-cols-[auto_1fr_auto] gap-3 md:grid-cols-[auto_1fr_1fr_auto]`,children:[(0,l.jsx)(`span`,{className:`flex h-8 items-center`,children:(0,l.jsx)(te,{size:`sm`,checked:e.enabled,onChange:e=>r(t,{enabled:e}),disabled:!n,"aria-label":`Enable ${e.key}`})}),(0,l.jsx)(F,{size:`sm`,value:e.key,onChange:e=>r(t,{key:e.target.value}),readOnly:!n,"aria-label":`Header name`,className:`font-mono`}),(0,l.jsx)(F,{size:`sm`,value:e.value,onChange:e=>r(t,{value:e.target.value}),readOnly:!n,"aria-label":`Header value`,containerClassName:`col-start-2 md:col-start-auto`,className:`font-mono`}),(0,l.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.key}`,onClick:()=>i(t),disabled:!n,className:`row-span-2 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-2 hover:text-content disabled:cursor-not-allowed disabled:opacity-40 md:row-span-1`,children:(0,l.jsx)(f,{name:`trash`,className:`h-4 w-4`})})]}),He=({body:e,error:t,editable:n,onBodyChange:r,onClearError:i})=>(0,l.jsxs)(`div`,{className:`space-y-2`,children:[t&&(0,l.jsx)(`div`,{className:`text-xs text-muted`,children:t}),(0,l.jsx)(`textarea`,{value:e,onChange:e=>{r(e.target.value),t&&i()},readOnly:!n,"aria-label":`Request body`,spellCheck:!1,rows:Fe(e),className:u(`w-full resize-none overflow-hidden rounded-lg border border-border bg-surface-2 p-3 [field-sizing:content]`,`font-mono text-[13px] leading-relaxed text-content outline-none placeholder:text-muted read-only:cursor-default`)})]}),Ue=({auth:e,editable:t,onChange:n})=>{let[r,i]=(0,c.useState)(!1),a=(0,l.jsx)(`button`,{type:`button`,"aria-label":r?`Hide secret`:`Show secret`,onClick:()=>i(e=>!e),className:`inline-flex h-6 w-6 items-center justify-center rounded-md text-muted transition-colors hover:text-content`,children:(0,l.jsx)(f,{name:r?`eye-closed`:`eye`,className:`h-4 w-4`})});return(0,l.jsxs)(`div`,{className:`grid items-start gap-3 md:grid-cols-[auto_1fr]`,children:[(0,l.jsx)(ae,{value:e.type,onChange:t=>{t===`none`&&n({type:`none`}),t===`bearer`&&n({type:`bearer`,token:e.type===`bearer`?e.token:``}),t===`apiKey`&&n({type:`apiKey`,key:e.type===`apiKey`?e.key:q,value:e.type===`apiKey`?e.value:``,in:`header`})},items:Pe,size:`md`,disabled:!t,minWidthClassName:`min-w-28`}),e.type===`none`&&(0,l.jsx)(`div`,{className:`rounded-lg border border-border bg-surface-2 p-2.5 text-xs text-muted`,children:`Auth is disabled for this request.`}),e.type===`bearer`&&(0,l.jsx)(F,{size:`sm`,type:r?`text`:`password`,value:e.token,onChange:e=>n({type:`bearer`,token:e.target.value}),readOnly:!t,rightSlot:a,className:`font-mono`}),e.type===`apiKey`&&(0,l.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,0.7fr)_minmax(0,1fr)]`,children:[(0,l.jsx)(F,{size:`sm`,value:e.key,onChange:t=>n({type:`apiKey`,key:t.target.value,value:e.value,in:`header`}),readOnly:!t,className:`font-mono`}),(0,l.jsx)(F,{size:`sm`,type:r?`text`:`password`,value:e.value,onChange:t=>n({type:`apiKey`,key:e.key,value:t.target.value,in:`header`}),readOnly:!t,rightSlot:a,className:`font-mono`})]})]})},We=({activeTab:e,auth:t,headers:n,body:r,bodyError:i,editable:a,onAuthChange:o,onHeaderUpdate:s,onHeaderRemove:c,onHeaderAdd:u,onBodyChange:d,onBodyErrorClear:p})=>e===`body`?(0,l.jsx)(He,{body:r,error:i,editable:a,onBodyChange:d,onClearError:p}):e===`auth`?(0,l.jsx)(Ue,{auth:t,editable:a,onChange:o}):(0,l.jsxs)(`div`,{className:`space-y-2.5`,children:[n.map((e,t)=>(0,l.jsx)(Ve,{header:e,index:t,editable:a,onUpdate:s,onRemove:c},`${e.key}-${t}`)),(0,l.jsxs)(`button`,{type:`button`,onClick:u,disabled:!a,className:`inline-flex items-center gap-1.5 rounded-md px-1 py-1 text-xs font-medium text-primary transition-colors hover:text-primary-hover disabled:cursor-not-allowed disabled:opacity-40`,children:[(0,l.jsx)(f,{name:`plus`,className:`h-4 w-4`}),`Add header`]})]}),Ge=({responsePanel:e,response:t})=>{let n=e===`body`,r=t.headers.map(e=>`${e.key}: ${e.value}`).join(`
8
+ `),i=n?t.body:r||`No response headers`;return(0,l.jsxs)(`div`,{className:`relative p-3`,children:[(0,l.jsxs)(`div`,{className:`absolute right-5 top-5 z-10 flex items-center gap-1`,children:[(0,l.jsx)(y,{"aria-label":`Download response`,variant:`surface`,size:`sm`,onClick:()=>{let e=new Blob([i],{type:n?`application/json`:`text/plain`}),t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=n?`response.json`:`response-headers.txt`,r.click(),URL.revokeObjectURL(t)},children:(0,l.jsx)(f,{name:`download`,size:14})}),(0,l.jsx)(y,{"aria-label":`Share response`,variant:`surface`,size:`sm`,onClick:async()=>{if(navigator.share)try{await navigator.share({title:`API response`,text:i})}catch{}else await navigator.clipboard?.writeText(i)},children:(0,l.jsx)(f,{name:`share`,size:14})}),(0,l.jsx)(S,{value:i,size:`sm`})]}),(0,l.jsx)(I,{code:i,language:n?`json`:`plain`,copyable:!1,reveal:!0,className:`pr-28`})]})};function Ke(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}var qe=({entries:e,onSelect:t,onClear:n})=>e.length===0?(0,l.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-6 py-10 text-center`,children:[(0,l.jsx)(f,{name:`restart`,className:`h-6 w-6 text-muted`}),(0,l.jsx)(`p`,{className:`text-sm font-medium text-content`,children:`No requests yet`}),(0,l.jsx)(`p`,{className:`text-xs text-muted`,children:`Requests you send will show up here.`})]}):(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-0.5`,children:[(0,l.jsxs)(`span`,{className:`text-xs text-muted`,children:[e.length,` request`,e.length===1?``:`s`]}),(0,l.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs text-muted transition-colors hover:text-content`,children:`Clear`})]}),(0,l.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border`,children:e.map(e=>(0,l.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,l.jsxs)(`button`,{type:`button`,onClick:()=>t(e),className:`flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-surface-2`,children:[(0,l.jsx)(ee,{method:e.request.method,className:`shrink-0`}),(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[13px] text-content`,children:e.request.url}),(0,l.jsx)(E,{status:e.response.status,statusText:e.response.statusText,className:`shrink-0`}),(0,l.jsxs)(`span`,{className:`hidden shrink-0 tabular-nums text-xs text-muted sm:inline`,children:[e.response.timeMs,`ms`]}),(0,l.jsx)(`span`,{className:`hidden shrink-0 text-xs text-muted md:inline`,children:Ke(e.at)})]})},K(e.request)))})]});async function Je(e,t){let n=performance.now();try{return t?await t(e):await B(e)}catch(e){return z(e,n)}}var Ye=({request:e,onRequestChange:t,onSend:n,editable:r=!0,onBack:i,onImport:a,className:o})=>{let s=(0,c.useMemo)(()=>we(e),[e]),d=(0,c.useMemo)(()=>Te(e,s),[e,s]),p=Le(e.body??ke),m=e.body??``,[h,_]=(0,c.useState)(`body`),[v,y]=(0,c.useState)(`response`),[b,x]=(0,c.useState)(`body`),[S,C]=(0,c.useState)(!1),[w,T]=(0,c.useState)([]),[ee,D]=(0,c.useState)(null),[O,k]=(0,c.useState)(null),te=(0,c.useMemo)(()=>V(e),[e]),M=O??te,N=d.filter(e=>e.enabled).length,ne=je.map(e=>e.id===`headers`?{...e,badge:N}:e),P=n=>{if(!r)return;let i=Oe(e,{method:e.method,url:e.url,body:m,auth:s,headers:d,...n});t?.(i)};return(0,l.jsxs)(`div`,{className:u(`space-y-3`,o),children:[(0,l.jsxs)(A,{flush:!0,children:[(0,l.jsxs)(`div`,{className:`p-3`,children:[(0,l.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[i&&(0,l.jsx)(`button`,{type:`button`,"aria-label":`Back to request snippets`,onClick:i,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,l.jsx)(f,{name:`arrow-left`,className:`h-5 w-5`})}),(0,l.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Try it Out`})]}),r&&a&&(0,l.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,onClick:a,leftIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,l.jsx)(Be,{method:e.method,url:e.url,isSending:S,editable:r,onMethodChange:e=>P({method:e}),onUrlChange:e=>P({url:e}),onSend:async()=>{let t=Oe(e,{method:e.method,url:e.url,body:m,auth:s,headers:d}),r=K(t);C(!0);let i=await Je(t,n);C(!1),k(i),y(`response`),T(e=>[{request:t,response:i,at:Date.now()},...e.filter(e=>K(e.request)!==r)].slice(0,25))}})]}),(0,l.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-y border-border px-3`,children:[(0,l.jsx)(j,{items:ne,activeId:h,onChange:e=>_(e),className:`border-b-0`}),h===`body`&&(0,l.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{try{P({body:Ie(p)}),D(null)}catch{D(`Invalid JSON`)}},disabled:!r,leftIcon:(0,l.jsx)(f,{name:`magic`,className:`h-4 w-4`}),children:`Format`})]}),(0,l.jsx)(`div`,{className:`p-3`,children:(0,l.jsx)(We,{activeTab:h,auth:s,headers:d,body:p,bodyError:ee,editable:r,onAuthChange:e=>{P({auth:e,headers:Ee(d,e,s)})},onHeaderUpdate:(e,t)=>{let n=d[e],r=d.map((n,r)=>r===e?{...n,...t}:n),i=r[e];P({auth:i&&(n&&G(n,s)||G(i,s)||W(i.key,q))?i.enabled?Se(i):{type:`none`}:s,headers:r})},onHeaderRemove:e=>{let t=d[e];P({auth:t&&(G(t,s)||W(t.key,q))?{type:`none`}:s,headers:d.filter((t,n)=>n!==e)})},onHeaderAdd:()=>{P({headers:[...d,{key:``,value:``,enabled:!0}]})},onBodyChange:e=>P({body:e}),onBodyErrorClear:()=>D(null)})})]}),(0,l.jsxs)(A,{flush:!0,children:[(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border px-3`,children:[(0,l.jsx)(j,{items:Me,activeId:v,onChange:e=>y(e),className:`border-b-0`}),v===`response`&&(0,l.jsx)(ze,{value:b,onChange:x})]}),v===`response`?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5 border-b border-border px-3 py-3 text-xs text-muted`,children:[(0,l.jsx)(E,{status:M.status,statusText:M.statusText}),(0,l.jsxs)(`span`,{children:[M.timeMs,`ms`]}),(0,l.jsx)(`span`,{children:M.size})]}),(0,l.jsx)(Ge,{responsePanel:b,response:M})]}):(0,l.jsx)(`div`,{className:`p-3`,children:(0,l.jsx)(qe,{entries:w,onSelect:e=>{t?.(e.request),k(e.response),y(`response`)},onClear:()=>T([])})})]})]})},Xe=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],Ze=new Set([`-d`,`--data`,`--data-raw`,`--data-binary`,`--data-ascii`]),Qe=new Set([`-H`,`--header`]),$e=new Set([`-X`,`--request`]),et=new Set([`--url`]),tt=`authorization`,nt=`Bearer `;function rt(e){return e.replace(/\\\s*\n\s*/g,` `).trim()}function it(e){return e.trim().replace(/^```(?:bash|sh|shell|zsh|curl)?\s*/i,``).replace(/\s*```$/i,``).replace(/^\s*[$>]\s*/gm,``).replace(/\\n/g,`
9
+ `).replace(/\\"/g,`"`).replace(/\\'/g,`'`)}function at(e){let t=[],n=``,r=null,i=!1,a=rt(it(e)),o=()=>{n&&=(t.push(n),``)};for(let e=0;e<a.length;e++){let t=a[e];if(i){n+=t,i=!1;continue}if(t===`\\`&&r!==`'`){let t=a[e+1];if(!r&&t===`n`){o(),e++;continue}if(!r&&t&&/\s/.test(t)){for(o();e+1<a.length&&/\s/.test(a[e+1]);)e++;continue}i=!0;continue}if((t===`"`||t===`'`)&&(!r||r===t)){r=r?null:t;continue}if(!r&&/\s/.test(t)){o();continue}n+=t}return i&&(n+=`\\`),o(),t}function ot(e){let t=e.findIndex(e=>e===`curl`||e.endsWith(`/curl`));return t>=0?e.slice(t+1):e}function st(e){return/^(?:https?:\/\/\S+|\/\S*|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\S*)$/.test(e)}function J(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)?e:`https://${e}`}function ct(e){let t=e.toUpperCase();return Xe.includes(t)?t:null}function Y(e){let t=e.indexOf(`:`);return t<0?null:{key:e.slice(0,t).trim(),value:e.slice(t+1).trim()}}function lt(e){let t=e.find(e=>e.key.toLowerCase()===tt);if(t)return t.value.toLowerCase().startsWith(nt.toLowerCase())?{type:`bearer`,token:t.value.slice(7)}:{type:`apiKey`,key:t.key,value:t.value,in:`header`}}function ut(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function X(e){let t=ot(at(e));if(t.length===0)return null;let n=[],r=[],i=null,a=``;for(let e=0;e<t.length;e++){let o=t[e],s=t[e+1];if($e.has(o)&&s){i=ct(s)??i,e++;continue}if(o.startsWith(`-X`)&&o.length>2){i=ct(o.slice(2))??i;continue}if(Qe.has(o)&&s){let t=Y(s);t&&n.push(t),e++;continue}if(o.startsWith(`-H`)&&o.length>2){let e=Y(o.slice(2));e&&n.push(e);continue}if(Ze.has(o)&&s!==void 0){r.push(s),e++;continue}let c=[...Ze].find(e=>o.startsWith(`${e}=`));if(c){r.push(o.slice(c.length+1));continue}if(et.has(o)&&s){a=J(s),e++;continue}if(o.startsWith(`--url=`)){a=J(o.slice(6));continue}!o.startsWith(`-`)&&st(o)&&(a=J(o))}if(!a)return null;let o=r.length?ut(r.join(`&`)):``,s=i??(o?`POST`:`GET`),c=lt(n);return{title:`Imported request`,method:s,url:a,headers:c?n.filter(e=>e.key.toLowerCase()!==tt):n,auth:c,body:o||void 0}}var dt=`curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\
11
10
  -H 'Content-Type: application/json' \\
12
- -d '{ "title": "API client", "body": "Live request", "userId": 1 }'`,mt=({onImport:e,onCancel:t,className:n})=>{let[r,i]=(0,l.useState)(``),[a,o]=(0,l.useState)(null);return(0,u.jsx)(N,{flush:!0,className:n,children:(0,u.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,u.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t&&(0,u.jsx)(`button`,{type:`button`,"aria-label":`Back`,onClick:t,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,u.jsx)(p,{name:`arrow-left`,className:`h-5 w-5`})}),(0,u.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Import`})]}),(0,u.jsx)(`p`,{className:`text-xs text-muted`,children:`Paste a cURL command to populate the request.`}),(0,u.jsx)(`textarea`,{value:r,onChange:e=>{i(e.target.value),a&&o(null)},spellCheck:!1,rows:5,placeholder:pt,"aria-label":`cURL command`,className:d(`w-full resize-none rounded-lg border bg-surface-2 p-3 font-mono text-[13px] leading-relaxed text-content outline-none`,`placeholder:text-muted/50 focus:ring-2 focus:ring-primary/20`,a?`border-red-500/60`:`border-border focus:border-primary/60`)}),a&&(0,u.jsx)(`p`,{className:`text-xs text-red-400`,children:a}),(0,u.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,u.jsx)(_,{size:`sm`,onClick:()=>{let t=Z(r);if(!t){o(`Could not parse a valid cURL command. Make sure it includes a URL.`);return}e(t,r),i(``),o(null)},disabled:!r.trim(),leftIcon:(0,u.jsx)(p,{name:`download`,className:`h-4 w-4`}),children:`Import`})})]})})},ht=[{id:`curl`,label:`cURL`},{id:`javascript`,label:`Javascript`},{id:`python`,label:`Python`},{id:`go`,label:`Go`}];function gt(e){return e===`curl`?`bash`:e}function _t(e){return!e||e.type===`none`?null:e.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.token}`}:{key:e.key,value:e.value}}function Q(e){let t=_t(e.auth);return t?[...(e.headers??[]).filter(e=>e.key.toLowerCase()!==t.key.toLowerCase()),t]:e.headers??[]}function vt(e){let t=`curl -X ${e.method} '${e.url}'`;for(let n of Q(e))t+=` \\\n -H '${n.key}: ${n.value}'`;return e.body&&(t+=` \\\n -d '${e.body}'`),t}function yt(e){let t=[`method: '${e.method}'`],n=Q(e);if(n.length){let e=n.map(e=>` '${e.key}': '${e.value}'`).join(`,
11
+ -d '{ "title": "API client", "body": "Live request", "userId": 1 }'`,ft=({onImport:e,onCancel:t,className:n})=>{let[r,i]=(0,c.useState)(``),[a,o]=(0,c.useState)(null);return(0,l.jsx)(A,{flush:!0,className:n,children:(0,l.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t&&(0,l.jsx)(`button`,{type:`button`,"aria-label":`Back`,onClick:t,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,l.jsx)(f,{name:`arrow-left`,className:`h-5 w-5`})}),(0,l.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Import`})]}),(0,l.jsx)(`p`,{className:`text-xs text-muted`,children:`Paste a cURL command to populate the request.`}),(0,l.jsx)(`textarea`,{value:r,onChange:e=>{i(e.target.value),a&&o(null)},spellCheck:!1,rows:5,placeholder:dt,"aria-label":`cURL command`,className:u(`w-full resize-none rounded-lg border bg-surface-2 p-3 font-mono text-[13px] leading-relaxed text-content outline-none`,`placeholder:text-muted/50 focus:ring-2 focus:ring-primary/20`,a?`border-red-500/60`:`border-border focus:border-primary/60`)}),a&&(0,l.jsx)(`p`,{className:`text-xs text-red-400`,children:a}),(0,l.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,l.jsx)(g,{size:`sm`,onClick:()=>{let t=X(r);if(!t){o(`Could not parse a valid cURL command. Make sure it includes a URL.`);return}e(t,r),i(``),o(null)},disabled:!r.trim(),leftIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})})]})})},pt=[{id:`curl`,label:`cURL`},{id:`javascript`,label:`Javascript`},{id:`python`,label:`Python`},{id:`go`,label:`Go`}];function mt(e){return e===`curl`?`bash`:e}function ht(e){return!e||e.type===`none`?null:e.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.token}`}:{key:e.key,value:e.value}}function Z(e){let t=ht(e.auth);return t?[...(e.headers??[]).filter(e=>e.key.toLowerCase()!==t.key.toLowerCase()),t]:e.headers??[]}function gt(e){let t=`curl -X ${e.method} '${e.url}'`;for(let n of Z(e))t+=` \\\n -H '${n.key}: ${n.value}'`;return e.body&&(t+=` \\\n -d '${e.body}'`),t}function _t(e){let t=[`method: '${e.method}'`],n=Z(e);if(n.length){let e=n.map(e=>` '${e.key}': '${e.value}'`).join(`,
13
12
  `);t.push(`headers: {\n${e}\n }`)}return e.body&&t.push(`body: JSON.stringify(${e.body})`),[`const res = await fetch('${e.url}', {`,` ${t.join(`,
14
13
  `)},`,`});`,``,`const data = await res.json();`,`console.log(data);`].join(`
15
- `)}function bt(e){let t=[`import requests`,``,`url = "${e.url}"`],n=[`url`],r=Q(e);if(r.length){t.push(``,`headers = {`);for(let e of r)t.push(` "${e.key}": "${e.value}",`);t.push(`}`),n.push(`headers=headers`)}return e.body&&(t.push(``,`payload = ${e.body}`),n.push(`json=payload`)),t.push(``,`response = requests.${e.method.toLowerCase()}(${n.join(`, `)})`,`print(response.json())`),t.join(`
16
- `)}function xt(e){let t=[`"fmt"`,`"io"`,`"net/http"`];e.body&&t.push(`"strings"`);let n=[`package main`,``,`import (`];for(let e of t)n.push(`\t${e}`);n.push(`)`,``,`func main() {`),e.body?(n.push(`\tpayload := strings.NewReader(\`${e.body}\`)`),n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", payload)`)):n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", nil)`);for(let t of Q(e))n.push(`\treq.Header.Set("${t.key}", "${t.value}")`);return n.push(` res, _ := http.DefaultClient.Do(req)`,` defer res.Body.Close()`,``,` body, _ := io.ReadAll(res.Body)`,` fmt.Println(string(body))`,`}`),n.join(`
17
- `)}function $(e,t){switch(t){case`curl`:return vt(e);case`javascript`:return yt(e);case`python`:return bt(e);case`go`:return xt(e)}}var St=({request:e,onTryItOut:t})=>{let[n,r]=(0,l.useState)(`curl`),i=(0,l.useMemo)(()=>$(e,n),[e,n]),a=!!t;return(0,u.jsxs)(`div`,{className:`space-y-3`,children:[(0,u.jsxs)(N,{label:e.title,children:[(0,u.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,u.jsx)(P,{items:ht,activeId:n,onChange:e=>{r(e)},className:`[&_button]:text-[14px]`}),a&&(0,u.jsx)(_,{size:`sm`,variant:`primary`,onClick:t,rightIcon:(0,u.jsx)(p,{name:`arrow-right`,className:`h-4 w-4`}),children:`Try it`})]}),(0,u.jsx)(`div`,{className:`mt-4`,children:(0,u.jsx)(H,{code:i,language:gt(n),showLineNumbers:!0})})]}),e.sampleResponse&&(0,u.jsx)(N,{label:``,children:(0,u.jsx)(H,{code:e.sampleResponse,language:`json`})})]})};function Ct(e){let[t,n]=(0,l.useState)(()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`);return(0,l.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>n(t.matches?`dark`:`light`);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),e===`system`?t:e}function wt(e){try{let t=new URL(e.url);return`${e.method} ${t.pathname||`/`}`}catch{return`${e.method} ${e.url||`/`}`}}var Tt=({request:e,allowImport:t,editable:n,onTryImport:r})=>(0,u.jsxs)(N,{label:`Invalid request`,children:[(0,u.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,u.jsx)(`div`,{className:`text-sm font-medium text-content`,children:`cURL`}),t&&n&&(0,u.jsx)(_,{size:`sm`,variant:`primary`,onClick:r,rightIcon:(0,u.jsx)(p,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,u.jsx)(`div`,{className:`mt-4`,children:(0,u.jsx)(H,{code:e.trim()||`Paste or pass a cURL request with a URL.`,language:`bash`,showLineNumbers:!0})}),(0,u.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`The request could not be parsed into a valid URL.`})]});function Et(e,t,n){return{...e,title:t??wt(e),sampleResponse:n}}var Dt=({request:e,title:t,sampleResponse:n,onUpdateRequest:r,editable:i=!0,allowImport:a=!0,mode:o=`dark`,syncSnippet:s=!1,customization:c})=>{let d=Ct(o),[f,p]=(0,l.useState)(`idle`),[m,h]=(0,l.useState)(e);(0,l.useEffect)(()=>{h(e)},[e]);let g=(0,l.useMemo)(()=>{let e=Z(m);return e?Et(e,t,n):null},[m,t,n]),_=s?m:e,v=(0,l.useMemo)(()=>{let e=Z(_);return e?Et(e,t,n):null},[_,t,n]),y=e=>{h(e),r?.(e)},b=e=>{y($(e,`curl`))},x=(e,t)=>{y(t.trim()),p(`console`)};return(0,u.jsx)(`div`,{"data-theme":d,style:{...c?.primary?{"--primary":c.primary}:{},...c?.background?{"--bg":c.background}:{}},className:`bg-bg text-content text-left`,children:f===`import`?(0,u.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:(0,u.jsx)(mt,{onImport:x,onCancel:()=>p(g?`console`:`idle`)})},`import`):f===`console`&&g?(0,u.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:(0,u.jsx)(Ze,{request:g,onRequestChange:b,editable:i,onBack:()=>p(`idle`),onImport:a&&i?()=>p(`import`):void 0})},`console`):v?(0,u.jsx)(St,{request:v,onTryItOut:()=>p(`console`)}):(0,u.jsx)(Tt,{request:_,allowImport:a,editable:i,onTryImport:()=>p(`import`)})})};exports.ApiConsole=Ze,exports.ApiPlayground=Dt,exports.ImportCard=mt,exports.RequestSnippet=St,exports.SNIPPET_LANGUAGES=ht,exports.executeWidgetRequest=_e,exports.generateSnippet=$,exports.highlightFor=gt,exports.mockWidgetResponse=ve,exports.parseCurl=Z,exports.widgetErrorResponse=U;
14
+ `)}function vt(e){let t=[`import requests`,``,`url = "${e.url}"`],n=[`url`],r=Z(e);if(r.length){t.push(``,`headers = {`);for(let e of r)t.push(` "${e.key}": "${e.value}",`);t.push(`}`),n.push(`headers=headers`)}return e.body&&(t.push(``,`payload = ${e.body}`),n.push(`json=payload`)),t.push(``,`response = requests.${e.method.toLowerCase()}(${n.join(`, `)})`,`print(response.json())`),t.join(`
15
+ `)}function yt(e){let t=[`"fmt"`,`"io"`,`"net/http"`];e.body&&t.push(`"strings"`);let n=[`package main`,``,`import (`];for(let e of t)n.push(`\t${e}`);n.push(`)`,``,`func main() {`),e.body?(n.push(`\tpayload := strings.NewReader(\`${e.body}\`)`),n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", payload)`)):n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", nil)`);for(let t of Z(e))n.push(`\treq.Header.Set("${t.key}", "${t.value}")`);return n.push(` res, _ := http.DefaultClient.Do(req)`,` defer res.Body.Close()`,``,` body, _ := io.ReadAll(res.Body)`,` fmt.Println(string(body))`,`}`),n.join(`
16
+ `)}function Q(e,t){switch(t){case`curl`:return gt(e);case`javascript`:return _t(e);case`python`:return vt(e);case`go`:return yt(e)}}var bt=({request:e,onTryItOut:t})=>{let[n,r]=(0,c.useState)(`curl`),i=(0,c.useMemo)(()=>Q(e,n),[e,n]),a=!!t;return(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsxs)(A,{label:e.title,children:[(0,l.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,l.jsx)(j,{items:pt,activeId:n,onChange:e=>{r(e)},className:`[&_button]:text-[14px]`}),a&&(0,l.jsx)(g,{size:`sm`,variant:`primary`,onClick:t,rightIcon:(0,l.jsx)(f,{name:`arrow-right`,className:`h-4 w-4`}),children:`Try it`})]}),(0,l.jsx)(`div`,{className:`mt-4`,children:(0,l.jsx)(I,{code:i,language:mt(n),showLineNumbers:!0})})]}),e.sampleResponse&&(0,l.jsx)(A,{label:``,children:(0,l.jsx)(I,{code:e.sampleResponse,language:`json`})})]})};function xt(e){let[t,n]=(0,c.useState)(()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`);return(0,c.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>n(t.matches?`dark`:`light`);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),e===`system`?t:e}function St(e){try{let t=new URL(e.url);return`${e.method} ${t.pathname||`/`}`}catch{return`${e.method} ${e.url||`/`}`}}var Ct=({request:e,allowImport:t,editable:n,onTryImport:r})=>(0,l.jsxs)(A,{label:`Invalid request`,children:[(0,l.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,l.jsx)(`div`,{className:`text-sm font-medium text-content`,children:`cURL`}),t&&n&&(0,l.jsx)(g,{size:`sm`,variant:`primary`,onClick:r,rightIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,l.jsx)(`div`,{className:`mt-4`,children:(0,l.jsx)(I,{code:e.trim()||`Paste or pass a cURL request with a URL.`,language:`bash`,showLineNumbers:!0})}),(0,l.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`The request could not be parsed into a valid URL.`})]});function $(e,t,n){return{...e,title:t??St(e),sampleResponse:n}}var wt=({request:e,title:t,sampleResponse:n,onUpdateRequest:r,editable:i=!0,allowImport:a=!0,mode:o=`dark`,syncSnippet:s=!1,customization:u})=>{let d=xt(o),[f,p]=(0,c.useState)(`idle`),[m,h]=(0,c.useState)(e);(0,c.useEffect)(()=>{h(e)},[e]);let g=(0,c.useMemo)(()=>{let e=X(m);return e?$(e,t,n):null},[m,t,n]),_=s?m:e,v=(0,c.useMemo)(()=>{let e=X(_);return e?$(e,t,n):null},[_,t,n]),y=e=>{h(e),r?.(e)},b=e=>{y(Q(e,`curl`))},x=(e,t)=>{y(t.trim()),p(`console`)};return(0,l.jsx)(`div`,{"data-theme":d,style:{...u?.primary?{"--primary":u.primary}:{},...u?.background?{"--bg":u.background}:{}},className:`bg-bg text-content text-left`,children:f===`import`?(0,l.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:(0,l.jsx)(ft,{onImport:x,onCancel:()=>p(g?`console`:`idle`)})},`import`):f===`console`&&g?(0,l.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:(0,l.jsx)(Ye,{request:g,onRequestChange:b,editable:i,onBack:()=>p(`idle`),onImport:a&&i?()=>p(`import`):void 0})},`console`):v?(0,l.jsx)(bt,{request:v,onTryItOut:()=>p(`console`)}):(0,l.jsx)(Ct,{request:_,allowImport:a,editable:i,onTryImport:()=>p(`import`)})})};exports.ApiConsole=Ye,exports.ApiPlayground=wt,exports.ImportCard=ft,exports.RequestSnippet=bt,exports.SNIPPET_LANGUAGES=pt,exports.executeWidgetRequest=B,exports.generateSnippet=Q,exports.highlightFor=mt,exports.mockWidgetResponse=V,exports.parseCurl=X,exports.widgetErrorResponse=z;