mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
1 line
3.2 KiB
JavaScript
1 line
3.2 KiB
JavaScript
import{S as e,i as n,s as t,w as s,g as o,k as r,l as i,o as a,x as c,y as l,q as u,I as $,A as f,Y as m,J as d,B as p,C as g,G as h,D as k,E as x,b as v,F as y,t as z,c as w,a as b,m as I,K as D,d as E}from"./index.cb5ffa4a.js";function N(e){let n,t,p,g,h=[e[1],{style:t=e[1].style+"; width: "+e[0]+"px; height: "+e[0]+"px"}],k={};for(let e=0;e<h.length;e+=1)k=s(k,h[e]);return{c(){n=o("div"),this.h()},l(e){n=r(e,"DIV",{style:!0}),i(n).forEach(a),this.h()},h(){c(n,k),l(n,"bx--icon--skeleton",!0)},m(t,s){u(t,n,s),p||(g=[$(n,"click",e[2]),$(n,"mouseover",e[3]),$(n,"mouseenter",e[4]),$(n,"mouseleave",e[5])],p=!0)},p(e,[s]){c(n,k=f(h,[2&s&&e[1],3&s&&t!==(t=e[1].style+"; width: "+e[0]+"px; height: "+e[0]+"px")&&{style:t}])),l(n,"bx--icon--skeleton",!0)},i:m,o:m,d(e){e&&a(n),p=!1,d(g)}}}function S(e,n,t){const o=["size"];let r=p(n,o),{size:i=16}=n;return e.$$set=e=>{n=s(s({},n),g(e)),t(1,r=p(n,o)),"size"in e&&t(0,i=e.size)},[i,r,function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)}]}class j extends e{constructor(e){super(),n(this,e,S,N,t,{size:0})}}function q(e){let n,t,o;const r=[e[3]];var i=e[0];function c(e){let n={};for(let e=0;e<r.length;e+=1)n=s(n,r[e]);return{props:n}}return i&&(n=new i(c()),n.$on("click",e[8]),n.$on("mouseover",e[9]),n.$on("mouseenter",e[10]),n.$on("mouseleave",e[11])),{c(){n&&w(n.$$.fragment),t=k()},l(e){n&&b(n.$$.fragment,e),t=k()},m(e,s){n&&I(n,e,s),u(e,t,s),o=!0},p(e,s){const o=8&s?f(r,[D(e[3])]):{};if(i!==(i=e[0])){if(n){x();const e=n;v(e.$$.fragment,1,0,()=>{E(e,1)}),y()}i?(n=new i(c()),n.$on("click",e[8]),n.$on("mouseover",e[9]),n.$on("mouseenter",e[10]),n.$on("mouseleave",e[11]),w(n.$$.fragment),z(n.$$.fragment,1),I(n,t.parentNode,t)):n=null}else i&&n.$set(o)},i(e){o||(n&&z(n.$$.fragment,e),o=!0)},o(e){n&&v(n.$$.fragment,e),o=!1},d(e){e&&a(t),n&&E(n,e)}}}function A(e){let n,t;const o=[{size:e[2]},e[3]];let r={};for(let e=0;e<o.length;e+=1)r=s(r,o[e]);return n=new j({props:r}),n.$on("click",e[4]),n.$on("mouseover",e[5]),n.$on("mouseenter",e[6]),n.$on("mouseleave",e[7]),{c(){w(n.$$.fragment)},l(e){b(n.$$.fragment,e)},m(e,s){I(n,e,s),t=!0},p(e,t){const s=12&t?f(o,[4&t&&{size:e[2]},8&t&&D(e[3])]):{};n.$set(s)},i(e){t||(z(n.$$.fragment,e),t=!0)},o(e){v(n.$$.fragment,e),t=!1},d(e){E(n,e)}}}function B(e){let n,t,s,o;const r=[A,q],i=[];function c(e,n){return e[1]?0:1}return n=c(e),t=i[n]=r[n](e),{c(){t.c(),s=k()},l(e){t.l(e),s=k()},m(e,t){i[n].m(e,t),u(e,s,t),o=!0},p(e,[o]){let a=n;n=c(e),n===a?i[n].p(e,o):(x(),v(i[a],1,1,()=>{i[a]=null}),y(),t=i[n],t||(t=i[n]=r[n](e),t.c()),z(t,1),t.m(s.parentNode,s))},i(e){o||(z(t),o=!0)},o(e){v(t),o=!1},d(e){i[n].d(e),e&&a(s)}}}function C(e,n,t){const o=["render","skeleton"];let r,i,a=p(n,o),{render:c}=n,{skeleton:l=!1}=n;return e.$$set=e=>{n=s(s({},n),g(e)),t(3,a=p(n,o)),"render"in e&&t(0,c=e.render),"skeleton"in e&&t(1,l=e.skeleton)},e.$$.update=()=>{1&e.$$.dirty&&t(12,r=c.toString().split(" ")[1]),4096&e.$$.dirty&&t(2,i=parseInt(r.slice(-2),10))},[c,l,i,a,function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)},function(n){h(e,n)}]}class F extends e{constructor(e){super(),n(this,e,C,B,t,{render:0,skeleton:1})}}export{F as I};
|