@epa-wg/custom-element-dist 0.0.27 → 0.0.29

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.
Files changed (187) hide show
  1. package/.storybook/main.ts +2 -2
  2. package/README.md +4 -4
  3. package/coverage/coverage-final.json +21 -22
  4. package/coverage/index.html +19 -34
  5. package/coverage/src/custom-element/coverage.svg +1 -1
  6. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  7. package/coverage/src/custom-element/custom-element.js.html +491 -368
  8. package/coverage/src/custom-element/http-request.js.html +12 -12
  9. package/coverage/src/custom-element/index.html +19 -19
  10. package/coverage/src/custom-element/local-storage.js.html +52 -52
  11. package/coverage/src/custom-element/location-element.js.html +4 -4
  12. package/coverage/src/custom-element/module-url.js.html +1 -1
  13. package/coverage/src/index.html +1 -1
  14. package/coverage/src/mocks/handlers.ts.html +1 -1
  15. package/coverage/src/mocks/index.html +1 -1
  16. package/coverage/src/stories/attributes.test.stories.ts.html +11 -2
  17. package/coverage/src/stories/css.test.stories.ts.html +8 -2
  18. package/coverage/src/stories/dom-merge.test.stories.ts.html +3 -3
  19. package/coverage/src/stories/external-template.test.stories.ts.html +8 -2
  20. package/coverage/src/stories/form.test.stories.ts.html +8 -2
  21. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  22. package/coverage/src/stories/index.html +1 -1
  23. package/coverage/src/stories/local-storage.test.stories.ts.html +24 -18
  24. package/coverage/src/stories/location-element.test.stories.ts.html +8 -2
  25. package/coverage/src/stories/module-url.test.stories.ts.html +8 -2
  26. package/coverage/src/stories/set-url.test.stories.ts.html +8 -2
  27. package/coverage/src/stories/slice-events.test.stories.ts.html +8 -2
  28. package/coverage/src/stories/slots.test.stories.ts.html +8 -2
  29. package/coverage/src/stories/testStoryBook.ts.html +12 -12
  30. package/coverage/src/stories/version-select.test.stories.ts.html +8 -2
  31. package/coverage/src/sum.ts.html +1 -1
  32. package/dist/custom-element-BOIPgtxz.js +565 -0
  33. package/dist/custom-element-CUsSENWc.cjs +97 -0
  34. package/dist/custom-element-bundle.cjs +1 -1
  35. package/dist/custom-element-bundle.js +22 -21
  36. package/dist/demo/a.svg +26 -26
  37. package/dist/demo/demo.css +0 -3
  38. package/dist/demo/s.xml +18 -3
  39. package/dist/demo/s.xslt +37 -54
  40. package/dist/demo/ss.html +24 -57
  41. package/package.json +13 -13
  42. package/public/demo/a.svg +26 -26
  43. package/public/demo/demo.css +0 -3
  44. package/public/demo/s.xml +18 -3
  45. package/public/demo/s.xslt +37 -54
  46. package/public/demo/ss.html +24 -57
  47. package/src/custom-element/custom-element.js +61 -20
  48. package/src/custom-element/demo/a.svg +26 -26
  49. package/src/custom-element/demo/demo.css +0 -3
  50. package/src/custom-element/demo/s.xml +18 -3
  51. package/src/custom-element/demo/s.xslt +37 -54
  52. package/src/custom-element/demo/ss.html +24 -57
  53. package/src/custom-element/ide/web-types-dce.json +1 -1
  54. package/src/custom-element/ide/web-types-xsl.json +1 -1
  55. package/src/dce-social-preview.png +0 -0
  56. package/src/material/angular.css +987 -0
  57. package/src/material/components/autocomplete.html +241 -0
  58. package/src/material/components/dropdown.html +115 -0
  59. package/src/material/components/icon-link.html +161 -0
  60. package/src/material/components/menu.html +235 -0
  61. package/src/material/components.html +121 -0
  62. package/src/material/demo.css +31 -0
  63. package/src/material/index.html +111 -0
  64. package/src/material/material.css +357 -0
  65. package/src/material/theme/README.md +18 -0
  66. package/src/material/theme/semantic.css +112 -0
  67. package/src/mocks/versions.mock.ts +8 -8
  68. package/src/stories/attributes.test.stories.ts +3 -0
  69. package/src/stories/css.test.stories.ts +2 -0
  70. package/src/stories/dom-merge.test.stories.ts +2 -2
  71. package/src/stories/external-template.test.stories.ts +2 -0
  72. package/src/stories/form.test.stories.ts +2 -0
  73. package/src/stories/local-storage.test.stories.ts +2 -0
  74. package/src/stories/location-element.test.stories.ts +2 -0
  75. package/src/stories/module-url.test.stories.ts +2 -0
  76. package/src/stories/set-url.test.stories.ts +2 -0
  77. package/src/stories/slice-events.test.stories.ts +2 -0
  78. package/src/stories/slots.test.stories.ts +2 -0
  79. package/src/stories/version-select.test.stories.ts +2 -0
  80. package/storybook-static/assets/Color-ERTF36HU-CQkSD2nd.js +1 -0
  81. package/storybook-static/assets/Configure-DOhzHFEs.js +165 -0
  82. package/storybook-static/assets/DocsRenderer-CFRXHY34-BSJkbsd6.js +2 -0
  83. package/storybook-static/assets/{attributes.test.stories-Bt5V18qO.js → attributes.test.stories-BJBuuXgZ.js} +4 -4
  84. package/storybook-static/assets/{css.test.stories-CGYy2daE.js → css.test.stories-pgbBc17d.js} +1 -1
  85. package/storybook-static/assets/custom-element-BDGsYgbP.js +97 -0
  86. package/storybook-static/assets/{dom-merge.test.stories-XlsZ0UvX.js → dom-merge.test.stories-CXcYP_-J.js} +5 -5
  87. package/storybook-static/assets/entry-preview-C313OLrj.js +26 -0
  88. package/storybook-static/assets/{entry-preview-docs-BMKNVQXA.js → entry-preview-docs-B7ORr9w5.js} +2 -2
  89. package/storybook-static/assets/{external-template.test.stories-Bt_Pflu8.js → external-template.test.stories-CpJ68Ghy.js} +13 -13
  90. package/storybook-static/assets/{form.test.stories-B0NoI8wm.js → form.test.stories-D35lyqd8.js} +2 -2
  91. package/storybook-static/assets/{handlers-B5969HUu.js → handlers-CW9pDZnt.js} +6 -6
  92. package/storybook-static/assets/{http-request.stories-B2skuTFV.js → http-request.stories-CBbknCOO.js} +6 -6
  93. package/storybook-static/assets/iframe-DOi4N7qI.js +2 -0
  94. package/storybook-static/assets/{index-C7lvoJNv.js → index-B3QjF0Ed.js} +1 -1
  95. package/storybook-static/assets/index-BSz1w4Gl.js +234 -0
  96. package/storybook-static/assets/index-BdcJ-iJ7.js +8 -0
  97. package/storybook-static/assets/index-CaL3Qp7t.js +634 -0
  98. package/storybook-static/assets/index-DgFM0Ce3.js +1 -0
  99. package/storybook-static/assets/index-YxUFxnQR.js +1 -0
  100. package/storybook-static/assets/{local-storage.test.stories-DfY6feqG.js → local-storage.test.stories-BY-PWhuk.js} +5 -5
  101. package/storybook-static/assets/{location-element.test.stories-944AotIJ.js → location-element.test.stories-3auBYEaU.js} +3 -3
  102. package/storybook-static/assets/{module-url.test.stories-DSKcwApl.js → module-url.test.stories-B7L9cL60.js} +6 -6
  103. package/storybook-static/assets/{preview-0Jj89qip.js → preview-BRPR-UXC.js} +1 -1
  104. package/storybook-static/assets/{preview-DB9FwMii.js → preview-BWzBA1C2.js} +1 -1
  105. package/storybook-static/assets/preview-BhhEZcNS.js +1 -0
  106. package/storybook-static/assets/{preview-CadgX-4y.js → preview-C992A1Y-.js} +2 -2
  107. package/storybook-static/assets/preview-CcS4DQh8.js +1 -0
  108. package/storybook-static/assets/{preview-AJR7rVPD.js → preview-CfWMRsRq.js} +1 -1
  109. package/storybook-static/assets/{preview-FpHGYA1q.js → preview-DHPc-V4N.js} +1 -1
  110. package/storybook-static/assets/preview-DYzi3Z2p.js +1 -0
  111. package/storybook-static/assets/{preview-4Up_z4Em.js → preview-caVMbCIR.js} +2 -2
  112. package/storybook-static/assets/preview-ncvtW_hb.js +34 -0
  113. package/storybook-static/assets/{set-url.test.stories-DjLHKkEh.js → set-url.test.stories-CuSuDLIx.js} +3 -3
  114. package/storybook-static/assets/{slice-events.test.stories-8I_BrHd6.js → slice-events.test.stories-BkRKsKem.js} +4 -4
  115. package/storybook-static/assets/{slots.test.stories-CvZz4jyP.js → slots.test.stories-BJCUWFkE.js} +8 -8
  116. package/storybook-static/assets/{version-select.test.stories-DSxmJylI.js → version-select.test.stories-B3ybJn_Z.js} +2 -2
  117. package/storybook-static/demo/a.svg +26 -26
  118. package/storybook-static/demo/demo.css +0 -3
  119. package/storybook-static/demo/s.xml +18 -3
  120. package/storybook-static/demo/s.xslt +37 -54
  121. package/storybook-static/demo/ss.html +24 -57
  122. package/storybook-static/iframe.html +1 -1
  123. package/storybook-static/index.html +3 -7
  124. package/storybook-static/project.json +1 -1
  125. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
  126. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +9 -9
  127. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +76 -94
  128. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
  129. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
  130. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
  131. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  132. package/storybook-static/sb-addons/interactions-9/manager-bundle.js +211 -0
  133. package/storybook-static/sb-addons/interactions-9/manager-bundle.js.LEGAL.txt +0 -0
  134. package/storybook-static/sb-manager/globals-module-info.js +11 -0
  135. package/storybook-static/sb-manager/globals-runtime.js +27803 -26928
  136. package/storybook-static/sb-manager/runtime.js +10341 -10136
  137. package/storybook-static/sb-preview/runtime.js +3841 -3828
  138. package/.idea/custom-element-dist.iml +0 -9
  139. package/.idea/misc.xml +0 -6
  140. package/.idea/modules.xml +0 -8
  141. package/.idea/vcs.xml +0 -6
  142. package/coverage/src/custom-element/demo/coverage.svg +0 -10
  143. package/coverage/src/custom-element/demo/index.html +0 -116
  144. package/coverage/src/custom-element/demo/z.js/coverage.svg +0 -10
  145. package/coverage/src/custom-element/demo/z.js.html +0 -112
  146. package/dist/custom-element-BMMsP1Dy.js +0 -533
  147. package/dist/custom-element-CPSk7s0j.cjs +0 -87
  148. package/dist/demo/s1.xslt +0 -60
  149. package/dist/demo/z.html +0 -33
  150. package/dist/demo/z.js +0 -9
  151. package/dist/demo/z.xml +0 -60
  152. package/dist/demo/z1.html +0 -34
  153. package/public/demo/s1.xslt +0 -60
  154. package/public/demo/z.html +0 -33
  155. package/public/demo/z.js +0 -9
  156. package/public/demo/z.xml +0 -60
  157. package/public/demo/z1.html +0 -34
  158. package/src/custom-element/demo/s1.xslt +0 -60
  159. package/src/custom-element/demo/z.html +0 -33
  160. package/src/custom-element/demo/z.js +0 -9
  161. package/src/custom-element/demo/z.xml +0 -60
  162. package/src/custom-element/demo/z1.html +0 -34
  163. package/storybook-static/assets/Color-KGDBMAHA-CJo5gHY3.js +0 -1
  164. package/storybook-static/assets/Configure-DdXbGKhY.js +0 -173
  165. package/storybook-static/assets/DocsRenderer-PKQXORMH-DLnpL5hE.js +0 -2
  166. package/storybook-static/assets/custom-element-D8hcDZHh.js +0 -265
  167. package/storybook-static/assets/entry-preview-BKQ8UCxI.js +0 -8
  168. package/storybook-static/assets/iframe-Dfrt81rk.js +0 -2
  169. package/storybook-static/assets/index-Ay195x2L.js +0 -605
  170. package/storybook-static/assets/index-C3ChPTMh.js +0 -1
  171. package/storybook-static/assets/index-C8k3Z-3Y.js +0 -28
  172. package/storybook-static/assets/index-DGdNYaqV.js +0 -8
  173. package/storybook-static/assets/index-Gpdhz4ab.js +0 -1
  174. package/storybook-static/assets/lit-element-DzhCn-8W.js +0 -19
  175. package/storybook-static/assets/preview-BJPLiuSt.js +0 -1
  176. package/storybook-static/assets/preview-BMWqy4Bi.js +0 -1
  177. package/storybook-static/assets/preview-BnWGZYux.js +0 -1
  178. package/storybook-static/assets/preview-Djh1_Tal.js +0 -20
  179. package/storybook-static/demo/s1.xslt +0 -60
  180. package/storybook-static/demo/z.html +0 -33
  181. package/storybook-static/demo/z.js +0 -9
  182. package/storybook-static/demo/z.xml +0 -60
  183. package/storybook-static/demo/z1.html +0 -34
  184. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +0 -336
  185. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +0 -77
  186. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +0 -234
  187. /package/{storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt → src/material/guide/getting-started/index.html} +0 -0
@@ -189,6 +189,7 @@ export const SlicesInAttrAndName:Story =
189
189
  },
190
190
  };
191
191
 
192
+ //#region unit tests
192
193
  /* istanbul ignore else -- @preserve */
193
194
  if( 'test' === import.meta.env.MODE &&
194
195
  !import.meta.url.includes('skiptest') )
@@ -198,3 +199,4 @@ if( 'test' === import.meta.env.MODE &&
198
199
  const { describe } = await import('vitest')
199
200
  describe(meta.title, () => testStoryBook( mod, meta ) );
200
201
  }
202
+ //#endregion
@@ -206,6 +206,7 @@ export const TemplateWithAttributesAndCondition:Story =
206
206
  }
207
207
  };
208
208
 
209
+ //#region unit tests
209
210
  /* istanbul ignore else -- @preserve */
210
211
  if( 'test' === import.meta.env.MODE &&
211
212
  !import.meta.url.includes('skiptest') )
@@ -215,3 +216,4 @@ if( 'test' === import.meta.env.MODE &&
215
216
  const { describe } = await import('vitest')
216
217
  describe(meta.title, () => testStoryBook( mod, meta ) );
217
218
  }
219
+ //#endregion
@@ -91,6 +91,7 @@ export const VersionsSelect:Story =
91
91
  };
92
92
 
93
93
 
94
+ //#region unit tests
94
95
  /* istanbul ignore else -- @preserve */
95
96
  if( 'test' === import.meta.env.MODE &&
96
97
  !import.meta.url.includes('skiptest') )
@@ -100,3 +101,4 @@ if( 'test' === import.meta.env.MODE &&
100
101
  const { describe } = await import('vitest')
101
102
  describe(meta.title, () => testStoryBook( mod, meta ) );
102
103
  }
104
+ //#endregion
@@ -0,0 +1 @@
1
+ import{al as Me,am as ie,an as Ce,ae as h,ag as b,ao as C,a2 as ue,a0 as $e,x as Ie,ap as Oe,aq as Ne}from"./index-CaL3Qp7t.js";import{g as fe}from"./index-BdcJ-iJ7.js";import"./iframe-DOi4N7qI.js";import"../sb-preview/runtime.js";import"./index-D-8MO0q_.js";import"./index-DrFu-skq.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const H=Se,he={};for(const e of Object.keys(H))he[H[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),l=a-o;let s,c;a===o?s=0:t===a?s=(n-r)/l:n===a?s=2+(r-t)/l:r===a&&(s=4+(t-n)/l),s=Math.min(s*60,360),s<0&&(s+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=l/(a+o):c=l/(2-a-o),[s,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const l=e[0]/255,s=e[1]/255,c=e[2]/255,i=Math.max(l,s,c),d=i-Math.min(l,s,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(l),n=f(s),r=f(c),l===i?o=r-n:s===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,l=(1-n-o)/(1-o)||0,s=(1-r-o)/(1-o)||0;return[a*100,l*100,s*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(H)){const a=H[o],l=Re(e,a);l<n&&(n=l,r=o)}return r};u.keyword.rgb=function(e){return H[e]};u.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,l=t*.0193+n*.1192+r*.9505;return[o*100,a*100,l*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,l=500*(n-r),s=200*(r-o);return[a,l,s]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,l;if(n===0)return l=r*255,[l,l,l];r<.5?o=r*(1+n):o=r+n-r*n;const s=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?l=s+(o-s)*6*a:2*a<1?l=o:3*a<2?l=s+(o-s)*(2/3-a)*6:l=s,c[i]=l*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const l=(r+n)/2,s=r===0?2*o/(a+o):2*n/(r+n);return[t,s*100,l*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),l=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,l];case 1:return[s,r,l];case 2:return[l,r,c];case 3:return[l,s,r];case 4:return[c,l,r];case 5:return[r,l,s]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,l;l=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,l/=2,[t,a*100,l*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const l=Math.floor(6*t),s=1-r;a=6*t-l,l&1&&(a=1-a);const c=n+a*(s-n);let i,d,f;switch(l){default:case 6:case 0:i=s,d=c,f=n;break;case 1:i=c,d=s,f=n;break;case 2:i=n,d=s,f=c;break;case 3:i=n,d=c,f=s;break;case 4:i=c,d=n,f=s;break;case 5:i=s,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),l=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,r*(1-o)+o);return[a*255,l*255,s*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,l;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,l=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),l=Math.min(Math.max(0,l),1),[o*255,a*255,l*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),l=200*(n-r);return[o,a,l]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,l;a=(t+16)/116,o=n/500+a,l=a-r/200;const s=a**3,c=o**3,i=l**3;return a=s>.008856?s:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,l=i>.008856?i:(l-16/116)/7.787,o*=95.047,a*=100,l*=108.883,[o,a,l]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const l=Math.sqrt(n*n+r*r);return[t,l,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),l=n*Math.sin(o);return[t,a,l]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let l=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(l+=60),l};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(s=>s+s).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,l=r&255;return[o,a,l]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),l=o-a;let s,c;return l<1?s=a/(1-l):s=0,l<=0?c=0:o===t?c=(n-r)/l%6:o===n?c=2+(r-t)/l:c=4+(t-n)/l,c/=6,c%=1,[c*360,l*100,s*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,l=a%1,s=1-l;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=l,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=l;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=l,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function Te(e){const t=je(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),o=Object.keys(X[r]);for(let a=o.length,l=0;l<a;l++){const s=o[l],c=t[s];c.distance===-1&&(c.distance=t[r].distance+1,c.parent=r,n.unshift(s))}}return t}function ze(e,t){return function(n){return t(e(n))}}function He(e,t){const n=[t[e].parent,e];let r=X[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),r=ze(X[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var Fe=function(e){const t=Te(e),n={},r=Object.keys(t);for(let o=r.length,a=0;a<o;a++){const l=r[a];t[l].parent!==null&&(n[l]=He(l,t))}return n};const K=de,Pe=Fe,I={},Le=Object.keys(K);function qe(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,l=0;l<a;l++)o[l]=Math.round(o[l]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}Le.forEach(e=>{I[e]={},Object.defineProperty(I[e],"channels",{value:K[e].channels}),Object.defineProperty(I[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];I[e][r]=Be(o),I[e][r].raw=qe(o)})});var Xe=I;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var lt=at,st=ie,W=Ke,re=lt,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,l,s,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,st(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function w(v){var M=r,T=o;return r=o=void 0,i=v,l=e.apply(T,M),l}function S(v){return i=v,s=setTimeout(m,t),d?w(v):l}function E(v){var M=v-c,T=v-i,ee=t-M;return f?ut(ee,a-T):ee}function p(v){var M=v-c,T=v-i;return c===void 0||M>=t||M<0||f&&T>=a}function m(){var v=W();if(p(v))return k(v);s=setTimeout(m,E(v))}function k(v){return s=void 0,g&&r?w(v):(r=o=void 0,l)}function y(){s!==void 0&&clearTimeout(s),i=0,r=c=o=s=void 0}function R(){return s===void 0?l:k(W())}function j(){var v=W(),M=p(v);if(r=arguments,o=this,c=v,M){if(s===void 0)return S(c);if(f)return clearTimeout(s),s=setTimeout(m,t),w(c)}return s===void 0&&(s=setTimeout(m,t)),l}return j.cancel=y,j.flush=R,j}var ht=ft;const dt=fe(ht);function $(){return($=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function J(e,t){if(e==null)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}function V(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var N=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},z=function(e){return"touches"in e},A=function(e){return e&&e.ownerDocument.defaultView||self},oe=function(e,t,n){var r=e.getBoundingClientRect(),o=z(t)?function(a,l){for(var s=0;s<a.length;s++)if(a[s].identifier===l)return a[s];return a[0]}(t.touches,n):t;return{left:N((o.pageX-(r.left+A(e).pageXOffset))/r.width),top:N((o.pageY-(r.top+A(e).pageYOffset))/r.height)}},ae=function(e){!z(e)&&e.preventDefault()},Q=h.memo(function(e){var t=e.onMove,n=e.onKey,r=J(e,["onMove","onKey"]),o=b.useRef(null),a=V(t),l=V(n),s=b.useRef(null),c=b.useRef(!1),i=b.useMemo(function(){var w=function(p){ae(p),(z(p)?p.touches.length>0:p.buttons>0)&&o.current?a(oe(o.current,p,s.current)):E(!1)},S=function(){return E(!1)};function E(p){var m=c.current,k=A(o.current),y=p?k.addEventListener:k.removeEventListener;y(m?"touchmove":"mousemove",w),y(m?"touchend":"mouseup",S)}return[function(p){var m=p.nativeEvent,k=o.current;if(k&&(ae(m),!function(R,j){return j&&!z(R)}(m,c.current)&&k)){if(z(m)){c.current=!0;var y=m.changedTouches||[];y.length&&(s.current=y[0].identifier)}k.focus(),a(oe(k,m,s.current)),E(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),l({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},E]},[l,a]),d=i[0],f=i[1],g=i[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),F=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=F(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},x=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},bt=function(e){return me(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?x(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?x(parseInt(e.substring(6,8),16)/255,2):1}},mt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:mt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(be(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:x(e.h),s:x(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:x(o/2),a:x(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},be=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),l=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:x(255*[r,s,l,l,c,r][i]),g:x(255*[c,r,r,s,l,l][i]),b:x(255*[l,l,c,r,r,s][i]),a:x(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?me({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(x(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},me=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),l=a-Math.min(t,n,r),s=l?a===t?(n-r)/l:a===n?2+(r-t)/l:4+(t-n)/l:0;return{h:x(60*(s<0?s+6:s)),s:x(a?l/a*100:0),v:x(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=F(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:N(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:N(t.s+100*o.left,0,100),v:N(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(t.s)+"%, Brightness "+x(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],l=o[1],s=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,s.current.color)){var i=e.toHsva(t);s.current={hsva:i,color:t},l(i)}},[t,e]),b.useEffect(function(){var i;ye(a,s.current.hsva)||e.equal(i=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:i},r(i))},[a,e,r]);var c=b.useCallback(function(i){l(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?b.useLayoutEffect:b.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},le=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!le.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,le.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=J(e,["className","colorModel","color","onChange"]),s=b.useRef(null);ke(s);var c=we(n,o,a),i=c[0],d=c[1],f=F(["react-colorful",t]);return h.createElement("div",$({},l,{ref:s,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:bt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,$({},e,{colorModel:Ct}))},It=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=F(["react-colorful__alpha",t]),l=x(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:N(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=J(e,["className","colorModel","color","onChange"]),s=b.useRef(null);ke(s);var c=we(n,o,a),i=c[0],d=c[1],f=F(["react-colorful",t]);return h.createElement("div",$({},l,{ref:s,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(It,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ot={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,$({},e,{colorModel:Ot}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=be(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,$({},e,{colorModel:St}))},jt=C.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Tt=C(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=C.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ht=C($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Ft=C.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=C.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`,se=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=C(Ie.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=C(Oe)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),Xt=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Dt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Wt=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Kt=/^\s*#?([0-9a-f]{3})\s*$/i,Vt={hex:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e?.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},O=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[l,s,c,i]=ce(e),[d,f,g]=_.rgb.hsl([l,s,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([l,s,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([l,s,c]).toLowerCase()}`}}if(Wt.test(e)){let[l,s,c,i]=ce(e),[d,f,g]=_.hsl.rgb([l,s,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([l,s,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([l,s,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!t?.valid)return q[n];if(n!=="hex")return t?.[n]||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,l]=r[1].split("");return`#${o}${o}${a}${a}${l}${l}`},Gt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>O(n)),[l,s]=b.useState(o?.colorSpace||"hex");b.useEffect(()=>{let f=e||"",g=O(f);r(f),a(g),s(g?.colorSpace||"hex")},[e]);let c=b.useMemo(()=>At(n,o,l).toLowerCase(),[n,o,l]),i=b.useCallback(f=>{let g=O(f),w=g?.value||f||"";r(w),w===""&&(a(void 0),t(void 0)),g&&(a(g),s(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=L.indexOf(l)+1;f>=L.length&&(f=0),s(L[f]);let g=o?.[L[f]]||"";r(g),t(g)},[o,l,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:l,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=b.useState(t?.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(s=>typeof s=="string"?O(s):s.title?{...O(s.color),keyword:s.title}:O(s.color)).concat(r).filter(Boolean).slice(-27),[e,r]),l=b.useCallback(s=>{s?.valid&&(a.some(c=>D(c[n])===D(s[n]))||o(c=>c.concat(s)))},[n,a]);return{presets:a,addPreset:l}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:l=!1,argType:s})=>{let c=b.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:w,cycleColorSpace:S}=Gt(t,c),{presets:E,addPreset:p}=Ut(a,g,w),m=Vt[w],k=!!s?.table?.readonly;return h.createElement(jt,{"aria-readonly":k},h.createElement(Tt,{startOpen:l,trigger:k?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(zt,null,h.createElement(m,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),E.length>0&&h.createElement(Ft,null,E.map((y,R)=>h.createElement(ue,{key:`${y.value}-${R}`,hasChrome:!1,tooltip:h.createElement(Ht,{note:y.keyword||y.value})},h.createElement(se,{value:y[w],active:g&&D(y[w])===D(g[w]),onClick:()=>f(y.value)})))))},h.createElement(se,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:y=>f(y.target.value),onFocus:y=>y.target.select(),readOnly:k,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:S}):null)},rn=Yt;export{Yt as ColorControl,rn as default};
@@ -0,0 +1,165 @@
1
+ import{ar as e,as as a}from"./index-CaL3Qp7t.js";import{u as o}from"./index-B3QjF0Ed.js";import"./iframe-DOi4N7qI.js";import"../sb-preview/runtime.js";import"./index-BdcJ-iJ7.js";import"./index-D-8MO0q_.js";import"./index-DrFu-skq.js";const n="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.0001%200C7.16466%200%200%207.17472%200%2016.0256C0%2023.1061%204.58452%2029.1131%2010.9419%2031.2322C11.7415%2031.3805%2012.0351%2030.8845%2012.0351%2030.4613C12.0351%2030.0791%2012.0202%2028.8167%2012.0133%2027.4776C7.56209%2028.447%206.62283%2025.5868%206.62283%2025.5868C5.89499%2023.7345%204.8463%2023.2419%204.8463%2023.2419C3.39461%2022.2473%204.95573%2022.2678%204.95573%2022.2678C6.56242%2022.3808%207.40842%2023.9192%207.40842%2023.9192C8.83547%2026.3691%2011.1514%2025.6609%2012.0645%2025.2514C12.2081%2024.2156%2012.6227%2023.5087%2013.0803%2023.1085C9.52648%2022.7032%205.7906%2021.3291%205.7906%2015.1886C5.7906%2013.4389%206.41563%2012.0094%207.43916%2010.8871C7.27303%2010.4834%206.72537%208.85349%207.59415%206.64609C7.59415%206.64609%208.93774%206.21539%2011.9953%208.28877C13.2716%207.9337%2014.6404%207.75563%2016.0001%207.74953C17.3599%207.75563%2018.7297%207.9337%2020.0084%208.28877C23.0623%206.21539%2024.404%206.64609%2024.404%206.64609C25.2749%208.85349%2024.727%2010.4834%2024.5608%2010.8871C25.5868%2012.0094%2026.2075%2013.4389%2026.2075%2015.1886C26.2075%2021.3437%2022.4645%2022.699%2018.9017%2023.0957C19.4756%2023.593%2019.9869%2024.5683%2019.9869%2026.0634C19.9869%2028.2077%2019.9684%2029.9334%2019.9684%2030.4613C19.9684%2030.8877%2020.2564%2031.3874%2021.0674%2031.2301C27.4213%2029.1086%2032%2023.1037%2032%2016.0256C32%207.17472%2024.8364%200%2016.0001%200ZM5.99257%2022.8288C5.95733%2022.9084%205.83227%2022.9322%205.71834%2022.8776C5.60229%2022.8253%205.53711%2022.7168%205.57474%2022.6369C5.60918%2022.5549%205.7345%2022.5321%205.85029%2022.587C5.9666%2022.6393%206.03284%2022.7489%205.99257%2022.8288ZM6.7796%2023.5321C6.70329%2023.603%206.55412%2023.5701%206.45291%2023.4581C6.34825%2023.3464%206.32864%2023.197%206.40601%2023.125C6.4847%2023.0542%206.62937%2023.0874%206.73429%2023.1991C6.83895%2023.3121%206.85935%2023.4605%206.7796%2023.5321ZM7.31953%2024.4321C7.2215%2024.5003%207.0612%2024.4363%206.96211%2024.2938C6.86407%2024.1513%206.86407%2023.9804%206.96422%2023.9119C7.06358%2023.8435%207.2215%2023.905%207.32191%2024.0465C7.41968%2024.1914%207.41968%2024.3623%207.31953%2024.4321ZM8.23267%2025.4743C8.14497%2025.5712%207.95818%2025.5452%207.82146%2025.413C7.68156%2025.2838%207.64261%2025.1004%207.73058%2025.0035C7.81934%2024.9064%208.00719%2024.9337%208.14497%2025.0648C8.28381%2025.1938%208.3262%2025.3785%208.23267%2025.4743ZM9.41281%2025.8262C9.37413%2025.9517%209.19423%2026.0088%209.013%2025.9554C8.83203%2025.9005%208.7136%2025.7535%208.75016%2025.6266C8.78778%2025.5003%208.96848%2025.4408%209.15104%2025.4979C9.33174%2025.5526%209.45044%2025.6985%209.41281%2025.8262ZM10.7559%2025.9754C10.7604%2026.1076%2010.6067%2026.2172%2010.4165%2026.2196C10.2252%2026.2238%2010.0704%2026.1169%2010.0683%2025.9868C10.0683%2025.8534%2010.2185%2025.7448%2010.4098%2025.7416C10.6001%2025.7379%2010.7559%2025.8441%2010.7559%2025.9754ZM12.0753%2025.9248C12.0981%2026.0537%2011.9658%2026.1862%2011.7769%2026.2215C11.5912%2026.2554%2011.4192%2026.1758%2011.3957%2026.0479C11.3726%2025.9157%2011.5072%2025.7833%2011.6927%2025.7491C11.8819%2025.7162%2012.0512%2025.7937%2012.0753%2025.9248Z'%20fill='%23161614'/%3e%3c/svg%3e",c="data:image/svg+xml,%3csvg%20width='33'%20height='32'%20viewBox='0%200%2033%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_10031_177575)'%3e%3cmask%20id='mask0_10031_177575'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='4'%20width='33'%20height='25'%3e%3cpath%20d='M32.5034%204.00195H0.503906V28.7758H32.5034V4.00195Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_10031_177575)'%3e%3cpath%20d='M27.5928%206.20817C25.5533%205.27289%2023.3662%204.58382%2021.0794%204.18916C21.0378%204.18154%2020.9962%204.20057%2020.9747%204.23864C20.6935%204.73863%2020.3819%205.3909%2020.1637%205.90358C17.7042%205.53558%2015.2573%205.53558%2012.8481%205.90358C12.6299%205.37951%2012.307%204.73863%2012.0245%204.23864C12.003%204.20184%2011.9614%204.18281%2011.9198%204.18916C9.63431%204.58255%207.44721%205.27163%205.40641%206.20817C5.38874%206.21578%205.3736%206.22848%205.36355%206.24497C1.21508%2012.439%200.078646%2018.4809%200.636144%2024.4478C0.638667%2024.477%200.655064%2024.5049%200.677768%2024.5227C3.41481%2026.5315%206.06609%2027.7511%208.66815%2028.5594C8.70979%2028.5721%208.75392%2028.5569%208.78042%2028.5226C9.39594%2027.6826%209.94461%2026.7968%2010.4151%2025.8653C10.4428%2025.8107%2010.4163%2025.746%2010.3596%2025.7244C9.48927%2025.3945%208.66058%2024.9922%207.86343%2024.5354C7.80038%2024.4986%207.79533%2024.4084%207.85333%2024.3653C8.02108%2024.2397%208.18888%2024.109%208.34906%2023.977C8.37804%2023.9529%208.41842%2023.9478%208.45249%2023.963C13.6894%2026.3526%2019.359%2026.3526%2024.5341%2023.963C24.5682%2023.9465%2024.6086%2023.9516%2024.6388%2023.9757C24.799%2024.1077%2024.9668%2024.2397%2025.1358%2024.3653C25.1938%2024.4084%2025.19%2024.4986%2025.127%2024.5354C24.3298%2025.0011%2023.5011%2025.3945%2022.6296%2025.7232C22.5728%2025.7447%2022.5476%2025.8107%2022.5754%2025.8653C23.0559%2026.7955%2023.6046%2027.6812%2024.2087%2028.5213C24.234%2028.5569%2024.2794%2028.5721%2024.321%2028.5594C26.9357%2027.7511%2029.5869%2026.5315%2032.324%2024.5227C32.348%2024.5049%2032.3631%2024.4783%2032.3656%2024.4491C33.0328%2017.5506%2031.2481%2011.5584%2027.6344%206.24623C27.6256%206.22848%2027.6105%206.21578%2027.5928%206.20817ZM11.1971%2020.8146C9.62043%2020.8146%208.32129%2019.3679%208.32129%2017.5913C8.32129%2015.8146%209.59523%2014.368%2011.1971%2014.368C12.8115%2014.368%2014.0981%2015.8273%2014.0729%2017.5913C14.0729%2019.3679%2012.7989%2020.8146%2011.1971%2020.8146ZM21.8299%2020.8146C20.2533%2020.8146%2018.9541%2019.3679%2018.9541%2017.5913C18.9541%2015.8146%2020.228%2014.368%2021.8299%2014.368C23.4444%2014.368%2024.7309%2015.8273%2024.7057%2017.5913C24.7057%2019.3679%2023.4444%2020.8146%2021.8299%2020.8146Z'%20fill='%235865F2'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_10031_177575'%3e%3crect%20width='31.9995'%20height='32'%20fill='white'%20transform='translate(0.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",l="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M31.3313%208.44657C30.9633%207.08998%2029.8791%206.02172%2028.5022%205.65916C26.0067%205.00026%2016%205.00026%2016%205.00026C16%205.00026%205.99333%205.00026%203.4978%205.65916C2.12102%206.02172%201.03665%207.08998%200.668678%208.44657C0%2010.9053%200%2016.0353%200%2016.0353C0%2016.0353%200%2021.1652%200.668678%2023.6242C1.03665%2024.9806%202.12102%2026.0489%203.4978%2026.4116C5.99333%2027.0703%2016%2027.0703%2016%2027.0703C16%2027.0703%2026.0067%2027.0703%2028.5022%2026.4116C29.8791%2026.0489%2030.9633%2024.9806%2031.3313%2023.6242C32%2021.1652%2032%2016.0353%2032%2016.0353C32%2016.0353%2032%2010.9053%2031.3313%208.44657Z'%20fill='%23ED1D24'/%3e%3cpath%20d='M12.7266%2020.6934L21.0902%2016.036L12.7266%2011.3781V20.6934Z'%20fill='white'/%3e%3c/svg%3e",d="data:image/svg+xml,%3csvg%20width='33'%20height='32'%20viewBox='0%200%2033%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_10031_177597)'%3e%3cpath%20opacity='0.7'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17%207.87059C17%206.48214%2017.9812%205.28722%2019.3431%205.01709L29.5249%202.99755C31.3238%202.64076%2033%204.01717%2033%205.85105V22.1344C33%2023.5229%2032.0188%2024.7178%2030.6569%2024.9879L20.4751%2027.0074C18.6762%2027.3642%2017%2025.9878%2017%2024.1539L17%207.87059Z'%20fill='%23B7F0EF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%205.85245C1%204.01857%202.67623%202.64215%204.47507%202.99895L14.6569%205.01848C16.0188%205.28861%2017%206.48354%2017%207.87198V24.1553C17%2025.9892%2015.3238%2027.3656%2013.5249%2027.0088L3.34311%2024.9893C1.98119%2024.7192%201%2023.5242%201%2022.1358V5.85245Z'%20fill='%2387E6E5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15.543%205.71289C15.543%205.71289%2016.8157%205.96289%2017.4002%206.57653C17.9847%207.19016%2018.4521%209.03107%2018.4521%209.03107C18.4521%209.03107%2018.4521%2025.1106%2018.4521%2026.9629C18.4521%2028.8152%2019.3775%2031.4174%2019.3775%2031.4174L17.4002%2028.8947L16.2575%2031.4174C16.2575%2031.4174%2015.543%2029.0765%2015.543%2027.122C15.543%2025.1674%2015.543%205.71289%2015.543%205.71289Z'%20fill='%2361C1FD'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_10031_177597'%3e%3crect%20width='32'%20height='32'%20fill='white'%20transform='translate(0.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",g=""+new URL("styling-Bk6zjRzU.png",import.meta.url).href,h=""+new URL("context-C0qIqeS4.png",import.meta.url).href,m="data:image/png;base64,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",p=""+new URL("docs---vsFbMi.png",import.meta.url).href,x=""+new URL("share-DGA-UcQf.png",import.meta.url).href,b=""+new URL("figma-plugin-CH2hELiO.png",import.meta.url).href,C=""+new URL("testing-cbzR9l9r.png",import.meta.url).href,u=""+new URL("accessibility-W_h2acOZ.png",import.meta.url).href,j=""+new URL("theming-D6WJLNoW.png",import.meta.url).href,f=""+new URL("addon-library-BWUCAmyN.png",import.meta.url).href,s=()=>{const t={path:"path",svg:"svg",...o()};return e.jsx(t.svg,{viewBox:"0 0 14 14",width:"8px",height:"14px",style:{marginLeft:"4px",display:"inline-block",shapeRendering:"inherit",verticalAlign:"middle",fill:"currentColor","path fill":"currentColor"},children:e.jsx(t.path,{d:"m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z"})})};function r(t){const i={code:"code",h1:"h1",p:"p",...o(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"Configure your project"}),`
2
+ `,e.jsxs("div",{className:"sb-container",children:[e.jsxs("div",{className:"sb-section-title",children:[e.jsx(i.h1,{id:"configure-your-project",children:"Configure your project"}),e.jsx(i.p,{children:"Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community."})]}),e.jsxs("div",{className:"sb-section",children:[e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:g,alt:"A wall of logos representing different styling technologies"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Add styling and CSS"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook."}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/configure/styling-and-css",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:h,alt:"An abstraction representing the composition of data for a component"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Provide context and mocking"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available."}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/writing-stories/decorators#context-for-mocking",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:m,alt:"A representation of typography and image assets"}),e.jsxs("div",{children:[e.jsx("h4",{className:"sb-section-item-heading",children:"Load assets and resources"}),e.jsxs("p",{className:"sb-section-item-paragraph",children:[`To link static files (like fonts) to your projects and stories, use the
3
+ `,e.jsx(i.code,{children:"staticDirs"}),` configuration option to specify folders to load when
4
+ starting Storybook.`]}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/configure/images-and-assets",target:"_blank",children:["Learn more",e.jsx(s,{})]})]})]})]})]}),`
5
+ `,e.jsxs("div",{className:"sb-container",children:[e.jsxs("div",{className:"sb-section-title",children:[e.jsx(i.h1,{id:"do-more-with-storybook",children:"Do more with Storybook"}),e.jsx(i.p,{children:"Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs."})]}),e.jsx("div",{className:"sb-section",children:e.jsxs("div",{className:"sb-features-grid",children:[e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:p,alt:"A screenshot showing the autodocs tag being set, pointing a docs page being generated"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Autodocs"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Auto-generate living,
6
+ interactive reference documentation from your components and stories.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/writing-docs/autodocs",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:x,alt:"A browser window showing a Storybook being published to a chromatic.com URL"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Publish to Chromatic"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Publish your Storybook to review and collaborate with your entire team."}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/sharing/publish-storybook#publish-storybook-with-chromatic",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:b,alt:"Windows showing the Storybook plugin in Figma"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Figma Plugin"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Embed your stories into Figma to cross-reference the design and live
7
+ implementation in one place.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:C,alt:"Screenshot of tests passing and failing"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Testing"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Use stories to test a component in all its variations, no matter how
8
+ complex.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/writing-tests",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:u,alt:"Screenshot of accessibility tests passing and failing"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Accessibility"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Automatically test your components for a11y issues as you develop."}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/writing-tests/accessibility-testing",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:j,alt:"Screenshot of Storybook in light and dark mode"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Theming"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Theme Storybook's UI to personalize it to your project."}),e.jsxs("a",{href:"https://storybook.js.org/docs/web-components/configure/theming",target:"_blank",children:["Learn more",e.jsx(s,{})]})]})]})})]}),`
9
+ `,e.jsxs("div",{className:"sb-addon",children:[e.jsxs("div",{className:"sb-addon-text",children:[e.jsx("h4",{children:"Addons"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Integrate your tools with Storybook to connect workflows."}),e.jsxs("a",{href:"https://storybook.js.org/integrations/",target:"_blank",children:["Discover all addons",e.jsx(s,{})]})]}),e.jsx("div",{className:"sb-addon-img",children:e.jsx("img",{src:f,alt:"Integrate your tools with Storybook to connect workflows."})})]}),`
10
+ `,e.jsxs("div",{className:"sb-section sb-socials",children:[e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:n,alt:"Github logo",className:"sb-explore-image"}),e.jsx(i.p,{children:"Join our contributors building the future of UI development."}),e.jsxs("a",{href:"https://github.com/storybookjs/storybook",target:"_blank",children:["Star on GitHub",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:c,alt:"Discord logo",className:"sb-explore-image"}),e.jsxs("div",{children:[e.jsx(i.p,{children:"Get support and chat with frontend developers."}),e.jsxs("a",{href:"https://discord.gg/storybook",target:"_blank",children:["Join Discord server",e.jsx(s,{})]})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:l,alt:"Youtube logo",className:"sb-explore-image"}),e.jsxs("div",{children:[e.jsx(i.p,{children:"Watch tutorials, feature previews and interviews."}),e.jsxs("a",{href:"https://www.youtube.com/@chromaticui",target:"_blank",children:["Watch on YouTube",e.jsx(s,{})]})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:d,alt:"A book",className:"sb-explore-image"}),e.jsx("p",{children:"Follow guided walkthroughs on for key workflows."}),e.jsxs("a",{href:"https://storybook.js.org/tutorials/",target:"_blank",children:["Discover tutorials",e.jsx(s,{})]})]})]}),`
11
+ `,e.jsx("style",{children:`
12
+ .sb-container {
13
+ margin-bottom: 48px;
14
+ }
15
+
16
+ .sb-section {
17
+ width: 100%;
18
+ display: flex;
19
+ flex-direction: row;
20
+ gap: 20px;
21
+ }
22
+
23
+ img {
24
+ object-fit: cover;
25
+ }
26
+
27
+ .sb-section-title {
28
+ margin-bottom: 32px;
29
+ }
30
+
31
+ .sb-section a:not(h1 a, h2 a, h3 a) {
32
+ font-size: 14px;
33
+ }
34
+
35
+ .sb-section-item, .sb-grid-item {
36
+ flex: 1;
37
+ display: flex;
38
+ flex-direction: column;
39
+ }
40
+
41
+ .sb-section-item-heading {
42
+ padding-top: 20px !important;
43
+ padding-bottom: 5px !important;
44
+ margin: 0 !important;
45
+ }
46
+ .sb-section-item-paragraph {
47
+ margin: 0;
48
+ padding-bottom: 10px;
49
+ }
50
+
51
+ .sb-chevron {
52
+ margin-left: 5px;
53
+ }
54
+
55
+ .sb-features-grid {
56
+ display: grid;
57
+ grid-template-columns: repeat(2, 1fr);
58
+ grid-gap: 32px 20px;
59
+ }
60
+
61
+ .sb-socials {
62
+ display: grid;
63
+ grid-template-columns: repeat(4, 1fr);
64
+ }
65
+
66
+ .sb-socials p {
67
+ margin-bottom: 10px;
68
+ }
69
+
70
+ .sb-explore-image {
71
+ max-height: 32px;
72
+ align-self: flex-start;
73
+ }
74
+
75
+ .sb-addon {
76
+ width: 100%;
77
+ display: flex;
78
+ align-items: center;
79
+ position: relative;
80
+ background-color: #EEF3F8;
81
+ border-radius: 5px;
82
+ border: 1px solid rgba(0, 0, 0, 0.05);
83
+ background: #EEF3F8;
84
+ height: 180px;
85
+ margin-bottom: 48px;
86
+ overflow: hidden;
87
+ }
88
+
89
+ .sb-addon-text {
90
+ padding-left: 48px;
91
+ max-width: 240px;
92
+ }
93
+
94
+ .sb-addon-text h4 {
95
+ padding-top: 0px;
96
+ }
97
+
98
+ .sb-addon-img {
99
+ position: absolute;
100
+ left: 345px;
101
+ top: 0;
102
+ height: 100%;
103
+ width: 200%;
104
+ overflow: hidden;
105
+ }
106
+
107
+ .sb-addon-img img {
108
+ width: 650px;
109
+ transform: rotate(-15deg);
110
+ margin-left: 40px;
111
+ margin-top: -72px;
112
+ box-shadow: 0 0 1px rgba(255, 255, 255, 0);
113
+ backface-visibility: hidden;
114
+ }
115
+
116
+ @media screen and (max-width: 800px) {
117
+ .sb-addon-img {
118
+ left: 300px;
119
+ }
120
+ }
121
+
122
+ @media screen and (max-width: 600px) {
123
+ .sb-section {
124
+ flex-direction: column;
125
+ }
126
+
127
+ .sb-features-grid {
128
+ grid-template-columns: repeat(1, 1fr);
129
+ }
130
+
131
+ .sb-socials {
132
+ grid-template-columns: repeat(2, 1fr);
133
+ }
134
+
135
+ .sb-addon {
136
+ height: 280px;
137
+ align-items: flex-start;
138
+ padding-top: 32px;
139
+ overflow: hidden;
140
+ }
141
+
142
+ .sb-addon-text {
143
+ padding-left: 24px;
144
+ }
145
+
146
+ .sb-addon-img {
147
+ right: 0;
148
+ left: 0;
149
+ top: 130px;
150
+ bottom: 0;
151
+ overflow: hidden;
152
+ height: auto;
153
+ width: 124%;
154
+ }
155
+
156
+ .sb-addon-img img {
157
+ width: 1200px;
158
+ transform: rotate(-12deg);
159
+ margin-left: 0;
160
+ margin-top: 48px;
161
+ margin-bottom: -40px;
162
+ margin-left: -24px;
163
+ }
164
+ }
165
+ `})]})}function A(t={}){const{wrapper:i}={...o(),...t.components};return i?e.jsx(i,{...t,children:e.jsx(r,{...t})}):r(t)}export{s as RightArrow,A as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DgFM0Ce3.js","./index-B3QjF0Ed.js","./index-CaL3Qp7t.js","./iframe-DOi4N7qI.js","./index-BdcJ-iJ7.js","./index-D-8MO0q_.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]);
2
+ import{_ as h}from"./iframe-DOi4N7qI.js";import{af as d,ag as s,ah as E,ai as v,aj as R,ae as n,ak as w}from"./index-CaL3Qp7t.js";import"../sb-preview/runtime.js";import"./index-BdcJ-iJ7.js";import"./index-D-8MO0q_.js";import"./index-DrFu-skq.js";var l,u=d;l=u.createRoot,u.hydrateRoot;var a=new Map;function _(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var f=({callback:e,children:t})=>{let r=s.useRef();return s.useLayoutEffect(()=>{r.current!==e&&(r.current=e,e())},[e]),t};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,t=null;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}});var g=async(e,t,r)=>{let o=await y(t,r);if(_()){o.render(e);return}let{promise:i,resolve:c}=Promise.withResolvers();return o.render(s.createElement(f,{callback:c},e)),i},x=(e,t)=>{let r=a.get(e);r&&(r.unmount(),a.delete(e))},y=async(e,t)=>{let r=a.get(e);return r||(r=l(e,t),a.set(e,r)),r},D={code:E,a:v,...R},C=class extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:n.createElement(n.Fragment,null,t)}},O=class{constructor(){this.render=async(e,t,r)=>{let o={...D,...t?.components},i=w;return new Promise((c,p)=>{h(async()=>{const{MDXProvider:m}=await import("./index-DgFM0Ce3.js");return{MDXProvider:m}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url).then(({MDXProvider:m})=>g(n.createElement(C,{showException:p,key:Math.random()},n.createElement(m,{components:o},n.createElement(i,{context:e,docsParameter:t}))),r)).then(()=>c())})},this.unmount=e=>{x(e)}}};export{O as DocsRenderer,D as defaultComponents};
@@ -1,4 +1,4 @@
1
- import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";function s(i){return new Promise(a=>setTimeout(a,i))}function r(i){const{title:a,body:t}=i;return`
1
+ import{w as o,e}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";function s(i){return new Promise(a=>setTimeout(a,i))}function r(i){const{title:a,body:t}=i;return`
2
2
  <fieldset>
3
3
  <legend>${a}</legend>
4
4
  ${t}
@@ -68,7 +68,7 @@ import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";f
68
68
  play: async ({
69
69
  canvasElement
70
70
  }) => {
71
- const titleText = (AttributeDefaults.args!.title as string);
71
+ const titleText = AttributeDefaults.args!.title as string;
72
72
  const canvas = within(canvasElement),
73
73
  code = async id => (await canvas.findByTestId(id)).textContent.trim();
74
74
  expect(await await canvas.findByTestId('p1')).toHaveTextContent('default_P1');
@@ -101,7 +101,7 @@ import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";f
101
101
  play: async ({
102
102
  canvasElement
103
103
  }) => {
104
- const titleText = (AttributeDefaults.args!.title as string);
104
+ const titleText = AttributeDefaults.args!.title as string;
105
105
  const canvas = within(canvasElement),
106
106
  code = async id => (await canvas.findByTestId(id)).textContent.trim();
107
107
  await sleep(20);
@@ -139,7 +139,7 @@ import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";f
139
139
  play: async ({
140
140
  canvasElement
141
141
  }) => {
142
- const titleText = (AttributeDefaults.args!.title as string);
142
+ const titleText = AttributeDefaults.args!.title as string;
143
143
  const canvas = within(canvasElement),
144
144
  code = async id => (await canvas.findByTestId(id)).textContent.trim();
145
145
  await sleep(20);
@@ -1,4 +1,4 @@
1
- import{w as i,e as t}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";const g={title:"",tag:"",style:"",slot:"",payload:""};function p(n){const{title:e,tag:o,style:s,slot:a,payload:l}={...g,...n};return`
1
+ import{w as i,e as t}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";const g={title:"",tag:"",style:"",slot:"",payload:""};function p(n){const{title:e,tag:o,style:s,slot:a,payload:l}={...g,...n};return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  <custom-element ${o?`tag="${o}"`:""} >
@@ -0,0 +1,97 @@
1
+ const W="http://www.w3.org/1999/XSL/Transform",V="http://www.w3.org/1999/xhtml",ue="http://exslt.org/common",f=(e,l)=>e.getAttribute?.(l),Z=e=>e.nodeType===3,de=e=>typeof e=="string",pe=e=>e&&typeof e.nodeType=="number",$=(e,l)=>(e.ownerDocument||e).createTextNode(l),se=e=>{for(;e.firstChild;)e.firstChild.remove();return e},_=e=>(e.getAttributeNames().map(l=>e.removeAttribute(l)),se(e)),le=e=>(e?.setAttribute("xmlns:xsl",W),e),ne=e=>(e?.setAttribute("xmlns:xhtml",V),le(e)),ae=e=>/^[_a-zA-Z][-_:a-zA-Z0-9]*$/.test(e),w=(e,l="",t=document)=>{const s=i=>(r=>(l&&r.append($(t.ownerDocument||t,l)),r))((t.ownerDocument||t).createElement(i));if(ae(e))return s(e);const n=s("dce-object");return n.setAttribute("dce-object-name",e),n},J=(e,l)=>{const t=e.ownerDocument.createElementNS(e.namespaceURI,l);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);return t};function j(e){return new DOMParser().parseFromString(e,"application/xml")}function X(e){return new XMLSerializer().serializeToString(e)}function H(e,l,t,s){const n=x=>e.ownerDocument.createElement(x),r=((x,p,u)=>(p.append(u=n(x)),u))(l,e);return[...t].forEach(x=>r.append(s(x))),r}function fe(e){return e.slot||(e.setAttribute||(e=w("span",e.textContent.replaceAll(`
2
+ `,""))),e.setAttribute("slot","")),e}function K(e,l){e.getAttributeNames().forEach(t=>l.includes(t)||e.removeAttribute(t))}const Q=e=>[...e].filter(l=>!(l.nodeType===3&&l.data.trim()===""));function D(e,l,t){const s=typeof e;if(s==="string")return w(l,e,t);if(s==="number")return w(l,""+e,t);if(e instanceof Array){const i=w("array","",t);return e.map(r=>i.append(D(r,l,t))),i}if(e instanceof FormData){const i=w("form-data","",t);for(const r of e)i.append(D(r[1],r[0],t));return i}const n=w(l,"",t);for(let i in e)pe(e[i])||typeof e[i]=="function"||e[i]instanceof Window||(typeof e[i]!="object"&&ae(i)?n.setAttribute(i,e[i]):n.append(D(e[i],i,t)));return n}function ee(e){if(L(e,"*",l=>[...l.childNodes].filter(t=>t.nodeType===3&&t.parentNode.localName!=="style"&&t.data).forEach(t=>{const s=t.data,n=s.matchAll(/{([^}]*)}/g);if(n){let i=0,r=p=>$(t,p),x=[];if([...n].forEach(p=>{p.index>i&&x.push(r(p.input.substring(i,p.index)));const u=e.querySelector("value-of").cloneNode();u.setAttribute("select",p[1]),x.push(u),i=p.index+p[0].length}),i<s.length&&x.push(r(s.substring(i,s.length))),x.length){for(let p of x)l.insertBefore(p,t);l.removeChild(t)}}})),"all"in e){let l=1;for(let t of e.all)t.setAttribute&&!t.tagName.startsWith("xsl:")&&t.setAttribute("data-dce-id",""+l++)}return e}function he(e,l="xsl:stylesheet"){if(e.tagName===l||e.documentElement?.tagName===l)return ee(e);const t=j(`<xsl:stylesheet version="1.0" xmlns:xsl="${W}" xmlns:xhtml="${V}" xmlns:exsl="${ue}" exclude-result-prefixes="exsl" >
3
+ <xsl:output method="xml"/>
4
+ <xsl:template match="/"><dce-root xmlns="${V}"><xsl:apply-templates select="*" /></dce-root></xsl:template>
5
+ <xsl:template match="*[name()='template']">
6
+ <xsl:apply-templates mode="sanitize" select="*|text()"/>
7
+ </xsl:template>
8
+ <xsl:template match="*">
9
+ <xsl:apply-templates mode="sanitize" select="*|text()"/>
10
+ </xsl:template>
11
+ <xsl:template match="*[name()='svg']|*[name()='math']">
12
+ <xsl:apply-templates mode="sanitize" select="."/>
13
+ </xsl:template>
14
+ <xsl:template mode="sanitize" match="*[count(text())=1 and count(*)=0]">
15
+ <xsl:copy>
16
+ <xsl:apply-templates mode="sanitize" select="@*"/>
17
+ <xsl:value-of select="text()"></xsl:value-of>
18
+ </xsl:copy>
19
+ </xsl:template>
20
+ <xsl:template mode="sanitize" match="xhtml:*[count(text())=1 and count(*)=0]">
21
+ <xsl:element name="{local-name()}">
22
+ <xsl:apply-templates mode="sanitize" select="@*"/>
23
+ <xsl:value-of select="text()"></xsl:value-of>
24
+ </xsl:element>
25
+ </xsl:template>
26
+ <xsl:template mode="sanitize" match="*|@*">
27
+ <xsl:copy>
28
+ <xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
29
+ </xsl:copy>
30
+ </xsl:template>
31
+ <xsl:template mode="sanitize" match="text()[normalize-space(.) = '']"/>
32
+ <xsl:template mode="sanitize" match="text()">
33
+ <dce-text>
34
+ <xsl:copy/>
35
+ </dce-text>
36
+ </xsl:template>
37
+ <xsl:template mode="sanitize" match="xsl:value-of|*[name()='slot']">
38
+ <xsl:copy>
39
+ <xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
40
+ </xsl:copy>
41
+ </xsl:template>
42
+ <xsl:template mode="sanitize" match="xhtml:*">
43
+ <xsl:element name="{local-name()}">
44
+ <xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
45
+ </xsl:element>
46
+ </xsl:template>
47
+ <xsl:template mode="sanitize" match="xhtml:input">
48
+ <xsl:element name="{local-name()}">
49
+ <xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
50
+ </xsl:element>
51
+ <xsl:for-each select="*">
52
+ <xsl:copy>
53
+ <xsl:attribute name="for" >^</xsl:attribute>
54
+ <xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
55
+ </xsl:copy>
56
+ </xsl:for-each>
57
+ </xsl:template>
58
+ </xsl:stylesheet>`),s=new XSLTProcessor,n=(a=>{L(a,"custom-element",b=>{b.firstElementChild.localName==="template"&&([...b.firstElementChild.content.childNodes].forEach(y=>b.append(y)),b.firstElementChild.remove())}),L(a,"script",b=>b.remove());const c=a.content??a.firstElementChild?.content??a.body??a;Ae.forEach(b=>L(c,b,y=>we(y,c)));const N=a.firstElementChild?.content||a.content,E=b=>{const y=j("<xhtml/>"),M=y.importNode(b,!0);return y.replaceChild(M,y.documentElement),ne(M)};if(N){const b=w("div");return[...N.childNodes].map(y=>b.append(y.cloneNode(!0))),E(b)}return E(a.documentElement||a.body||a)})(e),i=j(`<xsl:stylesheet version="1.0"
59
+ xmlns:xsl="${W}"
60
+ xmlns:xhtml="${V}"
61
+ xmlns:dce="urn:schemas-epa-wg:dce"
62
+ xmlns:exsl="http://exslt.org/common"
63
+ exclude-result-prefixes="exsl"
64
+ >
65
+ <xsl:template match="ignore">
66
+ <xsl:choose>
67
+ <xsl:when test="//attr">{//attr}</xsl:when>
68
+ <xsl:otherwise>{def}</xsl:otherwise>
69
+ </xsl:choose><xsl:value-of select="."></xsl:value-of></xsl:template>
70
+ <xsl:template mode="payload" match="attributes"></xsl:template>
71
+ <xsl:template match="/">
72
+ <xsl:apply-templates mode="payload" select="/datadom/attributes"/>
73
+ </xsl:template>
74
+ <xsl:template name="slot" >
75
+ <xsl:param name="slotname" />
76
+ <xsl:param name="defaultvalue" />
77
+ <xsl:choose>
78
+ <xsl:when test="//payload/*[@slot=$slotname]">
79
+ <xsl:copy-of select="//payload/*[@slot=$slotname]"/>
80
+ </xsl:when>
81
+ <xsl:otherwise>
82
+ <xsl:copy-of select="$defaultvalue"/>
83
+ </xsl:otherwise>
84
+ </xsl:choose>
85
+ </xsl:template>
86
+ <xsl:variable name="js-injected-body">
87
+ <xsl:call-template name="slot" >
88
+ <xsl:with-param name="slotname" select="''"/>
89
+ <xsl:with-param name="defaultvalue"/>
90
+ </xsl:call-template>
91
+ </xsl:variable>
92
+ </xsl:stylesheet>`);s.importStylesheet(t);const r=s.transformToFragment(n,document),x=(a,c)=>a.querySelector(c),p=x(i,'template[mode="payload"]');if(!r)return console.error("transformation error",{xml:n.outerHTML,xsl:X(t)});if(r.firstElementChild.localName!=="dce-root"){const a=r.ownerDocument.createElement("dce-root");[...r.childNodes].forEach(c=>a.append(c)),r.append(a)}const u=[];[...r.querySelectorAll("dce-root>attribute")].forEach(a=>{K(a,"namespace,name,select");const c=J(a,"xsl:param"),N=f(a,"name");p.append(c),K(c,"select,name");let E=f(c,"select")?.split("??");E||(E=["//"+N,`'${c.textContent}'`],_(c),c.setAttribute("name",N));let b;if(E?.length>1){c.removeAttribute("select");const y=x(i,'template[match="ignore"]>choose').cloneNode(!0);_(y.firstElementChild).append($(y,"{"+E[0]+"}")),_(y.lastElementChild).append($(y,"{"+E[1]+"}")),y.firstElementChild.setAttribute("test",E[0]),c.append(y),b=y.cloneNode(!0)}else b=J(a,"xsl:value-of");b.removeAttribute("name"),a.append(b),a.removeAttribute("select"),u.push(c)}),[...r.querySelectorAll("[value]")].filter(a=>a.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach(a=>{const c=f(a,"value");c&&a.setAttribute("value",Ne(c))});for(const a of r.childNodes)p.append(i.importNode(a,!0));[...p.getElementsByTagName("xsl:template")].forEach(a=>p.ownerDocument.documentElement.append(a));const q=x(i,'call-template[name="slot"]'),d=a=>{const c=q.cloneNode(!0),N=f(a,"name");N&&c.firstElementChild.setAttribute("select",`'${N}'`);for(let E of a.childNodes)c.lastElementChild.append(E);return c};L(p,"slot",a=>a.parentNode.replaceChild(d(a),a));const m=ee(i);return m.params=u,m}async function xe(e){return await new Promise((t,s)=>{const n=new XMLHttpRequest;n.open("GET",e),n.responseType="document",n.onload=()=>{n.readyState===n.DONE&&n.status===200?t(n.responseXML?.body||n.responseXML||w("div",n.responseText)):s(`${n.statusText} - ${e}`)},n.addEventListener("error",i=>s(i)),n.send()})}const ie=e=>e.split("|").map(l=>l.trim()).filter(l=>l),be=(e,l)=>ie(l).map(t=>{let s=e.ownerDocument,n=i=>(e.append(i),i);if(t.includes("/")){const i=[],r=s.evaluate(t,e);for(let x;x=r.iterateNext();)i.push(x);return i}return[...e.childNodes].find(i=>i.localName===t)||n(w(t,"",s))}).flat();function te(e,l,t,s){if(!t.sliceProcessed)return t.sliceProcessed=1,be(e,l??"").map(n=>{const i=e.ownerDocument,r=t.sliceEventSource,x=t.sliceElement,p=()=>[...n.childNodes].filter(u=>u.nodeType===3||u.localName==="value"||u.localName==="form-data").map(u=>u.remove());if(r.getAttributeNames().map(u=>n.setAttribute(u,f(r,u))),[...n.childNodes].filter(u=>u.localName==="event").map(u=>u.remove()),"validationMessage"in r&&n.setAttribute("validation-message",r.validationMessage),t.type==="init"&&p(),n.append(D(t,"event",i)),x.hasAttribute("slice-value")){r.value===void 0?n.removeAttribute("value"):n.setAttribute("value",r.value);const u=z(f(x,"slice-value"),n);p(),n.append($(i,u))}else{if("elements"in r)return p(),n.append(D(new FormData(r),"value",n.ownerDocument)),n;const u=r.value??f(r,"value");p(),u==null?[...n.childNodes].filter(T=>T.localName!=="event").map(T=>T.remove()):de(u)?n.append($(i,u)):n.append(D(u,"value",n.ownerDocument))}return n})}function L(e,l,t){e.querySelectorAll&&[...e.querySelectorAll(l)].forEach(t)}const ye=async(e,l)=>{if(!e||!e.trim())return[l];if(e.startsWith("#"))return(t=>{const s=t.querySelectorAll(e);return[...s.length?s:t.getRootNode().querySelectorAll(e)]})(l.parentElement);try{const[t,s]=e.split("#");if(e.charAt(0)===".")e=new URL(t,l.closest("[base]")?.getAttribute("base")||location).href;else try{e=import.meta.resolve(t),s&&(e+="#"+s)}catch(i){console.error(i.message)}const n=await xe(e);if(l.setAttributeNS("xml","base",e),s){const i=n.querySelectorAll("#"+s);return i.length?[...i]:(console.error("template not found",e+"#"+s),[l])}return[n]}catch{return[l]}};function ve(e,l){for(let t of e.attributes)t.namespaceURI?l.setAttributeNS(t.namespaceURI,t.name,t.value):l.setAttribute(t.name,t.value),t.name==="value"&&(l.value=t.value)}function oe(e,l=0){const t={};for(const s of e.childNodes){const n=f(s,"data-dce-id")||s.dceId||0;if(!t[n])n?t[n]=1:(t[n]=s.dceId=++l,s.setAttribute&&s.setAttribute("data-dce-id",s.dceId));else{const i=s.dceId=n+"-"+t[n]++;s.setAttribute&&s.setAttribute("data-dce-id",i)}s.childNodes.length&&oe(s)}}function ge(e,l,t){t=1*t;for(let s of e.childNodes)if((s.dceId??s.getAttribute("data-dce-id")*1)>t)return e.insertBefore(l,s);e.append(l)}function re(e,l){if(e.firstElementChild?.localName==="dce-root"&&l[0].localName!=="dce-root")return;if(!l.length)return e.firstElementChild?.localName!=="dce-root"&&se(e);const t={};for(let s of e.childNodes)t[s.dceId],Z(s)?(s.data.trim(),t[s.dceId||0]=s):t[f(s,"data-dce-id")||0]=s;for(let s of[...l]){const n=f(s,"data-dce-id")||s.dceId,i=t[n];i?(Z(s)?i.nodeValue!==s.nodeValue&&(i.nodeValue=s.nodeValue):(ve(s,i),(i.childNodes.length||s.childNodes.length)&&re(i,s.childNodes)),delete t[n]):ge(e,s,n)}for(let s of Object.values(t))s.localName!=="dce-root"&&s.remove()}function Ee(e,l){return e.hasAttribute(l)||e.setAttribute(l,crypto.randomUUID()),e.getAttribute(l)}const Ne=e=>[...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map(t=>`${t[1]}{${Y(t[3])}}${t[4]}`).join(""),Y=e=>{if(!e.trim())return e;const l=e.split("??"),t=l.shift(),s=Y(l.join("??"));return l.length?`concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )`:e},z=(e,l)=>{const t=e.split("??");if(t.length>1)return z(t[0],l)||z(t[1],l);e=Y(e);const s=l.ownerDocument.evaluate(e,l);switch(s.resultType){case XPathResult.NUMBER_TYPE:return s.numberValue;case XPathResult.STRING_TYPE:return s.stringValue;case XPathResult.BOOLEAN_TYPE:return s.booleanValue}let n="";for(let i;i=s.iterateNext();)n+=i.textContent;return n},Ae="stylesheet,transform,import,include,strip-space,preserve-space,output,key,decimal-format,namespace-alias,value-of,copy-of,number,apply-templates,apply-imports,for-each,sort,if,choose,when,otherwise,attribute-set,call-template,with-param,variable,param,text,processing-instruction,element,attribute,comment,copy,message,fallback".split(","),we=(e,l)=>{const t=w("xsl:"+e.localName);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);if(e.parentElement)e.parentElement.replaceChild(t,e);else{const s=e.parentElement||l,n=[...s.childNodes];n.forEach((i,r)=>{i===e&&(n[r]=t)}),s.replaceChildren(...n)}};class Te extends HTMLElement{static observedAttributes=["src","tag","hidden"];async connectedCallback(){this.firstElementChild&&this.firstElementChild.localName!=="template"&&console.warn(`custom-element used without template wrapping content
93
+ `,this.outerHTML);const l=await ye(f(this,"src"),this),t=f(this,"tag"),s=t||"dce-"+crypto.randomUUID();for(const d of l)L(d.templateNode||d.content||d,"style",m=>{const a=m.closest("slot"),c=a?`slot[name="${a.name}"]`:"";m.innerHTML=`${s} ${c}{${m.innerHTML}}`,this.append(m)});const n=l.map(d=>he(d)),i=n.map((d,m)=>{m=new XSLTProcessor;try{m.importStylesheet(d)}catch(a){console.error(a,X(d))}return m});Object.defineProperty(this,"xsltString",{get:()=>n.map(d=>X(d)).join(`
94
+ `)});const r=this,x=[...this.templateNode.querySelectorAll("[slice]")],p=x.map(d=>f(d,"slice")).filter(d=>!d.includes("/")).filter((d,m,a)=>a.indexOf(d)===m).map(ie).flat(),u=n.reduce((d,m)=>(m.params&&d.push(...m.params),d),[]);class T extends HTMLElement{static get observedAttributes(){return u.map(m=>f(m,"name"))}#e=0;connectedCallback(){let m=Q(this.childNodes);if(this.firstElementChild?.tagName==="TEMPLATE"){this.firstElementChild!==this.lastElementChild&&console.error("payload should have TEMPLATE as only child",this.outerHTML);const h=this.firstElementChild;h.remove(),m=Q(h.content.childNodes);for(const v of m)if(v.localName==="style"){const o=Ee(this,"data-dce-style");v.innerHTML=`${s}[data-dce-style="${o}"]{${v.innerHTML}}`,h.insertAdjacentElement("beforebegin",v)}else v.nodeType===1?h.insertAdjacentElement("beforebegin",v):v.nodeType===3&&h.insertAdjacentText("beforebegin",v.data)}const a=j("<datadom/>").documentElement,c=(h,v="")=>(o=>(v&&o.append($(a,v)),o))(a.ownerDocument.createElement(h)),N=H(a,"payload",m,fe);le(N),ne(N),this.innerHTML="";const E=H(a,"attributes",this.attributes,h=>c(h.nodeName,h.value));H(a,"dataset",Object.keys(this.dataset),h=>c(h,this.dataset[h]));const b=H(a,"slice",p,h=>c(h,"")),y=h=>z(h,b);this.xml=a;const M=[],G=()=>{const h={};for(let v;v=M.pop();){const o=f(v.sliceElement,"slice");h[o]||(te(b,o,v),h[o]=v)}Object.keys(h).length!==0&&U()};let O;this.onSlice=h=>{M.push(h),O||(O=setTimeout(()=>{G(),O=0},1))};const U=this.transform=()=>{if(this.#e)debugger;this.#e=1,i.map((o,g)=>{const S=o.transformToFragment(a.ownerDocument,document);return S||console.error(`XSLT transformation error. xsl:
95
+ `,X(n[g]),`
96
+ xml:
97
+ `,X(a)),S}).map(o=>{o&&(oe(o),re(this,o.childNodes))}),T.observedAttributes.map(o=>{let g=f(this.firstElementChild,o);g!==f(this,o)&&(this.setAttribute(o,g),this.#t(o,g))});function v(o){let g=o;if(o.localName==="slice"){const S=f(o,"for");if(S||(g=o.parentElement),S==="^")do g=g.previousElementSibling;while(g.localName==="slice");else g=this.querySelector(S);if(!g)return console.warn(`can not find selector in "slice for=${S}" `,o.outerHTML);f(o,"slice")||o.setAttribute("slice",f(o,"name"))}return g}L(this,"[slice],[slice-event]",o=>{let g=f(o,"slice-event");const S=o.hasAttribute("slice-value")||o.hasAttribute("value")||o.value,P=v(o);o.dceInitialized||(o.dceInitialized=1,P.hasAttribute("custom-validity")&&(g+=" change submit"),[...new Set((g||"change").split(" "))].forEach(ce=>P.addEventListener(ce,A=>{A.sliceElement=o,A.sliceEventSource=A.currentTarget||A.target,A.sliceProcessed=0;const me=te(b,f(A.sliceElement,"slice"),A);L(this,"[custom-validity]",R=>{if(!R.setCustomValidity)return;const F=f(R,"custom-validity");try{const I=F&&z(F,E);R.setCustomValidity(I===!0?"":I===!1?"invalid":I)}catch(I){console.error(I,"xPath",F)}});const k=f(P,"custom-validity"),C=k&&z(k,E),B=C===!0?"":C;if(k){if(o.setCustomValidity?o.setCustomValidity(B):o.validationMessage=B,me.map(R=>R.setAttribute("validation-message",B)),A.type==="submit")return C===!0?void 0:(setTimeout(U,1),!!C===C?(C||A.preventDefault(),C):C?(A.preventDefault(),!1):void 0);setTimeout(U,1)}this.onSlice(A)})),(!g||g.includes("init"))&&(S?this.onSlice({type:"init",target:P,sliceElement:o,sliceEventSource:P}):o.value=y(f(o,"slice"))))}),this.#e=0};U(),G()}#t(m,a){m==="value"&&(this.value=a);let c=this.xml.querySelector(`attributes>${m}`);c?_(c).append($(c,a)):(c=w(m,a,this.xml),this.xml.querySelector("attributes").append(c)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{[m]:a}}))}attributeChangedCallback(m,a,c){!this.xml||this.#e||(this.#t(m,c),this.transform())}get dce(){return r}}const q=d=>{window.customElements.get(d)!==T&&window.customElements.define(d,T)};if(t)q(t);else{const d=s;this.setAttribute("tag",d),q(d);const m=document.createElement(d);this.getAttributeNames().forEach(a=>m.setAttribute(a,this.getAttribute(a))),m.append(...[...this.childNodes].filter(a=>a.localName!=="style")),this.append(m)}}get templateNode(){return this.firstElementChild?.tagName==="TEMPLATE"?this.firstElementChild.content:this}get dce(){return this}get xslt(){return j(this.xsltString)}}window.customElements.define("custom-element",Te);
@@ -1,4 +1,4 @@
1
- import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";function p(n){return new Promise(e=>setTimeout(e,n))}function m(n){const{title:e,body:t}=n;return`
1
+ import{w as d,e as a,u as c,f as u}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";function p(n){return new Promise(e=>setTimeout(e,n))}function m(n){const{title:e,body:t}=n;return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  ${t}
@@ -110,7 +110,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
110
110
  play: async ({
111
111
  canvasElement
112
112
  }) => {
113
- const titleText = (CharsCountInTextarea.args!.title as string);
113
+ const titleText = CharsCountInTextarea.args!.title as string;
114
114
  const canvas = within(canvasElement);
115
115
  await canvas.findByText(titleText);
116
116
  await sleep(100);
@@ -163,7 +163,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
163
163
  play: async ({
164
164
  canvasElement
165
165
  }) => {
166
- const titleText = (WordCountOnType.args!.title as string);
166
+ const titleText = WordCountOnType.args!.title as string;
167
167
  const canvas = within(canvasElement);
168
168
  await canvas.findByText(titleText);
169
169
  const input = await canvas.findByTestId('input-id');
@@ -207,7 +207,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
207
207
  play: async ({
208
208
  canvasElement
209
209
  }) => {
210
- const titleText = (OrderPreservingOn2ndTransform.args!.title as string);
210
+ const titleText = OrderPreservingOn2ndTransform.args!.title as string;
211
211
  const canvas = within(canvasElement);
212
212
  await canvas.findByText(titleText);
213
213
 
@@ -247,7 +247,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
247
247
  play: async ({
248
248
  canvasElement
249
249
  }) => {
250
- const titleText = (ReadSystemValidityMessage.args!.title as string);
250
+ const titleText = ReadSystemValidityMessage.args!.title as string;
251
251
  const canvas = within(canvasElement);
252
252
  await canvas.findByText(titleText);
253
253
  await userEvent.type(canvas.getByTestId('inp1'), 'Hi');
@@ -0,0 +1,26 @@
1
+ import{d as ot}from"./index-DrFu-skq.js";/**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const U=globalThis,L=U.ShadowRoot&&(U.ShadyCSS===void 0||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),z=new WeakMap;let ht=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(L&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=z.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&z.set(e,t))}return t}toString(){return this.cssText}};const lt=r=>new ht(typeof r=="string"?r:r+"",void 0,G),at=(r,t)=>{if(L)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=U.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},B=L?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return lt(e)})(r):r;/**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const{is:ct,defineProperty:dt,getOwnPropertyDescriptor:pt,getOwnPropertyNames:ut,getOwnPropertySymbols:$t,getPrototypeOf:_t}=Object,H=globalThis,D=H.trustedTypes,ft=D?D.emptyScript:"",At=H.reactiveElementPolyfillSupport,E=(r,t)=>r,R={toAttribute(r,t){switch(t){case Boolean:r=r?ft:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},J=(r,t)=>!ct(r,t),I={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:J};Symbol.metadata??=Symbol("metadata"),H.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=I){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&dt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=pt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i?.call(this)},set(o){const a=i?.call(this);n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??I}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=_t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const e=this.properties,s=[...ut(e),...$t(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(B(i))}else t!==void 0&&e.push(B(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:R).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:R;this._$Em=i,this[i]=o.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??J)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s)n.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(e=>this._$EC(e,this[e])),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[E("elementProperties")]=new Map,y[E("finalized")]=new Map,At?.({ReactiveElement:y}),(H.reactiveElementVersions??=[]).push("2.0.4");/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const k=globalThis,x=k.trustedTypes,W=x?x.createPolicy("lit-html",{createHTML:r=>r}):void 0,Q="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,X="?"+_,mt=`<${X}>`,m=document,b=()=>m.createComment(""),w=r=>r===null||typeof r!="object"&&typeof r!="function",j=Array.isArray,yt=r=>j(r)||typeof r?.[Symbol.iterator]=="function",N=`[
14
+ \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,q=/>/g,f=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,Y=/"/g,tt=/^(?:script|style|textarea|title)$/i,g=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Z=new WeakMap,A=m.createTreeWalker(m,129);function et(r,t){if(!j(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return W!==void 0?W.createHTML(t):t}const gt=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=S;for(let a=0;a<e;a++){const h=r[a];let c,p,l=-1,u=0;for(;u<h.length&&(o.lastIndex=u,p=o.exec(h),p!==null);)u=o.lastIndex,o===S?p[1]==="!--"?o=V:p[1]!==void 0?o=q:p[2]!==void 0?(tt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=f):p[3]!==void 0&&(o=f):o===f?p[0]===">"?(o=i??S,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,c=p[1],o=p[3]===void 0?f:p[3]==='"'?Y:K):o===Y||o===K?o=f:o===V||o===q?o=S:(o=f,i=void 0);const $=o===f&&r[a+1].startsWith("/>")?" ":"";n+=o===S?h+mt:l>=0?(s.push(c),h.slice(0,l)+Q+h.slice(l)+_+$):h+_+(l===-2?a:$)}return[et(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class P{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,h=this.parts,[c,p]=gt(t,e);if(this.el=P.createElement(c,s),A.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=A.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(Q)){const u=p[o++],$=i.getAttribute(l).split(_),C=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:C[2],strings:$,ctor:C[1]==="."?St:C[1]==="?"?Et:C[1]==="@"?bt:M}),i.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:n}),i.removeAttribute(l));if(tt.test(i.tagName)){const l=i.textContent.split(_),u=l.length-1;if(u>0){i.textContent=x?x.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],b()),A.nextNode(),h.push({type:2,index:++n});i.append(l[u],b())}}}else if(i.nodeType===8)if(i.data===X)h.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const s=m.createElement("template");return s.innerHTML=t,s}}function v(r,t,e=r,s){if(t===g)return t;let i=s!==void 0?e.o?.[s]:e.l;const n=w(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e.o??=[])[s]=i:e.l=i),i!==void 0&&(t=v(r,i._$AS(r,t.values),i,s)),t}class vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??m).importNode(e,!0);A.currentNode=i;let n=A.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new O(n,n.nextSibling,this,t):h.type===1?c=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(c=new wt(n,this,t)),this._$AV.push(c),h=s[++a]}o!==h?.index&&(n=A.nextNode(),o++)}return A.currentNode=m,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class O{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=v(this,t,e),w(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==g&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):yt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&w(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=P.createElement(et(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const n=new vt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=Z.get(t.strings);return e===void 0&&Z.set(t.strings,e=new P(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new O(this.O(b()),this.O(b()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this.v=t,this._$AP?.(t))}}class M{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=v(this,t,e,0),o=!w(t)||t!==this._$AH&&t!==g,o&&(this._$AH=t);else{const a=t;let h,c;for(t=n[0],h=0;h<n.length-1;h++)c=v(this,a[s+h],e,h),c===g&&(c=this._$AH[h]),o||=!w(c)||c!==this._$AH[h],c===d?t=d:t!==d&&(t+=(c??"")+n[h+1]),this._$AH[h]=c}o&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class St extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Et extends M{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class bt extends M{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=v(this,t,e,0)??d)===g)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class wt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){v(this,t)}}const Pt=k.litHtmlPolyfillSupport;Pt?.(P,O),(k.litHtmlVersions??=[]).push("3.2.0");const st=(r,t,e)=>{const s=e?.renderBefore??t;let i=s._$litPart$;if(i===void 0){const n=e?.renderBefore??null;s._$litPart$=i=new O(t.insertBefore(b(),n),n,void 0,e??{})}return i._$AI(r),i};/**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */class T extends y{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=st(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return g}}T._$litElement$=!0,T.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:T});const Ot=globalThis.litElementPolyfillSupport;Ot?.({LitElement:T});(globalThis.litElementVersions??=[]).push("4.1.0");/**
20
+ * @license
21
+ * Copyright 2020 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */const Ct=(r,t)=>t===void 0?r?._$litType$!==void 0:r?._$litType$===t,{simulatePageLoad:F,simulateDOMContentLoaded:Ut}=__STORYBOOK_MODULE_PREVIEW_API__,{global:Tt}=__STORYBOOK_MODULE_GLOBAL__;var xt=Object.defineProperty,Ht=(r,t)=>{for(var e in t)xt(r,e,{get:t[e],enumerable:!0})},Mt={};Ht(Mt,{parameters:()=>nt,render:()=>it,renderToCanvas:()=>rt});var{Node:Nt}=Tt,it=(r,t)=>{let{id:e,component:s}=t;if(!s)throw new Error(`Unable to render story ${e} as the component annotation is missing from the default export`);let i=document.createElement(s);return Object.entries(r).forEach(([n,o])=>{i[n]=o}),i};function rt({storyFn:r,kind:t,name:e,showMain:s,showError:i,forceRemount:n},o){let a=r();if(s(),Ct(a)){(n||!o.querySelector('[id="root-inner"]'))&&(o.innerHTML='<div id="root-inner"></div>');let h=o.querySelector('[id="root-inner"]');st(a,h),F(o)}else if(typeof a=="string")o.innerHTML=a,F(o);else if(a instanceof Nt){if(o.firstChild===a&&!n)return;o.innerHTML="",o.appendChild(a),Ut()}else i({title:`Expecting an HTML snippet or DOM node from the story: "${e}" of "${t}".`,description:ot`
24
+ Did you forget to return the HTML snippet from the story?
25
+ Use "() => <your snippet or node>" or when defining the story.
26
+ `})}var nt={renderer:"web-components"};const kt=Object.freeze(Object.defineProperty({__proto__:null,parameters:nt,render:it,renderToCanvas:rt},Symbol.toStringTag,{value:"Module"}));export{st as Q,kt as e};