carbon-components-svelte/assets/index.77bc22b8.js
2020-10-02 20:46:37 -07:00

1 line
18 KiB
JavaScript

import{S as e,i as t,s as n,v as o,D as i,q as s,h as l,n as a,M as c,o as r,w as p,g as d,j as u,k as f,l as b,p as m,N as h,y as $,x,r as g,I as y,z as v,A as w,t as k,b as T,J as E,B as C,P as D,C as M,G as B,H as N,L as A,O as L,c as S,a as P,m as V,K as R,d as H,Y as O,E as _,F as j}from"./index.6b674a45.js";import{B as I}from"./Button.f0f995b5.js";import{C as q}from"./ChevronDown16.5983f6dc.js";function Y(e){let t,n=(e[1]||e[5]["aria-label"])+"";return{c(){t=l(n)},l(e){t=a(e,n)},m(e,n){s(e,t,n)},p(e,o){34&o&&n!==(n=(e[1]||e[5]["aria-label"])+"")&&c(t,n)},d(e){e&&r(t)}}}function z(e){let t,n,C,D,M,B,N,A,L;const S=e[7].default,P=o(S,e,e[6],null),V=P||function(e){let t,n=e[3]&&Y(e);return{c(){n&&n.c(),t=i()},l(e){n&&n.l(e),t=i()},m(e,o){n&&n.m(e,o),s(e,t,o)},p(e,o){e[3]?n?n.p(e,o):(n=Y(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&r(t)}}}(e);let R=[{type:"button"},{"aria-live":"polite"},{"aria-label":M=e[3]?e[1]:void 0},e[5],{class:B=e[5].class+" "+(e[3]&&"bx--copy-btn--"+e[3])}],H={};for(let e=0;e<R.length;e+=1)H=p(H,R[e]);return{c(){t=d("button"),V&&V.c(),n=u(),C=d("span"),D=l(e[1]),this.h()},l(o){t=f(o,"BUTTON",{type:!0,"aria-live":!0,"aria-label":!0,class:!0});var i=b(t);V&&V.l(i),n=m(i),C=f(i,"SPAN",{"aria-hidden":!0});var s=b(C);D=a(s,e[1]),s.forEach(r),i.forEach(r),this.h()},h(){h(C,"aria-hidden","true"),$(C,"bx--assistive-text",!0),$(C,"bx--copy-btn__feedback",!0),x(t,H),$(t,"bx--copy",!0),$(t,"bx--copy-btn--animating",e[3])},m(o,i){s(o,t,i),V&&V.m(t,null),g(t,n),g(t,C),g(C,D),e[10](t),N=!0,A||(L=[y(t,"click",e[8]),y(t,"click",e[11]),y(t,"animationend",e[9]),y(t,"animationend",e[12])],A=!0)},p(e,[n]){P?P.p&&64&n&&v(P,S,e,e[6],n,null,null):V&&V.p&&42&n&&V.p(e,n),(!N||2&n)&&c(D,e[1]),x(t,H=w(R,[{type:"button"},{"aria-live":"polite"},(!N||10&n&&M!==(M=e[3]?e[1]:void 0))&&{"aria-label":M},32&n&&e[5],(!N||40&n&&B!==(B=e[5].class+" "+(e[3]&&"bx--copy-btn--"+e[3])))&&{class:B}])),$(t,"bx--copy",!0),$(t,"bx--copy-btn--animating",e[3])},i(e){N||(k(V,e),N=!0)},o(e){T(V,e),N=!1},d(n){n&&r(t),V&&V.d(n),e[10](null),A=!1,E(L)}}}function Z(e,t,n){const o=["feedback","feedbackTimeout","ref"];let i=C(t,o),{$$slots:s={},$$scope:l}=t,{feedback:a="Copied!"}=t,{feedbackTimeout:c=2e3}=t,{ref:r=null}=t,d=void 0,u=void 0;D(()=>()=>{clearTimeout(u)});return e.$$set=e=>{t=p(p({},t),M(e)),n(5,i=C(t,o)),"feedback"in e&&n(1,a=e.feedback),"feedbackTimeout"in e&&n(2,c=e.feedbackTimeout),"ref"in e&&n(0,r=e.ref),"$$scope"in e&&n(6,l=e.$$scope)},[r,a,c,d,u,i,l,s,function(t){B(e,t)},function(t){B(e,t)},function(e){N[e?"unshift":"push"](()=>{r=e,n(0,r)})},()=>{"fade-in"!==d&&(n(3,d="fade-in"),n(4,u=setTimeout(()=>{n(3,d="fade-out")},c)))},({animationName:e})=>{"hide-feedback"===e&&n(3,d=void 0)}]}class F extends e{constructor(e){super(),t(this,e,Z,z,n,{feedback:1,feedbackTimeout:2,ref:0})}}function G(e){let t,n;return{c(){t=A("title"),n=l(e[2])},l(o){t=f(o,"title",{},1);var i=b(t);n=a(i,e[2]),i.forEach(r)},m(e,o){s(e,t,o),g(t,n)},p(e,t){4&t&&c(n,e[2])},d(e){e&&r(t)}}}function J(e){let t,n,l,a,c,d;const u=e[8].default,m=o(u,e,e[7],null),$=m||function(e){let t,n=e[2]&&G(e);return{c(){n&&n.c(),t=i()},l(e){n&&n.l(e),t=i()},m(e,o){n&&n.m(e,o),s(e,t,o)},p(e,o){e[2]?n?n.p(e,o):(n=G(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&r(t)}}}(e);let x=[{"data-carbon-icon":"Copy16"},{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{width:"16"},{height:"16"},{class:e[0]},{preserveAspectRatio:"xMidYMid meet"},{style:e[3]},{id:e[1]},e[4]],C={};for(let e=0;e<x.length;e+=1)C=p(C,x[e]);return{c(){t=A("svg"),n=A("path"),l=A("path"),$&&$.c(),this.h()},l(e){t=f(e,"svg",{"data-carbon-icon":!0,xmlns:!0,viewBox:!0,fill:!0,width:!0,height:!0,class:!0,preserveAspectRatio:!0,style:!0,id:!0},1);var o=b(t);n=f(o,"path",{d:!0},1),b(n).forEach(r),l=f(o,"path",{d:!0},1),b(l).forEach(r),$&&$.l(o),o.forEach(r),this.h()},h(){h(n,"d","M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"),h(l,"d","M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"),L(t,C)},m(o,i){s(o,t,i),g(t,n),g(t,l),$&&$.m(t,null),a=!0,c||(d=[y(t,"click",e[9]),y(t,"mouseover",e[10]),y(t,"mouseenter",e[11]),y(t,"mouseleave",e[12]),y(t,"keyup",e[13]),y(t,"keydown",e[14])],c=!0)},p(e,[n]){m?m.p&&128&n&&v(m,u,e,e[7],n,null,null):$&&$.p&&4&n&&$.p(e,n),L(t,C=w(x,[{"data-carbon-icon":"Copy16"},{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{width:"16"},{height:"16"},(!a||1&n)&&{class:e[0]},{preserveAspectRatio:"xMidYMid meet"},(!a||8&n)&&{style:e[3]},(!a||2&n)&&{id:e[1]},16&n&&e[4]]))},i(e){a||(k($,e),a=!0)},o(e){T($,e),a=!1},d(e){e&&r(t),$&&$.d(e),c=!1,E(d)}}}function K(e,t,n){let o,i,s,l,{$$slots:a={},$$scope:c}=t,{class:r}=t,{id:d}=t,{tabindex:u}=t,{focusable:f=!1}=t,{title:b}=t,{style:m}=t;return e.$$set=e=>{n(18,t=p(p({},t),M(e))),"class"in e&&n(0,r=e.class),"id"in e&&n(1,d=e.id),"tabindex"in e&&n(5,u=e.tabindex),"focusable"in e&&n(6,f=e.focusable),"title"in e&&n(2,b=e.title),"style"in e&&n(3,m=e.style),"$$scope"in e&&n(7,c=e.$$scope)},e.$$.update=()=>{n(15,o=t["aria-label"]),n(16,i=t["aria-labelledby"]),98308&e.$$.dirty&&n(17,s=o||i||b),229472&e.$$.dirty&&n(4,l={"aria-label":o,"aria-labelledby":i,"aria-hidden":!s||void 0,role:s?"img":void 0,focusable:"0"===u||f,tabindex:u})},t=M(t),[r,d,b,m,l,u,f,c,a,function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)}]}class U extends e{constructor(e){super(),t(this,e,K,J,n,{class:0,id:1,tabindex:5,focusable:6,title:2,style:3})}}function Q(e){let t,n;return t=new U({props:{class:"bx--snippet__icon"}}),{c(){S(t.$$.fragment)},l(e){P(t.$$.fragment,e)},m(e,o){V(t,e,o),n=!0},p:O,i(e){n||(k(t.$$.fragment,e),n=!0)},o(e){T(t.$$.fragment,e),n=!1},d(e){H(t,e)}}}function W(e){let t,n;const o=[{class:"bx--copy-btn"},{"aria-label":e[0]},{title:e[0]},e[1]];let i={$$slots:{default:[Q]},$$scope:{ctx:e}};for(let e=0;e<o.length;e+=1)i=p(i,o[e]);return t=new F({props:i}),t.$on("click",e[2]),t.$on("animationend",e[3]),{c(){S(t.$$.fragment)},l(e){P(t.$$.fragment,e)},m(e,o){V(t,e,o),n=!0},p(e,[n]){const i=3&n?w(o,[o[0],1&n&&{"aria-label":e[0]},1&n&&{title:e[0]},2&n&&R(e[1])]):{};16&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(k(t.$$.fragment,e),n=!0)},o(e){T(t.$$.fragment,e),n=!1},d(e){H(t,e)}}}function X(e,t,n){const o=["iconDescription"];let i=C(t,o),{iconDescription:s="Copy to clipboard"}=t;return e.$$set=e=>{t=p(p({},t),M(e)),n(1,i=C(t,o)),"iconDescription"in e&&n(0,s=e.iconDescription)},[s,i,function(t){B(e,t)},function(t){B(e,t)}]}class ee extends e{constructor(e){super(),t(this,e,X,W,n,{iconDescription:0})}}function te(e){let t,n,o,i,l;return{c(){t=d("span"),n=u(),o=d("span"),i=u(),l=d("span")},l(e){t=f(e,"SPAN",{}),b(t).forEach(r),n=m(e),o=f(e,"SPAN",{}),b(o).forEach(r),i=m(e),l=f(e,"SPAN",{}),b(l).forEach(r)},m(e,a){s(e,t,a),s(e,n,a),s(e,o,a),s(e,i,a),s(e,l,a)},d(e){e&&r(t),e&&r(n),e&&r(o),e&&r(i),e&&r(l)}}}function ne(e){let t;return{c(){t=d("span")},l(e){t=f(e,"SPAN",{}),b(t).forEach(r)},m(e,n){s(e,t,n)},d(e){e&&r(t)}}}function oe(e){let t,n,o,i;function l(e,t){return"single"===e[0]?ne:"multi"===e[0]?te:void 0}let a=l(e),c=a&&a(e),u=[e[1]],m={};for(let e=0;e<u.length;e+=1)m=p(m,u[e]);return{c(){t=d("div"),n=d("div"),c&&c.c(),this.h()},l(e){t=f(e,"DIV",{});var o=b(t);n=f(o,"DIV",{});var i=b(n);c&&c.l(i),i.forEach(r),o.forEach(r),this.h()},h(){$(n,"bx--snippet-container",!0),x(t,m),$(t,"bx--snippet",!0),$(t,"bx--skeleton",!0),$(t,"bx--snippet--single","single"===e[0]),$(t,"bx--snippet--multi","multi"===e[0])},m(l,a){s(l,t,a),g(t,n),c&&c.m(n,null),o||(i=[y(t,"click",e[2]),y(t,"mouseover",e[3]),y(t,"mouseenter",e[4]),y(t,"mouseleave",e[5])],o=!0)},p(e,[o]){a!==(a=l(e))&&(c&&c.d(1),c=a&&a(e),c&&(c.c(),c.m(n,null))),x(t,m=w(u,[2&o&&e[1]])),$(t,"bx--snippet",!0),$(t,"bx--skeleton",!0),$(t,"bx--snippet--single","single"===e[0]),$(t,"bx--snippet--multi","multi"===e[0])},i:O,o:O,d(e){e&&r(t),c&&c.d(),o=!1,E(i)}}}function ie(e,t,n){const o=["type"];let i=C(t,o),{type:s="single"}=t;return e.$$set=e=>{t=p(p({},t),M(e)),n(1,i=C(t,o)),"type"in e&&n(0,s=e.type)},[s,i,function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)}]}class se extends e{constructor(e){super(),t(this,e,ie,oe,n,{type:0})}}function le(e){let t,n,i,C,D,M,B,N,A,L,S,P,V;const R=e[17].default,H=o(R,e,e[33],null),O=H||function(e){let t;return{c(){t=l(e[4])},l(n){t=a(n,e[4])},m(e,n){s(e,t,n)},p(e,n){16&n[0]&&c(t,e[4])},d(e){e&&r(t)}}}(e);let I=!e[5]&&re(e),q=e[1]&&pe(e),Y=[e[14],{class:L=(e[3]&&"bx--snippet--"+e[3])+" "+e[14].class}],z={};for(let e=0;e<Y.length;e+=1)z=p(z,Y[e]);return{c(){t=d("div"),n=d("div"),i=d("code"),C=d("pre"),O&&O.c(),N=u(),I&&I.c(),A=u(),q&&q.c(),this.h()},l(e){t=f(e,"DIV",{class:!0});var o=b(t);n=f(o,"DIV",{role:!0,tabindex:!0,"aria-label":!0});var s=b(n);i=f(s,"CODE",{});var l=b(i);C=f(l,"PRE",{});var a=b(C);O&&O.l(a),a.forEach(r),l.forEach(r),s.forEach(r),N=m(o),I&&I.l(o),A=m(o),q&&q.l(o),o.forEach(r),this.h()},h(){h(n,"role",D="single"===e[3]?"textbox":void 0),h(n,"tabindex",M="single"===e[3]?"0":void 0),h(n,"aria-label",B=e[14]["aria-label"]||e[9]||"code-snippet"),$(n,"bx--snippet-container",!0),x(t,z),$(t,"bx--snippet",!0),$(t,"bx--btn--copy","inline"===e[3]),$(t,"bx--snippet--expand",e[0]),$(t,"bx--snippet--light",e[6]),$(t,"bx--snippet--no-copy",e[5])},m(o,l){s(o,t,l),g(t,n),g(n,i),g(i,C),O&&O.m(C,null),e[29](C),g(t,N),I&&I.m(t,null),g(t,A),q&&q.m(t,null),S=!0,P||(V=[y(t,"mouseover",e[18]),y(t,"mouseenter",e[19]),y(t,"mouseleave",e[20])],P=!0)},p(e,o){H?H.p&&4&o[1]&&v(H,R,e,e[33],o,null,null):O&&O.p&&16&o[0]&&O.p(e,o),(!S||8&o[0]&&D!==(D="single"===e[3]?"textbox":void 0))&&h(n,"role",D),(!S||8&o[0]&&M!==(M="single"===e[3]?"0":void 0))&&h(n,"tabindex",M),(!S||16896&o[0]&&B!==(B=e[14]["aria-label"]||e[9]||"code-snippet"))&&h(n,"aria-label",B),e[5]?I&&(_(),T(I,1,1,()=>{I=null}),j()):I?(I.p(e,o),32&o[0]&&k(I,1)):(I=re(e),I.c(),k(I,1),I.m(t,A)),e[1]?q?(q.p(e,o),2&o[0]&&k(q,1)):(q=pe(e),q.c(),k(q,1),q.m(t,null)):q&&(_(),T(q,1,1,()=>{q=null}),j()),x(t,z=w(Y,[16384&o[0]&&e[14],(!S||16392&o[0]&&L!==(L=(e[3]&&"bx--snippet--"+e[3])+" "+e[14].class))&&{class:L}])),$(t,"bx--snippet",!0),$(t,"bx--btn--copy","inline"===e[3]),$(t,"bx--snippet--expand",e[0]),$(t,"bx--snippet--light",e[6]),$(t,"bx--snippet--no-copy",e[5])},i(e){S||(k(O,e),k(I),k(q),S=!0)},o(e){T(O,e),T(I),T(q),S=!1},d(n){n&&r(t),O&&O.d(n),e[29](null),I&&I.d(),q&&q.d(),P=!1,E(V)}}}function ae(e){let t,n,o,l;const a=[fe,ue],c=[];function p(e,t){return e[5]?0:1}return t=p(e),n=c[t]=a[t](e),{c(){n.c(),o=i()},l(e){n.l(e),o=i()},m(e,n){c[t].m(e,n),s(e,o,n),l=!0},p(e,i){let s=t;t=p(e),t===s?c[t].p(e,i):(_(),T(c[s],1,1,()=>{c[s]=null}),j(),n=c[t],n||(n=c[t]=a[t](e),n.c()),k(n,1),n.m(o.parentNode,o))},i(e){l||(k(n),l=!0)},o(e){T(n),l=!1},d(e){c[t].d(e),e&&r(o)}}}function ce(e){let t,n;const o=[{type:e[3]},e[14]];let i={};for(let e=0;e<o.length;e+=1)i=p(i,o[e]);return t=new se({props:i}),t.$on("click",e[21]),t.$on("mouseover",e[22]),t.$on("mouseenter",e[23]),t.$on("mouseleave",e[24]),{c(){S(t.$$.fragment)},l(e){P(t.$$.fragment,e)},m(e,o){V(t,e,o),n=!0},p(e,n){const i=16392&n[0]?w(o,[8&n[0]&&{type:e[3]},16384&n[0]&&R(e[14])]):{};t.$set(i)},i(e){n||(k(t.$$.fragment,e),n=!0)},o(e){T(t.$$.fragment,e),n=!1},d(e){H(t,e)}}}function re(e){let t,n;return t=new ee({props:{feedback:e[10],feedbackTimeout:e[11],iconDescription:e[8]}}),t.$on("click",e[30]),t.$on("animationend",e[31]),{c(){S(t.$$.fragment)},l(e){P(t.$$.fragment,e)},m(e,o){V(t,e,o),n=!0},p(e,n){const o={};1024&n[0]&&(o.feedback=e[10]),2048&n[0]&&(o.feedbackTimeout=e[11]),256&n[0]&&(o.iconDescription=e[8]),t.$set(o)},i(e){n||(k(t.$$.fragment,e),n=!0)},o(e){T(t.$$.fragment,e),n=!1},d(e){H(t,e)}}}function pe(e){let t,n;return t=new I({props:{kind:"ghost",size:"small",class:"bx--snippet-btn--expand",$$slots:{default:[de]},$$scope:{ctx:e}}}),t.$on("click",e[32]),{c(){S(t.$$.fragment)},l(e){P(t.$$.fragment,e)},m(e,o){V(t,e,o),n=!0},p(e,n){const o={};8192&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(k(t.$$.fragment,e),n=!0)},o(e){T(t.$$.fragment,e),n=!1},d(e){H(t,e)}}}function de(e){let t,n,o,i,p;return i=new q({props:{class:"bx--icon-chevron--down bx--snippet__icon","aria-label":e[13]}}),{c(){t=d("span"),n=l(e[13]),o=u(),S(i.$$.fragment),this.h()},l(s){t=f(s,"SPAN",{});var l=b(t);n=a(l,e[13]),l.forEach(r),o=m(s),P(i.$$.fragment,s),this.h()},h(){$(t,"bx--snippet-btn--text",!0)},m(e,l){s(e,t,l),g(t,n),s(e,o,l),V(i,e,l),p=!0},p(e,t){(!p||8192&t[0])&&c(n,e[13]);const o={};8192&t[0]&&(o["aria-label"]=e[13]),i.$set(o)},i(e){p||(k(i.$$.fragment,e),p=!0)},o(e){T(i.$$.fragment,e),p=!1},d(e){e&&r(t),e&&r(o),H(i,e)}}}function ue(e){let t,n;const o=[{"aria-label":e[9]},{"aria-describedby":e[12]},{feedback:e[10]},{feedbackTimeout:e[11]},{class:"bx--snippet "+(e[3]&&"bx--snippet--"+e[3])+"\n "+("inline"===e[3]&&"bx--btn--copy")+"\n "+(e[0]&&"bx--snippet--expand")+"\n "+(e[6]&&"bx--snippet--light")+"\n "+(e[5]&&"bx--snippet--no-copy")},e[14]];let i={$$slots:{default:[be]},$$scope:{ctx:e}};for(let e=0;e<o.length;e+=1)i=p(i,o[e]);return t=new F({props:i}),t.$on("click",e[25]),t.$on("mouseover",e[26]),t.$on("mouseenter",e[27]),t.$on("mouseleave",e[28]),{c(){S(t.$$.fragment)},l(e){P(t.$$.fragment,e)},m(e,o){V(t,e,o),n=!0},p(e,n){const i=24169&n[0]?w(o,[512&n[0]&&{"aria-label":e[9]},4096&n[0]&&{"aria-describedby":e[12]},1024&n[0]&&{feedback:e[10]},2048&n[0]&&{feedbackTimeout:e[11]},105&n[0]&&{class:"bx--snippet "+(e[3]&&"bx--snippet--"+e[3])+"\n "+("inline"===e[3]&&"bx--btn--copy")+"\n "+(e[0]&&"bx--snippet--expand")+"\n "+(e[6]&&"bx--snippet--light")+"\n "+(e[5]&&"bx--snippet--no-copy")},16384&n[0]&&R(e[14])]):{};4112&n[0]|4&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(k(t.$$.fragment,e),n=!0)},o(e){T(t.$$.fragment,e),n=!1},d(e){H(t,e)}}}function fe(e){let t,n,i,u;const m=e[17].default,$=o(m,e,e[33],null),y=$||function(e){let t;return{c(){t=l(e[4])},l(n){t=a(n,e[4])},m(e,n){s(e,t,n)},p(e,n){16&n[0]&&c(t,e[4])},d(e){e&&r(t)}}}(e);let E=[{class:i="bx--snippet "+(e[3]&&"bx--snippet--"+e[3])+"\n "+("inline"===e[3]&&"bx--btn--copy")+"\n "+(e[0]&&"bx--snippet--expand")+"\n "+(e[6]&&"bx--snippet--light")+"\n "+(e[5]&&"bx--snippet--no-copy")},e[14]],C={};for(let e=0;e<E.length;e+=1)C=p(C,E[e]);return{c(){t=d("span"),n=d("code"),y&&y.c(),this.h()},l(e){t=f(e,"SPAN",{class:!0});var o=b(t);n=f(o,"CODE",{id:!0});var i=b(n);y&&y.l(i),i.forEach(r),o.forEach(r),this.h()},h(){h(n,"id",e[12]),x(t,C)},m(e,o){s(e,t,o),g(t,n),y&&y.m(n,null),u=!0},p(e,o){$?$.p&&4&o[1]&&v($,m,e,e[33],o,null,null):y&&y.p&&16&o[0]&&y.p(e,o),(!u||4096&o[0])&&h(n,"id",e[12]),x(t,C=w(E,[(!u||105&o[0]&&i!==(i="bx--snippet "+(e[3]&&"bx--snippet--"+e[3])+"\n "+("inline"===e[3]&&"bx--btn--copy")+"\n "+(e[0]&&"bx--snippet--expand")+"\n "+(e[6]&&"bx--snippet--light")+"\n "+(e[5]&&"bx--snippet--no-copy")))&&{class:i},16384&o[0]&&e[14]]))},i(e){u||(k(y,e),u=!0)},o(e){T(y,e),u=!1},d(e){e&&r(t),y&&y.d(e)}}}function be(e){let t,n;const i=e[17].default,p=o(i,e,e[33],null),u=p||function(e){let t;return{c(){t=l(e[4])},l(n){t=a(n,e[4])},m(e,n){s(e,t,n)},p(e,n){16&n[0]&&c(t,e[4])},d(e){e&&r(t)}}}(e);return{c(){t=d("code"),u&&u.c(),this.h()},l(e){t=f(e,"CODE",{id:!0});var n=b(t);u&&u.l(n),n.forEach(r),this.h()},h(){h(t,"id",e[12])},m(e,o){s(e,t,o),u&&u.m(t,null),n=!0},p(e,o){p?p.p&&4&o[1]&&v(p,i,e,e[33],o,null,null):u&&u.p&&16&o[0]&&u.p(e,o),(!n||4096&o[0])&&h(t,"id",e[12])},i(e){n||(k(u,e),n=!0)},o(e){T(u,e),n=!1},d(e){e&&r(t),u&&u.d(e)}}}function me(e){let t,n,o,l;const a=[ce,ae,le],c=[];function p(e,t){return e[7]?0:"inline"===e[3]?1:2}return t=p(e),n=c[t]=a[t](e),{c(){n.c(),o=i()},l(e){n.l(e),o=i()},m(e,n){c[t].m(e,n),s(e,o,n),l=!0},p(e,i){let s=t;t=p(e),t===s?c[t].p(e,i):(_(),T(c[s],1,1,()=>{c[s]=null}),j(),n=c[t],n||(n=c[t]=a[t](e),n.c()),k(n,1),n.m(o.parentNode,o))},i(e){l||(k(n),l=!0)},o(e){T(n),l=!1},d(e){c[t].d(e),e&&r(o)}}}function he(e,t,n){const o=["type","code","expanded","hideCopyButton","light","skeleton","copyButtonDescription","copyLabel","feedback","feedbackTimeout","showLessText","showMoreText","showMoreLess","id","ref"];let i=C(t,o),{$$slots:s={},$$scope:l}=t,{type:a="single"}=t,{code:c}=t,{expanded:r=!1}=t,{hideCopyButton:d=!1}=t,{light:u=!1}=t,{skeleton:f=!1}=t,{copyButtonDescription:b}=t,{copyLabel:m}=t,{feedback:h="Copied!"}=t,{feedbackTimeout:$=2e3}=t,{showLessText:x="Show less"}=t,{showMoreText:g="Show more"}=t,{showMoreLess:y=!1}=t,{id:v="ccs-"+Math.random().toString(36)}=t,{ref:w=null}=t;let k;return e.$$set=e=>{t=p(p({},t),M(e)),n(14,i=C(t,o)),"type"in e&&n(3,a=e.type),"code"in e&&n(4,c=e.code),"expanded"in e&&n(0,r=e.expanded),"hideCopyButton"in e&&n(5,d=e.hideCopyButton),"light"in e&&n(6,u=e.light),"skeleton"in e&&n(7,f=e.skeleton),"copyButtonDescription"in e&&n(8,b=e.copyButtonDescription),"copyLabel"in e&&n(9,m=e.copyLabel),"feedback"in e&&n(10,h=e.feedback),"feedbackTimeout"in e&&n(11,$=e.feedbackTimeout),"showLessText"in e&&n(15,x=e.showLessText),"showMoreText"in e&&n(16,g=e.showMoreText),"showMoreLess"in e&&n(1,y=e.showMoreLess),"id"in e&&n(12,v=e.id),"ref"in e&&n(2,w=e.ref),"$$scope"in e&&n(33,l=e.$$scope)},e.$$.update=()=>{98305&e.$$.dirty[0]&&n(13,k=r?x:g),12&e.$$.dirty[0]&&"multi"===a&&w&&n(1,y=w.getBoundingClientRect().height>255)},[r,y,w,a,c,d,u,f,b,m,h,$,v,k,i,x,g,s,function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(t){B(e,t)},function(e){N[e?"unshift":"push"](()=>{w=e,n(2,w)})},function(t){B(e,t)},function(t){B(e,t)},()=>{n(0,r=!r)},l]}class $e extends e{constructor(e){super(),t(this,e,he,me,n,{type:3,code:4,expanded:0,hideCopyButton:5,light:6,skeleton:7,copyButtonDescription:8,copyLabel:9,feedback:10,feedbackTimeout:11,showLessText:15,showMoreText:16,showMoreLess:1,id:12,ref:2},[-1,-1])}}var xe=function(e){if(navigator.clipboard)return navigator.clipboard.writeText(e).catch((function(e){throw void 0!==e?e:new DOMException("The request is not allowed","NotAllowedError")}));var t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",document.body.appendChild(t);var n=window.getSelection(),o=window.document.createRange();n.removeAllRanges(),o.selectNode(t),n.addRange(o);var i=!1;try{i=window.document.execCommand("copy")}catch(e){console.log("error",e)}return n.removeAllRanges(),window.document.body.removeChild(t),i?Promise.resolve():Promise.reject(new DOMException("The request is not allowed","NotAllowedError"))};export{$e as C,ee as a,xe as c};