nodality 1.4.3 → 1.5.1

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 (306) hide show
  1. package/README.md +34 -5
  2. package/bin/dev-server.mjs +200 -0
  3. package/bin/install-skill.mjs +77 -20
  4. package/bin/mcp-server.mjs +98 -0
  5. package/bin/nodality.mjs +29 -4
  6. package/dist/animator.cjs.js +1 -1
  7. package/dist/animator.cjs.js.LICENSE.txt +1 -1
  8. package/dist/animator.esm.js +1 -1
  9. package/dist/animator.esm.js.LICENSE.txt +1 -1
  10. package/dist/audionew.cjs.js +1 -1
  11. package/dist/audionew.cjs.js.LICENSE.txt +1 -1
  12. package/dist/audionew.esm.js +1 -1
  13. package/dist/audionew.esm.js.LICENSE.txt +1 -1
  14. package/dist/base.cjs.js +1 -1
  15. package/dist/base.cjs.js.LICENSE.txt +1 -1
  16. package/dist/base.esm.js +1 -1
  17. package/dist/base.esm.js.LICENSE.txt +1 -1
  18. package/dist/beta-desktop-bar.cjs.js +1 -1
  19. package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
  20. package/dist/beta-desktop-bar.esm.js +1 -1
  21. package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
  22. package/dist/beta-mobile-bar.cjs.js +1 -1
  23. package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
  24. package/dist/beta-mobile-bar.esm.js +1 -1
  25. package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
  26. package/dist/bundle.umd.js +1 -1
  27. package/dist/bundle.umd.js.LICENSE.txt +28 -62
  28. package/dist/button.cjs.js +1 -1
  29. package/dist/button.cjs.js.LICENSE.txt +1 -1
  30. package/dist/button.esm.js +1 -1
  31. package/dist/button.esm.js.LICENSE.txt +1 -1
  32. package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
  33. package/dist/card-getter.esm.js.LICENSE.txt +1 -1
  34. package/dist/center.cjs.js +1 -1
  35. package/dist/center.cjs.js.LICENSE.txt +1 -1
  36. package/dist/center.esm.js +1 -1
  37. package/dist/center.esm.js.LICENSE.txt +1 -1
  38. package/dist/checkbox.cjs.js +1 -1
  39. package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
  40. package/dist/checkbox.esm.js +1 -1
  41. package/dist/checkbox.esm.js.LICENSE.txt +1 -1
  42. package/dist/code.cjs.js +1 -1
  43. package/dist/code.cjs.js.LICENSE.txt +1 -1
  44. package/dist/code.esm.js +1 -1
  45. package/dist/code.esm.js.LICENSE.txt +1 -1
  46. package/dist/container.cjs.js +1 -1
  47. package/dist/container.cjs.js.LICENSE.txt +1 -1
  48. package/dist/container.esm.js +1 -1
  49. package/dist/container.esm.js.LICENSE.txt +1 -1
  50. package/dist/data-list.cjs.js.LICENSE.txt +1 -1
  51. package/dist/data-list.esm.js.LICENSE.txt +1 -1
  52. package/dist/designer.cjs.js +1 -1
  53. package/dist/designer.cjs.js.LICENSE.txt +28 -26
  54. package/dist/designer.esm.js +1 -1
  55. package/dist/designer.esm.js.LICENSE.txt +28 -26
  56. package/dist/element-mapper.cjs.js +1 -1
  57. package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
  58. package/dist/element-mapper.esm.js +1 -1
  59. package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
  60. package/dist/finalresult.esm.js +1 -2
  61. package/dist/finalresult.esm.js.LICENSE.txt +28 -26
  62. package/dist/flex-card.cjs.js +1 -1
  63. package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
  64. package/dist/flex-card.esm.js +1 -1
  65. package/dist/flex-card.esm.js.LICENSE.txt +1 -1
  66. package/dist/flex-grid.cjs.js +1 -1
  67. package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
  68. package/dist/flex-grid.esm.js +1 -1
  69. package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
  70. package/dist/flex-row.cjs.js +1 -1
  71. package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
  72. package/dist/flex-row.esm.js +1 -1
  73. package/dist/flex-row.esm.js.LICENSE.txt +1 -1
  74. package/dist/floating-input.cjs.js +1 -1
  75. package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
  76. package/dist/floating-input.esm.js +1 -1
  77. package/dist/floating-input.esm.js.LICENSE.txt +1 -1
  78. package/dist/free.cjs.js +1 -1
  79. package/dist/free.cjs.js.LICENSE.txt +1 -1
  80. package/dist/free.esm.js +1 -1
  81. package/dist/free.esm.js.LICENSE.txt +1 -1
  82. package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
  83. package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
  84. package/dist/image-picker.cjs.js +1 -1
  85. package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
  86. package/dist/image-picker.esm.js +1 -1
  87. package/dist/image-picker.esm.js.LICENSE.txt +1 -1
  88. package/dist/image.cjs.js +1 -1
  89. package/dist/image.cjs.js.LICENSE.txt +1 -1
  90. package/dist/image.esm.js +1 -1
  91. package/dist/image.esm.js.LICENSE.txt +1 -1
  92. package/dist/index.cjs.js +1 -1
  93. package/dist/index.cjs.js.LICENSE.txt +28 -26
  94. package/dist/index.d.ts +7 -4
  95. package/dist/index.esm.js +1 -2
  96. package/dist/index.esm.js.LICENSE.txt +28 -26
  97. package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
  98. package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
  99. package/dist/link-getter.cjs.js +1 -1
  100. package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
  101. package/dist/link-getter.esm.js +1 -1
  102. package/dist/link-getter.esm.js.LICENSE.txt +1 -1
  103. package/dist/link.cjs.js +1 -1
  104. package/dist/link.cjs.js.LICENSE.txt +1 -1
  105. package/dist/link.esm.js +1 -1
  106. package/dist/link.esm.js.LICENSE.txt +1 -1
  107. package/dist/meta-adder.cjs.js +1 -1
  108. package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
  109. package/dist/meta-adder.esm.js +1 -1
  110. package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
  111. package/dist/modal-2025.cjs.js +1 -1
  112. package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
  113. package/dist/modal-2025.esm.js +1 -1
  114. package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
  115. package/dist/multiswitcher.cjs.js +1 -1
  116. package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
  117. package/dist/multiswitcher.esm.js +1 -1
  118. package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
  119. package/dist/new-nav-bar.cjs.js +1 -1
  120. package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
  121. package/dist/new-nav-bar.esm.js +1 -1
  122. package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
  123. package/dist/picker.cjs.js +1 -1
  124. package/dist/picker.cjs.js.LICENSE.txt +1 -1
  125. package/dist/picker.esm.js +1 -1
  126. package/dist/picker.esm.js.LICENSE.txt +1 -1
  127. package/dist/progress.cjs.js +1 -1
  128. package/dist/progress.cjs.js.LICENSE.txt +1 -1
  129. package/dist/progress.esm.js +1 -1
  130. package/dist/progress.esm.js.LICENSE.txt +1 -1
  131. package/dist/radio.cjs.js.LICENSE.txt +1 -1
  132. package/dist/radio.esm.js.LICENSE.txt +1 -1
  133. package/dist/range.cjs.js.LICENSE.txt +1 -1
  134. package/dist/range.esm.js.LICENSE.txt +1 -1
  135. package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
  136. package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
  137. package/dist/side-bar.cjs.js +1 -1
  138. package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
  139. package/dist/side-bar.esm.js +1 -1
  140. package/dist/side-bar.esm.js.LICENSE.txt +1 -1
  141. package/dist/side-nav-bar.cjs.js +1 -1
  142. package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
  143. package/dist/side-nav-bar.esm.js +1 -1
  144. package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
  145. package/dist/simple-bar.cjs.js +1 -1
  146. package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
  147. package/dist/simple-bar.esm.js +1 -1
  148. package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
  149. package/dist/slider-2025.cjs.js +1 -1
  150. package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
  151. package/dist/slider-2025.esm.js +1 -1
  152. package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
  153. package/dist/spacer.cjs.js +1 -1
  154. package/dist/spacer.cjs.js.LICENSE.txt +1 -1
  155. package/dist/spacer.esm.js +1 -1
  156. package/dist/spacer.esm.js.LICENSE.txt +1 -1
  157. package/dist/stack.cjs.js +1 -1
  158. package/dist/stack.cjs.js.LICENSE.txt +1 -1
  159. package/dist/stack.esm.js +1 -1
  160. package/dist/stack.esm.js.LICENSE.txt +1 -1
  161. package/dist/stacker.cjs.js.LICENSE.txt +1 -1
  162. package/dist/stacker.esm.js.LICENSE.txt +1 -1
  163. package/dist/table.cjs.js +1 -1
  164. package/dist/table.cjs.js.LICENSE.txt +1 -1
  165. package/dist/table.esm.js +1 -1
  166. package/dist/table.esm.js.LICENSE.txt +1 -1
  167. package/dist/text-field.cjs.js +1 -1
  168. package/dist/text-field.cjs.js.LICENSE.txt +1 -1
  169. package/dist/text-field.esm.js +1 -1
  170. package/dist/text-field.esm.js.LICENSE.txt +1 -1
  171. package/dist/text.cjs.js +1 -1
  172. package/dist/text.cjs.js.LICENSE.txt +1 -1
  173. package/dist/text.esm.js +1 -1
  174. package/dist/text.esm.js.LICENSE.txt +1 -1
  175. package/dist/theme.cjs.js.LICENSE.txt +1 -1
  176. package/dist/theme.esm.js.LICENSE.txt +1 -1
  177. package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
  178. package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
  179. package/dist/ulist.cjs.js +1 -1
  180. package/dist/ulist.cjs.js.LICENSE.txt +1 -1
  181. package/dist/ulist.esm.js +1 -1
  182. package/dist/ulist.esm.js.LICENSE.txt +1 -1
  183. package/dist/video.cjs.js +1 -1
  184. package/dist/video.cjs.js.LICENSE.txt +1 -1
  185. package/dist/video.esm.js +1 -1
  186. package/dist/video.esm.js.LICENSE.txt +1 -1
  187. package/dist/wrap.cjs.js +1 -1
  188. package/dist/wrap.cjs.js.LICENSE.txt +1 -1
  189. package/dist/wrap.esm.js +1 -1
  190. package/dist/wrap.esm.js.LICENSE.txt +1 -1
  191. package/dist/zoom-card.cjs.js +1 -1
  192. package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
  193. package/dist/zoom-card.esm.js +1 -1
  194. package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
  195. package/layout/animator.js +60 -10
  196. package/layout/audio.js +1 -1
  197. package/layout/audionew.js +1 -1
  198. package/layout/base.js +1 -1
  199. package/layout/beta-desktop-bar.js +1 -1
  200. package/layout/beta-mobile-bar.js +1 -1
  201. package/layout/button.js +3 -3
  202. package/layout/center.js +1 -1
  203. package/layout/checkbox.js +1 -1
  204. package/layout/circle.js +1 -1
  205. package/layout/code.js +1 -1
  206. package/layout/container.js +4 -4
  207. package/layout/dropdown-2025.js +6 -5
  208. package/layout/flex-card.js +1 -1
  209. package/layout/flex-grid.js +3 -3
  210. package/layout/flex-row.js +3 -3
  211. package/layout/form-components/custom.js +1 -1
  212. package/layout/form-components/data-list.js +1 -1
  213. package/layout/form-components/floating-input.js +1 -1
  214. package/layout/form-components/form-all.js +1 -1
  215. package/layout/form-components/form.js +1 -1
  216. package/layout/form-components/image-picker.js +2 -2
  217. package/layout/form-components/picker.js +2 -2
  218. package/layout/form-components/radio.js +1 -1
  219. package/layout/form-components/radiogroup.js +1 -1
  220. package/layout/form-components/range.js +1 -1
  221. package/layout/free.js +1 -1
  222. package/layout/grid-overlay.js +1 -1
  223. package/layout/grid-switcher.js +3 -3
  224. package/layout/grid.js +2 -2
  225. package/layout/horizontal-scroller.js +1 -1
  226. package/layout/image.js +6 -3
  227. package/layout/index.js +1 -1
  228. package/layout/link.js +3 -3
  229. package/layout/list.js +1 -1
  230. package/layout/meta-adder.js +1 -1
  231. package/layout/modal-2025.js +1 -1
  232. package/layout/morph.js +1 -1
  233. package/layout/multiswitcher.js +12 -7
  234. package/layout/nav-bar.js +2 -2
  235. package/layout/nav-factor/custom-div.js +1 -1
  236. package/layout/new-nav-bar.js +2 -2
  237. package/layout/polygon.js +1 -1
  238. package/layout/prerender-site.js +1 -1
  239. package/layout/prerender.js +1 -1
  240. package/layout/progress.js +2 -2
  241. package/layout/row.js +3 -3
  242. package/layout/scroll-video.js +1 -1
  243. package/layout/shop.js +1 -1
  244. package/layout/side-bar.js +1 -1
  245. package/layout/side-nav-bar.js +1 -1
  246. package/layout/simple-bar.js +1 -1
  247. package/layout/slider-2025.js +1 -1
  248. package/layout/spacer.js +1 -1
  249. package/layout/stack.js +1 -1
  250. package/layout/svg.js +1 -1
  251. package/layout/switcher.js +2 -2
  252. package/layout/table.js +1 -1
  253. package/layout/text-field.js +2 -2
  254. package/layout/text.js +20 -8
  255. package/layout/ulist.js +1 -1
  256. package/layout/video.js +1 -1
  257. package/layout/wrap.js +1 -1
  258. package/layout/zoom-card.js +1 -1
  259. package/lib/agent-surface.js +1 -1
  260. package/lib/card-getter.js +1 -1
  261. package/lib/check-page.js +6 -2
  262. package/lib/codegen.js +1 -1
  263. package/lib/data.js +1 -1
  264. package/lib/designer.js +114 -8
  265. package/lib/dev-inspector.js +295 -0
  266. package/lib/dev-state.js +257 -0
  267. package/lib/element-mapper.js +186 -13
  268. package/lib/element-params.generated.js +4 -4
  269. package/lib/grid-geometry.js +1 -1
  270. package/lib/keyframe-animation.js +1 -1
  271. package/lib/known-inert.js +1 -1
  272. package/lib/link-getter.js +1 -1
  273. package/lib/morph-node.js +1 -1
  274. package/lib/normalize-spec.js +1 -1
  275. package/lib/parse-html.js +1 -1
  276. package/lib/raster-inspect.js +1 -1
  277. package/lib/raster-ops.js +9 -1
  278. package/lib/raster-presets.js +1 -1
  279. package/lib/react.js +1 -1
  280. package/lib/resolve-refs.js +1 -1
  281. package/lib/responsive.js +1 -1
  282. package/lib/scroll-video.js +1 -1
  283. package/lib/seo.js +1 -1
  284. package/lib/stacker.js +1 -1
  285. package/lib/suggest.js +1 -1
  286. package/lib/theme.js +1 -1
  287. package/lib/transform-anim.js +1 -1
  288. package/lib/transition.js +1 -1
  289. package/lib/validate-nodes.js +1 -1
  290. package/lib/view-transition.js +1 -1
  291. package/lib/webmcp-adapter.js +1 -1
  292. package/package.json +1 -1
  293. package/schema.json +1720 -4197
  294. package/scripts/generate-schema.mjs +9 -2
  295. package/skills/nodality/SKILL.md +22 -238
  296. package/skills/nodality/references/content-and-composites.md +66 -0
  297. package/skills/nodality/references/editing.md +38 -0
  298. package/skills/nodality/references/imperative.md +27 -0
  299. package/skills/nodality/references/multi-page.md +40 -0
  300. package/skills/nodality/references/node-families.md +58 -0
  301. package/skills/nodality/references/prerender.md +13 -0
  302. package/skills/nodality/references/verifying.md +27 -0
  303. package/skills/nodality-apply-comments/SKILL.md +52 -0
  304. package/skills/nodality-current/SKILL.md +69 -0
  305. package/skills/nodality-edit-page/SKILL.md +42 -0
  306. package/skills/nodality-new-page/SKILL.md +55 -0
@@ -1,3 +1,2 @@
1
1
  /*! For license information please see finalresult.esm.js.LICENSE.txt */
2
- var __nodality_wp_modules__={153:(e,t,r)=>{r.d(t,{m:()=>y});var n=r(9873),o=r(1382);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var y=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=p(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,t)).res=null,r.setup(e),r.code=[],r.isLast=!1,r.constrObj=e,r.code.push("\n new Wrapper() \n"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),r=t,n=[{key:"toCode",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var r=" ".repeat(t),n="".concat(r,'new Wrapper("').concat(this.constrObj,'")');if(this.constrObj||(n="".concat(r,"new Wrapper()")),Object.keys(this.obj).length){var i=Object.fromEntries(Object.entries(this.obj).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),a=(0,o.sy)(i,2);n+="\n".concat(r," .set(").concat(a,")")}return null!==(e=this.items)&&void 0!==e&&e.length&&(n+="\n".concat(r," .add([\n")+this.items.map(function(e){return e.toCode(t+4)}).join(",\n")+"\n".concat(r," ])")),[n+="\n".concat(r)]}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){this.obj=e,this.commonMethods(e),e.onTap&&this.onTap(e.onTap);var r=".set({";e.isHidden&&this.isHidden(e.isHidden),e.scale&&(this.res.style.scale=e.scale),e.scale&&(r+="scale: ".concat(e.scale)),e.keySet&&this.keySet(e.keySet),e.resprop&&this.resprop(e.resprop,e),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.gpos&&this.gpos(e.gpos);var n,o,s,l=[],c=e.transform&&"object"===a(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||c){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,o=this,"function"==typeof(s=f(p(1&3?n.prototype:n),"setAny",o))?function(e){return s.apply(o,e)}:s)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var u=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,c?e.transform:void 0];u=u.filter(function(e){return null!=e});for(var d=0;d<u.length;d++)l.push({range:u[d].range,log:u[d].op.name,target:u[d].target,op:u[d].op});var h=[];e.borderObj&&h.push("border"),e.background&&h.push("background"),e.mar&&h.push("margin"),e.animation&&h.push("animation"),e.span&&h.push("span"),c&&h.push("transform"),e.gradient&&h.push("gradient"),e.blast,this.options=e,this.chainReact(l,this.options.id,h)}if(e.centerColumn&&this.deprecatedOption("centerColumn",'center: "x"'),e.mboth&&(this.deprecatedOption("mboth",'mar: "center"'),this.mar("center")),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.simpleCenter&&this.deprecatedOption("simpleCenter","center: true"),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(r+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(r+='\n width: "'.concat(e.width,'",')),e.overflow&&(r+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(r+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(r+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),void 0!==e.borderObj.radius&&(this.res.style.borderRadius=e.borderObj.radius)),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),void 0!==e.borderObja.radius&&(this.res.style.borderRadius=e.borderObja.radius)),e.font&&this.font(e.font),e.font&&(r+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.deprecatedOption("flexCenter",'center: "y"'),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(r+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.area&&this.setArea(e.area),e.area&&(r+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(r+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(r+='\n flexDir: "'.concat(e.flexDir,'",')),e.center&&(r+="center: ".concat(JSON.stringify(e.center),",")),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.transform&&"object"===a(e.transform)&&this.reactOnTransform(e.transform),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var y=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));r+="\n stretch: ".concat(y,",")}for(var m in e)if("margin"===m){var v=e[m];if(Array.isArray(v)&&v.length>0){var b,g=i(v);try{for(g.s();!(b=g.n()).done;){var w=b.value;w.hasOwnProperty("top")&&(this.res.style.marginTop=w.top),w.hasOwnProperty("right")&&(this.res.style.marginRight=w.right),w.hasOwnProperty("bottom")&&(this.res.style.marginBottom=w.bottom),w.hasOwnProperty("left")&&(this.res.style.marginLeft=w.left)}}catch(e){g.e(e)}finally{g.f()}}}return 8===(r+="})\n").length&&(r=""),this.code.push(r),this}},{key:"rsp",value:function(e){var t=this;this.res.style.display="flex";var r=e.sequence.split("-"),n=function(){var n=e.ranges;"0px"!==n[0]&&n.unshift("0px");for(var o=0;o<n.length-1;o++)(window.matchMedia("(min-width: ".concat(n[o],") and (max-width: ").concat(n[o+1],")")).matches||window.matchMedia("(min-width: ".concat(n[n.length-1],")")).matches)&&("row"===r[o]&&(t.res.style.flexDirection="row",t.res.style.border="3px solid green"),"col"===r[o]&&(t.res.style.flexDirection="column",t.res.style.border="3px solid purple"));return t};window.addEventListener("resize",n),n()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(e){var t=this,r=function(){window.matchMedia("(max-width: ".concat(e.at,")")).matches?t.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?t.res.style.width="100%":t.res.style.width=e.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"flexAlign",value:function(e){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===e?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"heightNoAuto",value:function(e){return this.res.style.height=e,this}},{key:"border",value:function(e){return this.res.style.borderRadius="".concat(e.radius,"px"),this.res.style.border="".concat(e.width,"px solid ").concat(e.color),this}},{key:"add",value:function(e){this.items=e,this.code.push(".add([ \n");var t=e.map(function(t,r){return t.toCode().flatMap(function(e){return e}).join("")+(r<e.length-1?",":"")}).join("");this.code.push(t);for(var r=0;r<e.length;r++)if(void 0!==e[r]&&void 0!==e[r].toCode){var n=e[r].render();this.res.appendChild(n)}return this.code.push("])"),this}},{key:"setWidth",value:function(e){this.res.style.width="100vw"}},{key:"setHeight",value:function(e){return this.res.style.height="".concat(e),this}},{key:"setup",value:function(e){var t=null;return e?(e.isLink&&(t=document.createElement("a")),"aside"===e&&(t=document.createElement("aside")),"article"===e&&(t=document.createElement("article")),"main"===e&&(t=document.createElement("main")),"section"===e&&(t=document.createElement("section")),"header"===e&&(t=document.createElement("header")),"footer"===e&&(t=document.createElement("footer"))):t=document.createElement("div"),e&&e.isLink&&(t.style.textDecoration="none",t.setAttribute("href",e.child)),this.res=t,this.res.style.margin=0,this.res.style.padding=0,e&&!0===e.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),e&&!0===e.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),e&&"left"===e.align&&(this.res.style.alignItems="flex-start"),e&&"right"===e.align&&(this.res.style.alignItems="flex-end"),e&&e.height&&(this.res.style.height=e.height),e&&e.width&&(this.res.style.width=e.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(e){return this.res.style.width="auto",this.res.style.height="".concat(e),this}},{key:"dimensions",value:function(e,t){return this.w=e,this.h=t,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"size",value:function(e,t){return this.deprecatedOption("size() on this component","dimensions(w, h)"),this.dimensions(e,t)}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"corner",value:function(e){return this.res.style.borderRadius=e,this}},{key:"apply",value:function(e){var t=this,r=function(){for(var r=0;r<e.length;r++){var n=e[r],o=window.matchMedia("(max-width: ".concat(n.width,"px)"));n.device&&(o=window.matchMedia("(max-device-width: ".concat(n.width,"px)"))),o.matches&&Object.assign(t.res.style,n.styles)}},n=window.matchMedia("(max-width: ".concat(e[0].width,"px)"));return e[0].device&&(n=window.matchMedia("(max-device-width: ".concat(e[0].width,"px)"))),n.matches||Object.assign(this.res.style,e[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(e){document.querySelector(e).appendChild(this.res)}},{key:"render",value:function(e){return e?(document.querySelector("#mount"),document.querySelector(e).appendChild(this.res),this):this.res}}],n&&c(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},234:(e,t,r)=>{r.d(t,{SQ:()=>o}),r(5379),r(5275),r(2998),r(849),new Set(["h1.size","h2.size","h3.size","h4.size","h5.size","h6.size","p.size","a.transform","checkbox.exact","checkbox.area","checkbox.background","checkbox.color","checkbox.cursor","checkbox.height","checkbox.keySet","checkbox.mar","checkbox.maxWidth","checkbox.pad","checkbox.transform","checkbox.width","circle.transform","code.transform","filePicker.radius","labelInput.color","labelInput.exact","nav.size","nav.transform","polygon.transform","radio.color","radio.exact","sideNav.exact","sideNav.area","sideNav.background","sideNav.color","sideNav.cursor","sideNav.height","sideNav.keySet","sideNav.mar","sideNav.maxHeight","sideNav.maxWidth","sideNav.opacity","sideNav.pad","sideNav.radius","sideNav.size","sideNav.transform","sideNav.width","sideNav.zIndex","table.transform"]);[].concat(["op","target","range","style","duration"],["filter","gradient","color","width"]),new Set(["ulist"]),new Set(["h1","h2","h3","h4","h5","h6"]);var n="data-nod";function o(e,t){if(!e||!Array.isArray(t))return 0;for(var r=Array.from(e.children||[]),o=0,i=0;i<r.length&&i<t.length;i++)try{r[i].setAttribute(n,JSON.stringify(t[i])),o++}catch(e){}return o}},827:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{k:()=>c});var c=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,r.res=null,r.value=e,r.setup(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"setup",value:function(){var e=document.createElement("div"),t=document.createElement("div"),r=document.createElement("div");return t.style.position="absolute",r.style.position="relative",e.appendChild(t),e.appendChild(r),this.res=e,this}},{key:"padding",value:function(e,t,r,n){return(e||t||r||n)&&(this.res.style.paddingLeft=e,this.res.style.paddingTop=t,this.res.style.paddingRight=r,this.res.style.paddingBottom=n),t||r||n||(this.res.style.padding=e),this}},{key:"size",value:function(e){var t=this,r=e.width.split("%")[0],n=e.height;this.res.children[0].style.width=r/100*window.innerWidth,this.res.children[0].style.height=n,this.res.children[1].style.width=r/100*window.innerWidth*this.value,this.res.children[1].style.height=n;var o=function(){t.res.children[0].style.width=r/100*window.innerWidth,t.res.children[0].style.height=n,t.res.children[1].style.width=r/100*window.innerWidth*t.value,t.res.children[1].style.height=n};return window.addEventListener("resize",o),o(),this}},{key:"colors",value:function(e,t){return this.res.children[0].style.background=e,this.res.children[1].style.background=t,this}},{key:"round",value:function(e){return this.res.children[0].style.borderRadius="".concat(e,"px"),this.res.children[1].style.borderRadius="".concat(e,"px"),this}},{key:"render",value:function(e){if(Array.from(this.res.children).forEach(function(e){return e.style.padding=0}),Array.from(this.res.children).forEach(function(e){return e.style.margin=0}),!e)return this.res;document.querySelector(e).appendChild(this.res)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},849:(e,t,r)=>{r.d(t,{I:()=>Y});var n=r(9873),o=r(5379),i=r(8597),a=(r(9793),r(6131)),s=r(9383),l=r(7108),c=r(3050),u=(r(8807),r(3440),r(5367),r(7879)),d=r(7258),f=r(3420),p=(r(827),r(1873),r(2789)),h=r(7926),y=r(153),m=(r(1980),r(6182)),v=r(3665),b=(r(3243),r(3014)),g=(r(9310),r(1632),r(5860),r(4550),r(9290),r(2387)),w=r(9521),_=r(1236),x=r(3180),k=r(1557),O=r(2689),S=r(4617),E=(r(1353),r(3257)),j=(r(5613),r(1371)),P=r(2588),C=r(9932),T=(r(6679),r(9668)),A=r(8424),R=r(2027),M=(r(7698),r(9800)),I=r(5632),D=r(1200),L=r(5748),B=["font","color","background","radius"];function W(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||F(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){if(e){if("string"==typeof e)return z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,K(n.key),n)}}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(t){G(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function G(e,t,r){return(t=K(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}var X=["h1","h2","h3","h4","h5","h6","p","img","a","cards","free","nav","sideNav","row","dropdown","radio","input","labelInput","filePicker","picker","video","audio","multiswitcher","button","form","checkbox","stack","simple","copy","wrap","circle","polygon","code","table","ulist","gridOverlay","store","product","price","productData","productMedia","variantPicker","buy","cart"],J=function(e,t){var r=function(e){return"string"==typeof e&&"#"===e.charAt(0)?e.slice(1):e};return r(e)===r(t)},$=function(e){var t,r;return"string"==typeof e||"number"==typeof e?{title:String(e),link:"#e"}:H(H({},e),{},{title:String(null!==(t=null==e?void 0:e.title)&&void 0!==t?t:""),link:null!==(r=null==e?void 0:e.link)&&void 0!==r?r:"#e"})},V=Object.freeze({cards:"items",table:"items",ulist:"items",nav:"items",sideNav:"items",dropdown:"items",picker:"items",radio:"items",row:"children",form:"children",stack:"children",wrap:"children",product:"children"}),Y=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"mapType",value:function(e){var t=this.dispatchType(e),r=e&&e.el&&e.el.id;if(null!=r&&""!==r){var n=String(r);t&&"object"===N(t)&&(t.options&&"object"===N(t.options)&&(t.options.id=n),t.obj&&"object"===N(t.obj)&&(t.obj.id=n));var o=t&&(t.res||t.formElement||t.el||t.container);o&&"function"==typeof o.setAttribute&&(o.getAttribute("id")||o.setAttribute("id",String(r)))}return t}},{key:"dispatchType",value:function(e){if(function(e){var t=V[e&&e.type];if(t){var r="items"===t?"children":"items",n=function(t){return Array.isArray(e[t])&&e[t].length>0};if(n(r)&&!n(t)){var o=e.id?' (id "'.concat(e.id,'")'):"";console.warn('[nodality] "'.concat(e.type,'"').concat(o,' carries content in "').concat(r,'" but reads ')+'"'.concat(t,'". The "').concat(r,'" content is ignored and the placeholder template ')+'rendered instead. Move it to "'.concat(t,'".'))}}}(e&&e.el),["h1","h2","h3","h4","h5","h6","p"].includes(e.el.type))return this.mapText(e);if("img"===e.el.type)return this.mapImage(e);if("a"===e.el.type)return this.mapLink(e);if("cards"===e.el.type)return this.mapGrid(e);if("free"===e.el.type)return this.mapFree(e);if("nav"===e.el.type)return this.protoNav(e);if("sideNav"===e.el.type)return this.sideNav(e);if("row"===e.el.type)return this.mapRow(e);if("dropdown"===e.el.type)return this.dropdown(e);if("radio"===e.el.type)return this.radio(e);if("input"===e.el.type)return this.input(e);if("labelInput"===e.el.type)return this.floatInput(e);if("filePicker"===e.el.type)return this.filePicker(e);if("picker"===e.el.type)return this.picker(e);if("video"===e.el.type)return this.video(e);if("audio"===e.el.type)return this.audio(e);if("multiswitcher"===e.el.type)return this.multiswitcher(e);if("button"===e.el.type)return this.button(e);if("form"===e.el.type)return this.form(e);if("checkbox"===e.el.type)return this.checkbox(e);if("stack"===e.el.type)return this.stack(e);if("simple"===e.el.type)return this.simple(e);if("copy"===e.el.type)return this.mapCopy(e);if("wrap"===e.el.type)return this.mapWrap(e);if("circle"===e.el.type)return this.mapCircle(e);if("polygon"===e.el.type)return this.mapPolygon(e);if("code"===e.el.type)return this.mapCode(e);if("table"===e.el.type)return this.mapTable(e);if("ulist"===e.el.type)return this.mapUList(e);if("gridOverlay"===e.el.type)return this.mapGridOverlay(e);if("store"===e.el.type)return this.mapStore(e);if("product"===e.el.type)return this.mapProduct(e);if("price"===e.el.type)return this.mapPrice(e);if("productData"===e.el.type)return this.mapProductData(e);if("productMedia"===e.el.type)return this.mapProductMedia(e);if("variantPicker"===e.el.type)return this.mapVariantPicker(e);if("buy"===e.el.type)return this.mapBuy(e);if("cart"===e.el.type)return this.mapCart(e);throw new Error("[nodality] "+(0,i.au)(e.el.type,X,"element type"))}},{key:"mapTable",value:function(e){var t,r=e.el,n=Array.isArray(r.items)&&r.items.length?r.items:[{abbr:"AUIUI/AK9PT",name:"Pokročilé mobilní technologie",grade:"A",date:"09.01.2024"},{abbr:"AUIUI/AK9PT",name:"Pokročilé mobilní technologie",grade:"A",date:"09.01.2024"},{abbr:"AUIUI/AK9PT",name:"Pokročilé mobilní technologie",grade:"A",date:"09.01.2024"}];return(new m.X).add(n).set({cellPadding:"0.3em",cellAlign:"center",style:{font:"Arial"},headStyle:{color:"white",background:"#c2410c"},border:"2px solid black",center:!0,borderRadius:2.2,stroke:this.filtero("blast",r.id,e.customOptions),gradient:this.filtero("gradient",r.id,e.customOptions),animation:this.filtero("animation",r.id,e.customOptions),shadow:this.filtero("shadow",r.id,e.customOptions),span:this.filtero("span",r.id,e.customOptions),backgroundOp:this.filtero("background",r.id,e.customOptions),marginOp:this.filtero("margin",r.id,e.customOptions),transform:null!==(t=this.filtero("transform",r.id,e.customOptions))&&void 0!==t?t:r.transform,filtera:this.filtero("filter",r.id,e.customOptions),raster:this.filteroRaster(r.id,e.customOptions)})}},{key:"mapRow",value:function(e){var t,r=this,n=e.el;return(new c.Y).set(H(H({},this.elOpts(n,["stroke","gradient","animation","shadow","span","backgroundOp","marginOp","transform","filtera","raster"])),{},{stroke:this.filtero("blast",n.id,e.customOptions),gradient:this.filtero("gradient",n.id,e.customOptions),animation:this.filtero("animation",n.id,e.customOptions),shadow:this.filtero("shadow",n.id,e.customOptions),span:this.filtero("span",n.id,e.customOptions),backgroundOp:this.filtero("background",n.id,e.customOptions),marginOp:this.filtero("margin",n.id,e.customOptions),transform:null!==(t=this.filtero("transform",n.id,e.customOptions))&&void 0!==t?t:n.transform,filtera:this.filtero("filter",n.id,e.customOptions),raster:this.filteroRaster(n.id,e.customOptions)})).items(W(Array.isArray(n.children)&&n.children.length?n.children.map(function(t){return r.mapType(H(H({},e),{},{el:t}))}):[new a.E("This").set({size:"S3"}),new a.E("is").set({size:"S3",text:"Hello"}),new a.E("row.").set({size:"S3",text:"Hello"})]))}},{key:"mapCode",value:function(e){var t,r=e.el;return(new p.C).set({stroke:this.filtero("blast",r.id,e.customOptions),gradient:this.filtero("gradient",r.id,e.customOptions),animation:this.filtero("animation",r.id,e.customOptions),shadow:this.filtero("shadow",r.id,e.customOptions),span:this.filtero("span",r.id,e.customOptions),backgroundOp:this.filtero("background",r.id,e.customOptions),marginOp:this.filtero("margin",r.id,e.customOptions),transform:null!==(t=this.filtero("transform",r.id,e.customOptions))&&void 0!==t?t:r.transform,filtera:this.filtero("filter",r.id,e.customOptions),raster:this.filteroRaster(r.id,e.customOptions),pad:[{l:30}],mar:[{a:30}],class:"language-js",code:'new Text("Modality").set({ font: "Arial" })'})}},{key:"mapCopy",value:function(e){var t,r=e.customOptions,n=r.filter(function(e){return"copy"===e.op})[0],o=null!==(t=null==n?void 0:n.count)&&void 0!==t?t:3,i=(this.filteroRaster(e.el.id,r)||[]).filter(function(e){return e!==n}),a=300;return'new Wrapper()\n.set({\n width: "'.concat(a,'px",\n height: "').concat(a,'px",\n display: "flex",\n justifyContent: "center",\n alignItems: "center",\n position: "absolute",\n id: "').concat(e.el.id?String(e.el.id):"#first",'",\n scale: 0.3,\n ').concat(null!=n&&n.animation?'\nanimation: {\n op: {\n name: "animation",\n color: "green",\n width: "1px",\n fireAt: "inview",\n keyframesOpen: [\n {\n transform: "rotate(360deg)",\n opacity: 0\n },\n {\n transform: "rotate(0deg)",\n opacity: 1\n }\n ],\n keyframesClose: [\n {\n transform: "rotate(0deg)",\n opacity: 1\n },\n {\n transform: "rotate(0deg)",\n opacity: 0\n }\n ],\n openOptions: {\n duration: 300,\n fill: "forwards",\n delay: 1000\n },\n closeOptions: {\n duration: 1,\n fill: "forwards",\n delay: 1000\n }\n },\n target: [\n "#first"\n ]\n },\n ':"").concat(i.length?",\n raster: ".concat(JSON.stringify(i)):"","\n})\n.add(\n Array.from({ length: ").concat(o,' }).map((_, i) => {\n\n const bbox = {width: "').concat(a,'px", height: "').concat(a,'px"};\n\n const elHeight = bbox.height;\n\n const cx = ').concat(150,";\n const cy = ").concat(150,";\n\n const R = ").concat(150,";\n\n const n = ").concat(o,';\n\n // Evenly spaced angles, starting at top (-90°)\n const angle = (i / n) * Math.PI * 2 - Math.PI/2;\n const dist = R + parseFloat(elHeight)/2;\n\n const x = cx + dist * Math.cos(angle);\n const y = cy + dist * Math.sin(angle);\n\n let rot = angle * 180 / Math.PI + 90;\n rot = (rot % 360 + 360) % 360;\n rot = (rot % 360 + 360) % 360;\n\n return new Text("Hello").set({\n size: "S1",\n color: "green",\n font: "Arial",\n left: `${x}px`,\n top: `${y}px`,\n transform: {\n op: {\n name: "transform",\n transform: {\n static: true,\n keep: true,\n values: [\n "tx:-50%",\n "ty:-50%",\n `rotate(${rot}deg)`\n ]\n }\n }\n }\n })\n\n \n })\n)')}},{key:"button",value:function(e){var t,r=e.el;return new A.$(null!==(t=r.text)&&void 0!==t?t:"Button").set(H(H({fluidc:"S6"},this.elOpts(r)),{},{raster:this.filteroRaster(r.id,e.customOptions)}))}},{key:"multiswitcher",value:function(e){var t=this,r=Array.isArray(e.el.breakpoints)?e.el.breakpoints:null;if(!r||!r.length)throw new Error('[nodality] a "multiswitcher" element needs a non-empty `breakpoints` array of { at, view }.');return(new _.i).set({id:e.el.id,area:e.el.area,breakpoints:r.map(function(r){return{at:r.at,view:r.view&&"function"==typeof r.view.render?r.view:t.mapType(H(H({},e),{},{el:r.view}))}})})}},{key:"video",value:function(e){var t=e.el;if(!t.url)throw new Error('[nodality] a "video" element needs a `url`.');return this.attachRaster(new O.C(t.url).set(this.elOpts(t)),t,e.customOptions)}},{key:"audio",value:function(e){var t=e.el;if(!t.url)throw new Error('[nodality] an "audio" element needs a `url`.');return this.attachRaster(new f.f(t.url),t,e.customOptions)}},{key:"radio",value:function(e){var t,r=e.el;return(new j.z).set(H({items:Array.isArray(r.items)?r.items:[],multiple:null!==(t=r.multiple)&&void 0!==t&&t},this.elOpts(r)))}},{key:"input",value:function(e){var t,r=e.el;return(new b.A).set(H(H({type:null!==(t=r.inputType)&&void 0!==t?t:"text"},this.elOpts(r)),{},{raster:this.filteroRaster(r.id,e.customOptions)}))}},{key:"floatInput",value:function(e){var t,r=e.el;return this.attachRaster((new E.l).set(H(H({type:null!==(t=r.inputType)&&void 0!==t?t:"input"},void 0!==r.title||void 0===r.label&&void 0===r.text?{}:{title:void 0!==r.label?r.label:r.text}),this.elOpts(r))),r,e.customOptions)}},{key:"filePicker",value:function(e){var t,r=e.el;return this.attachRaster((new C.I).set(H({title:null!==(t=r.title)&&void 0!==t?t:"Choose a file"},this.elOpts(r))),r,e.customOptions)}},{key:"picker",value:function(e){var t=e.el;return(new P.L).set(H(H({items:Array.isArray(t.items)?t.items:[],pad:[{a:"0.5rem"}],rounded:!0},this.elOpts(t)),{},{raster:this.filteroRaster(t.id,e.customOptions)}))}},{key:"mapGridOverlay",value:function(e){for(var t=e.el,r={id:t.id,columns:t.columns,rows:t.rows,inset:t.inset,color:t.color,lineWidth:t.lineWidth,lineOpacity:t.lineOpacity,marks:t.marks,markSize:t.markSize,position:t.position,zIndex:t.zIndex,font:t.font,fontSize:t.fontSize,letterSpacing:t.letterSpacing,uppercase:t.uppercase,breakpoint:t.breakpoint,mobile:t.mobile,readouts:t.readouts,raster:this.filteroRaster(t.id,e.customOptions)},n=0,o=Object.keys(r);n<o.length;n++){var i=o[n];null==r[i]&&delete r[i]}return(new D.$).set(r)}},{key:"shop",value:function(e,t,r,n){var o=H({kind:e,id:t.id,font:t.font,color:t.color,keySet:t.keySet},r);n.shopFallback&&(o.fallback=!0);for(var i=0,a=Object.keys(o);i<a.length;i++){var s=a[i];null==o[s]&&delete o[s]}return(new L.D).set(o)}},{key:"mapStore",value:function(e){var t=e.el;return this.shop("store",t,{domain:t.domain,token:t.token,country:t.country,language:t.language},e)}},{key:"mapProduct",value:function(e){var t=this,r=e.el,n=this.shop("product",r,H(H({},this.elOpts(r)),{},{handle:r.handle}),e),o=Array.isArray(r.children)?r.children:[];n.add(o.map(function(r){return t.mapType(H(H({},e),{},{el:r,shopFallback:!1}))}));var i=function(e){if(!e||"object"!==N(e))return e;var t=H({},e);return t.id&&(t.id="".concat(String(t.id).replace(/^#/,""),"-static")),Array.isArray(t.children)&&(t.children=t.children.map(i)),t};return n.fallback(o.map(function(r){return t.mapType(H(H({},e),{},{el:i(r),shopFallback:!0}))})),n}},{key:"shopStyle",value:function(e){return H(H({},(0,n.HN)(e)),{},{pad:e.pad,mar:e.mar})}},{key:"mapPrice",value:function(e){var t=e.el;return this.shop("price",t,H(H({},this.shopStyle(t)),{},{text:t.text,query:t.query}),e)}},{key:"mapProductData",value:function(e){var t=e.el;return this.shop("productData",t,H(H({},this.shopStyle(t)),{},{query:t.query,text:t.text}),e)}},{key:"mapProductMedia",value:function(e){var t=e.el;return this.shop("productMedia",t,H(H({},this.shopStyle(t)),{},{query:t.query,url:t.url,alt:t.alt,width:t.width,height:t.height}),e)}},{key:"mapVariantPicker",value:function(e){var t=e.el;return this.shop("variantPicker",t,H(H({},this.shopStyle(t)),{},{text:t.text}),e)}},{key:"mapBuy",value:function(e){var t=e.el;return this.shop("buy",t,H(H({},this.shopStyle(t)),{},{text:t.text,mode:t.mode,cart:t.cart,store:t.store,url:t.url}),e)}},{key:"mapCart",value:function(e){var t=e.el;return this.shop("cart",t,{theme:t.theme,target:t.target,discountCodes:t.discountCodes},e)}},{key:"dropdown",value:function(e){var t,r=null!==(t=e.el.label)&&void 0!==t?t:e.el.title;e.el.items||(e.el.items=["Flower","Car","Maseratti"]);var n=e.el.items.map(function(e){return(new l.N).set({pad:[{a:10}],font:"Arial",bold:!0,link:"https://www.apple.com",text:e,icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"},hover:{color:"wheat",animation:.3}})}),o=(new v.m).set(H(H({},void 0===r?{}:{title:r}),{},{behaviour:"click",pad:[{a:"1rem"}],mar:[{a:"1rem"}],border:"1px solid black",width:"180px",radius:"1rem"})).add([].concat(W(void 0!==r?[]:[new a.E(e.el.items[0]).set({font:"Arial",fluidc:"S6",weight:"bold",align:"center",cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},pad:[{l:10,r:10}]})]),[(new y.m).set({border:"1px solid green",background:"#1abc9c",radius:"0.7rem",socenter:!0}).add(void 0===r?n.slice(1):n)])),i=this.filteroRaster(e.el.id,e.customOptions);return i&&o.rasterize(i),o}},{key:"pageNav",value:function(e,t){var r,o,i,s,c,u=this,d=e.el||{},f=function(){var t,r;return d.brand&&"object"===N(d.brand)?u.mapType(H(H({},e),{},{el:d.brand})):new a.E(null!==(t=d.brand)&&void 0!==t?t:"Company").set(H({size:"S6",font:null!==(r=d.font)&&void 0!==r?r:"Helvetica"},d.color?{color:d.color}:{}))},p=function(){return t.map(function(e){return(new l.N).set(H(H(H({text:e.title,url:e.link,pad:[{tb:8,lr:4}]},d.font?{font:d.font}:{}),d.color?{color:d.color}:{}),d.hover?{hover:d.hover}:{}))})},h=(0,n.HN)(d),y=(h.font,h.color,h.background,h.radius,H(H(H(H(H({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(h,B)),{},{background:null!==(r=d.background)&&void 0!==r?r:"#ecf0f1",mar:null!==(o=d.mar)&&void 0!==o?o:[{a:21}],radius:null!==(i=d.radius)&&void 0!==i?i:"1rem"},void 0!==d.pad?{pad:d.pad}:{}),void 0!==d.color?{color:d.color}:{}),void 0!==d.keySet?{keySet:d.keySet}:{}),d.brandLink?{brandLink:d.brandLink}:{})),m=void 0===d.breakpoint?"1200px":"number"==typeof d.breakpoint?"".concat(d.breakpoint,"px"):String(d.breakpoint),v=(new w.m).set(H(H(H({},y),{},{brand:f(),hamburgerColour:null!==(s=null!==(c=d.hamburgerColour)&&void 0!==c?c:d.color)&&void 0!==s?s:"#3498db"},d.menuLabel?{menuLabel:d.menuLabel}:{}),d.id?{menuId:"".concat(String(d.id).replace(/^#/,""),"-menu")}:{})).add(p()),b=(new g.C).set(H(H({},y),{},{maxHeight:"100px"})).add([f(),new x.h(!0)].concat(W(p())));return(new _.i).set({id:d.id,breakpoints:[{at:"0px",view:v},{at:m,view:b}]})}},{key:"protoNav",value:function(e){var t,r,n=e.customOptions,o=Array.isArray(null===(t=e.el)||void 0===t?void 0:t.items)&&e.el.items.length?e.el.items.map($):[{title:"Fire",link:"@e"},{title:"and",link:"@e"},{title:"smoke",link:"@e"}],i=Array.isArray(null===(r=e.el)||void 0===r?void 0:r.items)&&e.el.items.length?e.el.items.map($):null,s=function(){return i.map(function(e){return(new l.N).set({text:e.title,url:e.link,pad:[{tb:8,lr:4}]})})};if(i)return this.pageNav(e,i);var c=o.map(function(e,t){return new l.N('"'.concat(e.title,'"')).set({fluidc:"S6",text:e.title,link:e.link,font:"Arial",pad:[{a:40}],bold:!0,hover:{color:"wheat",animation:.3}})}),u=o.map(function(e,t){return new l.N('"'.concat(e.title,'"')).set({fluidc:"S6",text:e.title,link:e.link,font:"Arial",pad:[{a:40}],bold:!0,hover:{color:"wheat",animation:.3},animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px",keyframesOpen:[{transform:"translate(100%, ".concat(10*t,"%)"),opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, ".concat(10*t,"%)"),opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}}})});if(e.el.dropdown){var d=(new v.m).set({behaviour:"mouseover",pad:[{a:40}],padding:"10px",border:"1px solid black"}).add([new a.E("First").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:20,r:10}],font:"Arial",align:"center",weight:"bold"}),(new y.m).set({centerColumn:!0,radius:"0.7rem",background:"#1abc9c",makeResponsiveBehaviour:"undefined"}).add([(new l.N).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Second",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}}),(new l.N).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Third",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}})])]);u.push(d),c.push(d)}e.el.animation;var f=(new _.i).set({id:e.el&&e.el.id,breakpoints:[{at:"0px",view:(new w.m).set({background:"#ecf0f1",mar:[{a:21}],brand:new a.E("Company").set({size:"S6",font:"Helvetica"}),hamburgerColour:"#3498db",radius:"1rem"}).add([].concat(W(i?s():[(new l.N).set({text:"About",url:"#a"})]),[(new v.m).set({behaviour:"mouseover",pad:[{a:40}],mar:[{lr:"auto"}],breakpoint:"1200px",padding:"10px",border:"1px solid black",height:"auto"}).add([new a.E("More").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new a.E("Our story").set({cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new a.E("Team").set({cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"})])],W(i?[]:[new l.N("B").set({text:"About",url:"#b"}),new l.N("C").set({text:"Contact",url:"https://www.abcnews.com"})])))},{at:"1200px",view:(new g.C).set({background:"#ecf0f1",mar:[{a:21}],maxHeight:"100px",radius:"1rem"}).add([new a.E("Company").set({size:"S6",font:"Helvetica"}),new x.h(!0),(new v.m).set({behaviour:"mouseover",pad:[{a:40}],padding:"10px",border:"1px solid black",radius:"30px",width:"130px"}).add([new a.E("More").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),(new y.m).set({flexDir:"column",mar:[{t:"10px"}],radius:".3rem"}).add([new l.N("").set({text:"Who we are",url:"jk",cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new l.N("").set({text:"Info",url:"#u",cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new l.N("").set({text:"About",url:"#u",cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"})])])].concat(W(i?s():[(new l.N).set({text:"About",url:"#a"}),(new l.N).set({text:"Services",url:"#a"}),(new l.N).set({text:"Contact",url:"#a"})])))}]});return this.attachRaster(f,e.el,n)}},{key:"sideNav",value:function(e){e.customOptions;var t,r,n=Array.isArray(null===(t=e.el)||void 0===t?void 0:t.items)&&e.el.items.length>0,o=Array.isArray(null===(r=e.el)||void 0===r?void 0:r.items)&&e.el.items.length?e.el.items.map($):[{title:"Home",link:"@e"},{title:"Projects",link:"@e"},{title:"Services",link:"@e"}],i=o.map(function(e,t){return new l.N('"'.concat(e.title,'"')).set({fluidc:"S4",text:e.title,link:e.link,isNavA:!0,url:n&&e.link||"#e",id:"#"+e.title.toLowerCase(),font:"Arial",pad:[{a:20}],bold:!0,tags:{open:"sidebar:open",close:"sidebar:closed"},align:"left",hover:{color:"wheat",animation:.3}})}),s=(new v.m).set({behaviour:"mouseover",pad:[{a:40}],padding:"10px",animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px",keyframesOpen:[{transform:"translate(100%, ".concat(10,"%)"),opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, ".concat(10,"%)"),opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}}}).add([new a.E("More").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),(new y.m).set({centerColumn:!0,radius:"0.7rem",background:"#1abc9c",makeResponsiveBehaviour:"undefined"}).add([(new l.N).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Second",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}}),(new l.N).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Third",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}})])]),c=o.map(function(e,t){return new l.N('"'.concat(e.title,'"')).set({fluidc:"S4",text:e.title,link:e.link,isNavA:!0,url:n&&e.link||"#myURL",id:"#"+e.title.toLowerCase(),font:"Arial",pad:[{a:20}],bold:!0,tags:{open:"sidebar:open",close:"sidebar:closed"},align:"left",hover:{color:"wheat",animation:.3},animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px",keyframesOpen:[{transform:"translate(100%, ".concat(10*t,"%)"),opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, ".concat(10*t,"%)"),opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}}})});e.el.dropdown&&(c.push(s),i.push(s));var d=(new y.m).set({column:!0}).add([new a.E("Sidebar").set({size:"S6",font:"Arial",id:"#olod",italic:!0,animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px"}},pad:[{l:20},{t:20}]})].concat(W((e.el.animation?c:i).slice(0,o.length).filter(Boolean)),[e.el.animation&&e.el.dropdown?c[o.length]:new a.E("").set({}).excludeFromCode(),new a.E("Company, 2025").set({pad:[{a:20}],animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px"}}})])),f=(new y.m).set({column:!0}).add([new a.E("Off canvas").set({fluidc:"S6",font:"Arial",id:"#olod",italic:!0,animation:e.el.animation?{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px"}}:null,pad:[{l:40},{t:20}]})]),p=(new u.f).setup({animate:!0,radius:"1rem",isSide:!0,background:"#ecf0f1",hamColour:{opened:"#0f766e",closed:"#c2410c"},mobileSize:"1.2em",fixed:!0,tags:{open:"sidebar:open",close:"sidebar:closed"}}).items(e.el.offcanvas?f:d),h=this.filteroRaster(e.el.id,e.customOptions);return h&&p.rasterize(h),p}},{key:"mapFree",value:function(e){var t=e.customOptions.filter(function(e){return"slayout"===e.op.name||"layout"===e.op.name})[0],r=null,n={cols:6,rows:6};"text-above-image"!==t.op.value&&"image-above-text"!==t.op.value||(r=null,n=null),"img-overlay-text"===t.op.value&&(r={text:{row:"1 / span 2",col:"3 / span 2"},image:{row:"2 / span 3",col:"3 / 3"}}),"img-leftof-text"===t.op.value&&(r={text:{row:"1",col:"1 / 3"},image:{row:"1",col:"3 / 4"}});var o=(new d.b).set({id:"#3",templateCols:n,height:"600px"}).add([new a.E("I am free").set({border:"3px solid green",font:"Arial",size:"S1",color:"#1abc9c",gpos:null!=r?r.text:null,zIndex:1}),(new s._).set({url:"https://upload.wikimedia.org/wikipedia/commons/a/ac/MSC_World_Europa_-_Saint-Nazaire_-_June_2022.jpg",width:"400px",height:"auto",gpos:null!=r?r.image:null})]),i=this.filteroRaster(e.el.id,e.customOptions);return i&&o.rasterize(i),o}},{key:"mapCircle",value:function(e){var t,r=e.el;return(new I.j).set({diameter:108,background:"#1abc9c",stroke:this.filtero("blast",r.id,e.customOptions),gradient:this.filtero("gradient",r.id,e.customOptions),animation:this.filtero("animation",r.id,e.customOptions),shadow:this.filtero("shadow",r.id,e.customOptions),span:this.filtero("span",r.id,e.customOptions),backgroundOp:this.filtero("background",r.id,e.customOptions),marginOp:this.filtero("margin",r.id,e.customOptions),transform:null!==(t=this.filtero("transform",r.id,e.customOptions))&&void 0!==t?t:r.transform,filtera:this.filtero("filter",r.id,e.customOptions),raster:this.filteroRaster(r.id,e.customOptions)})}},{key:"mapPolygon",value:function(e){var t,r,n=e.el,o=null!==(t=e.el.sides)&&void 0!==t?t:7;return new M.t({id:n.id?String(n.id):"hex"}).set({sides:o,size:300,background:"#1abc9c",gradient:this.filtero("gradient",n.id,e.customOptions),animation:this.filtero("animation",n.id,e.customOptions),shadow:this.filtero("shadow",n.id,e.customOptions),span:this.filtero("span",n.id,e.customOptions),backgroundOp:this.filtero("background",n.id,e.customOptions),marginOp:this.filtero("margin",n.id,e.customOptions),transform:null!==(r=this.filtero("transform",n.id,e.customOptions))&&void 0!==r?r:n.transform,filtera:this.filtero("filter",n.id,e.customOptions),raster:this.filteroRaster(n.id,e.customOptions)})}},{key:"mapText",value:function(e){var t,r,n,o=e.el;return new a.E(o.text||o.value).set(H(H({},this.elOpts(o,["value","stroke","gradient","animation","shadow","span","backgroundOp","marginOp","transform","filtera","raster"])),{},{id:o.id,class:o.class,color:o.color,size:this.getElType(o.type),tag:o.tag,font:null!==(t=o.font)&&void 0!==t?t:"Arial",stroke:this.filtero("blast",o.id,e.customOptions),gradient:this.filtero("gradient",o.id,e.customOptions),animation:this.filtero("animation",o.id,e.customOptions),shadow:this.filtero("shadow",o.id,e.customOptions),span:this.filtero("span",o.id,e.customOptions),backgroundOp:this.filtero("background",o.id,e.customOptions),marginOp:this.filtero("margin",o.id,e.customOptions),transform:null!==(r=this.filtero("transform",o.id,e.customOptions))&&void 0!==r?r:o.transform,filtera:this.filtero("filter",o.id,e.customOptions),raster:this.filteroRaster(o.id,e.customOptions),resprop:null!==(n=o.resprop)&&void 0!==n?n:null}))}},{key:"mapImage",value:function(e){var t=e.el;return new s._(t.url).set(H(H({},this.elOpts(t)),{},{url:t.url,isFull:t.isFull,animation:this.filtero("animation",t.id,e.customOptions),shadow:this.filtero("shadow",t.id,e.customOptions),marginOp:this.filtero("margin",t.id,e.customOptions),filtera:this.filtero("filter",t.id,e.customOptions),raster:this.filteroRaster(t.id,e.customOptions)}))}},{key:"mapLink",value:function(e){var t,r,n,o=e.customOptions.filter(function(e){return"link-style"===e.op.name}),i=e.el;return e.el.id&&(i.id=e.el.id),e.el.link&&e.el.text&&(i.url=e.el.link,i.text=e.el.text),i.animation=this.filtero("animation",e.el.id,e.customOptions),i.class=e.el.class,i.width=e.el.width,i.font=null!==(t=e.el.font)&&void 0!==t?t:"Arial",i.fluidc=e.el.fluidc,i.transform=null!==(r=this.filtero("transform",e.el.id,e.customOptions))&&void 0!==r?r:e.el.transform,i.shadow=this.filtero("shadow",e.el.id,e.customOptions),i.gradient=this.filtero("gradient",e.el.id,e.customOptions),i.blast=this.filtero("blast",e.el.id,e.customOptions),i.backgroundOp=this.filtero("background",e.el.id,e.customOptions),i.raster=this.filteroRaster(e.el.id,e.customOptions),i.pad=null!==(n=e.el.pad)&&void 0!==n?n:[{a:10}],o.length>0?R.a.style({el:e.el,re:i,bst:o,options:e.customOptions})[o.length-1]:(new l.N).set(i)}},{key:"mapGrid",value:function(e){var t=e.el,r=(e.customOptions.find(function(e){return"card-style"===e.op.name}),this.filtero("gradient",t.id,e.customOptions)),n=this.filtero("animation",t.id,e.customOptions),o=this.filtero("shadow",t.id,e.customOptions),i=this.filtero("margin",t.id,e.customOptions),a=this.filtero("filter",t.id,e.customOptions),s=this.filteroRaster(t.id,e.customOptions),l=this.filtero("blast",t.id,e.customOptions),c='\n new Card()\n .set({\n width: "300px", \n height: "700px",\n radius: "0.7rem", \n mar: { sides: ["all"], value: "0.8rem" }\n '.concat(void 0!==r?",\n gradient: ".concat(JSON.stringify(r)):"").concat(void 0!==n?",\n animation: ".concat(JSON.stringify(n)):"").concat(void 0!==o?",\n shadow: ".concat(JSON.stringify(o)):"").concat(void 0!==i?",\n marginOp: ".concat(JSON.stringify(i)):"").concat(void 0!==a?",\n filtera: ".concat(JSON.stringify(a)):"").concat(void 0!==l?",\n blast: ".concat(JSON.stringify(l)):"",'\n })\n .items([\n new Image(item.img).set({isFull: true, url: item.img}),\n // #c2410c is 5.18:1 on white; h2 keeps the outline intact.\n new Text(item.title).set({ size: "S5", tag: "h2", color: "#c2410c" }),\n new Link("Link").set({\n text: item.title, \n url: item.link, \n background: "#1d6fe0", \n pad: [{ lr: "0.5rem", tb: "1rem" }], \n radius: "0.4rem", \n color: "white",\n mar: [{"a": 21}]\n })\n ])'),u=e.el.backgroundCard?'\n new ZoomCard()\n .set({\n url: item.img, \n font: "Arial", \n mar: { sides: ["all"], value: "0.8rem" }, \n inpad: "1rem", \n useBrightness: true\n })\n .items([\n new Text(item.title).set({ fluidc: "S6", tag: "h2", color: "#c2410c" }),\n new Link("Link").set({\n text: item.title, \n url: item.link, \n background: "#1d6fe0", \n pad: [{ lr: "0.5rem", tb: "1rem" }], \n radius: "0.4rem", \n color: "white"\n })\n ])':c,d=Object.entries(this.elOpts(e.el,["backgroundCard","gradient","animation","shadow","marginOp","filtera","blast","raster"])).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||F(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],n=t[1];return",\n ".concat(JSON.stringify(r),": ").concat(JSON.stringify(n))}).join("");return' new FlexGrid()\n .set({\n colat: "700px",\n wrap: true,\n align: "center",\n gap: "1rem"'.concat(d,"\n ").concat(void 0!==r?",\n gradient: ".concat(JSON.stringify(r)):"").concat(void 0!==n?",\n animation: ".concat(JSON.stringify(n)):"").concat(void 0!==o?",\n shadow: ".concat(JSON.stringify(o)):"").concat(void 0!==i?",\n marginOp: ".concat(JSON.stringify(i)):"").concat(void 0!==a?",\n filtera: ".concat(JSON.stringify(a)):"").concat(void 0!==l?",\n blast: ".concat(JSON.stringify(l)):"").concat(void 0!==s?",\n raster: ".concat(JSON.stringify(s)):"","\n })\n .items(\n ").concat(this.gridItemsSource(e,u),"\n )\n ")}},{key:"gridItemsSource",value:function(e,t){var r=this,n=e.el.items;if(!Array.isArray(n)||0===n.length)return'[\n { img: "https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg", title: "Starship", link: "#ship" },\n { img: "https://upload.wikimedia.org/wikipedia/commons/1/16/Apollo_11_Launch_-_GPN-2000-000630.jpg", title: "Saturn V", link: "#saturn" },\n { img: "https://upload.wikimedia.org/wikipedia/commons/d/d6/STS120LaunchHiRes-edit1.jpg", title: "Shuttle", link: "#shuttle" }\n ].map(item => \n '.concat(t,"\n )");var o,i=function(e){return Array.isArray(e)},a=n.filter(function(e){return!i(e)});if(0===n.filter(i).length)return"".concat(JSON.stringify(a,null,2).split("\n").map(function(e,t){return 0===t?e:" "+e}).join("\n"),".map(item => \n ").concat((o=t,a.some(function(e){return e&&void 0!==e.alt})?o.replace("url: item.img}","url: item.img, alt: item.alt}"):o),"\n )");var s=n.map(function(t){return i(t)?r.cardFromSpecs(e,t):r.cardFromShorthand(t)});return"[\n ".concat(s.join(",\n "),"\n ]")}},{key:"cardFromSpecs",value:function(e,t){var r=this,n=t.map(function(t){var n=r.mapType(H(H({},e),{},{el:t}));return"string"==typeof n?n.trim():(n&&"function"==typeof n.toCode?[].concat(n.toCode()).join(""):"").trim()}).filter(Boolean);return'new Card()\n .set({ width: "300px", height: "700px", radius: "0.7rem", mar: { sides: ["all"], value: "0.8rem" } })\n .items([\n '.concat(n.join(",\n "),"\n ])")}},{key:"cardFromShorthand",value:function(e){var t=function(e){return JSON.stringify(null!=e?e:"")};return'new Card()\n .set({ width: "300px", height: "700px", radius: "0.7rem", mar: { sides: ["all"], value: "0.8rem" } })\n .items([\n new Image('.concat(t(e.img),").set({isFull: true, url: ").concat(t(e.img)).concat(void 0===e.alt?"":", alt: ".concat(t(e.alt)),"}),\n new Text(").concat(t(e.title),').set({ size: "S5", tag: "h2", color: "#c2410c" }),\n new Link("Link").set({ text: ').concat(t(e.title),", url: ").concat(t(e.link),', background: "#1d6fe0", pad: [{ lr: "0.5rem", tb: "1rem" }], radius: "0.4rem", color: "white" })\n ])')}},{key:"checkbox",value:function(e){var t=e.el,r="string"==typeof t.label?new a.E(t.label).set({size:"S6"}):t.label;return this.attachRaster((new k.S).set(H(H({},this.elOpts(t,["label"])),void 0!==r?{label:r}:{})),t,e.customOptions)}},{key:"stack",value:function(e){var t=this,r=e.el,n=(new h.B).set(this.elOpts(r)),o=Array.isArray(r.children)?r.children:null;return o&&n.add(o.map(function(r){return t.mapType(H(H({},e),{},{el:r}))})),this.attachRaster(n,r,e.customOptions)}},{key:"form",value:function(e){var t,r=this,n=e.el,o=(new T.l).set(H(H(H({action:null!==(t=n.action)&&void 0!==t?t:""},void 0!==n.method?{method:n.method}:{}),void 0!==n.id?{id:n.id}:{}),void 0!==n.title?{title:n.title}:{})),i=Array.isArray(n.children)?n.children:null;return i&&o.add(i.map(function(t){return r.mapType(H(H({},e),{},{el:t}))})),o}},{key:"simple",value:function(e){var t,r,n=this,o=e.el,i=Array.isArray(o.react)?o.react:[];if(!i.length)throw new Error('[nodality] a "simple" element needs a non-empty `react` array of { at, template }.');var a=(Array.isArray(o.children)?o.children:[]).map(function(t){var r=n.mapType(H(H({},e),{},{el:t})).toCode();return Array.isArray(r)?r.join(""):String(r)}).join(",\n ");return"new AreaSwitcher()\n .set(".concat(JSON.stringify(H({gap:null!==(t=o.gap)&&void 0!==t?t:"10px",height:null!==(r=o.height)&&void 0!==r?r:"700px"},void 0!==o.id?{id:o.id}:{})),")\n .react(").concat(JSON.stringify(i,null,2),")\n .add([\n ").concat(a,"\n ])")}},{key:"mapWrap",value:function(e){var t,r,n,o=this,i=e.el,a=null!==(t=e.el.kind)&&void 0!==t?t:"",s=new y.m(a).set(H(H({},this.elOpts(i)),{},{font:null!==(r=i.font)&&void 0!==r?r:"Arial",stroke:this.filtero("blast",i.id,e.customOptions),gradient:this.filtero("gradient",i.id,e.customOptions),animation:this.filtero("animation",i.id,e.customOptions),shadow:this.filtero("shadow",i.id,e.customOptions),transform:null!==(n=this.filtero("transform",i.id,e.customOptions))&&void 0!==n?n:i.transform,filtera:this.filtero("filter",i.id,e.customOptions),raster:this.filteroRaster(i.id,e.customOptions)})),l=Array.isArray(i.children)?i.children:null;return l&&s.add(l.map(function(t){return o.mapType(H(H({},e),{},{el:t}))})),s}},{key:"mapUList",value:function(e){var t,r,n,o=this,i=e.el,s=null!==(t=e.el.kind)&&void 0!==t?t:"",l=new S.e(s).set(H(H({},this.elOpts(i)),{},{font:null!==(r=i.font)&&void 0!==r?r:"Arial",stroke:this.filtero("blast",i.id,e.customOptions),gradient:this.filtero("gradient",i.id,e.customOptions),animation:this.filtero("animation",i.id,e.customOptions),shadow:this.filtero("shadow",i.id,e.customOptions),transform:null!==(n=this.filtero("transform",i.id,e.customOptions))&&void 0!==n?n:i.transform,filtera:this.filtero("filter",i.id,e.customOptions),raster:this.filteroRaster(i.id,e.customOptions)})),c=Array.isArray(i.items)?i.items:null;return c&&l.setItems(c.map(function(t){return"string"==typeof t?new a.E(t).set({}):o.mapType(H(H({},e),{},{el:t}))})),l}},{key:"getElType",value:function(e){return"p"===e?"S6":"S".concat(e.substr(1))}},{key:"filtero",value:function(e,t,r){return r.filter(function(t){return t.op.name===e}).filter(function(e){return!e.target||e.target.some(function(e){return J(e,t)})})[0]}},{key:"elOpts",value:function(e){for(var t=new Set(["type","children","items","breakpoints","inputType","text","url"].concat(W(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]))),r={},n=0,o=Object.keys(e);n<o.length;n++){var i=o[n];t.has(i)||(r[i]=e[i])}return r}},{key:"attachRaster",value:function(e,t,r){var n=this.filteroRaster(t.id,r);return n&&e&&"function"==typeof e.rasterize&&e.rasterize(n),e}},{key:"filteroRaster",value:function(e,t){var r=(t||[]).filter(function(t){return t&&"string"==typeof t.op&&o.ls.includes(t.op)&&(!t.target||e&&t.target.some(function(t){return J(t,e)}))});return r.length>0?r:void 0}}],null&&q(e.prototype,null),t&&q(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},1200:(e,t,r)=>{r.d(t,{$:()=>O});var n=r(9873),o=r(1382),i=["mobile"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var u=function(e){var t=Math.floor(Number(e));return Number.isFinite(t)&&t>0?t:0},d=function(e,t){return Math.max(1,Math.round(Number(t)||1))%2==1?Math.round(e-.5)+.5:Math.round(e)},f=function(e,t,r,n){if(0===e||r<=t)return[];for(var o=(r-t)/e,i=[],a=0;a<=e;a++)i.push(d(t+o*a,n));return i};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function y(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function b(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var x="http://www.w3.org/2000/svg",k={columns:4,rows:2,inset:16,lineWidth:1,lineOpacity:.35,marks:"square",markSize:8,position:"fixed",zIndex:2,font:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:11,letterSpacing:"0.04em",uppercase:!0,breakpoint:768,readouts:[]},O=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=w(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}(this,t)).options={},e.config=null,e._readoutEls=new Map,e._readoutText=new Map,e.setup(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(t,e),r=t,n=[{key:"setup",value:function(){var e=document.createElement("div");e.setAttribute("aria-hidden","true"),e.setAttribute("data-nodality","grid-overlay"),e.style.pointerEvents="none",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.left="0",e.style.overflow="hidden";var t=document.createElementNS(x,"svg");return t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("focusable","false"),t.style.display="block",e.appendChild(t),this.res=e,this.svg=t,this}},{key:"set",value:function(){var e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=y,this.config={columns:null!==(e=y.columns)&&void 0!==e?e:k.columns,rows:null!==(t=y.rows)&&void 0!==t?t:k.rows,inset:null!==(r=y.inset)&&void 0!==r?r:k.inset,color:y.color,lineWidth:null!==(n=y.lineWidth)&&void 0!==n?n:k.lineWidth,lineOpacity:null!==(o=y.lineOpacity)&&void 0!==o?o:k.lineOpacity,marks:null!==(i=y.marks)&&void 0!==i?i:k.marks,markSize:null!==(a=y.markSize)&&void 0!==a?a:k.markSize,position:null!==(s=y.position)&&void 0!==s?s:k.position,zIndex:null!==(l=y.zIndex)&&void 0!==l?l:k.zIndex,font:null!==(c=y.font)&&void 0!==c?c:k.font,fontSize:null!==(u=y.fontSize)&&void 0!==u?u:k.fontSize,letterSpacing:null!==(d=y.letterSpacing)&&void 0!==d?d:k.letterSpacing,uppercase:null!==(f=y.uppercase)&&void 0!==f?f:k.uppercase,breakpoint:null!==(p=y.breakpoint)&&void 0!==p?p:k.breakpoint,mobile:y.mobile,readouts:null!==(h=y.readouts)&&void 0!==h?h:k.readouts};var m=this.config;return this.res.style.position="absolute"===m.position?"absolute":"fixed",this.res.style.zIndex=String(m.zIndex),y.color&&(this.res.style.color=y.color),y.id&&this.res.setAttribute("id",y.id),this._watchSize(),this.draw(),y.raster&&this.rasterize(y.raster),this}},{key:"readout",value:function(e,t){this._readoutText.set(e,t);var r=this._readoutEls.get(e);return r&&(r.textContent=this._format(t)),this}},{key:"geometry",value:function(){return this._geometry||null}},{key:"draw",value:function(){var e=this;if(!this.config)return this;var t=this._measure(),r=t.width,n=t.height,o=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})||{},r=t.mobile,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,i),o=Number(n.breakpoint)||768;return r&&"object"===c(r)&&e<o?s(s({},n),r):n}(this.config,this._viewportWidth()),a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,r=void 0===t?0:t,n=e.height,o=void 0===n?0:n,i=e.columns,a=void 0===i?4:i,s=e.rows,l=void 0===s?2:s,d=e.inset,p=void 0===d?0:d,h=e.lineWidth,y=void 0===h?1:h,m=Math.max(0,Number(r)||0),v=Math.max(0,Number(o)||0),b=u(a),g=u(l),w=function(e){if(e&&"object"===c(e))return{x:Math.max(0,Number(e.x)||0),y:Math.max(0,Number(e.y)||0)};var t=Math.max(0,Number(e)||0);return{x:t,y:t}}(p),_=Math.min(w.x,m/2),x=Math.min(w.y,v/2),k=f(b,_,m-_,y),O=f(g,x,v-x,y),S=[],E=0;E<O.length;E++)for(var j=0;j<k.length;j++)S.push({col:j,row:E,x:k[j],y:O[E]});return{width:m,height:v,columns:b,rows:g,inset:{x:_,y:x},cell:{width:b?(m-2*_)/b:0,height:g?(v-2*x)/g:0},x:k,y:O,intersections:S}}({width:r,height:n,columns:o.columns,rows:o.rows,inset:o.inset,lineWidth:o.lineWidth});this._geometry=a;for(var l=this.svg;l.firstChild;)l.removeChild(l.firstChild);if(this._readoutEls.clear(),!r||!n)return this;l.setAttribute("viewBox","0 0 ".concat(r," ").concat(n));var d,p=this._node("g",{stroke:"currentColor","stroke-width":o.lineWidth,"stroke-opacity":o.lineOpacity,"shape-rendering":"crispEdges"}),y=h(a.x);try{for(y.s();!(d=y.n()).done;){var m=d.value;p.appendChild(this._node("line",{x1:m,y1:0,x2:m,y2:n}))}}catch(e){y.e(e)}finally{y.f()}var v,b=h(a.y);try{for(b.s();!(v=b.n()).done;){var g=v.value;p.appendChild(this._node("line",{x1:0,y1:g,x2:r,y2:g}))}}catch(e){b.e(e)}finally{b.f()}l.appendChild(p);var w=Number(o.markSize)||0;if(w>0&&"square"===o.marks){var _,x=this._node("g",{fill:"currentColor","shape-rendering":"crispEdges"}),k=h(a.intersections);try{for(k.s();!(_=k.n()).done;){var O=_.value;x.appendChild(this._node("rect",{x:O.x-w/2,y:O.y-w/2,width:w,height:w}))}}catch(e){k.e(e)}finally{k.f()}l.appendChild(x)}else if(w>0&&"cross"===o.marks){var S=a.intersections.map(function(e){return"M".concat(e.x-w/2," ").concat(e.y,"H").concat(e.x+w/2,"M").concat(e.x," ").concat(e.y-w/2,"V").concat(e.y+w/2)}).join("");S&&l.appendChild(this._node("path",{d:S,fill:"none",stroke:"currentColor","stroke-width":o.lineWidth,"shape-rendering":"crispEdges"}))}var E=Array.isArray(o.readouts)?o.readouts:[];if(E.length){var j=this._node("g",{fill:"currentColor","font-family":o.font,"font-size":o.fontSize,"letter-spacing":o.letterSpacing}),P=w/2+6;E.forEach(function(t,o){if(t){var i=a.intersections.find(function(e){return e.col===t.col&&e.row===t.row});if(i){var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"br",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=["tl","tr","bl","br"].includes(t)?t:"br",i="r"===o[1],a="b"===o[0];if(n){var s=Number(n.width)||0,l=Number(n.height)||0,c=r+24;i&&e.x+c>s?i=!1:!i&&e.x-c<0&&(i=!0),a&&e.y+c>l?a=!1:!a&&e.y-c<0&&(a=!0)}return{x:e.x+(i?r:-r),y:e.y+(a?r:-r),textAnchor:i?"start":"end",baseline:a?"hanging":"alphabetic"}}(i,t.anchor,P,{width:r,height:n}),l=null!=t.id?String(t.id):"readout-".concat(o),c=e._node("text",{x:s.x,y:s.y,"text-anchor":s.textAnchor,"dominant-baseline":s.baseline,"data-readout":l});c.textContent=e._format(e._readoutText.has(l)?e._readoutText.get(l):t.text),j.appendChild(c),e._readoutEls.set(l,c)}}}),l.appendChild(j)}return this}},{key:"_format",value:function(e){var t=null==e?"":String(e);return this.config&&!1===this.config.uppercase?t:t.toUpperCase()}},{key:"_node",value:function(e,t){var r=document.createElementNS(x,e);for(var n in t)r.setAttribute(n,String(t[n]));return r}},{key:"_viewportWidth",value:function(){return"undefined"!=typeof window&&window.innerWidth?window.innerWidth:1/0}},{key:"_measure",value:function(){var e="undefined"!=typeof window;return{width:this.res.clientWidth||(e?window.innerWidth:0)||0,height:this.res.clientHeight||(e?window.innerHeight:0)||0}}},{key:"_watchSize",value:function(){var e=this;if(!this._watching&&"undefined"!=typeof window)if(this._watching=!0,"function"==typeof window.ResizeObserver){var t=new window.ResizeObserver(function(){return e.draw()});t.observe(this.res),this._track(function(){return t.disconnect()})}else this._on(window,"resize",function(){return e.draw()})}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var e=Object.fromEntries(Object.entries(this.options||{}).filter(function(e){return null!=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2)[1]}));return["new GridOverlay().set(".concat((0,o.sy)(e,4),")")]}},{key:"excludeFromCode",value:function(){return this.excludeFromCodeTrue=!0,this}},{key:"render",value:function(e){if(e){var t=document.querySelector(e);t&&(t.appendChild(this.res),this.draw())}return this.res}}],n&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},1236:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}r.d(t,{i:()=>f});var f=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}(this,t)).breakpoints=[],e.container=null,e.currentView=null,e.internalDiv=null,e.resizeListener=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,o=[{key:"set",value:function(e){var t=e.breakpoints,r=e.id,n=e.area;if(this.options={breakpoints:t},this._id=r,this._area=n,!Array.isArray(t))throw new Error("Breakpoints should be an array of objects with 'at' and 'view' properties.");return this.breakpoints=t.map(function(e){if("string"!=typeof e.at||!(e.view.render()instanceof HTMLElement))throw new Error("Each breakpoint must have 'at' as a string and 'view' as an HTMLElement.");return i(i({},e),{},{at:parseInt(e.at,10)})}),this.breakpoints.sort(function(e,t){return e.at-t.at}),this}},{key:"toCode",value:function(){JSON.stringify(this.options.breakpoints.map(function(e){return e.view.toCode()}).flat(),null,4),JSON.stringify(this.options.breakpoints.map(function(e){return e.at}),null,4),JSON.stringify(this.options.breakpoints,null,4);for(var e="",t=0;t<this.options.breakpoints.length;t++)e+='{ at: "'.concat(this.options.breakpoints[t].at,'", view: ').concat(this.options.breakpoints[t].view.toCode()," }, \n");var r=this._id?"\n id: ".concat(JSON.stringify(String(this._id)),","):"";return["new Switcher().set({".concat(r,"\n breakpoints: [\n ").concat(e,"\n ]\n })")]}},{key:"render",value:function(e){return this.internalDiv=document.createElement("div"),this.res=this.internalDiv,this._id&&this.internalDiv.setAttribute("id",this._id),this._area&&(this.internalDiv.style.gridArea=this._area),this.applyView(),this.resizeListener=this.applyView.bind(this),window.addEventListener("resize",this.resizeListener),void 0!==e&&document.querySelector(e).appendChild(this.internalDiv),this.internalDiv}},{key:"createRanges",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:99999,r=[],n=0;n<e.length;n++)r.push({from:e[n],to:n<e.length-1?e[n+1]-1:t});return r}},{key:"addRanges",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:99999;return e.map(function(e,n){var o=t[n],a=n<t.length-1?t[n+1]-1:r;return i(i({},e),{},{range:{from:o,to:a}})})}},{key:"applyView",value:function(){var e=this;if("function"==typeof window.matchMedia){window.innerWidth;var t=this.breakpoints.map(function(e){return e.at}),r=this.breakpoints.map(function(e){return e.at});this.createRanges(r),this.addRanges(this.breakpoints,t).forEach(function(t){var r="(min-width: ".concat(t.range.from,"px) and (max-width: ").concat(t.range.to,"px)");window.matchMedia(r).matches&&e.currentView!==t.view.render()&&(e.internalDiv.innerHTML="",e.internalDiv.appendChild(t.view.render()),e.currentView=t.view.render())})}else{var n=this.breakpoints.reduce(function(e,t){return parseFloat(t.at)>parseFloat(e.at)?t:e},this.breakpoints[0]);n&&this.currentView!==n.view.render()&&(this.internalDiv.innerHTML="",this.internalDiv.appendChild(n.view.render()),this.currentView=n.view.render())}}},{key:"destroy",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.internalDiv&&this.container&&this.container.removeChild(this.internalDiv),this.container=null,this.currentView=null,this.internalDiv=null}}],o&&s(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(r(9873).yU)},1353:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(8424);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}var s=function(){return e=function e(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.margin="20px auto",this.container.style.textAlign="center",this.elements=t,this.currentSlideIndex=0,this.buttons=r,this.tintColor=o.tintColor||"green",this.inactiveColor=o.inactiveColor||"gray",this.options=o,!this.buttons){var i={leftButton:new n.$("L").set({frame:{width:50,height:50},svg:this.createArrowSVG("left",28,this.tintColor),color:this.tintColor,radius:"100%",mar:[{a:"1rem"}]}),rightButton:new n.$("R").set({frame:{width:50,height:50},svg:this.createArrowSVG("right",28,this.tintColor),color:this.tintColor,radius:"100%",mar:[{a:"1rem"}]})};this.buttons=i}this.createSlider(),this.init()},t=[{key:"createArrowSVG",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"left",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:28,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"currentColor",n="http://www.w3.org/2000/svg",o=document.createElementNS(n,"svg");o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("width",String(t)),o.setAttribute("height",String(t)),o.setAttribute("aria-hidden","true"),o.style.display="block",o.style.pointerEvents="none";var i=document.createElementNS(n,"path");return i.setAttribute("fill",r),"left"===e?i.setAttribute("d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"):i.setAttribute("d","M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"),o.appendChild(i),o}},{key:"toCode",value:function(){var e="new Slider([".concat(this.elements.map(function(e){return e.toCode()}),"], null)");return[e=e.replace(/,\s*\./g,".")]}},{key:"createSlider",value:function(){var e,t=this;this.slider=document.createElement("div"),this.slider.style.width="100%",this.slider.style.height=null!==(e=this.options.height)&&void 0!==e?e:"400px",this.slider.style.borderRadius="20px",this.slider.style.overflow="hidden",this.slider.style.position="relative",this.slider.style.marginBottom="15px";var r=document.createElement("div");this.slidesWrapper=r,r.style.display="flex",r.style.overflowX="scroll",r.style.scrollBehavior="smooth",r.style.scrollSnapType="x mandatory",this.elements.forEach(function(e,n){var o=document.createElement("div");o.setAttribute("class","slide"),o.style.display="flex",o.style.justifyContent="center",o.style.alignItems="center",o.style.flexShrink="0",o.style.width="100%",o.style.height="400px",o.style.transformOrigin="center center",o.style.transform="scale(1)",o.style.scrollSnapAlign="center";var i=e.render();o.appendChild(i),i.style.cursor="pointer",i.addEventListener("click",function(){t.showLightbox(n)}),r.appendChild(o)}),this.arrowPrev=this.buttons.leftButton.render(),this.arrowPrev.style.position="absolute",this.arrowPrev.style.left="10px",this.arrowPrev.style.top="50%",this.arrowPrev.style.transform="translateY(-50%)",this.arrowPrev.style.zIndex="1",this.arrowPrev.style.display="flex",this.arrowPrev.style.alignItems="center",this.arrowPrev.style.justifyContent="center",this.arrowPrev.style.backgroundColor="white",this.arrowPrev.style.padding=".4rem",this.arrowNext=this.buttons.rightButton.render(),this.arrowNext.style.position="absolute",this.arrowNext.style.right="10px",this.arrowNext.style.top="50%",this.arrowNext.style.transform="translateY(-50%)",this.arrowNext.style.zIndex="1",this.arrowNext.style.display="flex",this.arrowNext.style.alignItems="center",this.arrowNext.style.justifyContent="center",this.arrowNext.style.backgroundColor="white",this.arrowNext.style.padding=".4rem";var n=document.createElement("div");n.style.position="absolute",n.style.bottom="10%",n.style.left="50%",n.style.transform="translateX(-50%)",n.style.textAlign="center",n.style.background="#ffffff",n.style.borderRadius="1rem",n.style.padding=".2rem",n.style.boxShadow="3px 3px 10px #000",this.options.hideSelector&&(n.style.display="none"),this.elements.forEach(function(e,r){var o=document.createElement("a");o.style.display="inline-block",o.style.height="15px",o.style.width="15px",o.style.borderRadius="50%",o.style.backgroundColor=t.inactiveColor,o.style.margin="0 10px",o.style.cursor="pointer",o.dataset.index=r,n.appendChild(o)});var o=document.createElement("div");o.style.display="flex",o.style.justifyContent="flex-start",o.style.margin="1rem",o.style.gap="10px",o.style.flexWrap="nowrap",o.style.overflowX="auto",this.options.hideThumbnails&&(o.style.display="none"),r.querySelectorAll(".slide").forEach(function(e,r){var n=document.createElement("div");n.className="slider-thumb",n.dataset.index=r.toString(),n.style.width="60px",n.style.height="40px",n.style.border="2px solid ".concat(t.inactiveColor),n.style.borderRadius="5px",n.style.overflow="hidden",n.style.cursor="pointer",n.style.flexShrink="0",n.style.position="relative";var i=(e.firstElementChild||e.cloneNode(!0)).cloneNode(!0);i.style.transform="scale(0.2)",i.style.transformOrigin="top left",i.style.width="300px",i.style.height="300px",i.style.backgroundSize="contain",i.style.pointerEvents="none",n.appendChild(i),o.appendChild(n)}),this.slider.appendChild(this.arrowPrev),this.slider.appendChild(this.arrowNext),this.slider.appendChild(r),this.slider.appendChild(n),this.container.appendChild(this.slider),this.container.appendChild(o),this.slidesWrapper=r,this.navLinks=Array.from(n.querySelectorAll("a")),this.thumbs=Array.from(o.querySelectorAll(".slider-thumb"))}},{key:"init",value:function(){this.updateActiveSlide(),this.attachEventListeners()}},{key:"attachEventListeners",value:function(){var e=this;this.arrowPrev.addEventListener("click",function(){e.moveToSlide(e.currentSlideIndex-1<0?e.elements.length-1:e.currentSlideIndex-1)}),this.arrowNext.addEventListener("click",function(){e.moveToSlide((e.currentSlideIndex+1)%e.elements.length)}),this.navLinks.forEach(function(t){t.addEventListener("click",function(r){r.preventDefault();var n=parseInt(t.dataset.index,10);e.moveToSlide(n)})}),this.thumbs.forEach(function(t){t.addEventListener("click",function(){var r=parseInt(t.dataset.index,10);e.moveToSlide(r)})}),document.addEventListener("keydown",function(t){"ArrowLeft"===t.key?e.moveToSlide(e.currentSlideIndex-1<0?e.elements.length-1:e.currentSlideIndex-1):"ArrowRight"===t.key&&e.moveToSlide((e.currentSlideIndex+1)%e.elements.length)})}},{key:"moveToSlide",value:function(e){this.currentSlideIndex=e,this.updateActiveSlide()}},{key:"updateActiveSlide",value:function(){var e=this;this.navLinks.forEach(function(t){var r=parseInt(t.dataset.index,10);t.style.backgroundColor=r===e.currentSlideIndex?e.tintColor:e.inactiveColor}),this.thumbs.forEach(function(t){var r=parseInt(t.dataset.index,10);t.style.borderColor=r===e.currentSlideIndex?e.tintColor:e.inactiveColor});var t=this.slidesWrapper.querySelector(".slide"),r=t?t.offsetWidth:this.slidesWrapper.clientWidth;this.slidesWrapper.scrollTo({left:this.currentSlideIndex*r,behavior:"smooth"})}},{key:"showLightbox",value:function(e){var t=this,r=e,n=document.createElement("div");n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.backgroundColor="rgba(0,0,0,0.9)",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.zIndex="9999",n.style.cursor="default";var o=document.createElement("div");o.style.position="relative",o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.maxWidth="90%",o.style.maxHeight="90%",n.appendChild(o);var i=function(e){o.innerHTML="";var r,n=t.elements[e].render();if(r="IMG"===n.tagName?n:n.querySelector("img")){var i=document.createElement("img");i.src=r.src,i.style.maxWidth="90vw",i.style.maxHeight="90vh",i.style.objectFit="contain",i.style.pointerEvents="none",i.style.display="block",o.appendChild(i)}else{var a=n.cloneNode(!0);a.style.width="90vw",a.style.height="90vh",a.style.maxWidth="90vw",a.style.maxHeight="90vh",a.style.pointerEvents="none",o.appendChild(a)}};i(r);var a=this.buttons.leftButton.render().cloneNode(!0),s=this.buttons.rightButton.render().cloneNode(!0),l={position:"absolute",top:"50%",transform:"translateY(-50%)",background:"white",border:"none",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",width:"50px",height:"50px",margin:"1rem",padding:"0",zIndex:"10000",cursor:"pointer",boxShadow:"0 2px 8px rgba(0,0,0,0.4)"};Object.assign(a.style,l,{left:"10px"}),Object.assign(s.style,l,{right:"10px"}),a.addEventListener("click",function(e){e.stopPropagation(),r=r-1<0?t.elements.length-1:r-1,i(r)}),s.addEventListener("click",function(e){e.stopPropagation(),r=(r+1)%t.elements.length,i(r)}),n.appendChild(a),n.appendChild(s);var c=document.createElement("div");c.innerHTML="✕",c.style.position="absolute",c.style.top="15px",c.style.right="20px",c.style.fontSize="2rem",c.style.color="white",c.style.cursor="pointer",c.style.zIndex="10000",c.style.userSelect="none",c.style.transition="transform 0.2s ease",c.addEventListener("mouseenter",function(){c.style.transform="scale(1.2)"}),c.addEventListener("mouseleave",function(){c.style.transform="scale(1)"}),c.addEventListener("click",function(e){e.stopPropagation(),document.body.removeChild(n),document.removeEventListener("keydown",u)}),n.appendChild(c),n.addEventListener("click",function(){document.body.removeChild(n),document.removeEventListener("keydown",u)});var u=function(e){"Escape"===e.key?(document.body.removeChild(n),document.removeEventListener("keydown",u)):"ArrowLeft"===e.key?(r=r-1<0?t.elements.length-1:r-1,i(r)):"ArrowRight"===e.key&&(r=(r+1)%t.elements.length,i(r))};document.addEventListener("keydown",u),document.body.appendChild(n)}},{key:"render",value:function(e){if(!e)return this.container;document.querySelector(e).appendChild(this.container)}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},1371:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{z:()=>a}),r(9873);var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=null,this.radioCount=0},t=[{key:"set",value:function(e){this.options=e,this.radioCount=e.items.length;for(var t=document.createElement("div"),r=e.items,n=0;n<r.length;n++){var o=document.createElement("label");r.font&&(o.style.font=r.font),r.color&&(o.style.color=r.color),r.exact&&(o.style.fontSize=r.exact);var i=document.createTextNode(r[n]);o.appendChild(i),o.setAttribute("for",r[n]);var a=document.createElement("input");a.setAttribute("type","radio"),a.setAttribute("id","S".concat(n)),a.setAttribute("value",r[n].split(" ").join("")),a.style.appearance="none",a.style.width="20px",a.style.height="20px",a.style.border=this.options.tint?"2px solid ".concat(this.options.tint):"2px solid #007BFF",a.style.borderRadius="50%",a.style.outline="none",a.style.cursor="pointer",a.style.transition="0.3s",this.options.font&&(o.style.fontFamily=this.options.font),e.multiple?a.setAttribute("name",r[n].split(" ").join("")):a.setAttribute("name",e.name),t.appendChild(a),t.appendChild(o),t.innerHTML+="</br>"}return this.el=t,e&&null!=e.id&&""!==e.id&&this.el.setAttribute("id",String(e.id)),this.responsive(),this}},{key:"padding",value:function(e){return this.el.style.padding=e,this}},{key:"getCheckedValues",value:function(){for(var e=[],t=0;t<this.radioCount;t++)if(document.querySelector("#S".concat(t)).checked){var r=document.querySelector("#S".concat(t));e.push(r.value)}return e}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new RadioGroup().set(".concat(e,")")]}},{key:"responsive",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.el.style.fontSize="1.7em"),this}},{key:"render",value:function(e){var t=this;if(!e){for(var r=function(){var e=t.el.children[n];"[object HTMLInputElement]"===e.toString()&&e.addEventListener("change",function(){if(e.checked){e.style.backgroundColor=t.options.tint?t.options.tint:"#007BFF",e.style.boxShadow=t.options.tint?"0 0 0 2px ".concat(t.options.tint," inset"):"0 0 0 2px #0056b3 inset";for(var r=0;r<t.el.children.length;r++){var n=t.el.children[r];"INPUT"===n.tagName&&"radio"===n.type&&!1===t.options.multiple&&n!==e&&(n.style.backgroundColor="transparent",n.style.boxShadow="none")}}else e.style.backgroundColor="transparent",e.style.boxShadow="none"})},n=0;n<this.el.children.length;n++)r();return this.el}document.querySelector(e).appendChild(this.el)}}],t&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();"undefined"!=typeof window&&(window.RadioGroup=a)},1382:(e,t,r)=>{r.d(t,{_H:()=>o,sy:()=>i});var n='"([A-Za-z_$][A-Za-z0-9_$]*)"\\s*:';function o(){return new RegExp(n,"g")}function i(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return"string"!=typeof(t=JSON.stringify(e,null,r))?t:t.replace(o(),"$1:")}},1557:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}r.d(t,{S:()=>u});var u=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t)).res=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,(a=[{key:"set",value:function(e){var t,r;this.options=e;var n=document.createElement("div");n.style.display="flex",n.style.alignItems="center";var o=document.createElement("input");o.type="checkbox",o.style.position="relative",o.style.marginRight="0.5rem";var i=e.size||"24px";o.style.width=i,o.style.height=i,e.customStyle&&(o.style.appearance="none"),o.style.border="2px solid #ccc",o.style.borderRadius="4px",o.style.backgroundColor=e.backgroundColor||"white",o.style.cursor="pointer",o.style.transition="background-color 0.2s ease, border-color 0.2s ease",o.style.display="inline-block",o.style.setProperty("--checked-bg-color",e.checkedBackgroundColor||"#4CAF50"),o.style.setProperty("--checkmark-color","white"),o.style.setProperty("--checkmark-clip-path",null!==(t=this.options.clipPath)&&void 0!==t?t:"polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%)");var a=document.createElement("style");a.textContent='\n input[type="checkbox"] {\n appearance: none;\n -webkit-appearance: none; /* For Safari */\n width: var(--size, 24px);\n height: var(--size, 24px);\n border: 2px solid #ccc;\n border-radius: 4px;\n background-color: white;\n position: relative;\n cursor: pointer;\n transition: background-color 0.2s ease, border-color 0.2s ease;\n }\n\n input[type="checkbox"]:checked {\n background-color: var(--checked-bg-color, #4CAF50);\n border-color: var(--checked-bg-color, #4CAF50);\n }\n\n input[type="checkbox"]::after {\n content: \'\';\n position: absolute;\n width: 50%;\n height: 50%;\n top: 25%;\n left: 25%;\n transform: scale(0);\n background-color: var(--checkmark-color, white);\n clip-path: var(--checkmark-clip-path);\n -webkit-clip-path: var(--checkmark-clip-path);\n transition: transform 0.2s ease;\n }\n\n input[type="checkbox"]:checked::after {\n transform: scale(1);\n }\n',e.customStyle&&document.head.appendChild(a),e.mar&&this.mar(e.mar),e.pad&&this.pad(e.pad),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),o.addEventListener("change",function(){o.checked?(o.style.backgroundColor=e.checkedBackgroundColor||"#4CAF50",o.style.borderColor=e.checkedBackgroundColor||"#4CAF50"):(o.style.backgroundColor=e.backgroundColor||"white",o.style.borderColor="#ccc")}),e.name&&o.setAttribute("name",e.name),n.appendChild(o);var s=document.createElement("div");if("function"==typeof(null===(r=e.label)||void 0===r?void 0:r.render))s.appendChild(e.label.render());else{var l=document.createTextNode(e.title||"Label");s.appendChild(l)}return s.style.opacity=.8,s.style.transition="opacity ease 0.2s, transform ease 0.2s",n.appendChild(s),this.res=n,this}},{key:"getValue",value:function(){return this.res.children[0].checked}},{key:"toCode",value:function(){var e=Object.entries(this.options).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];return"string"==typeof i?"".concat(r,': "').concat(i,'"'):"object"===n(i)&&null!==i?"function"==typeof i.toCode?"".concat(r,": ").concat(i.toCode()[0]):"".concat(r,": ").concat(JSON.stringify(i,null,4)):"".concat(r,": ").concat(i)}).join(",\n ");return["new Checkbox().set({\n ".concat(e,"\n})")]}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(r(9873).yU);"undefined"!=typeof window&&(window.Checkbox=u)},1632:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{B:()=>c});var c=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,r.code=[],r.setup();for(var o=0;o<e.length;o++)r.res.appendChild(e[o].render().render());return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"setup",value:function(){var e=document.createElement("div");e.style.padding=0,e.style.margin=0,this.res=e}},{key:"width",value:function(e,t){return this.res.style.width=e,t&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),this}},{key:"padding",value:function(e){return this.res.style.padding="".concat(e,"px"),this}},{key:"size",value:function(e,t){return this.w=e,this.h=t,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},1873:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{o:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).setup(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"setup",value:function(){var e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="center",e.style.alignItems="center",e.style.width="100%",e.style.height="auto",e.style.margin=0,e.style.padding=0,this.res=e}},{key:"set",value:function(e){return void 0!==e.id&&null!==e.id&&this.res.setAttribute("id",e.id),this.commonMethods(e),this}},{key:"toCode",value:function(){return[""]}},{key:"items",value:function(e){for(var t=0;t<e.length;t++){var r=e[t].render();this.res.appendChild(r)}return this}},{key:"add",value:function(e){for(var t=0;t<e.length;t++){var r=e[t].render();this.res.appendChild(r)}return this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},1980:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{W:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,e.res=document.createElement("meta"),e.res.setAttribute("name","viewport"),e.res.setAttribute("content","width=device-width, initial-scale=1"),e.charset=document.createElement("meta"),e.charset.setAttribute("charset","UTF-8"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"add",value:function(){document.head.appendChild(this.res),document.head.appendChild(this.charset)}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},2027:(e,t,r)=>{r.d(t,{a:()=>s});var n=r(7108);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"style",value:function(e){for(var t=e.bst,r=e.el,o=e.re,i=(e.options,[]),a=0;a<t.length;a++)t[a].target&&(r.id,t[a].target[0]);for(a=0;a<t.length;a++){var s=!0;t[a].target&&(s=!1,r.id===t[a].target[0]&&(s=!0));var l=t[a].op.ops.split("-");s&&l.includes("air")&&(o.borderObj={color:"#1abc9c",radius:"0rem",width:"3px"},o.color="#1abc9c",o.background="transparent"),s&&l.includes("round")&&(l.includes("air")?o.borderObj={width:"4px",radius:"0.7rem",color:"#1abc9c"}:o.borderObj={width:"0px",radius:"0.7rem",color:"#1abc9c"}),s&&l.includes("full")&&(o.background="#3498db",o.borderObj&&o.borderObj.radius&&(o.borderObj.radius="0.3rem"),o.color="white"),s&&l.includes("pill")&&(o.background="#3498db",o.borderObj.radius="9999px",o.color="white"),s&&l.includes("hover")&&(o.hover={color:"#1abc9c",background:"orange"}),i.push((new n.N).set(o))}return i}}],null&&i(e.prototype,null),t&&i(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},2234:(__unused_webpack_module,__nodality_wp_exports__,__nodality_wp_require__)=>{__nodality_wp_require__.d(__nodality_wp_exports__,{H:()=>Des});var _lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__=__nodality_wp_require__(849),_lib_morph_node_js__WEBPACK_IMPORTED_MODULE_1__=__nodality_wp_require__(7994),_lib_webmcp_adapter_js__WEBPACK_IMPORTED_MODULE_2__=__nodality_wp_require__(9110),_lib_parse_html_js__WEBPACK_IMPORTED_MODULE_3__=__nodality_wp_require__(234),_lib_resolve_refs_js__WEBPACK_IMPORTED_MODULE_4__=__nodality_wp_require__(9622),_lib_normalize_spec_js__WEBPACK_IMPORTED_MODULE_5__=__nodality_wp_require__(2998),_lib_responsive_js__WEBPACK_IMPORTED_MODULE_6__=__nodality_wp_require__(2417),_layout_animator_js__WEBPACK_IMPORTED_MODULE_7__=__nodality_wp_require__(9873),_layout_base_js__WEBPACK_IMPORTED_MODULE_8__=__nodality_wp_require__(9793),_layout_text_js__WEBPACK_IMPORTED_MODULE_9__=__nodality_wp_require__(6131),_layout_image_js__WEBPACK_IMPORTED_MODULE_10__=__nodality_wp_require__(9383),_layout_link_js__WEBPACK_IMPORTED_MODULE_11__=__nodality_wp_require__(7108),_layout_flex_row_js__WEBPACK_IMPORTED_MODULE_12__=__nodality_wp_require__(3050),_layout_nav_factor_custom_div_js__WEBPACK_IMPORTED_MODULE_13__=__nodality_wp_require__(8807),_layout_new_nav_bar_js__WEBPACK_IMPORTED_MODULE_14__=__nodality_wp_require__(3440),_layout_side_bar_js__WEBPACK_IMPORTED_MODULE_15__=__nodality_wp_require__(5367),_layout_side_nav_bar_js__WEBPACK_IMPORTED_MODULE_16__=__nodality_wp_require__(7879),_layout_free_js__WEBPACK_IMPORTED_MODULE_17__=__nodality_wp_require__(7258),_layout_audio_js__WEBPACK_IMPORTED_MODULE_18__=__nodality_wp_require__(3420),_layout_progress_js__WEBPACK_IMPORTED_MODULE_19__=__nodality_wp_require__(827),_layout_center_js__WEBPACK_IMPORTED_MODULE_20__=__nodality_wp_require__(1873),_layout_code_js__WEBPACK_IMPORTED_MODULE_21__=__nodality_wp_require__(2789),_layout_stack_js__WEBPACK_IMPORTED_MODULE_22__=__nodality_wp_require__(7926),_layout_container_js__WEBPACK_IMPORTED_MODULE_23__=__nodality_wp_require__(153),_layout_meta_adder_js__WEBPACK_IMPORTED_MODULE_24__=__nodality_wp_require__(1980),_layout_table_js__WEBPACK_IMPORTED_MODULE_25__=__nodality_wp_require__(6182),_layout_dropdown_2025_js__WEBPACK_IMPORTED_MODULE_26__=__nodality_wp_require__(3665),_layout_modal_2025_js__WEBPACK_IMPORTED_MODULE_27__=__nodality_wp_require__(3243),_layout_text_field_js__WEBPACK_IMPORTED_MODULE_28__=__nodality_wp_require__(3014),_layout_flex_card_js__WEBPACK_IMPORTED_MODULE_29__=__nodality_wp_require__(9310),_layout_wrap_js__WEBPACK_IMPORTED_MODULE_30__=__nodality_wp_require__(1632),_layout_flex_grid_js__WEBPACK_IMPORTED_MODULE_31__=__nodality_wp_require__(5860),_layout_zoom_card_js__WEBPACK_IMPORTED_MODULE_32__=__nodality_wp_require__(4550),_layout_simple_bar_js__WEBPACK_IMPORTED_MODULE_33__=__nodality_wp_require__(9290),_layout_beta_desktop_bar_js__WEBPACK_IMPORTED_MODULE_34__=__nodality_wp_require__(2387),_layout_beta_mobile_bar_js__WEBPACK_IMPORTED_MODULE_35__=__nodality_wp_require__(9521),_layout_multiswitcher_js__WEBPACK_IMPORTED_MODULE_36__=__nodality_wp_require__(1236),_layout_spacer_js__WEBPACK_IMPORTED_MODULE_37__=__nodality_wp_require__(3180),_layout_horizontal_scroller_js__WEBPACK_IMPORTED_MODULE_38__=__nodality_wp_require__(7135),_layout_checkbox_js__WEBPACK_IMPORTED_MODULE_39__=__nodality_wp_require__(1557),_layout_video_js__WEBPACK_IMPORTED_MODULE_40__=__nodality_wp_require__(2689),_layout_ulist_js__WEBPACK_IMPORTED_MODULE_41__=__nodality_wp_require__(4617),_layout_slider_2025_js__WEBPACK_IMPORTED_MODULE_42__=__nodality_wp_require__(1353),_layout_form_components_floating_input_js__WEBPACK_IMPORTED_MODULE_43__=__nodality_wp_require__(3257),_layout_form_components_range_js__WEBPACK_IMPORTED_MODULE_44__=__nodality_wp_require__(5613),_layout_form_components_radio_js__WEBPACK_IMPORTED_MODULE_45__=__nodality_wp_require__(1371),_layout_form_components_picker_js__WEBPACK_IMPORTED_MODULE_46__=__nodality_wp_require__(2588),_layout_form_components_image_picker_js__WEBPACK_IMPORTED_MODULE_47__=__nodality_wp_require__(9932),_layout_form_components_data_list_js__WEBPACK_IMPORTED_MODULE_48__=__nodality_wp_require__(6679),_layout_form_components_form_js__WEBPACK_IMPORTED_MODULE_49__=__nodality_wp_require__(9668),_layout_button_js__WEBPACK_IMPORTED_MODULE_50__=__nodality_wp_require__(8424),_lib_link_getter_js__WEBPACK_IMPORTED_MODULE_51__=__nodality_wp_require__(2027),_lib_card_getter_js__WEBPACK_IMPORTED_MODULE_52__=__nodality_wp_require__(4753),_layout_grid_switcher_js__WEBPACK_IMPORTED_MODULE_53__=__nodality_wp_require__(7698),_layout_polygon_js__WEBPACK_IMPORTED_MODULE_54__=__nodality_wp_require__(9800),_layout_circle_js__WEBPACK_IMPORTED_MODULE_55__=__nodality_wp_require__(5632),_layout_grid_overlay_js__WEBPACK_IMPORTED_MODULE_56__=__nodality_wp_require__(1200),_layout_shop_js__WEBPACK_IMPORTED_MODULE_57__=__nodality_wp_require__(5748);function _construct(e,t,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&_setPrototypeOf(o,r.prototype),o}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Des=function(){function Des(){_classCallCheck(this,Des),(0,_layout_animator_js__WEBPACK_IMPORTED_MODULE_7__.JB)(),this.items=[],this.options=[],this.code=[],this.ready2Render=[],this.stor={text:{miami:{code:'new Text("Hello").set({fluidc: "S3", color: "orange"})'},base:{code:'new Text("Hello").set({fluidc: "S3", color: "orange"})'},nepal:{code:'new Text("Hello").set({fluidc: "S3", color: "#2ECC71", font: "Helvetica Neue"})'},patagonia:{code:'new Text("Hello").set({fluidc: "S3", color: "#3498DB", font: "DIN Alternate"})'}},complexa:{code:"new Wrapper()\n .set({...}) // Rest of the code omitted for brevity"},complex:{code:'new Wrapper() \n\t.set({\n\t\t\n\t\tresponsive: {\n\t\t\tranges: ["700px", "1200px", "1400px"],\n\t\t\tsequence: "col-row-col"\n\t\t}\n\t})\n\t.add([\n\t\tnew Image("img/wix.jpeg").set({\n\t\t\twidth: "100%",\n\t\t\theight: "200px",\n objectFit: "cover"\n\t\t}),\n\n new Wrapper().set({\n responsive: {\n\t\t\tranges: ["700px", "1200px", "1400px"],\n\t\t\tsequence: "col-col-row"\n\t\t}\n }).add([\n new Text("Running in the desert").set({\n size: "S3",\n font: "Arial",\n color: "orange"\n }),\n\n new Text("This is example content").set({\n exact: "1rem",\n font: "Arial"\n }),\n\n\n new Image("img/wix.jpeg").set({\n width: "100%",\n height: "300px",\n objectFit: "cover"\n })\n ])\n\t])'},ops:{miami:{blast:{code:'stroke: {range:["0px","3000px"], op:{name:"blast",color:"orange",width:"3px"}}'},blastFun:function(e){return'stroke: {range:["0px","3000px"], op:{name:"blast",color:"orange",width:"'.concat(e,'px"}}')}},nepal:{blast:{code:'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#2ECC71",width:"3px"}}'},blastFun:function(e){return'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#2ECC71",width:"'.concat(e,'px"}}')}},patagonia:{blast:{code:'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#1abc9c",width:"3px"}}'},blastFun:function(e){return'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#1abc9c",width:"'.concat(e,'px"}}')}}},link:{miami:{code:'new Link("Link").set({text: "Hello", url: "#a", background: "", color: "orange", hover: {color: "white", background: "orange", animation: 0.6}, borderObj: {color: "orange", width: "3px", radius: "0.7rem"}, pad: { sides: ["all"], value: "0.6rem" }, mar: { "t": 0.8rem }, radius: "0.4rem"})'},base:{code:'new Link("Link").set({text: "Hello", url: "#ai", background: "#3498db", pad: [{lr: "0.5rem", tb: "1rem"}], radius: "0.4rem", color: "white"})'},nepal:{code:'new Link("Link").set({text: "Hello", url: "#a", background: "#2ECC71", pad: { sides: ["all"], value: "0.6rem" }, mar: { sides: ["top", "bottom"], value: "0.8rem" }, hover: {color: "#2ECC71", background: "white", border: true, animation: 0.3}, color: "white"})'},patagonia:{code:'new Link("Link", "#a").set({text: "Hello", url: "#a", background: "#1ABC9C", pad: { sides: ["all"], value: "0.6rem" }, mar: { sides: ["top", "bottom"], value: "0.8rem" }, hover: {color: "#2ECC71", background: "white", border: true, animation: 0.3}, color: "white"})'}},grid:{code:' new AreaSwitcher()\n .set({\n gap: "1rem"\n })\n .react([{\n at: "0px",\n template: [\n "eeeeee",\n "eeeeee",\n "abbbbb",\n "abbbbb",\n "abbbbb",\n "cccccc",\n "cccccc",\n "dddddd"\n ]\n },\n\n {\n at: "900px",\n color: "orange",\n template: [\n "aaaccc",\n "aaaccc",\n "bbbbbb",\n "dddddd",\n "eeeeee"\n ]\n },\n\n {\n at: "1200px",\n color: "purple",\n template: [\n "cccaaa",\n "cccaaa",\n "bbbbbb",\n "dddddd",\n "eeeeee"\n ]\n },\n ])\n .add([\n new Wrapper().set({\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem"\n }).add([\n new Text("NEW PRODUCT").set({\n exact: "1rem",\n font: "Oswald",\n width: "100%"\n }),\n new Text("Feel").set({\n fluidc: "S2",\n font: "Oswald",\n width: "100%",\n color: "black"\n }),\n new Text("Speed").set({\n exact: "7rem",\n font: "Oswald",\n width: "100%",\n color: "#3498db"\n }),\n ]),\n\n new Wrapper().set({\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem"\n }).add([\n new Text("TOP QUALITY").set({\n exact: "1rem",\n font: "Oswald",\n width: "100%"\n }),\n new Text("Amazing animals").set({\n fluidc: "S2",\n font: "Oswald",\n width: "100%",\n color: "black"\n }),\n\n new Text("Seals are intelligent, agile marine mammals found in oceans around the world, known for their streamlined bodies, flippers, and ability to thrive both in water and on land. Belonging to the pinniped family, they are divided into true seals, which lack external ears, and eared seals like sea lions, which are more mobile on land. Seals feed primarily on fish and squid, using their sensitive whiskers to detect prey underwater, and can dive to great depths while holding their breath for extended periods. Adapted to cold environments with thick blubber for insulation, seals play a crucial role in marine ecosystems but face threats from climate change, pollution, and human activity, making conservation efforts increasingly important.")\n .set({\n font: "Arial",\n exact: "1.3rem"\n })\n\n ]),\n\n new Wrapper().set({\n radius: "1.7rem",\n overflow: "hidden"\n\n }).add([\n\n new Image("https://cdn.pixabay.com/photo/2017/02/09/18/40/seal-2053165_640.jpg", "exact").set({\n width: "100%",\n height: "420px",\n minHeight: "100px",\n objectFit: "cover"\n\n })\n ]),\n\n new Wrapper().set({\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem",\n }).add([\n new Text("Welcome seals").set({\n fluidc: "S3",\n font: "Oswald",\n color: "black"\n }),\n \n ]),\n new Wrapper().set({\n mc: true,\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem",\n\n }).add([new Text("Top line").set({\n font: "Arial",\n exact: "1.3rem"\n }), ]),\n ])'},flexRow:function(e){return{image:{code:'new FlexRow().set({border: ["all", "3px"], colat: "600px"}).items([new Image(...), new Image(...), new Image(...)])'},text:{code:'new FlexRow().set({}).items([\n\nnew Text("This").set({\n size: "S3"\n}), \n\nnew Text("is").set({\n size: "S3",\n text: "Hello"\n}), \n\nnew Text("row.").set({\n size: "S3",\n text: "Hello"\n})\n \n])'}}},tabSpace:function(e){return" ".repeat(e)}}}return _createClass(Des,[{key:"at",value:function(e){Array.isArray(this.options)||(this.options=[]),Array.isArray(this.protoOptions)||(this.protoOptions=[]);var t=Des.cloneNodes([e])[0];return this.options.push(t),this.protoOptions.push(t),this}},{key:"nodes",value:function(e){return this.options=Des.cloneNodes(e),this.protoOptions=Des.cloneNodes(e),this}},{key:"getElType",value:function(e){return"p"===e?"S6":"S".concat(e.substr(1))}},{key:"filtero",value:function(e,t,r){return r.filter(function(t){return t.op.name===e}).filter(function(e){return!e.target||e.target.includes(t)})[0]}},{key:"add",value:function add(arr){var _this=this;arr=(0,_lib_resolve_refs_js__WEBPACK_IMPORTED_MODULE_4__.F0)(Array.isArray(arr)?arr:[],this._defs),arr=(0,_lib_normalize_spec_js__WEBPACK_IMPORTED_MODULE_5__.dh)(arr);var dangling=(0,_lib_resolve_refs_js__WEBPACK_IMPORTED_MODULE_4__.ny)(arr).filter(function(e){return!_this._defs||!Object.prototype.hasOwnProperty.call(_this._defs,e.name)});if(dangling.length){var defined=Object.keys(this._defs||{});throw new Error('[nodality] no definition for $ref "'.concat(dangling[0].name,'" at ')+"".concat(dangling[0].path,". Defined: ").concat(defined.length?defined.join(", "):"(none)"))}if(Array.isArray(this.options)&&this.options.some(function(e){return e&&e.op&&"arrange"===e.op.name})){var lowered=(0,_lib_responsive_js__WEBPACK_IMPORTED_MODULE_6__.E_)(arr,this.options);arr=lowered.elements;var _iterator=_createForOfIteratorHelper(lowered.skipped),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var s=_step.value;"undefined"!=typeof console&&console.warn("[nodality] arrange node ".concat(s.node).concat(s.target?' on "'.concat(s.target,'"'):""," ignored: ").concat(s.reason,"."))}}catch(e){_iterator.e(e)}finally{_iterator.f()}}this.css=[],this.elCSS=[],this.elHTML=[];var customOptions=this.options;customOptions.forEach(function(e){"radial"===e.direction&&(e.gradient="radial-gradient(orange, green)")}),arr=[].concat(_toConsumableArray(arr.filter(function(e){return e&&("nav"===e.type||"sideNav"===e.type)})),_toConsumableArray(arr.filter(function(e){return!e||"nav"!==e.type&&"sideNav"!==e.type}))),this._elements=arr;for(var _loop=function _loop(){var el=arr[i],ela=null,ops=["blast","gradient","shadow","filter","animation","transform","span"],replacementObjects=[{op:{name:"blast",color:"green",width:"1px"}},{op:{name:"gradient",gradient:"linear-gradient(orange, green)"}},{op:{name:"shadow",color:"#1abc9c",steps:3,colors:["orange","green","yellow"]}},{op:{name:"filter",filter:"grayscale(0.7)"}},{op:{name:"animation",color:"green",width:"1px",fireAt:"inview",keyframesOpen:[{transform:"translate(100%, 0%)",opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, 0%)",opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}},{op:{name:"transform",values:["ty:-20px","scale(3)","rotate(3deg)","skew(3deg, 0deg)","perspective(100px)","matrix(1, 0, 0, 1, 50, 50)"]}},{op:{name:"span",parts:[{text:"The first time",style:{italic:!0,arrpad:{sides:["left"],value:"3rem"},stroke:{range:["950px","1000px"],op:{name:"blast",background:["header","button"],color:"yellow",width:"1px"}}}},{text:"We went to the Moon",style:{}}]}}];for(q=0;q<ops.length;q++){var blastIDs=customOptions.map(function(e){return e.op}).map(function(e,t){return e===ops[q]?t:""}).filter(String);if(blastIDs.length>0)for(d=0;d<blastIDs.length;d++){var index=blastIDs[d],target=customOptions[index].target,range=customOptions[index].range,filter=customOptions[index].filter,gradient=customOptions[index].gradient,color=customOptions[index].color,width=customOptions[index].width,as=Des.cloneNodes([replacementObjects[q]])[0];as.target=target,null!=range&&(as.range=range),null!=filter&&(as.op.filter=filter),null!=gradient&&(as.op.gradient=gradient),"blast"===ops[q]&&(null!=color&&(as.op.color=color),null!=width&&(as.op.width=width)),customOptions[index]=as}}for(q=0;q<customOptions.length;q++){var option=customOptions[q].op.name,cool=_this.protoOptions[q].style||"default",duration=_this.protoOptions[q].duration||"default";if("transform"===option){var opts=[],_customOptions$q,_customOptions$q2,_customOptions$q3;opts="SOLARIUM"===cool?["scale(3)"]:"WAVE"===cool?["skew(15deg, 0deg)","tx:50px","rotate(10deg)","scale(1.1)"]:"CUBE-SPIN"===cool?["perspective(700px)","scale(0.9)"]:"TORNADO-SWITCH"===cool?["rotate(720deg)","scale(0.8)","tx:30px","ty:-50px","tz:-80px"]:"LASER-SWEEP"===cool?["tx:100px","opacity:0.2","scale(1.2, 1.0)"]:"TORNADO-TWIST"===cool?["rotate(720deg)","scale(0.8)","tx:30px","ty:-50px","skew(10deg, 0deg)"]:"JELLY-WOBBLE"===cool?["scale(1.2, 0.8)","rotate(5deg)","ty:-10px","skew(5deg, 0deg)"]:"DRUNKEN-SWAY"===cool?["rotate(15deg)","tx:20px","ty:-10px","skew(10deg, 5deg)"]:"FLAME-FLICKER"===cool?["scale(1.1, 0.9)","rotate(-5deg)","ty:5px","opacity:0.7"]:"PHANTOM-SHIFT"===cool?["tx:15px","ty:-5px","opacity:0.5","skew(5deg, 5deg)"]:"RUBBER-BOUNCE"===cool?["scale(1.3, 0.8)","skew(10deg, 0deg)","ty:-20px"]:"ASTEROID-CRASH"===cool?["tx:-80px","ty:100px","rotate(45deg)","scale(0.7)","opacity:0.5"]:"CYBER-GLITCH"===cool?["tx:5px","ty:-5px","rotate(3deg)","opacity:0.6","scale(1.05)"]:"BUBBLE-POP"===cool?["scale(1.5)","opacity:0.3","ty:-20px"]:"SUPERNOVA-BURST"===cool?["scale(2)","opacity:0","tx:50px","ty:-50px"]:"GRAVITY-DROP"===cool?["ty:100px","scale(0.8)","rotate(10deg)","skew(0deg, 10deg)"]:"LASER-SWEEP"===cool?["tx:100px","opacity:0.2","scale(1.2, 1.0)"]:"VORTEX-SINK"===cool?["rotate(-360deg)","scale(0.5)","ty:50px"]:"SHOCKWAVE"===cool?["scale(1.7)","opacity:0.4","skew(5deg, 5deg)"]:["ty:20px","tx:30px","rotate(3deg)","skew(40deg, 0deg)"],customOptions[q].op={name:"transform",values:opts,duration};var key="style",dur="duration";if(null!==(_customOptions$q=customOptions[q])&&void 0!==_customOptions$q&&_customOptions$q.op&&key in customOptions[q].op&&delete customOptions[q].op[key],null!==(_customOptions$q2=customOptions[q])&&void 0!==_customOptions$q2&&_customOptions$q2.op&&dur in customOptions[q].op&&delete customOptions[q].op[dur],null!==(_customOptions$q3=customOptions[q])&&void 0!==_customOptions$q3&&_customOptions$q3.op.values){var _customOptions$q4,values="values";null!==(_customOptions$q4=customOptions[q])&&void 0!==_customOptions$q4&&_customOptions$q4.op.values}}}function replaceMedium(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];if("object"===_typeof(e[n])&&null!==e[n])replaceMedium(e[n]);else if("string"==typeof e[n])switch(e[n].toLowerCase()){case"medium":e[n]="6s-ease-in-out";break;case"fast":e[n]="3s-ease-in-out";break;case"slow":e[n]="9s-ease-in-out";break;case"default":delete e[n]}}}replaceMedium(customOptions);var matchEls=["h1","h2","h3","h4","h5","h6","p"].includes(el.type)||"img"===el.type||"a"===el.type;matchEls?(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i}),ela.toCode?_this.code.push(ela.toCode().join("")):_this.code.push(ela),_this.ready2Render.push(ela),ela=ela.render()):"table"===el.type?(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i,storage:_this.stor}),_this.code.push(ela.toCode())):"slider"===el.type?_this.code.push(' \nlet texts = [\n\nnew Text("One").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n /*new Image().set({\n url: "https://image.datart.cz/foto/500/7/0/8/product_7766807.jpg",\n width: "400px",\n height: "auto"\n }),*/\n\n new Text("Two").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n \n new Text("Three").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n\n new Text("Four").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n];\n\nnew Slider(texts, null, { tintColor: "#e74c3c", inactiveColor: "#ccc" })\n \n'):"hslider"===el.type?_this.code.push('\n new HScroller()\n .seto({\n height: "300px",\n speed: 1.0 // the bigger the slower\n })\n .add([\n new Text("First").set({size: "S1", pad: [{"a": 40}] }),\n new Text("Second").set({size: "S1", pad: [{"a": 40}] }),\n new Text("Third").set({size: "S1", pad: [{"a": 40}] })\n ])\n '):"grid"===el.type?_this.code.push(_this.stor.grid.code):"modal"===el.type?_this.code.push('new Code()\n .set({\n pad: [\n { l: 30 },\n ], \n mar: [\n { a: 30 },\n ], \n class: "language-js",\n code: `\n // You need to copy and paste this example\n\n\n import {Animator} from "../layout/animator.js";\n import {Text} from "../layout/text.js";\n import {Modal} from "../layout/modal-2025.js";\n import {Stack} from "../layout/stack.js";\n import {Image} from "../layout/image.js";\n import {FlexRow} from "../layout/flex-row.js";\n import {Button} from "../layout/button.js";\n import {Spacer} from "../layout/spacer.js";\n import {Wrapper} from "../layout/container.js";\n \n \n let firstLong = "Apple today announced that the company has surpassed a 60 percent reduction in its global greenhouse gas emissions compared to 2015 levels, as part of its Apple 2030 goal to become carbon neutral across its entire footprint in the next five years. The company achieved several other major environmental milestones, including the use of 99 percent recycled rare earth elements in all magnets and 99 percent recycled cobalt in all Apple-designed batteries.1 Apple shared this and other progress in its annual Environmental Progress Report, published today.\n “We’re incredibly proud of the progress we’re making toward Apple 2030, which touches every part of our business,” said Lisa Jackson, Apple’s vice president of Environment, Policy, and Social Initiatives. “Today, we’re using more clean energy and recycled materials to make our products than ever before, we’re preserving water and preventing waste around the world, and we’re investing big in nature. As we get closer to 2030, the work gets even harder — and we’re meeting the challenge with innovation, collaboration, and urgency.\n Apple’s 2030 strategy prioritizes cutting greenhouse gas emissions by 75 percent compared with its 2015 baseline year, before applying high-quality carbon credits to balance the remaining emissions. Last year, Apple’s comprehensive efforts to reduce its carbon footprint — including the continued transition of its supply chain to renewable electricity and designing products with more recycled materials — avoided an estimated 41 million metric tons of greenhouse gas emissions.";\n \n let elements = [\n new Stack()\n .setup({})\n .add([\n new Image("https://pbs.twimg.com/media/DwYvbCBVAAEKY_R.jpg").set({}),\n \n new FlexRow().set({aligns: "start"}).items([\n \n new Button("×")\n \n .set({\n fluidc: "S3",\n onTap: () => modal.close(),\n frame: { width: 80, height: 80 },\n color: "white",\n background: "none"\n }),\n \n new Spacer(true),\n ])\n ]),\n \n \n new Text("Samuel Suresh")\n .set({\n color: "#00ae56",\n font: "SF Pro Display",\n fluidc: "S2",\n pad: [{"tl": 20}]\n }),\n \n \n new Text("Studying Science and Business, Western Sydney University, class of 2022")\n .set({\n font: "Arial",\n fluidc: "S6",\n pad: [{"l": 20}]\n }),\n \n \n new Text(firstLong)\n .set({\n font: "Arial",\n fluidc: "S6",\n pad: [{"l": 20}]\n }), \n ];\n \n \n let wrapper = new Wrapper()\n .set({})\n .add(elements);\n \n \n let modal = new Modal();\n modal\n .set({\n width: "600px", \n background: "#469d73cc",\n close: true\n })\n .add([wrapper])\n .render("#res"); \n \n \n new Button("Wow")\n .set({\n fluidc: "S3",\n onTap: () => modal.show()\n })\n .render("#res");\n \n `\n })'):"row"===el.type?(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i,storage:_this.stor}),_this.code.push(ela.toCode())):"cards"===el.type?(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i,storage:_this.stor}),_this.code.push(ela)):"wrap"===el.type?(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i,storage:_this.stor}),_this.code.push(ela.toCode()),_this.ready2Render.push(ela)):"responsive"===el.type?_this.code.push(_this.stor.complex.code):"free"===el.type||"nav"===el.type||"sideNav"===el.type||"dropdown"===el.type?(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i,storage:_this.stor}),_this.code.push(ela.toCode()),_this.ready2Render.push(ela),ela=ela.render()):(ela=_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I.mapType({el,customOptions,i,storage:_this.stor}),ela.toCode?_this.code.push(ela.toCode()):_this.code.push(ela),_this.ready2Render.push(ela),ela=eval(ela).render())},q,d,q,i=0;i<arr.length;i++)_loop();return this}},{key:"toTextArea",value:function(e){var t=e||"#mount",r=document.createElement("textarea");r.style.width=300,r.style.height=300,r.setAttribute("id","elements"),r.value=this.code.join(";\n\n"),this.target="#elements";var n=document.createElement("pre"),o=document.createElement("code"),i=this.code.map(function(e){return"".concat(e,'.render("').concat(t,'"); \n \n')});return this.code=i,o.textContent=this.code,n.appendChild(o),n.setAttribute("class","nonLayout"),document.body.appendChild(n),document.body.appendChild(r),this._codeEl=r,this._preEl=n,this}},{key:"defs",value:function(e){if(void 0!==this._elements)throw new Error("[nodality] .defs() must come before .add(): add() renders as it goes, so definitions given afterwards cannot be used. Chain it as new Des().defs({ ... }).nodes(N).add(E)");return this._defs=e&&"object"===_typeof(e)&&!Array.isArray(e)?e:{},this}},{key:"set",value:function(e){if("undefined"!=typeof globalThis&&!0===globalThis.NODALITY_EMIT){var t=this.code.map(function(t){return"".concat(t,'.render("').concat(e&&e.mount||"#mount",'")')});return globalThis.__NODALITY_EMITTED__=t,this}this.toTextArea(e&&e.mount),this._codeEl.style.display="none",this._preEl.style.display="block",!1===e.elements&&(this._preEl.style.display="none"),!1===e.layout&&null!=document.querySelector("#layoutPre")&&(document.querySelector("#layoutPre").style.display="none"),!1===e.code&&(this._preEl.style.display="none");for(var r={Text:_layout_text_js__WEBPACK_IMPORTED_MODULE_9__.E,Image:_layout_image_js__WEBPACK_IMPORTED_MODULE_10__._,Link:_layout_link_js__WEBPACK_IMPORTED_MODULE_11__.N,FlexRow:_layout_flex_row_js__WEBPACK_IMPORTED_MODULE_12__.Y,UINavBar:_layout_new_nav_bar_js__WEBPACK_IMPORTED_MODULE_14__.X,Free:_layout_free_js__WEBPACK_IMPORTED_MODULE_17__.b,Audio:_layout_audio_js__WEBPACK_IMPORTED_MODULE_18__.f,Progress:_layout_progress_js__WEBPACK_IMPORTED_MODULE_19__.k,Center:_layout_center_js__WEBPACK_IMPORTED_MODULE_20__.o,Code:_layout_code_js__WEBPACK_IMPORTED_MODULE_21__.C,Stack:_layout_stack_js__WEBPACK_IMPORTED_MODULE_22__.B,Wrapper:_layout_container_js__WEBPACK_IMPORTED_MODULE_23__.m,MetaAdder:_layout_meta_adder_js__WEBPACK_IMPORTED_MODULE_24__.W,Table:_layout_table_js__WEBPACK_IMPORTED_MODULE_25__.X,Dropdown:_layout_dropdown_2025_js__WEBPACK_IMPORTED_MODULE_26__.m,Modal:_layout_modal_2025_js__WEBPACK_IMPORTED_MODULE_27__.a,TextField:_layout_text_field_js__WEBPACK_IMPORTED_MODULE_28__.A,Card:_layout_flex_card_js__WEBPACK_IMPORTED_MODULE_29__.Z,Wrap:_layout_wrap_js__WEBPACK_IMPORTED_MODULE_30__.B,FlexGrid:_layout_flex_grid_js__WEBPACK_IMPORTED_MODULE_31__.M,ZoomCard:_layout_zoom_card_js__WEBPACK_IMPORTED_MODULE_32__.U,Switcher:_layout_multiswitcher_js__WEBPACK_IMPORTED_MODULE_36__.i,MobileBar:_layout_beta_mobile_bar_js__WEBPACK_IMPORTED_MODULE_35__.m,DesktopBar:_layout_beta_desktop_bar_js__WEBPACK_IMPORTED_MODULE_34__.C,SideNav:_layout_side_nav_bar_js__WEBPACK_IMPORTED_MODULE_16__.f,Spacer:_layout_spacer_js__WEBPACK_IMPORTED_MODULE_37__.h,HScroller:_layout_horizontal_scroller_js__WEBPACK_IMPORTED_MODULE_38__.J,Polygon:_layout_polygon_js__WEBPACK_IMPORTED_MODULE_54__.t,Circle:_layout_circle_js__WEBPACK_IMPORTED_MODULE_55__.j,UList:_layout_ulist_js__WEBPACK_IMPORTED_MODULE_41__.e,GridOverlay:_layout_grid_overlay_js__WEBPACK_IMPORTED_MODULE_56__.$,Shop:_layout_shop_js__WEBPACK_IMPORTED_MODULE_57__.D},n={FloatingInput:_layout_form_components_floating_input_js__WEBPACK_IMPORTED_MODULE_43__.l,Range:_layout_form_components_range_js__WEBPACK_IMPORTED_MODULE_44__.Q,RadioGroup:_layout_form_components_radio_js__WEBPACK_IMPORTED_MODULE_45__.z,Picker:_layout_form_components_picker_js__WEBPACK_IMPORTED_MODULE_46__.L,FilePickera:_layout_form_components_image_picker_js__WEBPACK_IMPORTED_MODULE_47__.I,DataList:_layout_form_components_data_list_js__WEBPACK_IMPORTED_MODULE_48__.T,Base:_layout_base_js__WEBPACK_IMPORTED_MODULE_8__.C,Form:_layout_form_components_form_js__WEBPACK_IMPORTED_MODULE_49__.l,Button:_layout_button_js__WEBPACK_IMPORTED_MODULE_50__.$,Slider:_layout_slider_2025_js__WEBPACK_IMPORTED_MODULE_42__.A,Video:_layout_video_js__WEBPACK_IMPORTED_MODULE_40__.C,Checkbox:_layout_checkbox_js__WEBPACK_IMPORTED_MODULE_39__.S},o={ElementMapper:_lib_element_mapper_js__WEBPACK_IMPORTED_MODULE_0__.I,Animator:_layout_animator_js__WEBPACK_IMPORTED_MODULE_7__.yU,LinkStyler:_lib_link_getter_js__WEBPACK_IMPORTED_MODULE_51__.a,CardGen:_lib_card_getter_js__WEBPACK_IMPORTED_MODULE_52__.Z,AreaSwitcher:_layout_grid_switcher_js__WEBPACK_IMPORTED_MODULE_53__.t},i=_objectSpread(_objectSpread(_objectSpread({},r),n),o),a=0;a<this.code.length;a++){var s=this.code[a];_construct(Function,_toConsumableArray(Object.keys(i)).concat([s])).apply(void 0,_toConsumableArray(Object.values(i)))}try{var l=document.querySelector(e&&e.mount||"#mount");this._morphs=(0,_lib_morph_node_js__WEBPACK_IMPORTED_MODULE_1__.AR)(l,this._elements,this.protoOptions)}catch(e){console.warn("[nodality] morph node skipped:",e)}try{this._agentSurface=(0,_lib_webmcp_adapter_js__WEBPACK_IMPORTED_MODULE_2__.Ko)({mount:document.querySelector(e&&e.mount||"#mount"),elements:this._elements,nodes:this.protoOptions,morphs:this._morphs})}catch(e){console.warn("[nodality] agent surface skipped:",e)}try{e&&e.annotate&&(0,_lib_parse_html_js__WEBPACK_IMPORTED_MODULE_3__.SQ)(document.querySelector(e&&e.mount||"#mount"),this._elements)}catch(e){console.warn("[nodality] round-trip annotation skipped:",e)}}}],[{key:"cloneNodes",value:function(e){if(!Array.isArray(e))return[];try{if("function"==typeof structuredClone)return structuredClone(e)}catch(e){}var t=function(e){if(Array.isArray(e))return e.map(t);if(e&&"object"===_typeof(e)){var r={};for(var n in e)r[n]=t(e[n]);return r}return e};return e.map(t)}}])}()},2387:(e,t,r)=>{r.d(t,{C:()=>d});var n=r(9873);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var i=["background","color","radius","maxHeight"];function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var d=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=c(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}(this,t)).navbar=document.createElement("nav"),e.navbar.classList.add("desktop-navbar"),e.navbarHeader=document.createElement("div"),e.navbarHeader.classList.add("navbar-header"),e.brand=document.createElement("div"),e.brand.classList.add("navbar-brand"),e.navContent=document.createElement("div"),e.navContent.classList.add("navbar-content"),e.navContent.style.width="100%",e.navContent.style.alignItems="center",e.navbarHeader.appendChild(e.brand),e.navbarHeader.appendChild(e.navContent),e.navbar.appendChild(e.navbarHeader),e.res=e.navbar,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,s=[{key:"set",value:function(e){this.obj=e,this.setStyles(e),e.background&&(this.res.style.backgroundColor=e.background),e.brand&&this.setBrand(e.brand),e.radius&&(this.res.style.borderRadius=e.radius),e.pad&&this.pad(e.pad),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.mar&&this.mar(e.mar),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.hamburgerColour&&(this.hamburgerColour=e.hamburgerColour),e.color&&(this.res.style.color=e.color),e.background,e.color,e.radius,e.maxHeight;var t=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i);return this.applyStyleOptions(t),e.keySet&&this.keySet(e.keySet),this}},{key:"setStyles",value:function(){var e;this.navbar.style.display="flex",this.navbar.style.flexDirection="column",this.navbar.style.padding="1rem",this.navbar.style.backgroundColor=null!==(e=this.obj.background)&&void 0!==e?e:"#333",this.navbarHeader.style.display="flex",this.navbarHeader.style.alignItems="center",this.navbarHeader.style.justifyContent="space-between",this.navbarHeader.style.width="100%",this.brand.style.fontSize="1.5rem",this.navContent.style.display="flex",this.navContent.style.gap="1rem"}},{key:"setBrand",value:function(e){return this.brand.innerHTML="",this.brand.appendChild(e),this}},{key:"add",value:function(e){this.items=e;for(var t=0;t<e.length;t++){e[t];var r=e[t].render();this.navContent.appendChild(0===t&&this.obj&&this.obj.brandLink?(0,n.bl)(r,this.obj.brandLink):r)}return this}},{key:"toCode",value:function(){var e=this.items.map(function(e){return e.toCode()}).flatMap(function(e){return e});return"new DesktopBar().set(".concat(this.removeQuotesFromFirstWord(JSON.stringify(this.obj)),").add([\n ").concat(e.join(","),"\n\n \n \n\n ])")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.navbar),this.navbar}}],s&&a(r.prototype,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s}(n.yU)},2417:(e,t,r)=>{function n(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}r.d(t,{E_:()=>y});var u="arrange",d=99999,f=function(e){return"string"==typeof e&&"#"===e.charAt(0)?e.slice(1):null==e?e:String(e)};var p=function(e){return"number"==typeof e?Math.round(e):parseInt(e,10)},h=function(e,t){return e[0]<=t[1]&&t[0]<=e[1]};function y(e,t){var r=[],o=[],a=new Map;if((Array.isArray(t)?t:[]).forEach(function(e,t){if(e&&e.op&&"object"===c(e.op)&&e.op.name===u){var r=function(e){if(!Array.isArray(e)||2!==e.length)return null;var t=p(e[0]),r=p(e[1]);return!Number.isFinite(t)||!Number.isFinite(r)||t<0||r<t?null:[t,r]}(e.range),n=Array.isArray(e.target)?e.target:[];if(r&&n.length){var i,l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(n);try{for(l.s();!(i=l.n()).done;){var d=i.value,y=f(String(d)),m=a.get(y)||[],v=m.find(function(e){return h(e.range,r)});v?o.push({node:t,target:y,reason:"overlaps node ".concat(v.node)}):(m.push({node:t,mode:e.op.mode||"column",range:r}),a.set(y,m))}}catch(e){l.e(e)}finally{l.f()}}else o.push({node:t,reason:"needs target and range [lo, hi]"})}}),!a.size)return{elements:e,applied:r,skipped:o};var l=function(e){if(!Array.isArray(e))return e;var t=!1,s=e.map(function(e){if(!e||"object"!==c(e))return e;var s=function(e){var t=null==e.id?null:f(String(e.id)),s=t&&a.get(t);if(!s)return e;var l=function(e){return"row"===e.type?"row":"cards"===e.type?"cards":"nav"===e.type?"nav":null}(e),c=s.slice().sort(function(e,t){return e.range[0]-t.range[0]});if(("row"===l||"cards"===l)&&s.every(function(e){return"column"===e.mode||"row"===e.mode})){var u=c.map(function(e){var t={breakpoint:[e.range[0],e.range[1]],flexDirection:e.mode};return"cards"===l&&"column"===e.mode&&(t.alignItems="center"),t});s.forEach(function(e){return r.push({node:e.node,target:t,via:"resprop"})});var p=i(i({},e),{},{resprop:[].concat(n(Array.isArray(e.resprop)?e.resprop.map(function(e){return i({},e)}):[]),n(u))});return"cards"===l&&(p.colat=!1),p}if("nav"===l&&s.every(function(e){return"collapse"===e.mode||"expand"===e.mode})){var h=c.filter(function(e){return"collapse"===e.mode}),y=c.filter(function(e){return"expand"===e.mode}),m=null;if(h.length||1!==y.length||0!==y[0].range[0]){if(1===h.length&&0===h[0].range[0]){var v=h[0].range[1];y.length?1===y.length&&y[0].range[0]===v+1&&(m=v+1):m=v>=d?d:v+1}}else m=0;return null!==m?(s.forEach(function(e){return r.push({node:e.node,target:t,via:"breakpoint"})}),i(i({},e),{},{breakpoint:"".concat(m,"px")})):(s.forEach(function(e){return o.push({node:e.node,target:t,reason:"a nav collapses below one width and expands above it; these ranges say otherwise"})}),e)}return s.forEach(function(r){return o.push({node:r.node,target:t,reason:'mode "'.concat(r.mode,'" does not apply to ').concat(e.type)})}),e}(e),u=l(e.children);return u!==e.children&&(s=i(i({},s===e?e:s),{},{children:u})),s!==e&&(t=!0),s});return t?s:e};return{elements:l(e),applied:r,skipped:o}}},2588:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{L:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).el=null,e.file=null,e.selected="",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"setup",value:function(e,t){document.createElement("div");var r=document.createElement("select");r.setAttribute("type","file"),r.setAttribute("name",t),r.addEventListener("change",function(){r.options[r.selectedIndex].value});for(var n=0;n<e.length;n++){var o=e[n],i="string"==typeof o||"number"==typeof o?[String(o),String(o)]:[o&&o[0],o&&o[1]];r.appendChild(this.addNode(i[0],i[1]))}return this.el=r,this.res=r,this}},{key:"set",value:function(e){this.options=e;var t=e.name;e.items&&this.setup(e.items,t),e.arrayPadding&&(this.deprecatedOption("arrayPadding",'pad: [{a: "0.5rem"}]'),this.arrayPadding(e.arrayPadding.sides,e.arrayPadding.value)),e.arrayMargin&&(this.deprecatedOption("arrayMargin","mar: [{a: 10}]"),this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value)),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.radius&&(this.el.style.borderRadius=e.radius),e.background&&(this.el.style.background=e.background);var r=e.title,n=void 0!==e.label?e.label:r;return null==n||this.el.getAttribute("aria-label")||this.el.setAttribute("aria-label",String(n)),this.commonMethods(e),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.el.style.paddingLeft=t),e.includes("right")&&(this.el.style.paddingRight=t),e.includes("top")&&(this.el.style.paddingTop=t),e.includes("bottom")&&(this.el.style.paddingBottom=t),e.includes("all")&&(this.el.style.padding=t),this}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.el.style.marginLeft=t),e.includes("right")&&(this.el.style.marginRight=t),e.includes("top")&&(this.el.style.marginTop=t),e.includes("bottom")&&(this.el.style.marginBottom=t),e.includes("all")&&(this.el.style.margin=t),this}},{key:"addNode",value:function(e,t){var r=document.createElement("option");r.setAttribute("value",e);var n=document.createTextNode(t);return r.appendChild(n),r}},{key:"padding",value:function(e){return this.el.style.padding=e,this}},{key:"font",value:function(e){return this.el.style.fontFamily=e,this}},{key:"margin",value:function(e){return this.el.style.margin=e,this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new Picker().set(".concat(e,")")]}},{key:"rounded",value:function(e){return this.el.style.borderRadius="4px",this}},{key:"auto",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.el.style.fontSize="3rem":e.el.style.fontSize="1rem"};return t(),window.addEventListener("resize",t),this}},{key:"render",value:function(e){if(!e)return this.el;document.querySelector(e).appendChild(this.el)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU);"undefined"!=typeof window&&(window.Picker=c)},2689:(e,t,r)=>{r.d(t,{C:()=>v});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){return e&&"function"==typeof e.play},y={mp4:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",ogv:"video/ogg",ogg:"video/ogg"},m=function(e){var t=String(e||"").split("?")[0].split("#")[0].split(".").pop().toLowerCase();return y[t]||""},v=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).url=e,r.options={},r.res=null,r.setup(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n=[{key:"setup",value:function(){var e=document.createElement("video");return null!=this.url&&e.setAttribute("src",this.url),e.setAttribute("controls","controls"),this.res=e,this}},{key:"set",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=r;var n=this.res;if(Array.isArray(r.sources)&&r.sources.length){n.removeAttribute("src");for(var o=0,c=function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(n.querySelectorAll("source"));o<c.length;o++)c[o].remove();var u,d=r.sources.concat(null!=this.url?[this.url]:[]),f=new Set,p=a(d);try{for(p.s();!(u=p.n()).done;){var h=u.value,y="string"==typeof h?h:h&&h.url;if(y&&!f.has(y)){f.add(y);var v=document.createElement("source");v.setAttribute("src",y);var b="object"===i(h)&&h.type||m(y);b&&v.setAttribute("type",b),n.appendChild(v)}}}catch(e){p.e(e)}finally{p.f()}}r.poster&&n.setAttribute("poster",r.poster),r.preload&&n.setAttribute("preload",r.preload),!1===r.controls?n.removeAttribute("controls"):!0===r.controls&&n.setAttribute("controls","controls"),r.loop&&(n.loop=!0,n.setAttribute("loop","loop")),(null!==(e=r.playsinline)&&void 0!==e?e:r.autoplay)&&(n.setAttribute("playsinline",""),n.setAttribute("webkit-playsinline",""));var g=null!==(t=r.muted)&&void 0!==t?t:!!r.autoplay||void 0;if(!0===g?(n.muted=!0,n.setAttribute("muted","")):!1===g&&(n.muted=!1,n.removeAttribute("muted")),r.autoplay&&this._autoplay(!1!==r.lazy),r.objectFit&&(n.style.objectFit=r.objectFit),r.aspectRatio&&(n.style.aspectRatio=r.aspectRatio),r.id&&n.setAttribute("id",r.id),r.label&&n.setAttribute("aria-label",r.label),r.decorative&&n.setAttribute("aria-hidden","true"),r.background&&(n.style.background=r.background),r.poster&&!1!==r.posterBehind&&!/url\(|gradient\(/.test(String(r.background||""))){var w=r.objectFit||"contain";n.style.backgroundImage="url(".concat(JSON.stringify(String(r.poster)),")"),n.style.backgroundSize="cover"===w?"cover":"fill"===w?"100% 100%":"none"===w?"auto":"contain",n.style.backgroundPosition="center",n.style.backgroundRepeat="no-repeat"}return r.height&&(n.style.height=r.height),r.maxWidth&&(n.style.maxWidth=r.maxWidth),r.radius&&(n.style.borderRadius="number"==typeof r.radius?"".concat(r.radius,"px"):r.radius),r.width&&(n.style.width="".concat(r.width)),r.opacity&&(n.style.opacity=r.opacity),r.raster&&this.rasterize(r.raster),this}},{key:"_autoplay",value:function(e){var t=this,r=this.res;if("undefined"==typeof window||!h(r))return this;if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r.removeAttribute("autoplay"),this;r.setAttribute("autoplay","");var n=function(){var e=r.play();e&&e.catch&&e.catch(function(){})};if(!e||"function"!=typeof window.IntersectionObserver)return n(),this;this._visible=!1;var o=new window.IntersectionObserver(function(e){var o,i=a(e);try{for(i.s();!(o=i.n()).done;){var s=o.value;t._visible=s.isIntersecting,s.isIntersecting&&!t._hidden?n():r.pause()}}catch(e){i.e(e)}finally{i.f()}},{threshold:.2});return o.observe(r),this._track(function(){return o.disconnect()}),this._hidden=!1,this._on(document,"visibilitychange",function(){t._hidden=document.hidden,document.hidden?r.pause():t._visible&&n()}),this}},{key:"play",value:function(){var e,t;return h(this.res)&&(null===(e=this.res.play())||void 0===e||null===(t=e.catch)||void 0===t||t.call(e,function(){})),this}},{key:"pause",value:function(){return h(this.res)&&this.res.pause(),this}},{key:"size",value:function(e){return this.res.style.width=e,this}},{key:"toCode",value:function(){var e=Object.fromEntries(Object.entries(this.options||{}).filter(function(e){return null!=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2)[1]}));return['new Video("'.concat(this.url,'").set(').concat((0,o.sy)(e,4),")")]}},{key:"render",value:function(e){var t;return e?(null===(t=document.querySelector(e))||void 0===t||t.appendChild(this.res),this.res):this.res}}],n&&c(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},2789:(e,t,r)=>{r.d(t,{C:()=>f});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},c.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var f=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=u(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("code"),e.pre=document.createElement("pre"),e.res.style.background="#18232e",e.res.style.display="block",e.res.style.width="auto",e.res.style.height="auto",e.res.style.borderRadius="1rem",e.pre.appendChild(e.res),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"toCode",value:function(){var e=this.options;Object.keys(e).forEach(function(t){return void 0===e[t]&&delete e[t]});var t=JSON.stringify(e,null,2).replace((0,o._H)(),"$1:").replace(/"([^"]+)"/g,function(e,t){return t.includes("\n")||t.includes("'")||t.includes('"')?"`"+t.replace(/`/g,"\\`")+"`":'"'.concat(t,'"')});return"new Code().set(".concat(t,")")}},{key:"callReact",value:function(e){this.options=e;var r,n,o,a=[],s=e.transform&&"object"===i(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||s){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=c(u(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var l=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,s?e.transform:void 0];l=l.filter(function(e){return null!=e});for(var d=0;d<l.length;d++)a.push({range:l[d].range,log:l[d].op.name,target:l[d].target,op:l[d].op});var f=[];e.borderObj&&f.push("border"),e.background&&f.push("background"),e.mar&&f.push("margin"),e.animation&&f.push("animation"),e.span&&f.push("span"),this.chainReact(a,e.id,f)}}},{key:"set",value:function(e){return e.code&&(this.pre.children[0].innerHTML=e.code),e.class&&this.pre.children[0].setAttribute("class","".concat(e.class)),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.resprop&&this.resprop(e.resprop,e),e.width&&(this.res.style.width=e.width),e.background&&(this.res.style.background=e.background),e.color&&(this.res.style.color=e.color),e.borderRadius&&(this.res.style.background=e.borderRadius),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius)),this.callReact(e),this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.pre),this.res}}],n&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},2998:(e,t,r)=>{function n(e,t){return s(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||i(e,t)||o()}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e){if(Array.isArray(e))return e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e,t,r){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}r.d(t,{dh:()=>p});var d=Object.freeze({src:"url",href:"url",options:"items"}),f=(new Set(Object.values(d)),function(e,t){if(Array.isArray(e))return e.map(function(e){return f(e,t)});if(!e||"object"!==u(e))return e;for(var r=t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e)),n=0,o=["children","items"];n<o.length;n++){var i=o[n];void 0!==r[i]&&(r[i]=f(r[i],t))}return r});function p(e){return function(e){return f(e,function(e){if("table"!==e.type||!Array.isArray(e.items)||e.items.length<2)return e;if(!e.items.every(function(e){return Array.isArray(e)}))return e;var t,r=s(t=e.items)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||o(),n=r[0],a=r.slice(1);return n.every(function(e){return"string"==typeof e||"number"==typeof e})?(e.items=a.map(function(e){return Object.fromEntries(n.map(function(t,r){return[String(t),e[r]]}))}),e):e})}(function(e){return f(e,function(e){for(var t=0,r=Object.entries(d);t<r.length;t++){var o=n(r[t],2),i=o[0],a=o[1];Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(e,a)||(e[a]=e[i]),delete e[i])}return e})}(e))}Object.freeze(Object.keys(d))},3014:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{A:()=>c});var c=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).text=e,r.res=null,r.valid=!1,r.setup(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"setup",value:function(){var e=document.createElement("input");return this.res=e,this.res.style.padding=0,this.res.style.margin=0,this.res.style.padding=".4rem .75rem",this.res.style.fontSize="1rem",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="100%"),this}},{key:"set",value:function(e){var t;if(this.options=e,this.res.setAttribute("type",null!==(t=e.type)&&void 0!==t?t:"text"),e.placeholder&&(this.res.placeholder=e.placeholder),this.res.style.boxSizing="border-box",!this.res.getAttribute("aria-label")){var r,n,o=null!==(r=null!==(n=e.label)&&void 0!==n?n:e.title)&&void 0!==r?r:e.placeholder;o&&this.res.setAttribute("aria-label",String(o))}return e.name&&this.res.setAttribute("name",e.name),e.id&&this.res.setAttribute("id",e.id),e.required&&this.res.setAttribute("required",""),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.exact&&(this.res.style.fontSize=e.exact),e.radius&&this.radius(e.radius),e.color&&(this.res.style.color=e.color),e.background&&(this.res.style.background=e.background),e.font&&(this.res.style.fontFamily=e.font),e.weight&&(this.res.style.fontWeight=e.weight),e.bold&&(this.res.style.fontWeight="bold"),e.theme&&this.theme(e.theme),this.commonMethods(e),this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return["new TextField().set(".concat(e,")")]}},{key:"setValid",value:function(e,t){return this.res.style.border=e?"6px solid green":"6px solid red",0===t.length&&(this.res.style.border="none"),this}},{key:"auto",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="3rem":e.res.style.fontSize="1rem"};return t(),window.addEventListener("resize",t),this}},{key:"value",value:function(e){return this.res.setAttribute("value",e),this}},{key:"password",value:function(){return this.res.setAttribute("type","password"),this}},{key:"number",value:function(){return this.res.setAttribute("type","number"),this}},{key:"process",value:function(e){return this.res.value}},{key:"size",value:function(e){return this.res.style.fontSize=e,this}},{key:"em",value:function(e){return this.res.style.fontSize="".concat(e,"em"),this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"bold",value:function(){return this.res.style.fontWeight="bold",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"placeholder",value:function(e){return this.res.setAttribute("placeholder",e),this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"onChange",value:function(e){var t=this;return this.res.value,this.res.addEventListener("input",function(r){e(t.res.value)}),this}},{key:"render",value:function(e){return e?(document.querySelector(e).appendChild(this.res),this.res):this.res}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},3050:(e,t,r)=>{r.d(t,{Y:()=>h});var n=r(9873),o=r(1382);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).code=[],n.saveEl=r,n.frs=e,n.res=null,n.setup(),n.responsive(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n=[{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(e){this.options=e;var t=e;return t.onTap&&this.onTap(t.onTap),t.id&&this.res.setAttribute("id",t.id),t.position&&(this.res.style.position=t.position),void 0!==t.top&&(this.res.style.top=t.top),e.id&&this.res.setAttribute("id",e.id),this.commonMethods(t),e.padding&&this.pad([{a:e.padding}]),e.background&&(this.res.style.backgroundColor="#ecf0f1",this.res.style.cornerRadius="#3rem"),e.alignTo&&(this.res.style.justifyContent=e.alignTo),e.background&&(this.res.style.backgroundColor=e.background),e.justify&&(this.res.style.justifyContent=e.justify),e.border&&("top"===e.border[0]&&(this.res.style.borderTop="".concat(e.border[1]," solid white")),"all"===e.border[0]&&(this.res.style.border="".concat(e.border[1]," solid orange"))),e.borderObj&&(this.borderObj(e.borderObj),JSON.stringify(e.borderObj)),e.width&&(this.res.style.width=e.width),e.height&&(this.res.style.height=e.height),e.gap&&(this.res.style.gap=e.gap),e.align&&(JSON.stringify(e.align),this.res.style.alignItems="flex-start",this.res.style.alignItems="flex-start"),e.wrap&&this.wrap(),e.alignIts&&(JSON.stringify(e.alignIts),this.res.style.alignItems="flex-start"),e.owrap&&this.onlyWrap(),null!=e.owrap&&!1===e.owrap&&(this.res.style.flexWrap="nowrap",this.res.style.background="yellow"),e.toColumn&&this.deprecatedOption("toColumn","colat"),e.column&&this.makeCol(),e.colat&&e.colat&&this.toColumnAt(e.colat),e.align&&this.makeJustify(e.justify),e.justify&&this.makeAlign(e.justify),"flex-start"===e.justifo&&(this.res.style.justifyContent="flex-start"),e.radius&&(this.res.style.borderRadius=e.radius),e.aligns&&this.aligns(e.aligns),this.callReact(t),!0===e.center&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),this}},{key:"callReact",value:function(e){this.options=e;var r,n,o,i=[],a=e.transform&&"object"===s(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||a){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=d(f(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var l=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,a?e.transform:void 0];l=l.filter(function(e){return null!=e});for(var c=0;c<l.length;c++)i.push({range:l[c].range,log:l[c].op.name,target:l[c].target,op:l[c].op});var u=[];e.borderObj&&u.push("border"),e.background&&u.push("background"),e.mar&&u.push("margin"),e.animation&&u.push("animation"),e.span&&u.push("span"),this.chainReact(i,e.id,u)}}},{key:"toColumnAt",value:function(e){var t=this;if(!this.columnAlways){var r=function(){var r=window.matchMedia("(max-width: ".concat(e,")")),n=window.matchMedia("(max-device-width: 415px)");r.matches||n.matches?t.res.style.flexDirection="column":t.res.style.flexDirection="row"};r(),window.addEventListener("resize",r)}return this}},{key:"onlyWrap",value:function(){return this.res.style.flexWrap="wrap",this}},{key:"wrap",value:function(){return this.res.style.flexWrap="wrap",this.res.style.justifyContent="space-between",this}},{key:"aligns",value:function(e){return"start"===e&&(this.res.style.alignItems="flex-start"),"end"===e&&(this.res.style.alignItems="flex-end"),"center"===e&&(this.res.style.alignItems="center"),this}},{key:"toCode",value:function(){for(var e={},t=0,r=Object.entries(this.options||{});t<r.length;t++){var n=i(r[t],2),a=n[0],s=n[1];null!=s&&""!==s&&(e[a]=s)}var l=JSON.stringify(e,null,4).replace((0,o._H)(),"$1:").replace(/"([^"]*)"/g,function(e,t){return t.includes("\n")?"`"+t.replace(/`/g,"\\`")+"`":'"'.concat(t,'"')}),c=(this.items||[]).map(function(e){return null!=e&&e.toCode?e.toCode():"/* element */"}).join(",\n ");return[["new FlexRow().set(".concat(l,")"),c?".items([\n ".concat(c,"\n])"):""].join("")]}},{key:"cornerRadius",value:function(e){return this.res.style.borderRadius=e,this}},{key:"makeJustify",value:function(e){return"start"===e&&(this.res.style.justifyContent="flex-start"),this}},{key:"makeAlign",value:function(e){return"center"===e?this.res.style.alignItems="center":this.res.style.justifyContent=e,this}},{key:"makeCol",value:function(){return this.res.style.flexDirection="column",this}},{key:"setClass",value:function(e){return this.res.setAttribute("class",e),this}},{key:"setup",value:function(){var e=document.createElement("div");return e.style.display="flex",e.style.justifyContent="space-around",e.style.alignItems="center",this.res=e,this}},{key:"frame",value:function(e){return this.res.style.width=e.width,this.res.style.height=e.height,window.matchMedia("(max-device-width: 415px)").matches&&e.mobile&&(this.res.style.width=e.mobile),this}},{key:"radius",value:function(e){return this.res.style.borderRadius="".concat(e,"px"),this}},{key:"shadow",value:function(e,t,r){return this.res.style.boxShadow="0px 1px 10px 0px rgb(145 145 145)",this}},{key:"items",value:function(e){this.els=e,this.items=e;for(var t=0;t<e.length;t++){if(null!=e[t])if(e[t].render instanceof Function){var r=e[t].render();this.res.appendChild(r)}else this.res.appendChild(e[t]);if(null!=e[t]&&e[t].render instanceof Function){var n=e[t].render();this.res.appendChild(n),void 0!==e[t].toCode&&this.code.push(e[t].toCode().flatMap(function(e){return e}))}}return this}},{key:"responsive",value:function(e){var t=this,r=window.matchMedia("(max-device-width: 415px)");return window.innerWidth<e||r.matches?this.res.style.gridTemplateColumns="1fr":this.res.style.gridTemplateColumns="1fr 1fr",window.addEventListener("resize",function(){window.innerWidth<e||r.matches?t.res.style.gridTemplateColumns="1fr":t.res.style.gridTemplateColumns="1fr 1fr"}),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],n&&l(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},3180:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}r.d(t,{h:()=>u});var u=function(e){function t(e){var r,n,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=l(o=t),(r=a(n,s()?Reflect.construct(o,[],l(n).constructor):o.apply(n,i)))._noTheme=!0;var c=document.createElement("div");return c.style.flex="1",r.res=c,r.res.setAttribute("class","innerHider"),a(r,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,(n=[{key:"toCode",value:function(){return["new Spacer(".concat(this.hide,")")]}},{key:"render",value:function(){return this.res}}])&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(9873).yU)},3243:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{a:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,e.el=null,e.obj=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"set",value:function(e){var t=document.createElement("div");return t.style.width="100vw",t.style.height="100vh",t.style.backgroundColor=e.background,t.style.zIndex="1",t.style.position="absolute",t.style.overflowY="scroll",this.obj=e,this.res=t,e.close&&this.close(),this}},{key:"close",value:function(){return this.res.style.display="none",this}},{key:"show",value:function(){return this.res.style.display="block",this}},{key:"add",value:function(e){var t=document.createElement("div");t.style.width=this.obj.width,t.style.height="auto",t.style.marginLeft="auto",t.style.marginRight="auto",t.style.backgroundColor="white",window.matchMedia("(max-device-width: 415px)").matches&&(t.style.marginTop="200px",t.style.width="100%");for(var r=0;r<e.length;r++)t.appendChild(e[r].render());return this.res.appendChild(t),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(e).appendChild(this.res)}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},3257:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{l:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).el=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"set",value:function(e){this.options=e;var t=document.createElement("div"),r=document.createElement("label");r.style.position="relative",r.style.display="block";var n=null==e.title?"":String(e.title),o=document.createTextNode(n);r.appendChild(o),r.style.opacity=0;var i=document.createElement("input");return"textarea"===e.type&&(i=document.createElement("textarea")),i.style.position="relative",i.placeholder=n,i.style.boxSizing="border-box",n&&!i.getAttribute("aria-label")&&i.setAttribute("aria-label",n),i.style.fontSize="1rem",i.style.padding=".4rem .75rem",t.appendChild(r),t.appendChild(i),this.res=t,e.mar&&this.mar(e.mar),e.pad&&this.pad(e.pad),i.addEventListener("focus",function(){r.style.transition="transform ease 0.2s",r.style.transform="scale(0.80)",r.style.textTransform="uppercase",r.style.transformOrigin="left top",r.style.fontWeight="bold",i.placeholder="",r.style.opacity="1.0",e.font&&(r.style.fontFamily=e.font),e.color&&(r.style.color=e.color),e.exact&&(r.style.fontSize=e.exact)}),i.addEventListener("focusout",function(){r.style.transform="scale(1.0)",i.placeholder=n,r.style.opacity="0.0"}),e.name&&i.setAttribute("name",e.name),"INPUT"===i.tagName&&e.type&&"input"!==e.type&&i.setAttribute("type",e.type),e.required&&i.setAttribute("required",""),window.matchMedia("(max-device-width: 415px)").matches&&(i.style.width="100%",t.style.width="100%"),i.style.fontSize="1rem",this.el=t,this}},{key:"getValue",value:function(){return this.el.children[1].value}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new FloatingInput().set(".concat(e,")")]}},{key:"margin",value:function(e){return this.el.style.margin=e,this}},{key:"render",value:function(e){if(!e)return this.el;document.querySelector(e).appendChild(this.el)}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU);"undefined"!=typeof window&&(window.FloatingInput=c)},3420:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}r.d(t,{f:()=>u});var u=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t)).url=e,r.res=null,r.options={},r.setup(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,a=[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options=e||{},this}},{key:"toCode",value:function(){var e=Object.fromEntries(Object.entries(this.options||{}).filter(function(e){return null!=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2)[1]})),t=Object.keys(e).length?".set(".concat(JSON.stringify(e),")"):"";return["new Audio(".concat(JSON.stringify(this.url),")").concat(t)]}},{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"size",value:function(e){return this.res.style.width=e,this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(r(9873).yU)},3440:(e,t,r)=>{r.d(t,{X:()=>h});var n=r(9873),o=r(1382);function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function d(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}var p=function(){return d(function e(t,r){c(this,e),this.obj=t||{},this.items=r||[]},[{key:"render",value:function(){var e=document.createElement("div");e.style.display="flex",e.style.width="100%",e.style.justifyContent="space-around",e.setAttribute("id","innerItemsWrapper");var t=window.matchMedia("(max-device-width: 415px)"),r=window.matchMedia("(max-width: 600px)");(t.matches||r.matches)&&(e.style.marginTop="3rem");for(var n=0;n<this.items.length;n++){var o=this.items[n];e.appendChild(o.render())}var i=document.createElement("div");return i.style.width=this.obj.isSide?"333px":"100%",i.style.background=this.obj.background||"white",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.style.height="100%",i.setAttribute("id","outerItemsWrapper"),i.appendChild(e),this.obj.customStyle&&(e.style.width="auto",e.style.top="0rem",e.style.borderRadius="1rem",e.style.background=this.obj.background||"white",e.style.margin="1rem",e.style.position="absolute",e.style.opacity=.8),i}}])}(),h=function(e){function t(e){var r,n,o,s;return c(this,t),r=function(e,t,r){return t=a(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],a(e).constructor):t.apply(e,r))}(this,t),n=r,s=function(){var e,t=window.matchMedia("(max-device-width: 415px)"),n=document.createElement("button");if(n.setAttribute("id","hamburger"),n.setAttribute("type","button"),n.setAttribute("aria-label","Menu"),n.setAttribute("aria-expanded","false"),n.setAttribute("aria-controls","innerItemsWrapper"),n.style.border="none",n.style.fontWeight="bold",n.style.position="absolute",n.style.color=null!==(e=r.hamburgerColour)&&void 0!==e?e:"orange",n.style.backgroundColor="transparent",n.style.fontSize=t.matches?"2.1em":"2em",r.hamburgerInset){var o=String(r.hamburgerInset).trim().split(/\s+/);n.style.padding=o.length>1?"".concat(o[0]," ").concat(o[1]):"".concat(o[0]," ").concat(o[0])}var i=document.createTextNode(r.symbol?r.symbol:"☰");return n.appendChild(i),n.style.marginLeft="auto",r.isShown=!1,n.addEventListener("click",function(){r.isShown=!r.isShown,n.setAttribute("aria-expanded",String(r.isShown)),r.hasAnimatedToWide=!1;var e=r.items[0].options;if(e&&e.animation){var t=e.animation.op,o=r.res.children[0].children[1].children[0];if(t){if(r.isShown)for(var i=0;i<o.children.length;i++)o.children[i].animate(t.keyframesClose,{duration:1,fill:"forwards",delay:0}).onfinish=function(){o.parentElement.style.display="block"};else o.parentElement.style.display="none";for(i=0;i<o.children.length;i++){var a=o.children[i];a.animate(t.keyframesClose,{duration:1,fill:"forwards",delay:0}),r.isShown?a.animate(t.keyframesOpen,t.openOptions):a.animate(t.keyframesClose,t.closeOptions)}}}else r.isShown?innerItemsWrapper.parentElement.style.display="block":innerItemsWrapper.parentElement.style.display="none"}),n},(o=f(o="addHamburger"))in n?Object.defineProperty(n,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[o]=s,r.titleText="",r.hasHamburger=!1,r.code=[],r.attributes={},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),d(t,[{key:"toCode",value:function(){var e="new UINavBar()";return Object.keys(this.attributes).length>0?e+=".setup(".concat((0,o.sy)(this.attributes,2),")"):e+=".setup({})",e+=".items([\n",e+=this.items.map(function(e){return e.toCode().join("").trim()}).join(",\n"),[e+="\n])"]}},{key:"styled",value:function(e){return this.setup(e),this.styles=e,this}},{key:"setup",value:function(e){this.obj=e,this.obj.isSide||(this.obj.animate=!1),this.attributes=e;var t=document.createElement("div");t.setAttribute("id","sars"),t.style.padding=0,t.style.margin=0;var r=document.createElement("div");return r.setAttribute("id","covid"),r.style.position="absolute",r.style.width="100%",r.style.zIndex=1,r.style.alignItems="flex-start",document.createElement("div").style.position="absolute",r.style.margin="20px",r.style.display="flex",r.style.alignItems="flex-end",r.style.margin=0,r.style.padding=0,r.style.margin=0,t.appendChild(r),this.addCloseButton=!1,this.res=t,e.background&&this.background({color:e.background}),e.openColor&&(this.openColor=e.openColor),e.sticky&&this.sticky(),e.pad&&this.pad(e.pad),e.hamburgerColour&&(this.hamburgerColour=e.hamburgerColour),e.hamburgerInset&&(this.hamburgerInset=e.hamburgerInset),e.mobileSize&&(this.mobileSize=e.mobileSize),e.desktopSize&&(this.desktopSize=e.desktopSize),e.height&&(this.res.children[0].style.height=e.height),this._ui={gap:e.gap,justify:e.justify,alignItems:e.alignItems,barPad:e.barPad,maxWidth:e.maxWidth,borderBottom:e.borderBottom},this.res.setAttribute("role","navigation"),this.res.setAttribute("aria-label",e.ariaLabel||"Primary"),this}},{key:"items",value:function(e){this.items=e;var t=["Link","Image","Spacer","Dropdown"].some(function(t){return e[0].__proto__.constructor.toString().startsWith("class ".concat(t))});this.itemCount=e.length;var r=new p(this.obj,this.items).render();this.res.children[0].appendChild(r);var n=this.res.children[0].children[0].children[0],o=this.items[0].options;if(o&&o.animation){var i=o.animation.op;if(i){var a=window.matchMedia("(max-device-width: 415px)"),s=window.matchMedia("(max-width: 600px)");if(a.matches||s.matches){var l={duration:1,fill:"forwards",delay:1};for(c=0;c<n.children.length;c++)n.children[c].animate(i.keyframesClose,l)}else for(var c=0;c<n.children.length;c++)n.children[c].animate(i.keyframesClose,{duration:1,fill:"forwards",delay:1}),n.children[c].animate(i.keyframesOpen,i.openOptions)}}if(this.adjust(),!t){this.itemCount=e.length;var u=document.createElement("div");for(u.style.backgroundColor="orange",c=0;c<e.length;c++){var d=e[c];if(d.logo){var f=new Image(d.logo).width("100px"),h=document.createElement("div");h.style.flex="1",h.style.height=23;var y=document.createElement("div");y.setAttribute("id","WR"),y.style.display="flex",y.style.flexDirection="row",y.appendChild(f.render()),this.res.children[0].appendChild(f.render()),this.obj.spacing&&this.res.children[0].appendChild(h)}if(d.logo&&(this.allowPad=!0),d.logo&&this.obj.spacing&&(this.res.children[0].children[0].style.marginLeft=this.obj.spacing.sides,this.res.children[0].children[0].style.marginRight=this.obj.spacing.sides),d.title){var m=void 0;m=this.allowPad?d.type?new Dropdown(d.items,d.title):new Link(d.title,d.url).pad([{lr:"1em"}]):d.type?new Link("DRPA",d.url):new Link(d.title,d.url),u.appendChild(m.render())}}this.res.children[0].appendChild(u),this.adjust()}var v=this.addHamburger();this.itemCount,this.obj.spacing,v.style.zIndex=1;var b=this.res.children[0];return b&&!b.querySelector("#hamburger")&&b.insertBefore(v,b.firstChild),this}},{key:"instance",value:function(){return this.res.children[0]}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=this.res.style.top||"0px",this.res.style.zIndex=this.res.style.zIndex||50,this._sticky=!0,this}},{key:"font",value:function(e){for(var t=0;t<this.res.children[0].children;t++)this.res.children[0].children[t].style.fontFamily=e;return this}},{key:"background",value:function(e){return e.background?(this.res.children[0].style.backgroundColor=e.color,this.res.children[0].style.opacity=e.opacity,this):(this.res.children[0].style.backgroundColor="transparent",this)}},{key:"adjust",value:function(e){var t=this,r=window.matchMedia("(max-width: 600px)"),n=window.matchMedia("(max-device-width: 415px)"),o=function(){t.isShown=!1,t.res.children[0],function(){for(var e=0;e<t.res.children[0].children.length;e++){var r=t.res.children[0].children[e];r.style.fontSize=n.matches?t.mobileSize?t.mobileSize:"1.2em":t.desktopSize?t.desktopSize:"1em","☰"===r.textContent&&(r.style.fontSize="2em")}}(),t.res.children[0].style.flexDirection="column";for(var e=0;e<t.res.children[0].children.length;e++)"☰"==t.res.children[0].children[e].textContent||t.res.children[0].children[e].textContent==t.keepItem?(t.res.children[0].children[e].id,t.res.children[0].children[e].style.display="flex"):t.res.children[0].children[e].style.display="none"};if(this.obj.isSide)o();else{var i=this.res.children[1];null!=i&&(i.style.background="yellow"),r.matches||n.matches?o():function(){t.res.children[0];for(var e=0;e<t.res.children[0].children.length;e++){var r=t.res.children[0].children[e];r.style.marginTop="0em",r.id,r.style.display="flex",r.textContent===t.titleText&&t.titleText.length>0&&(r.style.fontSize="2em")}var n=t.items[0].options;if(n&&n.animation){var o=n.animation.op,i=t.res.children[0].children[1].children[0];if(i.style.marginTop="0",o&&!t.hasAnimatedToWide)for(t.hasAnimatedToWide=!0,e=0;e<i.children.length;e++)i.children[e].animate(o.keyframesOpen,o.openOptions)}}()}return this}},{key:"render",value:function(e){var t=this,r=function(){var e=window.matchMedia("(max-width: 600px)"),r=window.matchMedia("(max-device-width: 415px)"),n=t.res.querySelector("#outerItemsWrapper")||t.res.children[0].children[1],o=n&&(n.querySelector("#innerItemsWrapper")||n.children[0]),i=t._ui||{};if(o&&(i.gap&&(o.style.gap=i.gap),i.justify&&(o.style.justifyContent=i.justify),i.alignItems&&(o.style.alignItems=i.alignItems),i.barPad&&(o.style.padding=i.barPad),i.maxWidth&&(o.style.maxWidth=i.maxWidth,o.style.marginLeft="auto",o.style.marginRight="auto")),n&&i.borderBottom&&(n.style.borderBottom=i.borderBottom),r.matches&&(o.style.position="relative"),(e.matches||r.matches)&&null!=o?o.style.flexDirection="column":null==o||t.obj.isSide||(o.style.flexDirection="row"),!t.obj.isSide&&!e.matches&&!r.matches){var a=t.res.querySelector("#hamburger");a&&(a.style.display="none")}t.obj.isSide&&(o.style.flexDirection="column"),t.obj.isSide||e.matches||(t.res.children[0].style.position="relative",n.style.transform="translateY(0px)"),!t.obj.isSide&&e.matches,t.obj.customStyle&&(t.res.children[0].style.marginTop="1rem",t.res.children[0].style.position="absolute",t.res.children[0].style.borderRadius="1rem",n.style.borderRadius="1rem"),t.obj.radius&&(t.res.children[0].style.borderRadius="1rem",n.style.borderRadius="1rem")};return window.addEventListener("resize",function(){return r()}),r(),e?(document.querySelector(e).style.padding=0,document.querySelector(e).style.margin=0,document.querySelector(e).appendChild(this.res),this.res):this.res}}])}(n.yU)},3665:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}r.d(t,{m:()=>d});var d=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=c(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("div"),e.res.style.position="relative",e.toggleWrap=document.createElement("div"),e.toggleWrap.style.zIndex=9999,e.toggleWrap.style.borderRadius="0.3rem",e.toggleWrap.style.cursor="pointer",e.toggleWrap.style.display="flex",e.toggleWrap.style.alignItems="center",e.toggleWrap.style.justifyContent="center",e.res.appendChild(e.toggleWrap),e.contentWrap=document.createElement("div"),e.contentWrap.style.position="fixed",e.contentWrap.style.background="#ecf0f1",e.contentWrap.style.borderRadius="0.3rem",e.contentWrap.style.boxShadow="0 2px 5px rgba(0, 0, 0, 0.15)",e.contentWrap.style.width="250px",e.contentWrap.style.display="none",e.contentWrap.style.zIndex=99999,document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(e.contentWrap)}),document.body&&document.body.appendChild(e.contentWrap),e.styles={},e.children=[],e.isExpanded=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,s=[{key:"set",value:function(e){var t=this;this.options=e,e.title&&(this.toggleWrap.textContent=e.title),e.width&&(this.toggleWrap.style.width=e.width),e.contentWidth&&(this.contentWrap.style.width=e.contentWidth),e.background&&(this.contentWrap.style.backgroundColor=e.background),e.radius&&(this.contentWrap.style.borderRadius=e.radius);var r=function(){var e=t.toggleWrap.getBoundingClientRect(),r=t.contentWrap.style.display,n=t.contentWrap.style.visibility;"none"===r&&(t.contentWrap.style.visibility="hidden",t.contentWrap.style.display="block");var o=t.contentWrap.getBoundingClientRect();"none"===r&&(t.contentWrap.style.display=r,t.contentWrap.style.visibility=n||"");var i=window.innerWidth,a=e.left+e.width/2-o.width/2;a<8&&(a=8),a+o.width>i-8&&(a=i-8-o.width),a<8&&(a=8),t.contentWrap.style.top=e.bottom+4+"px",t.contentWrap.style.left=a+"px"};this._positionContent=r;var n=function(){"none"!==t.contentWrap.style.display&&r()};if(window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),e.behaviour){var o=e.behaviour;if("mouseover"===o||"mouseenter"===o){var i,a=function(){clearTimeout(i),t.contentWrap.style.display="block",r()},s=function(){i=setTimeout(function(){t.contentWrap.style.display="none"},200)};this.toggleWrap.addEventListener("mouseenter",a),this.toggleWrap.addEventListener("mouseleave",s),this.contentWrap.addEventListener("mouseenter",a),this.contentWrap.addEventListener("mouseleave",s),this.toggleWrap.addEventListener("click",function(e){e.stopPropagation(),"block"===t.contentWrap.style.display?t.contentWrap.style.display="none":(t.contentWrap.style.display="block",r())}),document.addEventListener("click",function(e){"block"!==t.contentWrap.style.display||t.contentWrap.contains(e.target)||t.toggleWrap.contains(e.target)||(t.contentWrap.style.display="none")})}else"click"===o?this.res.addEventListener("click",function(){t.toggle(),"block"===t.contentWrap.style.display&&r()}):this.res.addEventListener(o,function(){t.contentWrap.style.display="block",r()})}else this.res.addEventListener("click",function(){t.toggle(),"block"===t.contentWrap.style.display&&r()});return e.mar&&this.mar(e.mar),e.pad&&this.pad(e.pad),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),this}},{key:"add",value:function(e){var t,r=this;if(!Array.isArray(e))throw new Error("The 'add' method expects an array of children.");var n=!this.options||!this.options.title;if(e.forEach(function(e,t){if(!n||0!==t){if(!(e.res instanceof HTMLElement))throw new Error("Each child must have a valid 'element' property that is an HTMLElement.");r.contentWrap.appendChild(e.res)}}),n){var a=e[0];a&&a.res&&this.toggleWrap.appendChild(a.res)}return(t=this.children).push.apply(t,function(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e)),this}},{key:"toggle",value:function(){this.isExpanded=!this.isExpanded,this.contentWrap.style.display=this.isExpanded?"block":"none"}},{key:"toCode",value:function(){var e=this,t=this.options?Object.entries(this.options).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];return"string"==typeof i?"".concat(r,': "').concat(i,'"'):"object"===n(i)?"".concat(r,": ").concat(JSON.stringify(i)):"".concat(r,": ").concat(i)}).join(",\n "):"",r=this.children.map(function(t,r){return t.toCode().flatMap(function(e){return e}).join("")+(r<e.children.length-1?",":"")}).join("");return["new Dropdown().set({\n ".concat(t,"\n}).add([\n ").concat(r,"\n])")]}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}],s&&a(r.prototype,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s}(r(9873).yU)},4550:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{U:()=>c});var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"set",value:function(e){return this.imageUrl=e.url,this.createCard(),e.useBrightness&&(this.useBrightness=!0),e.useBrightness&&"\n useBrightness: ".concat(this.useBrightness),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.inpad&&this.inpad(e.inpad),e.inpad&&"\n inpad: {".concat(e.inpad,"}"),e.font&&(this.res.style.fontFamily=e.font),e.inpad&&"\n font: ".concat(e.font),this.addListeners(),this}},{key:"inpad",value:function(e){return this.res.children[1].style.boxSizing="border-box",this.res.children[1].style.padding=e,this}},{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.children[1].appendChild(e[t].render());return this}},{key:"createCard",value:function(){var e=document.createElement("div");e.style.display="grid",e.style.width="300px",e.style.height="400px",e.setAttribute("id","AAA");var t=document.createElement("div");t.style.gridArea="1/1",t.style.height="400px",t.style.borderRadius="15px",t.style.boxShadow="0 4px 8px 0 rgba(0,0,0,0.2)",t.style.overflow="hidden";var r=document.createElement("div");r.style.width="100%",r.style.height="100%",r.style.transition="0.9s",r.style.backgroundImage="url(".concat(this.imageUrl,")"),r.style.backgroundSize="cover",r.style.backgroundPostion="cover",r.style.backgroundRepeat="no-repeat",t.appendChild(r);var n=document.createElement("div");return n.style.gridArea="1/1",n.style.zIndex="1",e.appendChild(t),e.appendChild(n),this.res=e,this}},{key:"addListeners",value:function(){var e=this,t=this.res.children[0].children[0];return this.res.onmouseover=function(){t.style.transform="scale(1.3)",e.useBrightness&&(t.style.filter="brightness(31%)")},this.res.onmouseout=function(){t.style.transform="scale(1.0)",e.useBrightness&&(t.style.filter="brightness(100%)")},this}},{key:"render",value:function(e){if(!e)return this.res;this.options.id&&this.res.setAttribute("id",this.options.id),document.querySelector(e).appendChild(this.res)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},4617:(e,t,r)=>{function n(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},c.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}r.d(t,{e:()=>f});var f=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=u(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}(this,t)).res=null,e.items=[],e.setup(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,o=[{key:"set",value:function(e){return this.options=e,e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),this.commonMethods(e),this.callReact(e),this}},{key:"callReact",value:function(e){var r,n,o,a=[],s=e.transform&&"object"===i(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||s){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=c(u(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var l=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,s?e.transform:void 0];l=l.filter(function(e){return null!=e});for(var d=0;d<l.length;d++)a.push({range:l[d].range,log:l[d].op.name,target:l[d].target,op:l[d].op});var f=[];e.borderObj&&f.push("border"),e.background&&f.push("background"),e.mar&&f.push("margin"),e.animation&&f.push("animation"),e.span&&f.push("span"),this.chainReact(a,this.options.id,f)}}},{key:"setup",value:function(){var e=document.createElement("ul");return this.res=e,this.res.style.padding=0,this.res.style.margin=0,this}},{key:"setItems",value:function(e){this.items=e;var t,r=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=n(e))){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if("string"==typeof o){var i=document.createElement("li");i.textContent=o,this.res.appendChild(i)}else{var a=o.render();this.res.appendChild(a)}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"size",value:function(e){return this.res.style.fontSize=e,this}},{key:"em",value:function(e){return this.res.style.fontSize="".concat(e,"em"),this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"align",value:function(e){return this.res.style.textAlign="".concat(e),this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"bold",value:function(){return this.res.style.fontWeight="bold",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"toCode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var t=" ".repeat(e),r="".concat(t,"new UList()"),o=Object.fromEntries(Object.entries(this.options||{}).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2)[1];return null!=t&&""!==t}));return Object.keys(o).length&&(r+="\n".concat(t," .set(").concat(JSON.stringify(o,null,2).split("\n").join("\n".concat(t," ")),")")),this.items&&this.items.length&&(r+="\n".concat(t," .setItems([\n")+this.items.map(function(t){return"string"==typeof t?"".concat(" ".repeat(e+4),'"').concat(t,'"'):t.toCode(e+4)}).join(",\n")+"\n".concat(t," ])")),[r+="\n".concat(t)]}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],o&&a(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(r(9873).yU)},4753:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{Z:()=>a});var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"cards",value:function(e,t,r){for(var n=[],o=0;o<e.children.length;o++){var i=e.children[o];"text"===i&&this.insertTextToCard(n,t,e,r),"image"!==i||e.backgroundCard||n.push('\n new Image("https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg").set({})'),"link"===i&&(t.op?n.push("\n ".concat(r.tabSpace(6)," ").concat(r.link[t.op.theme.toLowerCase()].code)):n.push("\n ".concat(r.tabSpace(6)," ").concat(r.link.base.code)))}return n}},{key:"insertTextToCard",value:function(e,t,r,n){if(t.op)if(t.op.ops&&t.op.ops.includes("text-blast")){var o="\n ".concat(n.tabSpace(6)," ").concat(n.text[t.op.theme.toLowerCase()].code),i=n.ops[t.op.theme.toLowerCase()].blast.code;r.backgroundCard||(i=n.ops[t.op.theme.toLowerCase()].blastFun(1));var a=this.insertTextBetween(o,i);e.push(a)}else e.push("\n ".concat(n.tabSpace(6)," ").concat(n.text[t.op.theme.toLowerCase()].code));else e.push("\n ".concat(n.tabSpace(6)," ").concat(n.text.base.code))}},{key:"insertTextBetween",value:function(e,t){var r=e.match(/(color: ".+?",)(.+?)(id: ".+?")/);if(r){var n=r.index+r[0].length;return e.slice(0,n)+", "+t+", "+e.slice(n)}return e}}],null&&o(e.prototype,null),t&&o(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},5275:(e,t,r)=>{r.d(t,{IS:()=>a}),r(5379);var n=r(8597),o={"t-vhs":{summary:"Tape-glitch morph: chroma splits and the image tears, strongest at the midpoint, gone at both ends.",nodes:[{op:"aberration",amount:[0,18,0]},{op:"flow",strength:[0,34,0],scale:60,speed:0,window:[.15,.95],ease:"in-out"}]},"t-dissolve":{summary:"Ordered-dither dissolve — the old state breaks into pixels before the new one resolves.",nodes:[{op:"dither",levels:[8,2,8],size:[1,7,1],amount:[0,1,0],ease:"in-out"}]},"t-split":{summary:"Per-side morph: the old state posterises to duotone while the new one resolves through a halftone screen.",nodes:[{op:"duotone",side:"old",amount:[0,1,1],dark:"#0B1B2B",light:"#1abc9c"},{op:"halftone",side:"new",size:[10,6,2],amount:[1,1,0],softness:.35,angle:15}]},"t-bloom":{summary:"A soft halftone bloom through the middle of the morph.",nodes:[{op:"halftone",size:[2,9,2],amount:[0,1,0],softness:.4,angle:15,window:[.1,.9]}]},"t-fluid":{summary:"Liquid morph: the old state is carried on a current and pours into the new one, calm at both ends.",nodes:[{op:"flow",strength:[0,46,0],scale:130,speed:.8,ease:"in-out"},{op:"aberration",amount:[0,4,0],window:[.2,.8]}]},"t-particles":{summary:"Particle morph: the old state breaks into dots that scatter and re-form as the new one, with see-through gaps in between.",nodes:[{op:"particles",size:9,amount:[0,1,1,0],reach:5,ease:"in-out"}]},"liquid-hero":{summary:"A ripple that trails the pointer, then relaxes back in ~1.5s.",live:"enhanced",nodes:[{op:"stir",by:"mouse",radius:.055,force:2.2,strength:16,curl:.8,resolution:256,decay:.988}]},linger:{summary:"The same current, held for four or five seconds. Only `decay` differs.",live:"enhanced",nodes:[{op:"stir",by:"mouse",radius:.055,force:2.2,strength:7,curl:.8,resolution:256,decay:.9985,dye:0,sheen:0}]},"flow-field":{summary:"A standing current across the whole element. No solver, runs anywhere.",nodes:[{op:"flow",strength:18,scale:120,speed:.25}]},"flow-pointer":{summary:"The same current, but only around the pointer.",nodes:[{op:"flow",by:"mouse",strength:26,scale:100,radius:320}]},"print-shop":{summary:"Offset-litho dot screen with white seams under the glyphs.",nodes:[{op:"halftone",size:6,angle:15},{op:"edges",color:"#FFFFFF"}]},newsprint:{summary:"One-bit ordered dither — ink on paper, no greys.",nodes:[{op:"dither",mono:!0,ink:"#0B1B2B"}]},crt:{summary:"Posterised to a few levels, with a lens-like colour split.",nodes:[{op:"dither",levels:3},{op:"aberration",amount:6}]},glass:{summary:"Refractive metaball lens over untouched content.",nodes:[{op:"blobs",refract:70,dispersion:1,frost:.25}]},"hex-lens":{summary:"Hex cells rise toward the pointer; flush and invisible at rest.",nodes:[{op:"hexalize",size:26,lift:.3,by:"hover",radius:220}]},ripple:{summary:"The coordinate space pushes away from the pointer.",nodes:[{op:"offset",by:"mouse",strength:22,radius:280}]},spotlight:{summary:"A duotone disc that travels with the pointer; the rest is untouched.",nodes:[{op:"mask",from:"radial",as:"spot",by:"mouse",radius:200},{op:"duotone",masked:"spot",colors:["#104B87","#E8FF00"]}]},turbulent:{summary:"Animated noise drives the displacement, so the warp breathes.",nodes:[{op:"noise",as:"turbulence",scale:3,speed:.4},{op:"offset",masked:"turbulence",by:"static",strength:30}]},echoes:{summary:"Changing content leaves a fading trail behind it.",live:"required",nodes:[{op:"echo",decay:.92,strength:.85}]},comet:{summary:"A long, tinted comet tail. Needs live capture — on snapshot you see nothing move.",live:"required",nodes:[{op:"echo",decay:.975,strength:.95,tint:"#7FD4FF",tintAmount:.65}]}},i=function(e){return JSON.parse(JSON.stringify(e))};function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o[e];if(!r)throw new Error("[nodality] "+(0,n.au)(e,Object.keys(o),"raster preset"));return i(r.nodes).map(function(e){return Object.assign(e,t)})}},5318:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.d(t,{S:()=>a});var o="nodality.theme.mode",i="nodality:theme",a={mode:function(){try{var e=localStorage.getItem(o);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{color:"#111"},dark:{}},setDefaults:function(e){return e&&"object"===n(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===n(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(o,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(i,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(i,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(i,{detail:{mode:this.mode,tokens:this.current}}))}}},5367:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},s.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}r.d(t,{z:()=>u});var u=function(e){function t(e,r){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,o.res=null,o.width="16em",o.height="100vh",o.els=e,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,i=[{key:"setup",value:function(e){var r,n,o,i=this;e.tags&&(r=t,n=this,"function"==typeof(o=s(l(1&3?r.prototype:r),"setTags",n))?function(e){return o.apply(n,e)}:o)([e.tags]),e.width&&(this.width=e.width),e.height&&(this.height=e.height);var a=document.createElement("div");a.style.position="absolute";var c=document.createElement("button");c.style.position="absolute",c.style.background="white",c.style.opacity=.8,c.style.border="none",c.style.width="2rem",c.style.height="2rem",c.style.minWidth="24px",c.style.minHeight="24px",c.getAttribute("aria-label")||c.setAttribute("aria-label","Toggle navigation"),c.style.borderRadius="50%",c.style.zIndex=2;var u=document.createTextNode("☰");c.appendChild(u),c.style.fontSize="2em",window.matchMedia("(max-device-width: 400px)").matches&&(c.style.fontSize="6em"),window.matchMedia("(max-device-width: 400px)").matches&&e.fullMobile&&(this.width="100vw"),a.appendChild(c);var d=document.createElement("div");return d.style.position="absolute",d.style.backgroundColor="#fff",d.style.flexDirection="column",d.style.display="flex",d.style.alignItems="center",d.style.margin=0,d.style.padding=0,d.style.width=this.width,d.style.margin=0,d.style.marginTop="-10px",d.style.paddingTop="1em",d.style.paddingBottom="1em",d.style.height="".concat(this.height),d.style.transform="translateX(-".concat(this.width,")"),d.style.transition="all 0.80s",a.appendChild(d),this.hidden=!1,c.addEventListener("click",function(){i.hidden=!i.hidden;for(var e=0;e<d.children.length;e++)"☰"!==d.textContent&&(i.hidden?d.style.transform="translateX(0em)":d.style.transform="translateX(-".concat(i.width,")"))}),this.res=a,this.els&&this.items(this.els),this}},{key:"background",value:function(e){return this.res.children[1].style.backgroundColor=e.color,this.res.children[1].style.opacity=e.opacity,this}},{key:"items",value:function(e){this.itemCount=e.length;for(var t=0;t<e.length;t++)this.res.children[1].appendChild(e[t].render());return this}},{key:"render",value:function(e){return e?(document.querySelector(e).style.padding=0,document.querySelector(e).style.margin=0,document.querySelector(e).appendChild(this.res),this.res):this.res}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},5379:(e,t,r)=>{function n(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function s(r,n,i,a){var s=n&&n.prototype instanceof c?n:c,u=Object.create(s.prototype);return o(u,"_invoke",function(r,n,o){var i,a,s,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,a=0,s=e,f.n=r,l}};function p(r,n){for(a=r,s=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,a=0))}if(o||r>1)return l;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),a=u,s=h;(t=a<2?e:s)||!d;){i||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(d=f.n<0)?s:r.call(n,f))!==l)break}catch(t){i=e,a=1,s=t}finally{c=1}}return{value:t,done:d}}}(r,i,a),!0),u}var l={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var f=[][i]?t(t([][i]())):(o(t={},i,function(){return this}),t),p=d.prototype=c.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,o(e,a,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=d,o(p,"constructor",d),o(d,"constructor",u),u.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(p),o(p,a,"Generator"),o(p,i,function(){return this}),o(p,"toString",function(){return"[object Generator]"}),(n=function(){return{w:s,m:h}})()}function o(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}o=function(e,t,r,n){if(t)i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var a=function(t,r){o(e,t,function(e){return this._invoke(t,r,e)})};a("next",0),a("throw",1),a("return",2)}},o(e,t,r,n)}function i(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,l,"next",e)}function l(e){i(a,n,o,s,l,"throw",e)}s(void 0)})}}function s(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{hE:()=>ce,ls:()=>v,sB:()=>fe});var p={static:function(e){return{x:.5*e.w,y:.5*e.h,amt:1}},mouse:function(e){return{x:e.mouseX,y:e.mouseY,amt:1}},hover:function(e){return{x:e.mouseX,y:e.mouseY,amt:e.hover}},scroll:function(e){return{x:.5*e.w,y:e.h*e.scroll,amt:1}},time:function(e){return{x:e.w*(.5+.34*Math.cos(.6*e.t)),y:e.h*(.5+.34*Math.sin(.8*e.t)),amt:1}}},h=Object.keys(p),y={hexalize:{doc:{summary:'Hexagonal cell grid. Snaps sampling to a hex lattice and draws cell borders; with `lift`, cells near the driver swell toward the viewer and their content magnifies to match. Away from the focus a lifted chain is untouched — no magnification, no border — so with `by: "hover"` the element is pixel-identical at rest and the cells appear only under the pointer.',params:{size:{default:24,unit:"px",summary:"lattice pitch — the width of one cell"},lift:{default:0,unit:"ratio",structural:!0,summary:"how much bigger a cell gets at the focus: 0.3 renders the nearest hexagons at 1.3x. 0 compiles the cheap path entirely away, so crossing zero rebuilds."},radius:{default:200,unit:"px",summary:"falloff distance around the driver focus"}}},structuralOnToggle:["lift"],stage:"cell",decl:function(e){return"\n uniform float ".concat(e,"size;\n uniform float ").concat(e,"lift;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;")},code:function(e,t){return t.lift?"\n {\n vec2 hp = warped / ".concat(e,"size;\n vec2 hr = vec2(1.0, 1.7320508), hh = hr * 0.5;\n vec2 ha = mod(hp, hr) - hh, hb = mod(hp - hh, hr) - hh;\n vec2 gv = dot(ha, ha) < dot(hb, hb) ? ha : hb;\n vec2 ").concat(e,"AX = normalize(vec2(1.0, 1.7320508));\n vec2 ").concat(e,"c0 = hp - gv;\n // Seed with the owning cell. Its own hexagon always covers the\n // fragment at any scale >= 1, so there is always a winner.\n vec2 ").concat(e,"bestC = ").concat(e,"c0;\n float ").concat(e,"bestF = (1.0 - smoothstep(0.0, ").concat(e,"radius,\n length(").concat(e,"c0 * ").concat(e,"size - ").concat(e,"dpos))) * ").concat(e,"damt;\n float ").concat(e,"bestS = 1.0 + ").concat(e,"lift * ").concat(e,"bestF;\n").concat([[1,0],[-1,0],[.5,.8660254],[-.5,.8660254],[.5,-.8660254],[-.5,-.8660254]].map(function(t){var r,n,o=u(t,2);return r=o[0],n=o[1],"\n {\n vec2 c = ".concat(e,"c0 + vec2(").concat(r.toFixed(7),", ").concat(n.toFixed(7),");\n float f = 1.0 - smoothstep(0.0, ").concat(e,"radius,\n length(c * ").concat(e,"size - ").concat(e,"dpos));\n f *= ").concat(e,"damt;\n float s = 1.0 + ").concat(e,"lift * f;\n vec2 q = hp - c;\n float hd = max(dot(abs(q), ").concat(e,"AX), abs(q).x);\n // Covered by this cell's grown hexagon, and nearer than\n // whatever we have so far.\n if (hd <= 0.5 * s && s > ").concat(e,"bestS) {\n ").concat(e,"bestS = s; ").concat(e,"bestC = c; ").concat(e,"bestF = f;\n }\n }")}).join(""),"\n center = ").concat(e,"bestC * ").concat(e,"size;\n // Divide by the winner's scale: the border test then reaches\n // 0.5 further out (a bigger hexagon) and the sample moves in\n // toward the centre (its content magnified to match), both by\n // the same factor, so proportions are preserved exactly.\n gv = (hp - ").concat(e,"bestC) / max(").concat(e,"bestS, 1e-3);\n warped = center + gv * ").concat(e,'size;\n gv = abs(gv);\n // Border strength follows the SAME falloff as the scale, so a\n // cell that has not been raised draws no border at all. Away\n // from the pointer bestF is 0, which means scale 1, sampling\n // untouched and edge 0 — bit-identical to the source image, so\n // nothing reveals that an effect is attached until the pointer\n // arrives. Pair with by:"hover" for a fully flush resting\n // state; by:"mouse" holds amt at 1 and so keeps a permanent\n // hotspot wherever the pointer last was.\n edge = max(edge, smoothstep(0.44, 0.5,\n max(dot(gv, ').concat(e,"AX), gv.x)) * ").concat(e,"bestF);\n }"):"\n {\n vec2 hp = warped / ".concat(e,"size;\n vec2 hr = vec2(1.0, 1.7320508), hh = hr * 0.5;\n vec2 ha = mod(hp, hr) - hh, hb = mod(hp - hh, hr) - hh;\n vec2 gv = dot(ha, ha) < dot(hb, hb) ? ha : hb;\n center = (hp - gv) * ").concat(e,"size;\n gv = abs(gv);\n edge = max(edge, smoothstep(0.44, 0.5,\n max(dot(gv, normalize(vec2(1.0, 1.7320508))), gv.x)));\n }")},uniforms:function(e,t){return{size:["1f",(e.size||24)*t],lift:["1f",null!=e.lift?e.lift:0],radius:["1f",(e.radius||200)*t]}},map:function(e,t){return t.lift?null:e}},offset:{doc:{summary:"Pushes the coordinate space away from the driver focus. Warp stage, so cell grids and borders move WITH the content instead of staying a fixed screen-space lattice.",params:{strength:{default:20,unit:"px",summary:"how far the space is pushed at full amount"},radius:{default:260,unit:"px",summary:"falloff distance around the focus"}}},stage:"warp",defaultDriver:"mouse",decl:function(e){return"uniform float ".concat(e,"strength; uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos; uniform float ").concat(e,"damt;")},code:function(e){return"\n {\n float d = length(warped - ".concat(e,"dpos);\n float fall = 1.0 - smoothstep(0.0, ").concat(e,"radius, d);\n vec2 dir = d > 0.5 ? (warped - ").concat(e,"dpos) / d : vec2(0.0);\n warped -= dir * ").concat(e,"strength * fall * ").concat(e,"damt;\n }")},uniforms:function(e,t){return{strength:["1f",(e.strength||20)*t],radius:["1f",(e.radius||260)*t]}},map:function(e,t,r){var n,o,i,a=(t.strength||20)*r.dpr,s=(t.radius||260)*r.dpr,l=e[0]-r.dpos[0],c=e[1]-r.dpos[1],u=Math.hypot(l,c),d=1-(n=s,o=u,(i=Math.min(1,Math.max(0,(o-0)/(n-0||1e-6))))*i*(3-2*i));if(!(u>.5))return e;var f=a*d*r.damt/u;return[e[0]-l*f,e[1]-c*f]}},flow:{doc:{summary:"Curl-noise current. The coordinate space drifts along a divergence-free field, so content slides as if carried by water. Divergence-free means the flow never piles up or tears.",params:{strength:{default:18,unit:"px",summary:"how far the current carries the space"},scale:{default:120,unit:"px",summary:"size of one eddy — small is turbulent, large is a slow drift"},speed:{default:.25,unit:"seconds",summary:"how fast the field evolves; 0 freezes it"},seed:{default:0,unit:"count",summary:"picks a different field of the same character"},radius:{default:320,unit:"px",summary:"falloff around the focus. Only used when `by` names a driver; without one the current covers the whole element."}}},structural:["by"],stage:"warp",decl:function(e){return"\n uniform float ".concat(e,"scale;\n uniform float ").concat(e,"strength;\n uniform float ").concat(e,"speed;\n uniform float ").concat(e,"seed;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;\n // Polynomial bit-mixing hash, deliberately NOT the usual\n // fract(sin(dot(...))). Trig-based hashes disagree across GPU\n // vendors — sin's precision at large arguments is not\n // specified — so the same seed would render a different field\n // on different hardware. This one is multiply/fract only, so\n // the field is at least stable per-device. (Determinism rule,\n // MORPH-IMPL-SPEC §2.9.5a.)\n float ").concat(e,"h(vec2 v) {\n vec3 q = fract(vec3(v.xyx) * 0.1031 + ").concat(e,"seed);\n q += dot(q, q.yzx + 33.33);\n return fract((q.x + q.y) * q.z);\n }\n float ").concat(e,"n(vec2 v) {\n vec2 i = floor(v), f = v - i;\n f = f * f * (3.0 - 2.0 * f);\n return mix(mix(").concat(e,"h(i), ").concat(e,"h(i + vec2(1.0, 0.0)), f.x),\n mix(").concat(e,"h(i + vec2(0.0, 1.0)), ").concat(e,"h(i + vec2(1.0, 1.0)), f.x), f.y);\n }\n // The potential. Two octaves: enough structure to read as a\n // current without the cost of a full fBm.\n float ").concat(e,"psi(vec2 v) {\n return ").concat(e,"n(v) * 0.65 + ").concat(e,"n(v * 2.3 + 11.0) * 0.35;\n }")},code:function(e,t){return"\n {\n float sc = max(".concat(e,"scale, 1.0);\n vec2 drift = vec2(0.0, u_time * ").concat(e,"speed);").concat(t.by?"\n float fall = 1.0 - smoothstep(0.0, ".concat(e,"radius, length(warped - ").concat(e,"dpos));\n float amt = ").concat(e,"strength * fall * ").concat(e,"damt;"):"\n float amt = ".concat(e,"strength;"),"\n // Three fixed Euler steps along curl(psi). Fixed count, not\n // adaptive: the step budget is a compile-time property so the\n // shader cost cannot vary with the content.\n for (int i = 0; i < 3; i++) {\n vec2 q = warped / sc + drift;\n float e = 0.35;\n float dy = ").concat(e,"psi(q + vec2(0.0, e)) - ").concat(e,"psi(q - vec2(0.0, e));\n float dx = ").concat(e,"psi(q + vec2(e, 0.0)) - ").concat(e,"psi(q - vec2(e, 0.0));\n // curl of a 2D scalar potential = (dpsi/dy, -dpsi/dx)\n warped += vec2(dy, -dx) / (2.0 * e) * amt * 0.3333;\n }\n }")},uniforms:function(e,t){return{scale:["1f",(null!=e.scale?e.scale:120)*t],strength:["1f",(null!=e.strength?e.strength:18)*t],speed:["1f",null!=e.speed?e.speed:.25],seed:["1f",null!=e.seed?e.seed:0],radius:["1f",(null!=e.radius?e.radius:320)*t]}}},duotone:{doc:{summary:"Maps luminance onto a two-colour ramp. With `by`, the mapping is confined to a spot around the driver focus and the rest of the element keeps its own colour.",params:{colors:{default:["#104B87","#E8FF00"],unit:"color",summary:"[shadow, highlight] — the two ends of the ramp"},radius:{default:220,unit:"px",summary:"spot size when `by` names a driver"}}},structural:["by"],stage:"color",decl:function(e){return"uniform vec3 ".concat(e,"a; uniform vec3 ").concat(e,"b; uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos; uniform float ").concat(e,"damt;")},code:function(e,t){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n vec3 duo = mix(".concat(e,"a, ").concat(e,"b, lum);\n ").concat(t.by?"float mask = (1.0 - smoothstep(".concat(e,"radius * 0.35, ").concat(e,"radius,\n length(center - ").concat(e,"dpos))) * ").concat(e,"damt;"):"float mask = 1.0;","\n col = mix(col, duo, mask);\n }")},uniforms:function(e,t){var r=e.colors||["#104B87","#E8FF00"];return{a:["3fv",m(r[0])],b:["3fv",m(r[1])],radius:["1f",(e.radius||220)*t]}}},edges:{doc:{summary:"Draws the cell borders a cell-stage op produced. On its own it shows nothing — it colours `edge`, which only hexalize (or another cell op) writes.",params:{color:{default:"#FFFFFF",unit:"color",summary:"border colour"},strength:{default:1,unit:"ratio",summary:"border opacity"}}},stage:"color",needs:"cell",decl:function(e){return"uniform vec3 ".concat(e,"color; uniform float ").concat(e,"strength;")},code:function(e){return"\n {\n edgeCol = ".concat(e,"color;\n edgeCov = max(edgeCov, edge * ").concat(e,"strength);\n }")},uniforms:function(e){return{color:["3fv",m(e.color||"#FFFFFF")],strength:["1f",null!=e.strength?e.strength:1]}}},halftone:{doc:{summary:"Print halftone: the image is redrawn as a grid of ink dots on paper, dot size following local luminance.",params:{size:{default:6,unit:"px",summary:"dot pitch"},angle:{default:15,unit:"deg",summary:"screen angle of the dot grid"},ink:{default:"#0B1B2B",unit:"color",summary:"dot colour"},paper:{default:"#FFFFFF",unit:"color",summary:"background colour"},softness:{default:.08,unit:"ratio",summary:"dot edge softness — 0 is a hard stencil"},amount:{default:1,unit:"ratio",summary:"blend back toward the un-screened image; 0 is identity. Keyframe it to 0 at both ends of a transition so the shader hands over to the real element without a pop."},radius:{default:220,unit:"px",summary:"spot size when `by` names a driver"}}},structural:["by"],stage:"color",decl:function(e){return"\n uniform float ".concat(e,"size;\n uniform float ").concat(e,"amount;\n uniform float ").concat(e,"angle;\n uniform vec3 ").concat(e,"ink;\n uniform vec3 ").concat(e,"paper;\n uniform float ").concat(e,"soft;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;")},code:function(e,t){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n float sz = ".concat(e,"size;").concat(t.by?"\n float fd = 1.0 - smoothstep(0.0, ".concat(e,"radius, length(frag - ").concat(e,"dpos));\n sz *= 1.0 + fd * ").concat(e,"damt * 1.8;"):"","\n // Screen angle: rotating the grid is what stops the dots\n // reading as a horizontal/vertical texture.\n float ca = cos(").concat(e,"angle), sa = sin(").concat(e,"angle);\n vec2 rp = vec2(ca * frag.x - sa * frag.y,\n sa * frag.x + ca * frag.y) / max(sz, 1.0);\n vec2 cell = fract(rp) - 0.5;\n // Dot radius from tone: darker tone prints a bigger dot.\n // sqrt because ink coverage goes as area, not radius.\n float rr = sqrt(clamp(1.0 - lum, 0.0, 1.0)) * 0.55;\n float dm = smoothstep(rr, rr - ").concat(e,"soft, length(cell));\n col = mix(col, mix(").concat(e,"paper, ").concat(e,"ink, dm), clamp(").concat(e,"amount, 0.0, 1.0));\n }")},uniforms:function(e,t){return{size:["1f",(e.size||6)*t],amount:["1f",null!=e.amount?e.amount:1],angle:["1f",(null!=e.angle?e.angle:15)*Math.PI/180],ink:["3fv",m(e.ink||"#0B1B2B")],paper:["3fv",m(e.paper||"#FFFFFF")],soft:["1f",null!=e.softness?e.softness:.08],radius:["1f",(e.radius||220)*t]}}},dither:{doc:{summary:"Ordered (Bayer) dithering to a small palette — the look of an 8-bit display, and the one op that gets sharper as the element gets smaller.",params:{size:{default:1,unit:"px",summary:"size of one dither cell; 1 is per-pixel"},levels:{default:6,unit:"count",summary:"quantisation steps per channel"},amount:{default:1,unit:"ratio",summary:"blend back toward the undithered image"},mono:{default:!1,unit:"bool",structural:!0,summary:"quantise luminance to ink/paper instead of per-channel colour. A different shader, so toggling rebuilds."},ink:{default:"#0B1B2B",unit:"color",summary:"dark end, mono only"},paper:{default:"#FFFFFF",unit:"color",summary:"light end, mono only"},radius:{default:220,unit:"px",summary:"spot size when `by` names a driver"}}},structural:["by","mono"],stage:"color",decl:function(e){return"\n uniform float ".concat(e,"levels;\n uniform float ").concat(e,"size;\n uniform float ").concat(e,"amount;\n uniform vec3 ").concat(e,"ink;\n uniform vec3 ").concat(e,"paper;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;\n uniform float ").concat(e,"radius;\n // Bayer matrices by recursive bit-interleave rather than a\n // 64-entry table: WebGL1 has no constant array indexing, and\n // the nesting is exactly the recursive definition of the\n // ordered-dither matrix.\n float ").concat(e,"b2(vec2 a) {\n a = floor(a);\n return fract(a.x * 0.5 + a.y * a.y * 0.75);\n }\n float ").concat(e,"b4(vec2 a) { return ").concat(e,"b2(0.5 * a) * 0.25 + ").concat(e,"b2(a); }\n float ").concat(e,"b8(vec2 a) { return ").concat(e,"b4(0.5 * a) * 0.25 + ").concat(e,"b2(a); }")},code:function(e,t){return"\n {\n float sz = max(".concat(e,"size, 1e-3);").concat(t.by?"\n float fd = 1.0 - smoothstep(0.0, ".concat(e,"radius, length(frag - ").concat(e,"dpos));\n sz *= 1.0 + fd * ").concat(e,"damt * 1.8;"):"","\n // Centre the threshold on zero so dithering does not lift or\n // crush the overall exposure, only redistributes it.\n float t = ").concat(e,"b8(frag / sz) - 0.5;\n float lv = max(").concat(e,"levels, 1.0);\n ").concat(t.mono?"\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n float q = step(0.5, lum + t);\n vec3 dq = mix(".concat(e,"ink, ").concat(e,"paper, q);"):"\n // Per channel: scale to level index, offset by the threshold,\n // round, scale back. The +t before rounding is what turns a\n // hard band edge into an interleaved pattern of the two\n // neighbouring levels.\n vec3 dq = floor(col * lv + 0.5 + t) / lv;","\n col = mix(col, clamp(dq, 0.0, 1.0), clamp(").concat(e,"amount, 0.0, 1.0));\n }")},uniforms:function(e,t){return{levels:["1f",null!=e.levels?e.levels:6],size:["1f",(null!=e.size?e.size:1)*t],amount:["1f",null!=e.amount?e.amount:1],ink:["3fv",m(e.ink||"#0B1B2B")],paper:["3fv",m(e.paper||"#FFFFFF")],radius:["1f",(e.radius||220)*t]}}},aberration:{movesCoords:!1,doc:{summary:"Chromatic aberration: the three colour channels are sampled at slightly different offsets, like a cheap lens.",params:{amount:{default:6,unit:"px",summary:"channel separation"},radius:{default:240,unit:"px",summary:"falloff around the focus when `by` names a driver"}}},structural:["by"],stage:"displace",chroma:!0,decl:function(e){return"\n uniform float ".concat(e,"amount;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;")},code:function(e,t){return"\n {\n vec2 ctr = ".concat(t.by?"".concat(e,"dpos"):"u_res * 0.5",";\n vec2 dv = sampleP - ctr;\n float dl = length(dv);\n vec2 dir = dl > 0.5 ? dv / dl : vec2(0.0);\n ").concat(t.by?"float amt = ".concat(e,"amount * ").concat(e,"damt *\n (1.0 - smoothstep(0.0, ").concat(e,"radius, dl));"):"float amt = ".concat(e,"amount * (dl / max(length(u_res) * 0.5, 1.0));"),"\n chroma += dir * amt;\n }")},uniforms:function(e,t){return{amount:["1f",(null!=e.amount?e.amount:6)*t],radius:["1f",(e.radius||240)*t]}}},particles:{doc:{summary:"Breaks the image into one particle per cell, which shrinks to a dot and scatters on its own heading. Built for transitions (t-particles), where the gaps are transparent; elsewhere they show the image unmoved.",params:{size:{default:6,unit:"px",summary:"particle size: one particle per cell this big"},amount:{default:1,unit:"ratio",summary:"0 is the intact image, 1 fully scattered"},reach:{default:4,unit:"count",structural:!0,summary:"travel limit: a particle moves at most reach - 1 cells. Compiled in, and the cost: each pixel searches (2·reach + 1)² cells."},seed:{default:0,unit:"count",summary:"picks a different scatter of the same character"}}},structural:["reach"],stage:"displace",decl:function(e){return"\n uniform float ".concat(e,"size;\n uniform float ").concat(e,"amount;\n uniform float ").concat(e,"seed;\n // Polynomial hash, as in flow: trig hashes band on Apple\n // silicon and differ between GPU vendors.\n float ").concat(e,"h(vec2 v) {\n vec3 q = fract(vec3(v.xyx) * 0.1031 + ").concat(e,"seed * 0.1);\n q += dot(q, q.yzx + 33.33);\n return fract((q.x + q.y) * q.z);\n }")},code:function(e,t){var r=Math.max(1,Math.min(6,Math.round(null!=t.reach?t.reach:4)));return"\n {\n float sz = max(".concat(e,"size, 1.0);\n float a = clamp(").concat(e,"amount, 0.0, 1.0);\n if (a > 0.0) {\n vec2 x = sampleP;\n vec2 q = floor(x / sz);\n // Square and full-size at rest, so at a = 0 the cells tile\n // the image exactly; round and at 45% in full flight.\n float h = sz * 0.5 * (1.0 - 0.55 * a);\n float travel = ").concat(r-1,".0 * sz * a;\n float best = -1.0;\n vec2 hit = vec2(-1.0e5);\n for (int j = -").concat(r,"; j <= ").concat(r,"; j++) {\n for (int i = -").concat(r,"; i <= ").concat(r,"; i++) {\n vec2 c = q + vec2(float(i), float(j));\n vec2 dir = vec2(").concat(e,"h(c), ").concat(e,"h(c + vec2(57.3, 11.9))) * 2.0 - 1.0;\n // How far this one goes, and how high it stacks.\n float k = ").concat(e,"h(c + vec2(31.7, 83.1));\n vec2 home = (c + 0.5) * sz;\n vec2 d = x - (home + dir * travel * (0.35 + 0.65 * k));\n float dist = mix(max(abs(d.x), abs(d.y)), length(d), a);\n if (dist <= h && k > best) {\n best = k;\n // The particle carries its own cell, shrunk.\n hit = home + d * (0.5 * sz / h);\n }\n }\n }\n#ifdef NOD_TRANSITION\n // A gap lands outside both boxes, which is transparent.\n sampleP = hit;\n#else\n // No backdrop outside a transition: a gap would clamp to an\n // edge texel, so it shows the image unmoved instead.\n if (best >= 0.0) sampleP = hit;\n#endif\n }\n }")},uniforms:function(e,t){return{size:["1f",(null!=e.size?e.size:6)*t],amount:["1f",null!=e.amount?e.amount:1],seed:["1f",null!=e.seed?e.seed:0]}}},mask:{doc:{summary:'Writes a scalar FIELD for later ops to read — draws nothing itself. Give a downstream op `masked: "name"` and it applies only where this field is high. This is how any op becomes local without knowing anything about masking.',params:{as:{default:"mask",unit:"name",structural:!0,summary:"name of the field written. Consumers name it in `masked:`."},from:{default:"radial",unit:"name",structural:!0,summary:"field shape — compiled in, so changing it rebuilds"},at:{default:[.5,.5],unit:"point",structural:!0,summary:"centre as a fraction of the element box; survives resizes"},radius:{default:260,unit:"px",summary:"field radius"},invert:{default:!1,unit:"bool",summary:"swap inside and outside"},remap:{default:[0,1],unit:"range",summary:"rescale the field's output range"}}},structural:["as","from","at"],stage:"field",producesField:!0,defaultDriver:"static",decl:function(e){return"\n uniform vec2 ".concat(e,"dpos;\n uniform float ").concat(e,"damt;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"at;\n uniform vec2 ").concat(e,"remap;\n uniform float ").concat(e,"invert;")},code:function(e,t){var r=t.from||"radial",n=t.at?"(".concat(e,"at * u_res)"):"".concat(e,"dpos"),o="vertical"===r?"frag.y / max(u_res.y, 1.0)":"horizontal"===r?"frag.x / max(u_res.x, 1.0)":"1.0 - smoothstep(0.0, ".concat(e,"radius, length(frag - ").concat(n,"))");return"\n {\n float m = ".concat(o,";\n m = clamp((m - ").concat(e,"remap.x) / max(").concat(e,"remap.y - ").concat(e,"remap.x, 1e-4), 0.0, 1.0);\n m = mix(m, 1.0 - m, ").concat(e,"invert);\n ").concat(j(t.as||"mask")," *= m * ").concat(e,"damt;\n }")},uniforms:function(e,t){return{radius:["1f",(null!=e.radius?e.radius:260)*t],at:["2fv",e.at||[.5,.5]],remap:["2fv",e.remap||[0,1]],invert:["1f",e.invert?1:0]}}},noise:{doc:{summary:"Writes an animated noise FIELD. Same contract as `mask` — it draws nothing; downstream ops read it via `masked:`. Use it to make any other op flicker, breathe or crawl.",params:{as:{default:"mask",unit:"name",structural:!0,summary:"name of the field written"},scale:{default:3,unit:"ratio",summary:"noise frequency across the element"},speed:{default:.3,unit:"seconds",summary:"how fast it evolves; 0 freezes it"},amount:{default:1,unit:"ratio",summary:"blend between flat 1.0 and full noise"},remap:{default:[0,1],unit:"range",summary:"rescale the field's output range"}}},structural:["as"],stage:"field",producesField:!0,decl:function(e){return"\n uniform float ".concat(e,"scale;\n uniform float ").concat(e,"speed;\n uniform vec2 ").concat(e,"remap;\n uniform float ").concat(e,"amp;\n float ").concat(e,"h(vec2 v) {\n return fract(sin(dot(v, vec2(41.113, 289.717))) * 43758.545);\n }\n float ").concat(e,"n(vec2 v) {\n vec2 i = floor(v), f = v - i;\n f = f * f * (3.0 - 2.0 * f);\n return mix(mix(").concat(e,"h(i), ").concat(e,"h(i + vec2(1.0, 0.0)), f.x),\n mix(").concat(e,"h(i + vec2(0.0, 1.0)), ").concat(e,"h(i + vec2(1.0, 1.0)), f.x), f.y);\n }")},code:function(e,t){return"\n {\n vec2 np = frag / max(u_res.y, 1.0) * ".concat(e,"scale;\n // Two octaves: enough structure to read as turbulence\n // without the cost of a full fBm.\n float n = ").concat(e,"n(np + u_time * ").concat(e,"speed) * 0.65 +\n ").concat(e,"n(np * 2.7 - u_time * ").concat(e,"speed * 0.6) * 0.35;\n n = clamp((n - ").concat(e,"remap.x) / max(").concat(e,"remap.y - ").concat(e,"remap.x, 1e-4), 0.0, 1.0);\n ").concat(j(t.as||"mask")," *= mix(1.0, n, ").concat(e,"amp);\n }")},uniforms:function(e){return{scale:["1f",null!=e.scale?e.scale:3],speed:["1f",null!=e.speed?e.speed:.3],remap:["2fv",e.remap||[0,1]],amp:["1f",null!=e.amount?e.amount:1]}}},copy:{multiSample:!0,doc:{summary:"Stamps extra copies of the element over itself. Copies sample the ORIGINAL texture, not the result of earlier colour ops, so a copy of a halftoned element is a copy of the unhalftoned source.",params:{count:{default:5,unit:"count",structural:!0,summary:'stamps arranged in a ring around the focus. The loop is unrolled at compile time, so this rebuilds — not something to animate. This default is the shader\'s; the DOM path that an element of type "copy" takes uses 3 instead.'},points:{default:null,unit:"point",structural:!0,summary:"explicit [[x,y], ...] in fractions of the element box, instead of a ring. Survives resizes. Overrides `count`."},radius:{default:110,unit:"px",summary:"ring radius when using `count`"},scale:{default:.5,unit:"ratio",summary:"size of each copy"},rotate:{default:0,unit:"deg",summary:"rotation applied per copy"},fade:{default:1,unit:"ratio",summary:"opacity falloff across the set"},amount:{default:1,unit:"ratio",summary:"overall blend of the copies over the original"},animation:{default:!1,unit:"bool",readBy:"element-mapper",summary:'DOM path only. An element of type "copy" is built by the mapper rather than by the shader, and this asks that mapper for animated copies; the shader path ignores it. Declared because the mapper has always read it and the docs have always taught it, while the registry did not list it – so the validator reported a documented, working node as an unknown parameter.'}}},structural:["count","points"],stage:"color",defaultDriver:"static",decl:function(e){return"\n uniform vec2 ".concat(e,"dpos;\n uniform float ").concat(e,"damt;\n uniform float ").concat(e,"radius;\n uniform float ").concat(e,"scale;\n uniform float ").concat(e,"rotate;\n uniform float ").concat(e,"fade;\n uniform float ").concat(e,"amount;")},code:function(e,t){for(var r=Array.isArray(t.points)&&t.points.length>0,n=r?t.points.length:Math.max(1,Math.min(24,Math.round(t.count||5))),o="",i=function(i){var a,s=r?"vec2(".concat((+t.points[i][0]).toFixed(5),", ").concat((+t.points[i][1]).toFixed(5),") * u_res"):(a=i/n*Math.PI*2,"".concat(e,"dpos + vec2(").concat(Math.cos(a).toFixed(5),", ")+"".concat(Math.sin(a).toFixed(5),") * ").concat(e,"radius"));o+="\n {\n float ang = ".concat(e,"rotate * ").concat((i+1).toFixed(1),";\n float cs = cos(ang), sn = sin(ang);\n // Inverse transform: to draw a stamp scaled by s about a\n // centre c, fetch from the source at (frag - c) / s.\n vec2 d = mat2(cs, -sn, sn, cs) * (frag - (").concat(s,"));\n vec2 q = d / max(").concat(e,"scale, 1e-3) + u_res * 0.5;\n vec2 quv = vec2(q.x / u_res.x, 1.0 - q.y / u_res.y);\n vec2 inside = step(vec2(0.0), quv) * step(quv, vec2(1.0));\n vec4 s = texture2D(u_tex, clamp(quv, 0.0, 1.0));\n float w = s.a * inside.x * inside.y * ").concat(e,"amount * ").concat(e,"damt\n * pow(").concat(e,"fade, ").concat(i.toFixed(1),");\n // Straight-alpha OVER, newest stamp on top.\n float na = w + ovA * (1.0 - w);\n ovCol = (s.rgb * w + ovCol * ovA * (1.0 - w)) / max(na, 1e-4);\n ovA = na;\n }")},a=0;a<n;a++)i(a);return o},uniforms:function(e,t){return{radius:["1f",(null!=e.radius?e.radius:110)*t],scale:["1f",null!=e.scale?e.scale:.5],rotate:["1f",null!=e.rotate?e.rotate:0],fade:["1f",null!=e.fade?e.fade:1],amount:["1f",null!=e.amount?e.amount:1]}}},merge:{doc:{summary:"Runs two sub-chains over the same source and blends the results. The only op that takes other ops as arguments — everything else composes by sequence, this composes in parallel.",params:{a:{default:null,summary:"first branch: an array of nodes",structural:!0},b:{default:null,summary:"second branch: an array of nodes",structural:!0},mode:{default:"over",unit:"name",structural:!0,summary:"how the branches combine: over, add, screen, multiply, difference, lighten. Compiled in, so it rebuilds."},mix:{default:1,unit:"ratio",summary:"how far to blend b into a"}}},structural:["mode","a","b"],stage:"color",decl:function(e){return"uniform float ".concat(e,"mix;")},code:function(){return""},uniforms:function(e){return{mix:["1f",null!=e.mix?e.mix:1]}}},echo:{doc:{summary:"Temporal accumulation — a fading trail of what CHANGED. Typing smears, a ticking counter leaves a comet. The one op that does nothing on the snapshot backend, because a frozen image has no motion to record.",params:{strength:{default:.85,unit:"ratio",summary:"opacity of the trail"},decay:{default:.92,unit:"ratio",summary:"per-second persistence — higher is a longer tail"},tint:{default:"#7FD4FF",unit:"color",summary:"colour pushed into the trail"},tintAmount:{default:.5,unit:"ratio",summary:"how far the trail is tinted"}}},stage:"color",decl:function(e){return"\n uniform sampler2D ".concat(e,"hist;\n uniform float ").concat(e,"strength;\n uniform vec3 ").concat(e,"tint;\n uniform float ").concat(e,"tintAmt;")},code:function(e){return"\n {\n // Sampled in screen space: the trail records where things\n // WERE, which is not where a warp op would fetch them from.\n vec2 huv = vec2(frag.x / u_res.x, 1.0 - frag.y / u_res.y);\n vec4 h = texture2D(".concat(e,"hist, clamp(huv, 0.001, 0.999));\n float ha = clamp(h.a * ").concat(e,"strength, 0.0, 1.0);\n vec3 hc = mix(h.rgb, ").concat(e,"tint, ").concat(e,"tintAmt);\n // Straight-alpha OVER into the border layer so an edges op\n // in the same chain still composites correctly.\n float na = ha + edgeCov * (1.0 - ha);\n edgeCol = (hc * ha + edgeCol * edgeCov * (1.0 - ha)) / max(na, 1e-4);\n edgeCov = na;\n }")},uniforms:function(e){return{strength:["1f",null!=e.strength?e.strength:.85],tint:["3fv",m(e.tint||"#7FD4FF")],tintAmt:["1f",e.tint?null!=e.tintAmount?e.tintAmount:.5:0]}},solver:{resolutions:function(e,t,r){return{frame:[t,r]}},targets:{history:{double:!0,res:"frame",fmt:"rgba",smooth:!0}},samplers:{hist:"history"},programs:{accumulate:"\nprecision highp float;\nuniform sampler2D u_content;\nuniform sampler2D u_hist;\nuniform vec2 u_texel;\nuniform float u_decay;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec4 c = texture2D(u_content, uv);\n vec4 h = texture2D(u_hist, uv) * u_decay;\n gl_FragColor = max(c, h);\n}"},splatColor:function(){return[0,0,0]},step:function(e,t,r){var n=Math.min(r.dt,1/30),o=Math.pow(null!=t.decay?t.decay:.92,60*n);e.use("accumulate"),e.f2("u_texel",1/e.canvasW,1/e.canvasH),e.f1("u_decay",o),e.smp("u_content",e.content,0),e.smp("u_hist",e.read("history"),1),e.blit(e.write("history")),e.swap("history")}}},stir:{doc:{summary:"Stirred liquid: a real fluid simulation the content is dragged through. STATEFUL — it owns a ping-pong pair of render targets that evolve frame to frame, so it is the most expensive op here.",params:{strength:{default:26,unit:"px",summary:"how far the fluid carries the content"},force:{default:1,unit:"ratio",summary:"how hard the pointer pushes the fluid"},radius:{default:.1,unit:"ratio",summary:"splat size, as a fraction of the sim grid"},curl:{default:2.2,unit:"ratio",summary:"vorticity — how much the fluid curls into eddies"},decay:{default:.985,unit:"ratio",summary:"per-second velocity persistence"},pressure:{default:.8,unit:"ratio",summary:"pressure retained between frames"},pressureIterations:{default:6,unit:"count",summary:"solver iterations; higher is stiffer and slower"},intensity:{default:1.6,unit:"ratio",summary:"brightness of the dye layer"},sheen:{default:.15,unit:"ratio",summary:"specular highlight on the surface"},tint:{default:"#7FD4FF",unit:"color",summary:"dye colour, unless `rainbow`"},rainbow:{default:!1,unit:"bool",summary:"cycle dye hue instead of using `tint`"},dye:{default:.85,unit:"ratio",summary:"how much dye colour reaches the final image"},dyeAmount:{default:.6,unit:"ratio",summary:"how much dye each splat injects"},dyeFade:{default:.97,unit:"ratio",summary:"per-second dye persistence"},resolution:{default:128,unit:"count",summary:"velocity grid size, clamped 32..512"},dyeResolution:{default:512,unit:"count",summary:"dye grid size, clamped 64..1024"}}},stage:["warp","color"],decl:function(e){return"\n uniform sampler2D ".concat(e,"vel;\n uniform sampler2D ").concat(e,"dye;\n uniform float ").concat(e,"strength;\n uniform float ").concat(e,"dyemix;\n uniform float ").concat(e,"intensity;\n uniform float ").concat(e,"sheen;\n uniform vec3 ").concat(e,"tint;")},code:function(e,t,r){return"warp"===r?"\n {\n // frag/warped are top-down pixels, the field is bottom-up\n // [0,1]: flip y going in, and flip the y of the vector coming\n // out so the content drags WITH the pointer.\n vec2 fuv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec2 v = texture2D(".concat(e,"vel, clamp(fuv, 0.001, 0.999)).xy;\n warped += vec2(v.x, -v.y) * ").concat(e,"strength;\n }"):"\n {\n // Sampled at the CONTINUOUS warped position, never at the\n // cell centre: a cell op upstream (hexalize) snaps the cell\n // centre to one point per tile, which would quantise the\n // liquid into flat per-hex patches instead of smooth swirls.\n vec2 suv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec3 dc = texture2D(".concat(e,"dye, clamp(suv, 0.001, 0.999)).rgb;\n float mag = length(dc);\n // Colour is carried IN the dye field and advected with it, so\n // a ribbon keeps its hue while the flow folds it. Deriving\n // colour from the local flow direction instead would make\n // neighbouring pixels jump hue and read as confetti.\n vec3 liquid = mag > 1e-4 ? clamp(dc / mag * 1.25, 0.0, 1.0) : ").concat(e,"tint;\n float amt = clamp((1.0 - exp(-mag * ").concat(e,"intensity)) * ").concat(e,"dyemix, 0.0, 1.0);\n // Straight-alpha OVER so a later overlay op (blobs) still\n // composites correctly on top of the liquid.\n float na = amt + ovA * (1.0 - amt);\n ovCol = (liquid * amt + ovCol * ovA * (1.0 - amt)) / max(na, 1e-4);\n ovA = na;\n\n // Faint sheen on the content itself where the flow is fast.\n float sp = length(texture2D(").concat(e,"vel, clamp(suv, 0.001, 0.999)).xy);\n col = mix(col, ").concat(e,"tint, (1.0 - exp(-sp * 0.7)) * ").concat(e,"sheen);\n }")},uniforms:function(e,t){return{strength:["1f",(null!=e.strength?e.strength:26)*t],sheen:["1f",null!=e.sheen?e.sheen:.15],tint:["3fv",m(e.tint||"#7FD4FF")],dyemix:["1f",null!=e.dye?e.dye:.85],intensity:["1f",null!=e.intensity?e.intensity:1.6]}},solver:{resolutions:function(e){return{sim:Math.max(32,Math.min(e.resolution||128,512)),dye:Math.max(64,Math.min(e.dyeResolution||512,1024))}},targets:{velocity:{double:!0,res:"sim",fmt:"rg",smooth:!0},dye:{double:!0,res:"dye",fmt:"rgba",smooth:!0},pressure:{double:!0,res:"sim",fmt:"r",smooth:!1},divergence:{double:!1,res:"sim",fmt:"r",smooth:!1},vorticity:{double:!1,res:"sim",fmt:"r",smooth:!1}},samplers:{vel:"velocity",dye:"dye"},programs:{splat:"\nprecision highp float;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform vec2 u_point;\nuniform vec3 u_amount;\nuniform float u_radius;\nuniform float u_aspect;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 d = uv - u_point;\n if (u_aspect >= 1.0) d.y /= u_aspect; else d.x *= u_aspect;\n float g = exp(-dot(d, d) / max(u_radius * u_radius, 1e-6));\n gl_FragColor = vec4(texture2D(u_src, uv).xyz + u_amount * g, 1.0);\n}",advect:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform float u_dt;\nuniform float u_diss;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 back = uv - texture2D(u_vel, uv).xy * u_dt;\n gl_FragColor = vec4(texture2D(u_src, clamp(back, 0.0, 1.0)).xyz * u_diss, 1.0);\n}",curl:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).y;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).y;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).x;\n gl_FragColor = vec4(0.5 * ((r - l) - (t - b)), 0.0, 0.0, 1.0);\n}",confine:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_curl;\nuniform vec2 u_texel;\nuniform float u_eps;\nuniform float u_dt;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_curl, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_curl, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_curl, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_curl, uv - vec2(0.0, u_texel.y)).x;\n float c = texture2D(u_curl, uv).x;\n vec2 grad = 0.5 * vec2(abs(r) - abs(l), abs(t) - abs(b));\n vec2 n = grad / (length(grad) + 1e-5);\n vec2 force = u_eps * c * vec2(n.y, -n.x);\n vec2 v = texture2D(u_vel, uv).xy + force * u_dt;\n gl_FragColor = vec4(clamp(v, -64.0, 64.0), 0.0, 1.0);\n}",divergence:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).y;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).y;\n vec2 c = texture2D(u_vel, uv).xy;\n if (uv.x - u_texel.x < 0.0) l = -c.x;\n if (uv.x + u_texel.x > 1.0) r = -c.x;\n if (uv.y - u_texel.y < 0.0) b = -c.y;\n if (uv.y + u_texel.y > 1.0) t = -c.y;\n gl_FragColor = vec4(0.5 * ((r - l) + (t - b)), 0.0, 0.0, 1.0);\n}",jacobi:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_div;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n float d = texture2D(u_div, uv).x;\n gl_FragColor = vec4((r + l + t + b - d) * 0.25, 0.0, 0.0, 1.0);\n}",subtract:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n vec2 v = texture2D(u_vel, uv).xy - 0.5 * vec2(r - l, t - b);\n gl_FragColor = vec4(v, 0.0, 1.0);\n}",decay:"\nprecision highp float;\nuniform sampler2D u_tex;\nuniform vec2 u_texel;\nuniform float u_value;\nvoid main() {\n gl_FragColor = texture2D(u_tex, gl_FragCoord.xy * u_texel) * u_value;\n}"},splatColor:function(e,t,r){var n=null!=e.dyeAmount?e.dyeAmount:.6;if(!e.rainbow){var o=m(e.tint||"#7FD4FF");return[o[0]*n,o[1]*n,o[2]*n]}var i=Math.atan2(r,t);return[(.5+.5*Math.cos(i))*n,(.5+.5*Math.cos(i+2.0944))*n,(.5+.5*Math.cos(i+4.1888))*n]},step:function(e,t,r){var n=Math.min(r.dt,1/30),o=1/e.res.sim,i=1/e.res.dye,a=function(e,t){return Math.pow(e,60*t)};if(r.moving){var s=null!=t.force?t.force:1;e.use("splat"),e.f1("u_radius",null!=t.radius?t.radius:.1),e.f1("u_aspect",r.aspect),e.f2("u_point",r.px,r.py),e.f2("u_texel",o,o),e.smp("u_src",e.read("velocity"),0),e.f3("u_amount",r.dx*s,r.dy*s,0),e.blit(e.write("velocity")),e.swap("velocity"),e.f2("u_texel",i,i),e.smp("u_src",e.read("dye"),0),e.f3("u_amount",r.col[0],r.col[1],r.col[2]),e.blit(e.write("dye")),e.swap("dye")}e.use("curl"),e.f2("u_texel",o,o),e.smp("u_vel",e.read("velocity"),0),e.blit(e.single("vorticity")),e.use("confine"),e.f2("u_texel",o,o),e.f1("u_eps",null!=t.curl?t.curl:2.2),e.f1("u_dt",n),e.smp("u_vel",e.read("velocity"),0),e.smp("u_curl",e.single("vorticity"),1),e.blit(e.write("velocity")),e.swap("velocity"),e.use("divergence"),e.f2("u_texel",o,o),e.smp("u_vel",e.read("velocity"),0),e.blit(e.single("divergence")),e.use("decay"),e.f2("u_texel",o,o),e.f1("u_value",a(null!=t.pressure?t.pressure:.8,n)),e.smp("u_tex",e.read("pressure"),0),e.blit(e.write("pressure")),e.swap("pressure"),e.use("jacobi"),e.f2("u_texel",o,o),e.smp("u_div",e.single("divergence"),1);for(var l=Math.max(1,Math.min(t.pressureIterations||6,40)),c=0;c<l;c++)e.smp("u_p",e.read("pressure"),0),e.blit(e.write("pressure")),e.swap("pressure");e.use("subtract"),e.f2("u_texel",o,o),e.smp("u_p",e.read("pressure"),0),e.smp("u_vel",e.read("velocity"),1),e.blit(e.write("velocity")),e.swap("velocity"),e.use("advect"),e.f1("u_dt",n),e.f2("u_texel",o,o),e.smp("u_vel",e.read("velocity"),0),e.smp("u_src",e.read("velocity"),0),e.f1("u_diss",a(null!=t.decay?t.decay:.985,n)),e.blit(e.write("velocity")),e.swap("velocity"),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.smp("u_src",e.read("dye"),1),e.f1("u_diss",a(null!=t.dyeFade?t.dyeFade:.97,n)),e.blit(e.write("dye")),e.swap("dye")}}},blobs:{doc:{summary:"Liquid-glass blobs that follow the pointer: a chain of metaballs refracting the content behind them, stretching apart on a fast flick and relaxing back to a single circle at rest.",params:{count:{default:1,unit:"count",structural:!0,summary:"independent drifting blobs, on top of the trail chain"},trail:{default:7,unit:"count",structural:!0,summary:"blobs in the follow-the-leader chain. Unrolled at compile time, so it rebuilds."},radius:{default:46,unit:"px",summary:"blob radius at rest"},color:{default:"#EAF4EE",unit:"color",summary:"glass tint"},refract:{default:70,unit:"px",summary:"how far the glass bends what is behind it"},rim:{default:.6,unit:"ratio",summary:"brightness of the rim light"},alpha:{default:1,unit:"ratio",summary:"overall opacity"},iridescence:{default:.8,unit:"ratio",summary:"colour shift across the rim"},dispersion:{default:1,unit:"ratio",summary:"per-channel refraction spread"},frost:{default:.25,unit:"ratio",summary:"blur of what shows through"}}},structural:["count","trail"],stage:"color",overlay:!0,mips:!0,decl:function(e){return"\n uniform vec3 ".concat(e,"blobs[").concat(12,"];\n uniform int ").concat(e,"count;\n uniform vec3 ").concat(e,"tint;\n uniform float ").concat(e,"refract;\n uniform float ").concat(e,"rim;\n uniform float ").concat(e,"alpha;\n uniform float ").concat(e,"irid;\n uniform float ").concat(e,"disp;\n uniform float ").concat(e,"frost;\n float ").concat(e,"hash(vec3 v) {\n return fract(sin(dot(v, vec3(21.9898, 63.233, 41.719))) * 41739.317);\n }\n float ").concat(e,"noise(vec3 v) {\n vec3 f = floor(v);\n vec3 r = v - f;\n r = r * r * (3.0 - 2.0 * r);\n float c000 = ").concat(e,"hash(f);\n float c100 = ").concat(e,"hash(f + vec3(1.0, 0.0, 0.0));\n float c010 = ").concat(e,"hash(f + vec3(0.0, 1.0, 0.0));\n float c110 = ").concat(e,"hash(f + vec3(1.0, 1.0, 0.0));\n float c001 = ").concat(e,"hash(f + vec3(0.0, 0.0, 1.0));\n float c101 = ").concat(e,"hash(f + vec3(1.0, 0.0, 1.0));\n float c011 = ").concat(e,"hash(f + vec3(0.0, 1.0, 1.0));\n float c111 = ").concat(e,"hash(f + vec3(1.0, 1.0, 1.0));\n return mix(\n mix(mix(c000, c100, r.x), mix(c010, c110, r.x), r.y),\n mix(mix(c001, c101, r.x), mix(c011, c111, r.x), r.y), r.z);\n }")},code:function(e){return"\n {\n float field = 0.0;\n vec2 grad = vec2(0.0);\n for (int bi = 0; bi < ".concat(12,"; bi++) {\n if (bi >= ").concat(e,"count) break;\n vec2 bd = frag - ").concat(e,"blobs[bi].xy;\n float br = ").concat(e,"blobs[bi].z;\n float dd = max(dot(bd, bd), 1.0);\n field += (br * br) / dd;\n grad += (-2.0 * (br * br) / (dd * dd)) * bd;\n }\n float bmask = smoothstep(0.6, 1.0, field);\n if (bmask > 0.003) {\n float gmag = length(grad);\n vec2 g2 = gmag > 1e-6 ? -grad / gmag : vec2(0.0);\n // Pseudo-3D surface normal from the 2D field. For a\n // metaball field (sum of r^2/d^2), 1/sqrt(field) IS the\n // normalized radial position: 0 at the centre, 1 at the\n // surface. That yields a true hemisphere profile — the\n // curvature (and therefore refraction) varies smoothly\n // across the WHOLE disc, not just an edge annulus.\n float s = clamp(inversesqrt(max(field, 1e-4)), 0.0, 1.0);\n vec3 n = normalize(vec3(g2 * s, sqrt(max(1.0 - s * s, 0.004))));\n vec3 rd = vec3(0.0, 0.0, -1.0);\n\n // Dispersion: refract each channel with a slightly\n // different index (water-glass ~1.33). Near the rim the\n // exit direction flattens (|z| -> 0), so the sampling\n // offsets stretch — producing the smooth concentric\n // colour-fringed bands of a thick lens.\n float ca = 0.03 * ").concat(e,"disp;\n vec3 tR = refract(rd, n, 1.0 / (1.33 - ca));\n vec3 tG = refract(rd, n, 1.0 / 1.33);\n vec3 tB = refract(rd, n, 1.0 / (1.33 + ca));\n vec2 oR = tR.xy * (").concat(e,"refract / max(abs(tR.z), 0.3));\n vec2 oG = tG.xy * (").concat(e,"refract / max(abs(tG.z), 0.3));\n vec2 oB = tB.xy * (").concat(e,"refract / max(abs(tB.z), 0.3));\n\n // Blur grows with how far the ray was bent (mip bias), so\n // strongly-refracted regions smear smoothly instead of\n // showing sharp displaced copies. frost adds a base blur.\n float lod = ").concat(e,"frost * 5.0 + log2(1.0 + length(oG) * 0.035);\n vec2 px = 1.0 / u_res;\n vec4 sG = texture2D(u_tex, clamp(uv + oG * px, 0.002, 0.998), lod);\n vec3 refr;\n refr.r = texture2D(u_tex, clamp(uv + oR * px, 0.002, 0.998), lod).r;\n refr.g = sG.g;\n refr.b = texture2D(u_tex, clamp(uv + oB * px, 0.002, 0.998), lod).b;\n // Blend in (approximately) linear light for clean fringes.\n refr = pow(max(refr, 0.0), vec3(2.2));\n\n vec3 tintLin = pow(").concat(e,"tint, vec3(2.2));\n vec3 bodyLin = mix(tintLin * 0.35, refr, sG.a);\n\n // Glass darkens toward the silhouette (absorption), the\n // opposite of an additive glow ring.\n float edge = pow(1.0 - clamp(n.z, 0.0, 1.0), 1.5);\n bodyLin *= 1.0 - 0.35 * ").concat(e,"rim * edge;\n vec3 body = pow(max(bodyLin, 0.0), vec3(1.0 / 2.2));\n\n // Sparse iridescent glints: two drifting value-noise\n // fields sampled on the reflection direction, one warm\n // one cool, sharpened hard so only sparkles survive.\n vec3 rf = reflect(rd, n);\n float nA = ").concat(e,"noise(rf * 2.3 + u_time * 0.5);\n float nB = ").concat(e,"noise(rf * 2.3 - u_time * 0.5);\n vec3 glint = pow(max(vec3(0.30, 0.52, 0.86) * nA +\n vec3(0.80, 0.56, 0.34) * nB, 0.0), vec3(6.0));\n body += glint * ").concat(e,"irid;\n\n // Small hard specular from a fixed key light.\n vec3 L = normalize(vec3(-0.5, 0.7, 0.6));\n float spec = pow(max(dot(reflect(-L, n), vec3(0.0, 0.0, 1.0)), 0.0), 60.0);\n body += spec * 0.35;\n\n ovCol = body;\n ovA = max(ovA, bmask * ").concat(e,"alpha);\n }\n }")},uniforms:function(e,t){return{tint:["3fv",m(e.color||"#EAF4EE")],refract:["1f",(null!=e.refract?e.refract:70)*t],rim:["1f",null!=e.rim?e.rim:.6],alpha:["1f",null!=e.alpha?e.alpha:1],irid:["1f",null!=e.iridescence?e.iridescence:.8],disp:["1f",null!=e.dispersion?e.dispersion:1],frost:["1f",null!=e.frost?e.frost:.25]}},init:function(e,t,r,n){for(var o=(e.radius||46)*t,i=Math.max(1,Math.min(null!=e.trail?e.trail:7,12)),a=[],s=0,l=0;l<i;l++){var c=Math.pow(.86,l);a.push(c),s+=c*c}for(var u=Math.sqrt(s),d=a.map(function(e){return o*e/u}),f=a.map(function(e,t){return.85*o*Math.pow(.955,t)}),p=function(e,t){return e+Math.random()*(t-e)},h=Math.max(0,Math.min((e.count||1)-1,12-i)),y=[],m=0;m<h;m++){var v=p(0,2*Math.PI),b=p(30,80)*t;y.push({x:p(o,r-o),y:p(o,n-o),r:o*p(.45,.8),vx:Math.cos(v)*b,vy:Math.sin(v)*b,phase:p(0,2*Math.PI)})}for(var g={x:.5*r,y:.55*n},w=[],_=0;_<i;_++)w.push({x:g.x,y:g.y});return{head:g,chain:w,nTrail:i,drifters:y,trailIdleR:d,trailMoveR:f,stretch:0,seg:.9*o}},tick:function(e,t){var r=Math.min(t.dt,.05),n=t.w,o=t.h,i=1-Math.exp(9*-r);e.head.x+=(t.mouseX-e.head.x)*i,e.head.y+=(t.mouseY-e.head.y)*i;var a=e.chain;a[0].x=e.head.x,a[0].y=e.head.y;for(var s=1-Math.exp(16*-r),l=1;l<a.length;l++){var u=a[l-1],d=a[l],f=u.x-d.x,p=u.y-d.y,h=Math.hypot(f,p)||1e-4,y=e.seg;h>y&&(d.x+=f*(1-y/h),d.y+=p*(1-y/h)),d.x+=(u.x-d.x)*s,d.y+=(u.y-d.y)*s}var m=a[a.length-1],v=Math.hypot(m.x-e.head.x,m.y-e.head.y),b=Math.max(1,e.seg*(e.nTrail-1)),g=Math.min(1,v/b);e.stretch+=(g-e.stretch)*(1-Math.exp(8*-r));var w,_=c(e.drifters);try{for(_.s();!(w=_.n()).done;){var x=w.value;x.x+=x.vx*r,x.y+=x.vy*r,x.x<x.r?(x.x=x.r,x.vx=Math.abs(x.vx)):x.x>n-x.r&&(x.x=n-x.r,x.vx=-Math.abs(x.vx)),x.y<x.r?(x.y=x.r,x.vy=Math.abs(x.vy)):x.y>o-x.r&&(x.y=o-x.r,x.vy=-Math.abs(x.vy)),x.phase+=1.6*r}}catch(e){_.e(e)}finally{_.f()}for(var k=new Float32Array(36),O=e.stretch,S=0;S<e.nTrail;S++){var E=a[S];k[3*S]=E.x,k[3*S+1]=E.y,k[3*S+2]=e.trailIdleR[S]+(e.trailMoveR[S]-e.trailIdleR[S])*O}return e.drifters.forEach(function(t,r){var n=e.nTrail+r;k[3*n]=t.x,k[3*n+1]=t.y,k[3*n+2]=t.r*(1+.12*Math.sin(t.phase))}),[{name:"blobs",kind:"3fv",value:k},{name:"count",kind:"1i",value:e.nTrail+e.drifters.length}]}}};function m(e){return[1,3,5].map(function(t){return parseInt(e.slice(t,t+2),16)/255})}var v=Object.keys(y).concat("switch"),b=["px","ratio","deg","count","seconds"];function g(e,t,r){if(!Array.isArray(r)||r.length<2)return!1;var n,o=c(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;if("number"!=typeof i||!Number.isFinite(i))return!1}}catch(e){o.e(e)}finally{o.f()}var a=y[e],s=a&&a.doc&&a.doc.params&&a.doc.params[t];return!!s&&b.includes(s.unit)}function w(e,t){var r=e.length-1,n=Math.min(1,Math.max(0,t))*r,o=Math.min(r-1,Math.floor(n));return e[o]+(e[o+1]-e[o])*(n-o)}var _={linear:function(e){return e},in:function(e){return e*e*e},out:function(e){return 1-Math.pow(1-e,3)},"in-out":function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},back:function(e){return 1+2.70158*Math.pow(e-1,3)+1.70158*Math.pow(e-1,2)}},x=Object.keys(_);function k(e){return e?"texElementSubImage2D"in e?"sub-image":"texElementImage2D"in e?"image":null:null}function O(e){e.removeAttribute("content"),e.removeAttribute("layoutsubtree"),e.removeAttribute("data-nodality-raster-api")}var S="attribute vec2 a; void main(){ gl_Position = vec4(a, 0.0, 1.0); }",E={warp:["warped"],cell:["center","edge"],displace:["sampleP","chroma"],color:["col","edgeCol","edgeCov","ovCol","ovA"]},j=(["field"].concat(s(Object.keys(E))),"what steers the effect: ".concat(h.join(", "),". "),"easing for this node's local progress: ".concat(x.join(", ")),function(e){return"fld_".concat(String(e).replace(/[^A-Za-z0-9_]/g,""))}),P=function(e){return!0===e.masked?"mask":"string"==typeof e.masked?e.masked:null},C=function(e){return"edge"===e||"edgeCov"===e||"ovA"===e?"float":"col"===e||"edgeCol"===e||"ovCol"===e?"vec3":"vec2"},T={over:function(e,t){return t},add:function(e,t){return"min(".concat(e," + ").concat(t,", vec3(1.0))")},screen:function(e,t){return"1.0 - (1.0 - ".concat(e,") * (1.0 - ").concat(t,")")},multiply:function(e,t){return"".concat(e," * ").concat(t)},difference:function(e,t){return"abs(".concat(e," - ").concat(t,")")},lighten:function(e,t){return"max(".concat(e,", ").concat(t,")")},darken:function(e,t){return"min(".concat(e,", ").concat(t,")")}},A=function(){return{field:"",warp:"",cell:"",displace:"",color:""}};function R(e,t){var r,n=[],o=c(e||[]);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i&&i.op){var a={node:i,i:t.length};t.push(i),"merge"===i.op&&(a.a=R(i.a,t),a.b=R(i.b,t)),n.push(a)}}}catch(e){o.e(e)}finally{o.f()}return n}function M(e,t){var r,n=c(e);try{var o=function(){var e=r.value,n=e.node;if("merge"===n.op)return function(e,t){var r="u".concat(e.i,"_"),n=T[e.node.mode]||T.over,o=A(),i=A();M(e.a||[],o),M(e.b||[],i),t.field+=o.field+i.field;for(var a=function(){var e=l[s];if(!o[e]&&!i[e])return 1;var a=E[e],c=" {\n";a.forEach(function(e,t){c+=" ".concat(C(e)," pre").concat(t," = ").concat(e,";\n")}),c+=o[e],a.forEach(function(e,t){c+=" ".concat(C(e)," bra").concat(t," = ").concat(e,";\n")}),a.forEach(function(e,t){c+=" ".concat(e," = pre").concat(t,";\n")}),c+=i[e],a.forEach(function(e,t){var o="vec3"===C(e)?n("bra".concat(t),e):e;c+=" ".concat(e," = mix(bra").concat(t,", ").concat(o,", ").concat(r,"mix);\n")}),c+=" }\n",t[e]+=c},s=0,l=["warp","cell","displace","color"];s<l.length;s++)a()}(e,t),0;var o=y[n.op];if(!o)return 0;var i="u".concat(e.i,"_"),a=Array.isArray(o.stage)?o.stage:[o.stage],s=P(n);a.forEach(function(e){var r=o.code(i,n,e)+"\n";if(s&&E[e]){var a=E[e],l=a.map(function(e,t){return" ".concat(C(e)," msv").concat(t," = ").concat(e,";")}).join("\n"),c=a.map(function(e,t){return" ".concat(e," = mix(msv").concat(t,", ").concat(e,", ").concat(j(s),");")}).join("\n");r=" {\n".concat(l,"\n").concat(r,"\n").concat(c,"\n }\n")}t["field"===e||"warp"===e||"cell"===e||"displace"===e?e:"color"]+=r})};for(n.s();!(r=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}function I(e,t,r,n){var o=n&&n.fade||"opaque",i=function(e){var t=Number(e);return(Number.isFinite(t)?t:0).toFixed(5)},a=function(e){return e&&e.w>0&&e.h>0?e.h/e.w:0},l=!(!n||"width"!==n.fit),c=n&&Array.isArray(n.crossfade)&&2===n.crossfade.length?n.crossfade:null,u="",d=new Set;t.forEach(function(e){var t=y[e.op];t&&t.producesField&&d.add(e.as||"mask");var r=P(e);r&&d.add(r)});var f=s(d).map(function(e){return" float ".concat(j(e)," = 1.0;")}).join("\n");t.forEach(function(e,t){var r=y[e.op];r&&(u+=r.decl("u".concat(t,"_"),e)+"\n")});var p=function(e){var t=e&&e.node&&e.node.side;if("old"!==t&&"new"!==t)return null;var r=y[e.node.op],o=r?Array.isArray(r.stage)?r.stage:[r.stage]:[];return o.every(function(e){return"color"===e})?n?t:(console.warn('[nodality] side:"'.concat(t,'" has no meaning without a ')+"transition — there is only one image. Ignoring it."),null):(console.warn('[nodality] "'.concat(e.node.op,'" is a ').concat(o.join("+")," op, ")+'so side:"'.concat(t,'" cannot apply to it — a sided op must be colour-only, ')+"because both sides share one sampling coordinate. Running it on the blended result instead."),null)},h=e.filter(function(e){return!p(e)}),m=e.filter(function(e){return"old"===p(e)}),v=e.filter(function(e){return"new"===p(e)}),b=A();M(h,b);var g=function(e,t){if(!e.length)return"";var r=A();if(M(e,r),!r.color)return"";var n=E.color.filter(function(e){return"col"!==e}).map(function(e){return" ".concat(C(e)," ").concat(e," = ").concat("vec3"===C(e)?"vec3(0.0)":"0.0",";")}).join("\n");return" {\n vec2 frag = p;\n vec3 col = ".concat(t,".rgb;\n").concat(n,"\n").concat(r.color,"\n ").concat(t,".rgb = col;\n }\n")},w=g(m,"o"),_=g(v,"n"),x=b.field,k=b.warp,O=b.cell,S=b.displace,T=b.color,R=t,I=R.some(function(e){return"edges"===e.op})?"":" col *= 1.0 - edge * 0.55;",D=R.some(function(e){return(y[e.op]||{}).chroma})?n?"\n vec2 cdev = vec2(chroma.x, chroma.y);\n col.r = nodSampleAt(sampleP + cdev).r;\n col.b = nodSampleAt(sampleP - cdev).b;":"\n vec2 cpx = vec2(chroma.x, -chroma.y) / u_res;\n col.r = texture2D(u_tex, clamp(uv + cpx, 0.001, 0.999)).r;\n col.b = texture2D(u_tex, clamp(uv - cpx, 0.001, 0.999)).b;":"",L=r?"uniform vec2 u_probe;\n":"",B=r?"u_probe + vec2(0.5)":"gl_FragCoord.xy";return"\nprecision highp float;\n".concat(n?"#define NOD_TRANSITION 1\n":"","uniform sampler2D u_tex;\nuniform vec2 u_res;\nuniform vec2 u_mouse;\nuniform float u_time;\nuniform float u_t; // phase T1: transition progress, 0..1\n\n// Op uniforms are declared HERE, above the transition helpers, because a\n// per-side op's code is emitted inside nodSampleAt. GLSL requires\n// declaration before use, and with the declarations further down every\n// sided op failed to compile with \"'u0_amount' : undeclared identifier\".\n").concat(L).concat(u,"\n").concat(n?"\n// ── phase T2: transition mode ──────────────────────────────────────\n// Two captures instead of one. u_tex is the NEW element, u_old the\n// frozen OLD one, and u_box is the content box they are both drawn\n// into — lerped from the old rect to the new rect by u_t. So geometry\n// (the box) and pixels (the effect chain) stay separate problems, which\n// is the split View Transitions also makes and the one that keeps this\n// maintainable.\nuniform sampler2D u_old;\n".concat(n&&n.newImage?"uniform sampler2D u_newimg;":"",'\n// Phase T2, gap 2. TWO boxes, not one. With a single shared box the\n// only expressible motion is "both sides march together", so the classic\n// "old slides out while new slides in" was impossible. Each capture now\n// interpolates in its own rect, which keeps per-side motion in the\n// GEOMETRY tier (P-3) instead of needing per-side op scoping.\nuniform vec4 u_boxOld; // x, y, w, h — device px, top-down\nuniform vec4 u_boxNew;\n\n// sRGB <-> linear. A naive crossfade in gamma space dips visibly in\n// brightness at mid-fade on photographic content; this is the classic\n// artifact and it is why the mix below is not just mix().\nvec3 nodToLinear(vec3 c) { return pow(c, vec3(2.2)); }\nvec3 nodToSRGB(vec3 c) { return pow(c, vec3(1.0 / 2.2)); }\n\n// Premultiplied, so anti-aliased edges over transparency do not pick up\n// a dark halo as the two sides cross.\nvec4 nodBlend(vec4 a, vec4 b, float t, float d) {\n vec3 pa = nodToLinear(a.rgb) * a.a;\n vec3 pb = nodToLinear(b.rgb) * b.a;\n').concat("morph"===o?"\n // MORPH — a per-pixel CHOICE, not a mix. d is a stable hash of the\n // output pixel, so each pixel flips from old to new at its own point\n // in t. At any instant almost every pixel is showing exactly ONE\n // side, and the two contents are never both legible at once.\n //\n // A uniform crossfade cannot do this: at t=0.5 it is by definition\n // 50% of each, which reads as a double exposure the moment the two\n // states differ much — a wide nav bar and a small card, say.\n float k = smoothstep(d - 0.12, d + 0.12, t);\n vec3 pm = pa * (1.0 - k) + pb * k;\n float al = a.a * (1.0 - k) + b.a * k;":"dissolve"===o?'\n // DISSOLVE — a true cross-dissolve: alpha lerps between the two.\n // Correct, and the right choice when one side really should fade to\n // nothing. Wrong for a shape morph, because any region covered by\n // only ONE side is translucent for the whole transition and the\n // morph reads as "everything is disappearing".\n vec3 pm = mix(pa, pb, t);\n float al = mix(a.a, b.a, t);':"\n // OPAQUE (default) — the colour crosses over without the shape\n // thinning out. The coverage-weighted lerp already gives that for\n // free, and it is worth seeing why:\n //\n // both sides cover a.a = b.a = 1 -> w = 1 at every t. Solid\n // throughout. No mid-fade.\n // only the old b.a = 0 -> w = 1-t. Releases.\n // only the new a.a = 0 -> w = t. Arrives.\n //\n // So one expression covers the union case AND each side's release,\n // linearly, with no curve to pop against.\n vec3 pm = pa * (1.0 - t) + pb * t;\n float al = a.a * (1.0 - t) + b.a * t;","\n return vec4(nodToSRGB(pm / max(al, 1e-4)), al);\n}\n\n// EVERY fetch in transition mode goes through here. A displace-stage op\n// that sampled u_tex directly — aberration does exactly that for its\n// per-channel taps — would show fringes from the new capture only, with\n// the old one silently absent from those channels.\n// Takes a position in DEVICE PX (sampleP space), not uv, because the two\n// captures no longer share a uv. Each is mapped through its own box and\n// masked to it, then blended.\nvec2 nodBoxUV(vec4 box, vec2 p) {\n return vec2((p.x - box.x) / max(box.z, 1.0),\n 1.0 - (p.y - box.y) / max(box.w, 1.0));\n}\nfloat nodInBox(vec2 uv) {\n return step(0.0, uv.x) * step(uv.x, 1.0) * step(0.0, uv.y) * step(uv.y, 1.0);\n}\n").concat(l?'// fit: "width" — the capture\'s own height at this box width.\nvec2 nodFitUV(vec4 box, vec2 p, float aspect) {\n return vec2((p.x - box.x) / max(box.z, 1.0),\n 1.0 - (p.y - box.y) / max(box.z * aspect, 1.0));\n}\n':"","vec4 nodSampleAt(vec2 p) {\n").concat(l?" vec2 uo = nodFitUV(u_boxOld, p, ".concat(i(a(n.oldRect)),");\n vec2 un = nodFitUV(u_boxNew, p, ").concat(i(a(n.newRect)),");"):" vec2 uo = nodBoxUV(u_boxOld, p);\n vec2 un = nodBoxUV(u_boxNew, p);","\n vec4 o = texture2D(u_old, clamp(uo, 0.001, 0.999));\n // With newImage the new side is a capture of the ELEMENT, so both\n // sides can travel between their own rects and converge into one\n // shape. Without it the new side is the HOST capture, which can only\n // be mapped 1:1 — the destination then sits at its final place from\n // t=0 while the old shrinks toward it, and the result reads as two\n // things on screen at once rather than one thing morphing.\n vec4 n = texture2D(").concat(n&&n.newImage?"u_newimg":"u_tex",",\n clamp(un, 0.001, 0.999));\n o.a *= nodInBox(uo);\n n.a *= nodInBox(un);\n").concat(l?" // Clipped to the travelling box as well, so a tall capture in a\n // short box shows its top rather than spilling below it.\n o.a *= nodInBox(nodBoxUV(u_boxOld, p));\n n.a *= nodInBox(nodBoxUV(u_boxNew, p));\n":"").concat(w).concat(_,"\n // The threshold each pixel flips at. Mostly a COHERENT ramp down the\n // box with a little grain on top — pure white noise chooses correctly\n // (never two legible images at once) but reads as television static\n // rather than as one thing becoming another. The ramp makes it a\n // wipe; the grain keeps the edge from looking like a ruler.\n float grain = fract(sin(dot(floor(p / 3.0), vec2(12.9898, 78.233))) * 43758.5453);\n float ramp = clamp(un.y, 0.0, 1.0);\n float d = ramp * 0.82 + grain * 0.18;\n return nodBlend(o, n, ").concat(c?"smoothstep(".concat(i(c[0]),", ").concat(i(c[1]),", u_t)"):"u_t",", d);\n}"):"","\nvoid main() {\n vec2 fc = ").concat(B,";\n vec2 frag = vec2(fc.x, u_res.y - fc.y);\n").concat(f,"\n").concat(x,"\n vec2 warped = frag;\n").concat(k,"\n vec2 center = warped;\n float edge = 0.0;\n").concat(O,"\n vec2 sampleP = warped;\n vec2 chroma = vec2(0.0);\n").concat(S).concat(r?"\n vec2 q = clamp(sampleP / u_res, 0.0, 1.0) * 255.0;\n vec2 hi = floor(q);\n vec2 lo = floor(fract(q) * 255.0);\n gl_FragColor = vec4(hi.x, lo.x, hi.y, lo.y) / 255.0;\n}":"\n".concat(n?"\n // uv stays defined, as the NEW box's, for ops that reference it.\n vec2 uv = nodBoxUV(u_boxNew, sampleP);\n vec4 tex = nodSampleAt(sampleP);":"\n vec2 uv = vec2(sampleP.x / u_res.x, 1.0 - sampleP.y / u_res.y);\n vec4 tex = texture2D(u_tex, clamp(uv, 0.001, 0.999));","\n vec3 col = tex.rgb;").concat(D,"\n vec3 edgeCol = vec3(1.0);\n float edgeCov = 0.0;\n vec3 ovCol = vec3(0.0);\n float ovA = 0.0;\n").concat(T,"\n").concat(I,"\n // content OVER border\n float baseA = tex.a + edgeCov * (1.0 - tex.a);\n vec3 baseRGB = (col * tex.a + edgeCol * edgeCov * (1.0 - tex.a)) / max(baseA, 1e-4);\n // overlay OVER (content+border)\n float outA = ovA + baseA * (1.0 - ovA);\n vec3 outRGB = (ovCol * ovA + baseRGB * baseA * (1.0 - ovA)) / max(outA, 1e-4);\n gl_FragColor = vec4(outRGB, outA);\n}"))}var D=/\d(?:vw|vh|vmin|vmax|dvw|dvh|svw|svh|lvw|lvh)\b/i,L=["font-size","line-height","letter-spacing","word-spacing"],B=["color","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-transform","text-decoration-color","white-space","word-break"],W=["background-color","background-image","background-size","background-position","background-repeat","background-clip","border-radius","box-shadow","opacity","outline-color"],F=new Set(["none","rgba(0, 0, 0, 0)","transparent","0px","auto","1","repeat","0% 0%","border-box","0% 0% / auto repeat scroll padding-box border-box"]),z=new Map,N=null,q=/@font-face\s*{[^}]*}/gi,U=/font-family\s*:\s*(['"]?)([^;'"]+)\1/i,H=/font-weight\s*:\s*([^;]+)/i,G=/font-style\s*:\s*([^;]+)/i,K=/url\((['"]?)([^)'"]+)\1\)/gi,X=/unicode-range\s*:\s*([^;}]+)/i;function J(e,t){if(!e)return!0;var r,n=[],o=c(e.split(","));try{for(o.s();!(r=o.n()).done;){var i=r.value,a=/U\+([0-9a-fA-F?]+)(?:-([0-9a-fA-F]+))?/.exec(i.trim());if(a)if(-1!==a[1].indexOf("?"))n.push([parseInt(a[1].replace(/\?/g,"0"),16),parseInt(a[1].replace(/\?/g,"F"),16)]);else{var s=parseInt(a[1],16);n.push([s,a[2]?parseInt(a[2],16):s])}}}catch(e){o.e(e)}finally{o.f()}if(!n.length)return!0;var l,u=c(t);try{for(u.s();!(l=u.n()).done;)for(var d=l.value.codePointAt(0),f=0;f<n.length;f++)if(d>=n[f][0]&&d<=n[f][1])return!0}catch(e){u.e(e)}finally{u.f()}return!1}function $(e,t){var r,n=[],o=c(e.match(q)||[]);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=U.exec(i);if(a){var s=[],l=void 0;for(K.lastIndex=0;l=K.exec(i);)try{s.push(new URL(l[2],t).href)}catch(e){}s.length&&n.push({family:a[2].trim().toLowerCase(),weight:(H.exec(i)||[,"400"])[1].trim(),style:(G.exec(i)||[,"normal"])[1].trim(),range:(X.exec(i)||[,""])[1].trim(),block:i,urls:s})}}}catch(e){o.e(e)}finally{o.f()}return n}function V(){return Y.apply(this,arguments)}function Y(){return(Y=a(n().m(function e(){var t,r,o,i,a,l,c,u,d,f,p,h,y,m,v,b,g;return n().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!N){e.n=1;break}return e.a(2,N);case 1:t=[],r=0,o=Array.from(document.styleSheets||[]);case 2:if(!(r<o.length)){e.n=10;break}i=o[r],a=null;try{a=i.cssRules}catch(e){a=null}if(!a){e.n=3;break}for(l=0,c=Array.from(a);l<c.length;l++)(u=c[l]).constructor&&"CSSFontFaceRule"===u.constructor.name&&t.push.apply(t,s($(u.cssText,i.href||location.href)));e.n=9;break;case 3:if(!i.href){e.n=9;break}return e.p=4,e.n=5,fetch(i.href,{mode:"cors"});case 5:if(!(d=e.v).ok){e.n=7;break}return f=t.push,p=t,h=s,y=$,e.n=6,d.text();case 6:m=e.v,v=i.href,b=y(m,v),g=h(b),f.apply.call(f,p,g);case 7:e.n=9;break;case 8:e.p=8,e.v;case 9:r++,e.n=2;break;case 10:return N=t,e.a(2,t)}},e,null,[[4,8]])}))).apply(this,arguments)}function Q(e){return Z.apply(this,arguments)}function Z(){return(Z=a(n().m(function e(t){var r,o,i,a,s,l,c,u;return n().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!z.has(t)){e.n=1;break}return e.a(2,z.get(t));case 1:return r=null,e.p=2,e.n=3,fetch(t,{mode:"cors"});case 3:if(!(o=e.v).ok){e.n=5;break}return c=Uint8Array,e.n=4,o.arrayBuffer();case 4:for(u=e.v,i=new c(u),a="",s=0;s<i.length;s++)a+=String.fromCharCode(i[s]);l=t.endsWith(".woff2")?"font/woff2":t.endsWith(".woff")?"font/woff":"font/ttf",r="data:".concat(l,";base64,").concat(btoa(a));case 5:e.n=7;break;case 6:e.p=6,e.v,r=null;case 7:return z.set(t,r),e.a(2,r)}},e,null,[[2,6]])}))).apply(this,arguments)}function ee(e){for(var t=new Map,r=0,n=[e].concat(s(e.querySelectorAll("*")));r<n.length;r++){var o=n[r],i=window.getComputedStyle(o),a=(i.fontFamily||"").split(",")[0].trim().replace(/^['"]|['"]$/g,"");if(a){var l="".concat(a.toLowerCase(),"|").concat(i.fontWeight,"|").concat(i.fontStyle);t.has(l)||t.set(l,{family:a.toLowerCase(),weight:i.fontWeight,style:i.fontStyle})}}return Array.from(t.values())}function te(){return(te=a(n().m(function e(t){var r,o,i,a,s,l,u,d,f,p,h,y,m,v;return n().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,V();case 1:r=e.v,e.n=3;break;case 2:return e.p=2,e.v,e.a(2,"");case 3:if(r.length){e.n=4;break}return e.a(2,"");case 4:if(o=ee(t),i=t.textContent||"",a=r.filter(function(e){return J(e.range,i)&&o.some(function(t){return t.family===e.family&&(e.style===t.style||"normal"===e.style)&&(e.weight===String(t.weight)||/\s/.test(e.weight))})}),a.length){e.n=5;break}return e.a(2,"");case 5:s=[],l=c(a),e.p=6,l.s();case 7:if((u=l.n()).done){e.n=18;break}d=u.value,f=null,p=c(d.urls),e.p=8,p.s();case 9:if((h=p.n()).done){e.n=12;break}return y=h.value,e.n=10,Q(y);case 10:if(!(f=e.v)){e.n=11;break}return e.a(3,12);case 11:e.n=9;break;case 12:e.n=14;break;case 13:e.p=13,m=e.v,p.e(m);case 14:return e.p=14,p.f(),e.f(14);case 15:if(f){e.n=16;break}return e.a(3,17);case 16:s.push("@font-face{font-family:'".concat(d.family,"';font-style:").concat(d.style,";")+"font-weight:".concat(d.weight,";src:url(").concat(f,");}"));case 17:e.n=7;break;case 18:e.n=20;break;case 19:e.p=19,v=e.v,l.e(v);case 20:return e.p=20,l.f(),e.f(20);case 21:return e.a(2,s.join(""))}},e,null,[[8,13,14,15],[6,19,20,21],[0,2]])}))).apply(this,arguments)}var re={coarse:"(pointer: coarse)",fine:"(pointer: fine)",hover:"(hover: hover)","no-hover":"(hover: none)","reduced-motion":"(prefers-reduced-motion: reduce)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)"};function ne(e){if("function"==typeof e)try{return!!e()}catch(e){return!1}if("boolean"==typeof e)return e;if("string"!=typeof e||""===e)return!1;var t=re[e]||e;if("undefined"==typeof window||"function"!=typeof window.matchMedia)return!1;try{return window.matchMedia(t).matches}catch(e){return!1}}function oe(e,t){if(!Array.isArray(e))return[];if((t||0)>8)return[];var r,n=[],o=c(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i&&"switch"===i.op){var a,s=c(oe((ne(i.when)?i.use:i.else)||[],(t||0)+1));try{for(s.s();!(a=s.n()).done;){var l=a.value;n.push(l)}}catch(e){s.e(e)}finally{s.f()}}else n.push(i)}}catch(e){o.e(e)}finally{o.f()}return n}var ie=new Set(["IMG","VIDEO","CANVAS","IFRAME","INPUT","EMBED","OBJECT","TEXTAREA","SELECT","BR","HR","AREA","SOURCE","TRACK","WBR"]),ae=["objectFit","objectPosition","borderRadius","imageRendering","filter"],se="nodality:raster-param",le=new Set;function ce(){return s(le)}var ue=["op","masked","live"],de=!1;function fe(e,t,r){var n=t,o=r&&r.transition||null;if(!e||"undefined"==typeof document||"undefined"==typeof window)return null;if(!(t&&0!==t.length||o))return null;if(t||(t=[]),t.some(function(e){return e&&"switch"===e.op})&&0===(t=oe(t,0)).length&&!o)return null;var i=[],a=R(t,i);if(t=i,"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return null;if(ie.has(e.tagName)){var d=e.parentElement&&e.parentElement.hasAttribute&&e.parentElement.hasAttribute("data-nodality-raster-host")?e.parentElement:null;if(e=d||function(e){if(!e.parentNode)return null;var t,r={},n=c(ae);try{for(n.s();!(t=n.n()).done;){var o=t.value;e.style[o]&&(r[o]=e.style[o])}}catch(e){n.e(e)}finally{n.f()}var i=document.createElement("div");return i.setAttribute("data-nodality-raster-host",e.tagName.toLowerCase()),i.style.cssText=e.style.cssText,e.parentNode.insertBefore(i,e),i.appendChild(e),e.removeAttribute("style"),Object.assign(e.style,r),e.style.display="block",e.style.width="100%",e.style.height="100%","static"===("function"==typeof getComputedStyle?getComputedStyle(i).position:"static")&&(i.style.position="relative"),i.style.width||(i.style.width="100%"),i.style.height||(i.style.height="100%"),i}(e),!e)return null}if(e.querySelector&&e.querySelector(":scope > canvas[data-nodality-raster]"))return null;var f=function(){var t=e.getBoundingClientRect();return{width:t.width>=2?t.width:e.scrollWidth||0,height:t.height>=2?t.height:e.scrollHeight||0}},m=f();if(m.width<2||m.height<2)return null;var v=Math.max(1,Math.min(r&&r.resolution?r.resolution:window.devicePixelRatio||1,3)),b=t.some(function(e){return(y[e.op]||{}).overlay}),x=t.length>0&&!o&&t.every(function(e){return(y[e.op]||{}).overlay}),E=!(!o||!0!==o.live),j=!x&&(!o||E)&&!t.some(function(e){return!1===e.live}),C=k("undefined"!=typeof WebGL2RenderingContext&&WebGL2RenderingContext.prototype)||k("undefined"!=typeof WebGLRenderingContext&&WebGLRenderingContext.prototype),T=j&&null!==C;j&&!T&&console.info("[nodality] HTML-in-Canvas API not available - raster ops fall back to snapshot capture.");var A=document.createElement("canvas");T&&function(e,t){"sub-image"===t?e.setAttribute("content","drawable"):e.setAttribute("layoutsubtree","")}(A,C);var M={alpha:!0,premultipliedAlpha:!1},z=A.getContext("webgl2",M)||A.getContext("webgl",M);if(!z)return null;var N="undefined"!=typeof WebGL2RenderingContext&&z instanceof WebGL2RenderingContext,q=N&&t.some(function(e){return(y[e.op]||{}).mips}),U=T?k(z):null;T&&U!==C&&(console.info("[nodality] HTML-in-Canvas upload missing on the created context ("+U+" vs "+C+") - snapshot fallback."),O(A),T=!1),"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),A.width=Math.round(m.width*v),A.height=Math.round(m.height*v),A.setAttribute("data-nodality-raster",T?"live":"snapshot"),T&&A.setAttribute("data-nodality-raster-api",U),console.info("[nodality] raster backend:",T?"html-in-canvas (live, "+U+")":"snapshot");var H={width:m.width,height:m.height},G=e;if(T){var K=document.createElement("div"),X=getComputedStyle(e),J="flex"===X.display||"inline-flex"===X.display,$="grid"===X.display||"inline-grid"===X.display,V=function(e){return parseFloat(e)||0},Y=V(X.paddingLeft)+V(X.paddingRight),Q=V(X.paddingTop)+V(X.paddingBottom);for(H.width=Math.max(2,m.width-Y),H.height=Math.max(2,m.height-Q),K.style.cssText="display:".concat(J||$?X.display:"block",";")+"width:".concat(H.width,"px;height:").concat(H.height,"px;"),$&&(K.style.gridTemplateColumns=X.gridTemplateColumns,K.style.gridTemplateRows=X.gridTemplateRows,K.style.gridTemplateAreas=X.gridTemplateAreas,K.style.gap=X.gap,K.style.alignItems=X.alignItems,K.style.justifyItems=X.justifyItems),J&&(K.style.flexDirection=X.flexDirection,K.style.alignItems=X.alignItems,K.style.justifyContent=X.justifyContent,K.style.gap=X.gap),"sub-image"===U&&K.setAttribute("drawable","");e.firstChild;)K.appendChild(e.firstChild);A.appendChild(K),G=K,A.style.cssText="display:block;width:".concat(H.width,"px;height:").concat(H.height,"px;")}else if(A.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(m.width,"px;height:").concat(m.height,"px;")+"pointer-events:none;z-index:2147483000;",x)A.setAttribute("aria-hidden","true");else{A.setAttribute("role","img");var Z=(e.textContent||"").replace(/\s+/g," ").trim();Z&&A.setAttribute("aria-label",Z.slice(0,300))}e.appendChild(A);var ee=function(e,t){var r=z.createShader(e);if(z.shaderSource(r,t),z.compileShader(r),!z.getShaderParameter(r,z.COMPILE_STATUS))throw new Error("[nodality] raster shader: "+z.getShaderInfoLog(r));return r},re=z.createProgram();z.attachShader(re,ee(z.VERTEX_SHADER,S)),z.attachShader(re,ee(z.FRAGMENT_SHADER,I(a,t,!1,o))),z.bindAttribLocation(re,0,"a"),z.linkProgram(re),z.useProgram(re),z.bindBuffer(z.ARRAY_BUFFER,z.createBuffer()),z.bufferData(z.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),z.STATIC_DRAW),z.enableVertexAttribArray(0),z.vertexAttribPointer(0,2,z.FLOAT,!1,0,0);var ne=function(e){return z.getUniformLocation(re,e)},ce=function(e,t,r){"1f"===t?z.uniform1f(e,r):"1i"===t?z.uniform1i(e,r):"2fv"===t?z.uniform2fv(e,r):"3fv"===t&&z.uniform3fv(e,r)},pe=0,he=t.map(function(e,t){return{node:e,i:t}}).filter(function(e){return function(e){for(var t in e)if(g(e.op,t,e[t]))return!0;return!1}(e.node)}),ye=function(e,r){t.forEach(function(t,n){if(!r||r.has(n)){var o=y[t.op];if(o&&o.uniforms){var i=o.uniforms(function(e,t){var r=null,n=e.window||e.ease?function(e,t){var r=Math.min(1,Math.max(0,t)),n=e.window;Array.isArray(n)&&2===n.length&&n[1]!==n[0]&&(r=Math.min(1,Math.max(0,(r-n[0])/(n[1]-n[0]))));var o=e.ease&&_[e.ease];return o?o(r):r}(e,t):t;for(var o in e)g(e.op,o,e[o])&&((r=r||Object.assign({},e))[o]=w(e[o],n));return r||e}(t,pe),v);for(var a in i)ce(e("u".concat(n,"_").concat(a)),i[a][0],i[a][1])}}})};ye(ne);var me=new Set(he.map(function(e){return e.i})),ve=[];t.forEach(function(e,t){var r=y[e.op];r&&"function"==typeof r.init&&ve.push({i:t,def:r,state:r.init(e,v,A.width,A.height)})});var be="undefined"!=typeof performance?performance.now():0,ge=[];t.forEach(function(e,t){var r=y[e.op];if(r&&r.solver){var n=function(e,t){var r=y[e.op];if(!N||!z.getExtension("EXT_color_buffer_float"))return console.info("[nodality] '"+e.op+"' needs WebGL2 float render targets - op skipped."),null;z.getExtension("OES_texture_float_linear");var n=r.solver.resolutions(e,A.width,A.height),o={r:[z.R16F,z.RED],rg:[z.RG16F,z.RG],rgba:[z.RGBA16F,z.RGBA]},i=[],a=function(e,t,r,n){var a=u(o[r],2),s=a[0],l=a[1],c=z.createTexture();z.bindTexture(z.TEXTURE_2D,c);var d=n?z.LINEAR:z.NEAREST;z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,d),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,d),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),z.texImage2D(z.TEXTURE_2D,0,s,e,t,0,l,z.HALF_FLOAT,null);var f=z.createFramebuffer();z.bindFramebuffer(z.FRAMEBUFFER,f),z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_2D,c,0);var p=z.checkFramebufferStatus(z.FRAMEBUFFER)===z.FRAMEBUFFER_COMPLETE;z.viewport(0,0,e,t),z.clearColor(0,0,0,1),z.clear(z.COLOR_BUFFER_BIT);var h={tex:c,fbo:f,w:e,h:t,ok:p};return i.push(h),h},s={},l=!0;for(var c in r.solver.targets){var d=r.solver.targets[c],f=n[d.res],p=u(Array.isArray(f)?f:[f,f],2),h=p[0],m=p[1];d.double?(s[c]={a:a(h,m,d.fmt,d.smooth),b:a(h,m,d.fmt,d.smooth)},l=l&&s[c].a.ok&&s[c].b.ok):(s[c]={a:a(h,m,d.fmt,d.smooth)},l=l&&s[c].a.ok)}z.bindFramebuffer(z.FRAMEBUFFER,null);var v=function(){return i.forEach(function(e){z.deleteFramebuffer(e.fbo),z.deleteTexture(e.tex)})};if(!l)return console.info("[nodality] '"+e.op+"' float targets incomplete - op skipped."),v(),null;var b={};try{for(var g in r.solver.programs){var w=z.createProgram();if(z.attachShader(w,ee(z.VERTEX_SHADER,S)),z.attachShader(w,ee(z.FRAGMENT_SHADER,r.solver.programs[g])),z.bindAttribLocation(w,0,"a"),z.linkProgram(w),!z.getProgramParameter(w,z.LINK_STATUS))throw new Error(g+": "+z.getProgramInfoLog(w));b[g]={prog:w,loc:{}}}}catch(t){for(var _ in console.warn("[nodality] '"+e.op+"' solver programs failed:",t),v(),b)z.deleteProgram(b[_].prog);return null}return z.useProgram(re),{i:t,node:e,def:r,res:n,targets:s,progs:b,cleanup:v,prevX:.5,prevY:.5,primed:!1}}(e,t);n&&ge.push(n)}});var we=function(e,t){var r=null,n={res:e.res,use:function(t){r=e.progs[t],z.useProgram(r.prog)},u:function(e){return e in r.loc||(r.loc[e]=z.getUniformLocation(r.prog,e)),r.loc[e]},f1:function(e,t){z.uniform1f(n.u(e),t)},f2:function(e,t,r){z.uniform2f(n.u(e),t,r)},f3:function(e,t,r,o){z.uniform3f(n.u(e),t,r,o)},smp:function(e,t,r){z.activeTexture(z.TEXTURE0+r),z.bindTexture(z.TEXTURE_2D,t.tex),z.uniform1i(n.u(e),r)},read:function(t){return e.targets[t].a},write:function(t){return e.targets[t].b},single:function(t){return e.targets[t].a},content:{tex:_e},canvasW:A.width,canvasH:A.height,swap:function(t){var r=e.targets[t],n=r.a;r.a=r.b,r.b=n},blit:function(e){z.bindFramebuffer(z.FRAMEBUFFER,e.fbo),z.viewport(0,0,e.w,e.h),z.drawArrays(z.TRIANGLES,0,3)}},o=Ne[0]/A.width,i=1-Ne[1]/A.height,a=0,s=0;e.primed&&qe&&(a=(o-e.prevX)/Math.max(t,.001),s=(i-e.prevY)/Math.max(t,.001)),e.prevX=o,e.prevY=i,e.primed=!0;var l=qe&&Math.abs(a)+Math.abs(s)>.001;e.def.solver.step(n,e.node,{dt:t,px:o,py:i,dx:a,dy:s,moving:l,aspect:A.width/Math.max(A.height,1),col:e.def.solver.splatColor(e.node,a,s)})},_e=z.createTexture();z.bindTexture(z.TEXTURE_2D,_e),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,q?z.LINEAR_MIPMAP_LINEAR:z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,!0);var xe=function(){q&&z.generateMipmap(z.TEXTURE_2D)},ke=!1,Oe=null,Se=null;if(o&&o.oldImage){Oe=z.createTexture(),z.bindTexture(z.TEXTURE_2D,Oe),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE);try{z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,o.oldImage)}catch(e){console.warn("[nodality] transition: old capture upload failed:",e),z.deleteTexture(Oe),Oe=null}}if(o&&o.newImage){Se=z.createTexture(),z.bindTexture(z.TEXTURE_2D,Se),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE);try{z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,o.newImage)}catch(e){console.warn("[nodality] transition: new capture upload failed:",e),z.deleteTexture(Se),Se=null}}var Ee=!1,je=T?"live":"snapshot",Pe=!1,Ce={color:"transparent","-webkit-text-fill-color":"transparent","-webkit-text-stroke-color":"transparent","background-color":"transparent","background-image":"none","border-color":"transparent","box-shadow":"none","text-shadow":"none"},Te=null,Ae=function(){if(!Te){!function(){if(!de&&"undefined"!=typeof document){de=!0;var e=document.createElement("style");e.setAttribute("data-nodality","selection"),e.textContent="[data-nodality-ink]::selection,[data-nodality-ink] *::selection{color:var(--nod-ink);-webkit-text-fill-color:var(--nod-ink)}[data-nodality-ink]::-moz-selection,[data-nodality-ink] *::-moz-selection{color:var(--nod-ink);-webkit-text-fill-color:var(--nod-ink)}",(document.head||document.documentElement).appendChild(e)}}(),Te=[],e.setAttribute("data-nodality-ink","");for(var t=[e].concat(s(e.querySelectorAll("*"))).filter(function(e){return e!==A&&"CANVAS"!==e.tagName}),r=t.map(function(e){return getComputedStyle(e).color}),n=0;n<t.length;n++){var o=t[n],i={op:o.style.getPropertyValue("opacity"),ink:o.style.getPropertyValue("--nod-ink")};for(var a in Ce)i[a]=o.style.getPropertyValue(a);for(var l in Te.push([o,i]),o.style.setProperty("--nod-ink",r[n]),Ce)o.style.setProperty(l,Ce[l],"important");o!==e&&o.matches&&o.matches("img,svg,video,picture,iframe")&&o.style.setProperty("opacity","0","important")}e.style.isolation="isolate",A.style.zIndex="-1"}},Re=function(){if(e.style.visibility="",e.removeAttribute("data-nodality-ink"),Te){var t,r=c(Te);try{for(r.s();!(t=r.n()).done;){var n=u(t.value,2),o=n[0],i=n[1];for(var a in Ce)i[a]?o.style.setProperty(a,i[a]):o.style.removeProperty(a);i.op?o.style.setProperty("opacity",i.op):o.style.removeProperty("opacity"),i.ink?o.style.setProperty("--nod-ink",i.ink):o.style.removeProperty("--nod-ink")}}catch(e){r.e(e)}finally{r.f()}Te=null,e.style.isolation="",A.style.zIndex=""}},Me=function(){if(!o)return!1;var t=pe>=1,r=G!==e,n=o.standDownAtStart&&pe<=0,i=t&&!r||n?"hidden":"visible";return A.style.visibility!==i&&(A.style.visibility=i),t||n?Te&&Re():Te||Ae(),!0},Ie=function(){if(b){var t=function(){var t="IMG"===e.tagName?e:e.querySelector?e.querySelector("img"):null;return t&&t.complete&&t.naturalWidth>0?t:null}();if(t)try{return z.bindTexture(z.TEXTURE_2D,_e),z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,t),xe(),ke=!0,Promise.resolve()}catch(e){}else if(!Pe){var r="IMG"===e.tagName?e:e.querySelector&&e.querySelector("img");r&&(Pe=!0,r.addEventListener("load",function(){Ee||Ie()},{once:!0}))}}A.style.display="none",Re();var n=function(e,t,r,n){var o=function(e){if(!e)return null;var t=null;if("IMG"===e.tagName)t=e;else if(e.children){var r=Array.prototype.filter.call(e.children,function(e){return!e.hasAttribute||!e.hasAttribute("data-nodality-raster")});1===r.length&&"IMG"===r[0].tagName&&(t=r[0])}if(!t||!t.complete||!t.naturalWidth)return null;try{if(new URL(t.currentSrc||t.src,location.href).origin!==location.origin)return null}catch(e){return null}return t}(e);return o?Promise.resolve(function(e,t,r,n){var o=Math.max(1,Math.round(t*n)),i=Math.max(1,Math.round(r*n)),a=e.naturalWidth,s=e.naturalHeight;if(!a||!s)return e;var l="fill",c="50% 50%";if("function"==typeof getComputedStyle){var u=getComputedStyle(e);l=u.objectFit||"fill",c=u.objectPosition||"50% 50%"}if("fill"===l)return e;var d=o/a,f=i/s,p="cover"===l?Math.max(d,f):"contain"===l?Math.min(d,f):"none"===l?1:"scale-down"===l?Math.min(1,Math.min(d,f)):Math.max(d,f),h=a*p,y=s*p,m=String(c).trim().split(/\s+/),v=function(e,t){if(null==e)return.5;if(e.endsWith("%"))return parseFloat(e)/100;if("left"===e||"top"===e)return 0;if("right"===e||"bottom"===e)return 1;if("center"===e)return.5;var r=parseFloat(e);return isNaN(r)?.5:r/(0===t?Math.max(o-h,1):Math.max(i-y,1))},b=v(m[0],0),g=v(m.length>1?m[1]:m[0],1),w=document.createElement("canvas");w.width=o,w.height=i;var _=w.getContext("2d");return _?(_.drawImage(e,(o-h)*b,(i-y)*g,h,y),w):e}(o,t,r,n)):function(e){return te.apply(this,arguments)}(e).catch(function(){return""}).then(function(o){return new Promise(function(i,a){var l=(new XMLSerializer).serializeToString(function(e,t){for(var r=[e].concat(s(e.querySelectorAll("*"))),n=[t].concat(s(t.querySelectorAll("*"))),o=0;o<r.length&&o<n.length;o++){var i=n[o].style;if(i){var a=null;if(i.length>0)for(var l=0,u=Array.from(i);l<u.length;l++){var d=u[l];if(D.test(i.getPropertyValue(d))){var f=(a=a||window.getComputedStyle(r[o])).getPropertyValue(d);f&&i.setProperty(d,f,i.getPropertyPriority(d))}}var p,h=c(L);try{for(h.s();!(p=h.n()).done;){var y=p.value,m=(a=a||window.getComputedStyle(r[o])).getPropertyValue(y);m&&"normal"!==m&&i.setProperty(y,m)}}catch(e){h.e(e)}finally{h.f()}var v,b=window.getComputedStyle(r[o]),g=r[o].parentElement,w=0!==o&&g?window.getComputedStyle(g):null,_=c(B);try{for(_.s();!(v=_.n()).done;){var x=v.value,k=b.getPropertyValue(x);k&&(w&&w.getPropertyValue(x)===k||i.getPropertyValue(x)||i.setProperty(x,k))}}catch(e){_.e(e)}finally{_.f()}var O,S=c(W);try{for(S.s();!(O=S.n()).done;){var E=O.value;if(!i.getPropertyValue(E)){var j=b.getPropertyValue(E);j&&!F.has(j)&&i.setProperty(E,j)}}}catch(e){S.e(e)}finally{S.f()}}}return t}(e,e.cloneNode(!0))),u='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(t,'" height="').concat(r,'" viewBox="0 0 ').concat(t," ").concat(r,'">')+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+(o?"<style>".concat(o,"</style>"):"")+"".concat(l,"</div>")+"</foreignObject></svg>",d=document.createElement("img");d.onload=function(){var e=document.createElement("canvas");e.width=Math.max(1,Math.round(t*n)),e.height=Math.max(1,Math.round(r*n));var o=e.getContext("2d");o?(o.drawImage(d,0,0,e.width,e.height),i(e)):i(d)},d.onerror=a,d.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u)})})}(e,m.width,m.height,v).then(function(e){Ee||(z.bindTexture(z.TEXTURE_2D,_e),z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,e),xe(),ke=!0,Me()||(x||Ae(),A.style.visibility="visible"))}).catch(function(e){Re(),console.warn("[nodality] raster snapshot failed:",e)});return A.style.display="",n},De="",Le=-1,Be=function(){if(!Ee&&"live"===je){if(z.bindTexture(z.TEXTURE_2D,_e),"sub-image"===U){try{!function(){var e=A.width+"x"+A.height;if(e!==De){var t=A.width,r=A.height;if("function"==typeof A.captureElementImage){var n=A.captureElementImage(G);try{t=Math.ceil(n.width),r=Math.ceil(n.height)}finally{n&&"function"==typeof n.close&&n.close()}}z.texImage2D(z.TEXTURE_2D,0,N?z.RGBA8||32856:z.RGBA,Math.max(1,t),Math.max(1,r),0,z.RGBA,z.UNSIGNED_BYTE,null),De=e}}(),z.texElementSubImage2D(z.TEXTURE_2D,0,0,0,G)}catch(e){return De="",void We("texElementSubImage2D failed: "+(e&&e.name?e.name:"?")+": "+(e&&e.message?e.message:e))}return xe(),void(ke=!0)}var e,t=z.RGBA8||32856,r=[[z.TEXTURE_2D,t,G],[z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,G],[z.TEXTURE_2D,0,t,G],[z.TEXTURE_2D,0,G]];if(Le>=0)e=[Le];else{e=[0,1,2,3];var n={3:0,6:1,4:2}[z.texElementImage2D.length];null!=n&&(e.splice(e.indexOf(n),1),e.unshift(n))}var o,i=[],a=c(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;try{return z.texElementImage2D.apply(z,r[s]),xe(),Le<0&&(Le=s,console.info("[nodality] texElementImage2D signature discovered: form",s,"(declared arity "+z.texElementImage2D.length+")")),void(ke=!0)}catch(e){i.push("form"+s+" -> "+(e&&e.name?e.name:"?")+": "+(e&&e.message?e.message:e))}}}catch(e){a.e(e)}finally{a.f()}We("texElementImage2D rejected all known signatures (arity "+z.texElementImage2D.length+"): "+i.join(" | "))}},We=function(t){if(!Ee&&"live"===je){for(je="snapshot",console.warn("[nodality] live raster backend failed ("+t+") - falling back to snapshot."),A.removeEventListener("paint",Be);G.firstChild;)e.appendChild(G.firstChild);G.parentNode===A&&A.removeChild(G),O(A),A.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(m.width,"px;height:").concat(m.height,"px;")+"pointer-events:none;z-index:2147483000;",A.setAttribute("aria-hidden","true"),A.setAttribute("data-nodality-raster","snapshot-fallback"),Ie()}};if(T){A.addEventListener("paint",Be);var Fe=function(){return setTimeout(function(){Ee||"live"!==je||ke||We("no paint event within 1500ms")},1500)};if("undefined"!=typeof document&&"hidden"===document.visibilityState){var ze=function(){"hidden"!==document.visibilityState&&(document.removeEventListener("visibilitychange",ze),Ee||Fe())};document.addEventListener("visibilitychange",ze)}else Fe()}var Ne=[.5*A.width,.5*A.height],qe=!1,Ue=function(e){var t=A.getBoundingClientRect(),r=e.touches?e.touches[0]:e,n=[(r.clientX-t.left)*v,(r.clientY-t.top)*v];n[0]===Ne[0]&&n[1]===Ne[1]||(qe=!0),Ne=n};e.addEventListener("mousemove",Ue,{passive:!0}),e.addEventListener("touchmove",Ue,{passive:!0});var He=0,Ge=0,Ke=function(){He=1},Xe=function(){He=0};e.addEventListener("mouseenter",Ke,{passive:!0}),e.addEventListener("mouseleave",Xe,{passive:!0});var Je=[];t.forEach(function(e,t){var r=y[e.op]||{},n=e.by||r.defaultDriver;n&&p[n]?Je.push({i:t,fn:p[n]}):e.by&&console.warn("[nodality] unknown driver '"+e.by+"' on op '"+e.op+"' - known drivers: "+h.join(", "))});var $e=function(){if("undefined"==typeof window)return.5;var t=e.getBoundingClientRect(),r=window.innerHeight||1;return Math.max(0,Math.min(1,(r-t.top)/(r+t.height)))},Ve=0,Ye=null,Qe=function(e,t){z.uniform2f(e("u_res"),t.res[0],t.res[1]),z.uniform2f(e("u_mouse"),t.mouse[0],t.mouse[1]),z.uniform1f(e("u_time"),t.time),z.uniform1f(e("u_t"),t.t);var r,n=c(t.drivers);try{for(n.s();!(r=n.n()).done;){var i=r.value;z.uniform2f(e("u".concat(i.i,"_dpos")),i.x,i.y),z.uniform1f(e("u".concat(i.i,"_damt")),i.amt)}}catch(e){n.e(e)}finally{n.f()}var a,s=c(t.dyn);try{for(s.s();!(a=s.n()).done;){var l,u=a.value,d=c(u.ups);try{for(d.s();!(l=d.n()).done;){var f=l.value;ce(e("u".concat(u.i,"_").concat(f.name)),f.kind,f.value)}}catch(e){d.e(e)}finally{d.f()}}}catch(e){s.e(e)}finally{s.f()}z.activeTexture(z.TEXTURE0),z.bindTexture(z.TEXTURE_2D,_e),z.uniform1i(e("u_tex"),0);var p=1;if(o&&Oe){z.activeTexture(z.TEXTURE0+p),z.bindTexture(z.TEXTURE_2D,Oe),z.uniform1i(e("u_old"),p),p++;var h=t.t,y=function(e,t){return[(e.x+(t.x-e.x)*h)*v,(e.y+(t.y-e.y)*h)*v,(e.w+(t.w-e.w)*h)*v,(e.h+(t.h-e.h)*h)*v]},m=y(o.oldRect,o.oldTo||o.newRect),b=y(o.newFrom||o.oldRect,o.newRect);z.uniform4f(e("u_boxOld"),m[0],m[1],m[2],m[3]),z.uniform4f(e("u_boxNew"),b[0],b[1],b[2],b[3]),Se&&(z.activeTexture(z.TEXTURE0+p),z.bindTexture(z.TEXTURE_2D,Se),z.uniform1i(e("u_newimg"),p),p++)}for(var g=0,w=ge;g<w.length;g++){var _=w[g],x=_.def.solver.samplers;for(var k in x)z.activeTexture(z.TEXTURE0+p),z.bindTexture(z.TEXTURE_2D,_.targets[x[k]].a.tex),z.uniform1i(e("u".concat(_.i,"_").concat(k)),p),p++}z.activeTexture(z.TEXTURE0)},Ze=null,et=["warp","cell","displace"],tt=function(e,r,n){if(Ee||!Ye||!ke)return null;var i=A.getBoundingClientRect();if(i.width&&i.height&&(!n||!n.gpu)){var s=A.width/i.width,l=A.height/i.height,u=(e-i.left)*s,d=(r-i.top)*l;if(u>=0&&d>=0&&u<A.width&&d<A.height){var f=Math.floor(u),p=Math.floor(A.height-d),h=function(e,r){if(!Ye)return null;var n,o={},i=c(Ye.drivers);try{for(i.s();!(n=i.n()).done;){var a=n.value;o[a.i]=a}}catch(e){i.e(e)}finally{i.f()}for(var s=[e,r],l=0,u=et;l<u.length;l++)for(var d=u[l],f=0;f<t.length;f++){var p=t[f],h=y[p.op];if(h&&(Array.isArray(h.stage)?h.stage:[h.stage]).includes(d)){if(P(p))return null;if("function"!=typeof h.map){if(!1===h.movesCoords)continue;return null}var m=o[f],b=h.map(s,p,{res:Ye.res,dpr:v,dpos:m?[m.x,m.y]:[Ye.res[0]/2,Ye.res[1]/2],damt:m?m.amt:1,time:Ye.time,mouse:Ye.mouse});if(!b)return null;s=b}}return s}(f+.5,A.height-p-.5);if(h)return{x:i.left+Math.min(Math.max(h[0],0),A.width)/s,y:i.top+Math.min(Math.max(h[1],0),A.height)/l}}}var m=function(){if(Ze)return Ze;var e=z.createProgram();if(z.attachShader(e,ee(z.VERTEX_SHADER,S)),z.attachShader(e,ee(z.FRAGMENT_SHADER,I(a,t,!0,o))),z.bindAttribLocation(e,0,"a"),z.linkProgram(e),!z.getProgramParameter(e,z.LINK_STATUS))return console.warn("[nodality] probe program failed:",z.getProgramInfoLog(e)),z.deleteProgram(e),Ze={broken:!0};var r=z.createTexture();z.bindTexture(z.TEXTURE_2D,r),z.texImage2D(z.TEXTURE_2D,0,z.RGBA,1,1,0,z.RGBA,z.UNSIGNED_BYTE,null),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE);var n=z.createFramebuffer();z.bindFramebuffer(z.FRAMEBUFFER,n),z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_2D,r,0);var i=z.checkFramebufferStatus(z.FRAMEBUFFER);if(z.bindFramebuffer(z.FRAMEBUFFER,null),i!==z.FRAMEBUFFER_COMPLETE)return console.warn("[nodality] probe framebuffer incomplete:",i),z.deleteProgram(e),z.deleteFramebuffer(n),z.deleteTexture(r),Ze={broken:!0};var s={},l=function(t){return t in s?s[t]:s[t]=z.getUniformLocation(e,t)};return z.useProgram(e),ye(l),z.useProgram(re),Ze={prog:e,fbo:n,tex:r,px:new Uint8Array(4),U:l}}();if(m.broken)return null;var b=A.getBoundingClientRect();if(!b.width||!b.height)return null;var g=A.width/b.width,w=A.height/b.height,_=(e-b.left)*g,x=(r-b.top)*w;if(_<0||x<0||_>=A.width||x>=A.height)return null;var k=Math.floor(_),O=Math.floor(A.height-x);z.bindFramebuffer(z.FRAMEBUFFER,m.fbo),z.useProgram(m.prog),z.viewport(0,0,1,1),z.uniform2f(m.U("u_probe"),k,O),Qe(m.U,Ye),z.drawArrays(z.TRIANGLES,0,3),z.readPixels(0,0,1,1,z.RGBA,z.UNSIGNED_BYTE,m.px),z.bindFramebuffer(z.FRAMEBUFFER,null),z.useProgram(re),z.viewport(0,0,A.width,A.height);var E=m.px,j=(E[0]+E[1]/255)/255,C=(E[2]+E[3]/255)/255;return{x:b.left+j*A.width/g,y:b.top+C*A.height/w}},rt="__nodalityRetargeted",nt=!t.some(function(e){return!1===e.interactive}),ot="data-nodality-hover",it=t.some(function(e){return!0===e.hoverAttr}),at=[],st=function(t){for(var r=[],n=t;n&&n!==e.parentNode;n=n.parentElement)r.push(n);for(var o=new Set(r),i=0,a=at;i<a.length;i++){var s=a[i];o.has(s)||s.removeAttribute(ot)}for(var l=0,c=r;l<c.length;l++){var u=c[l];u.hasAttribute(ot)||u.setAttribute(ot,"")}at=r},lt=0,ct=function(t){if(nt&&!Ee&&!t[rt]){if("pointermove"===t.type||"mousemove"===t.type){var r="undefined"!=typeof performance?performance.now():0;if(r-lt<12)return;lt=r}var n=tt(t.clientX,t.clientY);if(n){var o=G!==e;if(!(!o&&Math.abs(n.x-t.clientX)<.5&&Math.abs(n.y-t.clientY)<.5)){var i,a,s,l,u=o?(i=n.x,a=n.y,s=null,(l=function(e){var t,r=c(e.children);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=n.getBoundingClientRect();o.width&&o.height&&(i<o.left||i>o.right||a<o.top||a>o.bottom||(s=n,l(n)))}}catch(e){r.e(e)}finally{r.f()}})(G),s):"function"==typeof document.elementFromPoint?document.elementFromPoint(n.x,n.y):null;if(u&&u!==t.target&&e.contains(u)){if(it&&st(u),"pointerdown"===t.type||"mousedown"===t.type||"click"===t.type){var d=u.closest&&u.closest("a, button, input, select, textarea, [tabindex]");d&&"function"==typeof d.focus&&d.focus({preventScroll:!0})}t.stopPropagation(),t.cancelable&&t.preventDefault(),u.dispatchEvent(function(e,t,r){var n=new("undefined"!=typeof PointerEvent&&e instanceof PointerEvent?PointerEvent:MouseEvent)(e.type,{bubbles:!0,cancelable:e.cancelable,composed:!0,view:e.view||("undefined"!=typeof window?window:null),detail:e.detail,clientX:t,clientY:r,screenX:e.screenX+(t-e.clientX),screenY:e.screenY+(r-e.clientY),ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,buttons:e.buttons,relatedTarget:e.relatedTarget,pointerId:e.pointerId,pointerType:e.pointerType,isPrimary:e.isPrimary,pressure:e.pressure});return n[rt]=!0,n}(t,n.x,n.y))}}}}},ut=["pointerdown","pointerup","pointermove","click","dblclick","contextmenu","mousedown","mouseup"],dt=function(){it&&st(null)};if(nt){var ft,pt=c(ut);try{for(pt.s();!(ft=pt.n()).done;){var ht=ft.value;e.addEventListener(ht,ct,!0)}}catch(e){pt.e(e)}finally{pt.f()}e.addEventListener("pointerleave",dt,!0)}var yt=!0,mt=function(){if(!Ee){if(Me(),yt&&ke){for(var e="undefined"!=typeof performance?performance.now():be+16,t=Math.max(0,(e-be)/1e3),r=0,n=ge;r<n.length;r++){var o=n[r];we(o,t)}qe=!1,z.bindFramebuffer(z.FRAMEBUFFER,null),z.useProgram(re),z.viewport(0,0,A.width,A.height),z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT);var i={res:[A.width,A.height],mouse:[Ne[0],Ne[1]],time:e/1e3,t:pe,drivers:[],dyn:[]};if(Je.length>0){Ge+=(He-Ge)*(1-Math.exp(8*-t));for(var a={mouseX:Ne[0],mouseY:Ne[1],w:A.width,h:A.height,t:e/1e3,hover:Ge,scroll:$e()},s=0,l=Je;s<l.length;s++){var c=l[s],u=c.fn(a);i.drivers.push({i:c.i,x:u.x,y:u.y,amt:u.amt})}}if(ve.length>0)for(var d={w:A.width,h:A.height,mouseX:Ne[0],mouseY:Ne[1],dt:t,t:e/1e3},f=0,p=ve;f<p.length;f++){var h=p[f];i.dyn.push({i:h.i,ups:h.def.tick(h.state,d)})}Ye=i,Qe(ne,i),be=e,z.drawArrays(z.TRIANGLES,0,3)}Ve=requestAnimationFrame(mt)}},vt=null;"undefined"!=typeof IntersectionObserver&&(vt=new IntersectionObserver(function(e){var t=u(e,1)[0];yt=t.isIntersecting})).observe(e);var bt=null,gt=0,wt=function(){if(!Ee){var e=f();if(!(e.width<2||e.height<2)){var t=Math.round(e.width*v),r=Math.round(e.height*v);m.width=e.width,m.height=e.height,A.style.width=e.width+"px",A.style.height=e.height+"px";var n=A.width!==t||A.height!==r;n&&(A.width=t,A.height=r),"snapshot"===je?Ie():n&&Be()}}};"undefined"!=typeof ResizeObserver&&(bt=new ResizeObserver(function(){"live"!==je&&(function(){if(!Ee){var e=f();e.width<2||e.height<2||Math.round(e.width)===Math.round(m.width)&&Math.round(e.height)===Math.round(m.height)||(m.width=e.width,m.height=e.height,A.style.width=e.width+"px",A.style.height=e.height+"px")}}(),clearTimeout(gt),gt=setTimeout(wt,150))})).observe(e);var _t=0,xt=function(){clearTimeout(_t),_t=setTimeout(function(){if(!Ee)if("snapshot"!==je){var t=e.clientWidth||e.parentElement&&e.parentElement.clientWidth||m.width;A.style.width=t+"px",setTimeout(function(){if(!Ee&&"live"===je){var e=Math.max(2,Math.round(G.getBoundingClientRect().height))||m.height;m.width=t,m.height=e,A.style.height=e+"px",A.width=Math.round(t*v),A.height=Math.round(e*v),Be()}},50)}else wt()},150)};"undefined"!=typeof window&&window.addEventListener("resize",xt),"live"===je?Ve=requestAnimationFrame(mt):(Ie().then(function(){Ve=requestAnimationFrame(mt)}),"undefined"!=typeof document&&document.fonts&&"object"===l(document.fonts.ready)&&Promise.resolve(document.fonts.ready).then(wt).catch(function(){}));var kt=function(t,r,n,o,i){"function"==typeof CustomEvent&&"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(se,{detail:{pipeline:Ot,el:e,index:t,key:r,value:n,prev:o,how:i}}))},Ot={canvas:A,nodes:t,get backend(){return je},sourceAt:function(e,t,r){return tt(e,t,r)},get progress(){return pe},setProgress:function(e){var t=Math.min(1,Math.max(0,Number(e)||0));return t===pe||(pe=t,he.length&&(z.useProgram(re),ye(ne,me),Ze&&!Ze.broken&&(z.useProgram(Ze.prog),ye(Ze.U,me),z.useProgram(re))),Me()),pe},setParam:function(e,r,n){var o=t[e];if(!o||Ee)return!1;var i=o[r];if(o[r]=n,function(e,t,r,n){if(ue.includes(t))return!0;var o=y[e];if(!o)return!0;if((o.structural||[]).includes(t))return!0;if((o.structuralOnToggle||[]).includes(t))return!r!=!n;if(o.uniforms)try{if(t in o.uniforms(Object.assign({op:e},function(e,t,r){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},t,r)),1))return!1}catch(e){}return!0}(o.op,r,n,i))return Ot.rebuild(),kt(e,r,n,i,"rebuild"),"rebuild";var a=y[o.op];if(a&&a.uniforms){var s=a.uniforms(o,v);for(var c in z.useProgram(re),s)ce(ne("u".concat(e,"_").concat(c)),s[c][0],s[c][1]);if(Ze&&!Ze.broken){for(var u in z.useProgram(Ze.prog),s)ce(Ze.U("u".concat(e,"_").concat(u)),s[u][0],s[u][1]);z.useProgram(re)}}return kt(e,r,n,i,"uniform"),"uniform"},rebuild:function(){if(Ee)return null;var t=e;return Ot.destroy(),fe(t,n)}};return le.add(Ot),Object.assign(Ot,{refresh:function(){return"live"===je?Be():Ie()},destroy:function(){le.delete(Ot),Ee=!0,cancelAnimationFrame(Ve),clearTimeout(gt),clearTimeout(_t),vt&&vt.disconnect(),bt&&bt.disconnect(),"undefined"!=typeof window&&window.removeEventListener("resize",xt),e.removeEventListener("mousemove",Ue),e.removeEventListener("touchmove",Ue);for(var t=0,r=ut;t<r.length;t++){var n=r[t];e.removeEventListener(n,ct,!0)}e.removeEventListener("pointerleave",dt,!0),st(null),e.removeEventListener("mouseenter",Ke),e.removeEventListener("mouseleave",Xe),A.removeEventListener("paint",Be);for(var o=0,i=ge;o<i.length;o++){var a=i[o];for(var s in a.cleanup(),a.progs)z.deleteProgram(a.progs[s].prog)}for(ge.length=0,Ze&&!Ze.broken&&(z.deleteProgram(Ze.prog),z.deleteFramebuffer(Ze.fbo),z.deleteTexture(Ze.tex)),Ze=null,Oe&&(z.deleteTexture(Oe),Oe=null),Se&&(z.deleteTexture(Se),Se=null);G!==e&&G.firstChild;)e.appendChild(G.firstChild);Re(),e.style.visibility="",A.remove()}})}},5613:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{Q:()=>a}),r(9873);var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=null,this.minLabel=null,this.maxLabel=null,this.currentLabel=null},(t=[{key:"padding",value:function(e){return this.el.style.padding=e,this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return["new Range().set(".concat(e,")")]}},{key:"set",value:function(e){var t,r,n=this;this.options=e;var o=document.createElement("input");if(o.setAttribute("id","slider"),o.setAttribute("type","range"),o.setAttribute("min",e.min),o.setAttribute("max",e.max),o.setAttribute("value",e.min),o.style.width=null!==(t=e.width)&&void 0!==t?t:"100%",!e.plain){var i,a;o.style.setProperty("-webkit-appearance","none"),o.style.appearance="none",o.style.height="9px",o.style.background=null!==(i=e.style.trackColor)&&void 0!==i?i:"orange",o.style.borderRadius="5px";var s="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(a=e.style.thumbColor)&&void 0!==a?a:"4CAF50",";\n cursor: pointer;\n }\n "),l=document.createElement("style");l.appendChild(document.createTextNode(s)),document.head.appendChild(l)}var c=document.createElement("div");c.style.display="flex",c.style.flexDirection="column",c.style.alignItems="center",c.style.width="100%";var u=document.createElement("div");if(u.style.display="flex",u.style.justifyContent="space-between",u.style.width=null!==(r=e.width)&&void 0!==r?r:"100%",this.minLabel=document.createElement("span"),this.minLabel.textContent=e.min,this.maxLabel=document.createElement("span"),this.maxLabel.textContent=e.max,this.currentLabel=document.createElement("span"),this.currentLabel.textContent=o.value,e.font&&(this.currentLabel.style.fontFamily=e.font),e.font&&(this.minLabel.style.fontFamily=e.font),e.font&&(this.maxLabel.style.fontFamily=e.font),e.plain||(u.appendChild(this.minLabel),u.appendChild(this.currentLabel),u.appendChild(this.maxLabel)),o.addEventListener("input",function(){n.currentLabel.textContent=o.value}),window.matchMedia("(max-device-width: 415px)").matches)if(e.plain)o.style.width="80%";else{var d,f;o.style.height="20px",o.style.background=null!==(d=e.style.trackColor)&&void 0!==d?d:"1abc9C",o.style.borderRadius="10px",o.style.fontSize="3rem",o.style.width="80%";var p="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(f=e.style.thumbColor)&&void 0!==f?f:"blue",";\n cursor: pointer;\n }\n "),h=document.createElement("style");h.appendChild(document.createTextNode(p)),document.head.appendChild(h)}return c.appendChild(u),c.appendChild(o),this.el=c,this}},{key:"value",value:function(){return this.el.querySelector("#slider").value}},{key:"render",value:function(e){if(!e)return this.el;document.querySelector(e).appendChild(this.el)}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();"undefined"!=typeof window&&(window.Range=a)},5632:(e,t,r)=>{r.d(t,{j:()=>p});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},u.apply(null,arguments)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=d(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}(this,t)).res=null,e.options={},e.code=[],e.elCSS=[],e.html=[],e.react=[],e.setup(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),r=t,n=[{key:"setup",value:function(){var e=document.createElement("div");return this.res=e,this.res.style.padding=0,this.res.style.margin=0,this.res.style.borderRadius="50%",this}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var e=Object.fromEntries(Object.entries(this.options||{}).filter(function(e){return null!=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2)[1]})),t=(0,o.sy)(e,4);return["new Circle().set(".concat(t,")")]}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"diameter",value:function(e){return this.res.style.width=this.res.style.height="number"==typeof e?e+"px":e,this.res.style.borderRadius="50%",this}},{key:"size",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.res.style.width="number"==typeof e?e+"px":e,this.res.style.height="number"==typeof t?t+"px":t,this.res.style.borderRadius="50%",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"border",value:function(e){return this.res.style.border="string"==typeof e?e:"".concat((null==e?void 0:e.width)||1,"px solid ").concat((null==e?void 0:e.color)||"black"),this}},{key:"radius",value:function(e){return this.res.style.borderRadius="number"==typeof e?e+"px":e,this}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e,e.top&&(this.res.style.top=e.top),e.left&&(this.res.style.left=e.left),(e.top||e.left)&&(this.res.style.position="absolute"),e.diameter&&this.diameter(e.diameter),e.size&&this.size(e.size.w||e.size,e.size.h||e.size),e.width&&(this.res.style.width=e.width),e.height&&(this.res.style.height=e.height),e.radius&&this.radius(e.radius),e.id&&this.res.setAttribute("id",e.id),e.class&&this.res.setAttribute("class",e.class),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.pad&&(this.res.style.padding=e.pad),e.mar&&(this.res.style.margin=e.mar),e.background&&(this.res.style.background=e.background),e.color&&this.color(e.color),e.border&&this.border(e.border),e.shadow&&(this.res.style.boxShadow=e.shadow),e.cursor&&(this.res.style.cursor=!0===e.cursor?"pointer":e.cursor);var r,n,o,i=[];if(e.stroke||e.gradient||e.backgroundOp||e.layout||e.marginOp||e.shadow||e.animation||e.filtera||e.transform){var a;e.gradient&&(this.globalGradient=e.gradient.op.gradient),"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)"),e.stroke&&(null===(r=t,n=this,a="function"==typeof(o=u(d(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)||void 0===a||a([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]));for(var s=[e.stroke,e.gradient,e.animation,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform].filter(function(e){return null!=e}),l=0;l<s.length;l++)i.push({range:s[l].range,log:s[l].op.name,target:s[l].target,op:s[l].op});var c=[];e.border&&c.push("border"),e.background&&c.push("background"),(e.mar||e.margin)&&c.push("margin"),e.animation&&c.push("animation"),this.chainReact(i,this.options.id,c)}return this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"excludeFromCode",value:function(){return this.excludeFromCodeTrue=!0,this}},{key:"setClass",value:function(e){return this.res.setAttribute("class",e),this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"render",value:function(e){var t;return e&&(null===(t=document.querySelector(e))||void 0===t||t.appendChild(this.res)),this.res}}],n&&s(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},5748:(e,t,r)=>{r.d(t,{D:()=>v});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var y="https://cdn.shopify.com/storefront/web-components.js",m=function(e,t){var r=String(null!=e?e:t).replace(/^#/,"");return/^[A-Za-z][\w-]*$/.test(r)?r:t},v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=p(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,t)).items=[],e.fallbackItems=[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),r=t,n=[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e;var t=e.kind,r=this["build_".concat(t)];if("function"!=typeof r)throw new Error('nodality: Shop has no kind "'.concat(t,'"'));return this.res=r.call(this,e),"product"===t&&(this.res.style.display="block",this.commonMethods(e)),e.id&&this.res.setAttribute("id",String(e.id)),e.font&&(this.res.style.fontFamily=e.font),e.color&&(this.res.style.color=e.color),"product"!==t&&"store"!==t&&"cart"!==t&&(this.applyStyleOptions(e),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar)),e.keySet&&this.keySet(e.keySet),this}},{key:"build_store",value:function(e){var r=document.createElement("shopify-store");return r.setAttribute("store-domain",e.domain),e.token&&r.setAttribute("public-access-token",e.token),e.country&&r.setAttribute("country",e.country),e.language&&r.setAttribute("language",e.language),t.loadScript(),r}},{key:"build_product",value:function(e){var t=document.createElement("shopify-context");return t.setAttribute("type","product"),t.setAttribute("handle",e.handle),this.template=document.createElement("template"),this.placeholder=document.createElement("div"),this.placeholder.setAttribute("shopify-loading-placeholder",""),this.placeholder.style.display="contents",t.appendChild(this.template),t.appendChild(this.placeholder),t}},{key:"build_price",value:function(e){var t;if(e.fallback)return this.text(e.text);var r=document.createElement("shopify-money");return r.setAttribute("query",null!==(t=e.query)&&void 0!==t?t:"product.selectedOrFirstAvailableVariant.price"),null!=e.text&&(r.textContent=e.text),r}},{key:"build_productData",value:function(e){var t;if(e.fallback)return this.text(e.text);var r=document.createElement("shopify-data");return r.setAttribute("query",null!==(t=e.query)&&void 0!==t?t:"product.title"),null!=e.text&&(r.textContent=e.text),r}},{key:"build_productMedia",value:function(e){var t;if(e.fallback){var r,n=document.createElement("img");return e.url&&n.setAttribute("src",e.url),n.setAttribute("alt",null!==(r=e.alt)&&void 0!==r?r:""),e.width&&n.setAttribute("width",String(e.width)),e.height&&n.setAttribute("height",String(e.height)),n}var o=document.createElement("shopify-media");if(o.setAttribute("query",null!==(t=e.query)&&void 0!==t?t:"product.selectedOrFirstAvailableVariant.image"),e.width&&o.setAttribute("width",String(e.width)),e.height&&o.setAttribute("height",String(e.height)),e.url){var i,a=document.createElement("img");a.setAttribute("src",e.url),a.setAttribute("alt",null!==(i=e.alt)&&void 0!==i?i:""),o.appendChild(a)}return o}},{key:"build_variantPicker",value:function(e){if(e.fallback)return this.text(e.text);var t=document.createElement("shopify-variant-selector");return null!=e.text&&(t.textContent=e.text),t}},{key:"build_buy",value:function(e){var t;if(e.fallback){var r,n=document.createElement("a");return e.url&&n.setAttribute("href",e.url),n.textContent=null!==(r=e.text)&&void 0!==r?r:"Buy",n}var o=document.createElement("button");o.setAttribute("type","button"),o.textContent=null!==(t=e.text)&&void 0!==t?t:"Add to cart";var i=m(e.cart,"cart"),a=m(e.store,"store");return o.setAttribute("onclick","buyNow"===e.mode?"document.getElementById('".concat(a,"').buyNow(event)"):"document.getElementById('".concat(i,"').addLine(event).showModal()")),o}},{key:"build_cart",value:function(e){var r=document.createElement("shopify-cart");e.target&&r.setAttribute("target",e.target),e.discountCodes&&r.setAttribute("discount-codes",e.discountCodes);var n=m(e.id,"cart");return e.theme&&t.themeCart(n,e.theme),r}},{key:"text",value:function(e){var t=document.createElement("span");return t.textContent=null!=e?e:"",t}},{key:"add",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.items=e;var t,r=this.template?this.template.content:this.res,n=s(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;o&&"function"==typeof o.render&&r.appendChild(o.render())}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"fallback",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.fallbackItems=e;var t,r=this.placeholder||this.res,n=s(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;o&&"function"==typeof o.render&&r.appendChild(o.render())}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"toCode",value:function(){var e=Object.fromEntries(Object.entries(this.options||{}).filter(function(e){return null!=a(e,2)[1]})),t=function(e){return e.filter(function(e){return e&&"function"==typeof e.toCode}).map(function(e){return[].concat(e.toCode()).join("")}).join(",\n")},r="new Shop().set(".concat((0,o.sy)(e,4),")");return this.items.length&&(r+=".add([".concat(t(this.items),"])")),this.fallbackItems.length&&(r+=".fallback([".concat(t(this.fallbackItems),"])")),[r]}},{key:"render",value:function(e){if(e){var t=document.querySelector(e);t&&t.appendChild(this.res)}return this.res}}],l=[{key:"loadScript",value:function(){if("undefined"!=typeof document&&document.head&&!document.querySelector('script[src="'.concat(y,'"]'))){var e=document.createElement("script");e.setAttribute("type","module"),e.setAttribute("src",y),document.head.appendChild(e)}}},{key:"themeCart",value:function(e,t){var r,n;if("undefined"!=typeof document&&document.head){var o="#".concat(e),i=function(e){return Object.entries(e).filter(function(e){var t=a(e,2)[1];return null!=t&&""!==t}).map(function(e){var t=a(e,2),r=t[0],n=t[1];return"".concat(r,": ").concat(String(n).replace(/[;{}<>]/g,""))}).join("; ")},s=["".concat(o," { ").concat(i({"font-family":t.font})," }"),"".concat(o,"::part(dialog) { ").concat(i({background:t.background,color:t.color,"font-family":t.font,"border-radius":t.radius})," }"),"".concat(o,"::part(primary-button) { ").concat(i({background:t.accent,color:t.accentText,"font-family":t.font,"border-radius":null!==(r=t.buttonRadius)&&void 0!==r?r:t.radius})," }"),"".concat(o,"::part(secondary-button) { ").concat(i({color:t.color,"font-family":t.font})," }"),"".concat(o,"::part(line-heading) { ").concat(i({"font-family":null!==(n=t.headingFont)&&void 0!==n?n:t.font})," }")].join("\n"),l="nodality-cart-".concat(e),c=document.head.querySelector('style[data-shop="'.concat(l,'"]'));c||((c=document.createElement("style")).setAttribute("data-shop",l),document.head.appendChild(c)),c.textContent=s}}}],n&&u(r.prototype,n),l&&u(r,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,l}(n.yU)},5860:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},s.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}r.d(t,{M:()=>u});var u=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t)).code=[],e.setup(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,i=[{key:"toCode",value:function(){return this.code}},{key:"setup",value:function(){this.code.push("new FlexGrid()"),this.code.push(".setup()");var e=document.createElement("div");return e.style.display="flex",e.style.padding=0,e.style.margin=0,this.res=e,this}},{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(e){e.id&&this.res.setAttribute("id",e.id),this.commonMethods(e),e.onTap&&this.onTap(e.onTap),this.code.push(".set({"),e.gap&&this.code.push("gap: ".concat(e.gap)),e.gap&&(this.res.style.gap=e.gap),e.flex&&(this.res.style.flex=e.flex),e.flex&&this.code.push("flex: ".concat(e.flex,",")),e.wrap&&(this.res.style.flexWrap="wrap"),e.wrap&&this.code.push("wrap: ".concat(e.wrap,",")),e.align&&(this.res.style.justifyContent=e.align),e.align&&this.code.push("align: ".concat(e.align,",")),e.colat&&this.toColumnAt(e.colat),e.colat&&this.code.push('\n colat: "'.concat(e.colat,'",')),this.code.push("}),");var t=e;return this.callReact(t),this}},{key:"callReact",value:function(e){this.options=e;var r,o,i,a=[],c=e.transform&&"object"===n(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||c){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(orange, green)")),e.stroke&&(r=t,o=this,"function"==typeof(i=s(l(1&3?r.prototype:r),"setAny",o))?function(e){return i.apply(o,e)}:i)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var u=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,c?e.transform:void 0];u=u.filter(function(e){return null!=e});for(var d=0;d<u.length;d++)a.push({range:u[d].range,log:u[d].op.name,target:u[d].target,op:u[d].op});var f=[];e.borderObj&&f.push("border"),e.background&&f.push("background"),e.mar&&f.push("margin"),e.animation&&f.push("animation"),e.span&&f.push("span"),this.chainReact(a,e.id,f)}}},{key:"toColumnAt",value:function(e){var t=this;if(!this.columnAlways){var r=function(){var r=window.matchMedia("(max-width: ".concat(e,")")),n=window.matchMedia("(max-device-width: 415px)");r.matches||n.matches?(t.res.style.flexDirection="column",t.res.style.alignItems="center"):t.res.style.flexDirection="row"};r(),window.addEventListener("resize",r)}}},{key:"flex",value:function(e){return this.arra=Array.from(e.replace(/\s/g,"")),this.areas=Array.from(Array(e.replace(/\s/g,"")).join("")),this.save='"'.concat(e,'"'),this}},{key:"items",value:function(e){this.items=e,this.code.push("\n .items([");for(var t=0;t<e.length;t++){var r=e[t];if(null!=r){var n=r.render();void 0!==r.toCode&&this.code.push(r.toCode().flatMap(function(e){return e})),this.res.appendChild(n)}}return this.code.push("\n ])"),this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"adjust",value:function(e){var t=this,r=function(){var r=window.matchMedia("(max-device-width: 415px)");if(window.innerWidth<e||r.matches)for(var n=0;n<t.res.children.length;n++)t.res.children[n].style.flex="",t.res.children[n].style.width="100%";else for(n=0;n<t.res.children.length;n++)t.res.children[n].style.flex="".concat(t.arra[n])};return r(),window.addEventListener("resize",r),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(e).appendChild(this.res)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},6131:(e,t,r)=>{r.d(t,{E:()=>h});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(e,t,r,n){var o=d(f(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).text=e,n.res=null,n.setup(r),n.code=[],n.elCSS=[],n.html=[],n.react=[],n.code.push('new Text("'.concat(n.text,'")')),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n=[{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var e=Object.fromEntries(Object.entries(this.options).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),t=(0,o.sy)(e,4);return['new Text("'.concat(this.text,'").set(').concat(t,")")]}},{key:"toElCSS",value:function(){return this.elCSS=this.elCSS.map(function(e){return" "+e}),this.preffersId?this.elCSS.unshift(this.res.id+" { \n"):this.elCSS.unshift("."+this.class+" { \n"),this.elCSS.push(" } \n \n"),this.elCSS}},{key:"getType",value:function(){return"S1"===this.options.fluidc?"HTMLHeaderElement":"HTMLParagraphElement"}},{key:"stroke",value:function(){return this.res.style["-webkit-text-stroke"]="3px orange",this}},{key:"fill",value:function(){return this.res.style["-webkit-text-fill-color"]="transparent",this}},{key:"setClass",value:function(e){return this.res.setAttribute("class",e),this}},{key:"styled",value:function(e){return this.set(e),this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace((0,o._H)(),"$1:")}},{key:"looksLikeMarkdown",value:function(e){return/(\*\*.*\*\*|\*.*\*|`[^`]+`|\[.*?\]\(.*?\)|^# )/m.test(e)}},{key:"parseMarkdown",value:function(e){var t=e;return(t=(t=(t=(t=(t=(t=(t=t.replace(/^### (.*$)/gim,"<h3>$1</h3>")).replace(/^## (.*$)/gim,"<h2>$1</h2>")).replace(/^# (.*$)/gim,"<h1>$1</h1>")).replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>")).replace(/\*(.*?)\*/g,"<em>$1</em>")).replace(/`([^`]+)`/g,"<code>$1</code>")).replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>')).replace(/\n/g,"<br>")}},{key:"set",value:function(e){if(this.resCopy=this.res,this.options=e,u(t,"setPrevText",this,3)([this.text]),e.raster&&this.rasterize(e.raster),this.commonMethods(e),e.left&&(this.res.style.left=e.left),e.flex&&(this.res.style.display="flex"),(e.left||e.top)&&(this.res.style.position="absolute"),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.gpos&&this.gpos(e.gpos),e.vtn&&(this.res.style.viewTransitionName=e.vtn),e.index&&u(t,"setIndex",this,3)([e.index]),e.index&&(this.index=e.index),e.preffersId&&(this.preffersId=e.preffersId),u(t,"setPref",this,3)([e.preffersId]),e.removeDecoration&&(this.res.style.textDecoration="none"),e.block&&(this.res.style.display="block"),e.area&&this.setArea(e.area),e.icon&&this.addIcon(e.icon),e.color&&this.color(e.color),e.color&&this.elCSS.push("color: ".concat(e.color,"; \n")),e.class&&this.setClass(e.class),e.size&&this.fluidCopy(e.size),e.fluidc&&this.fluidCopy(e.fluidc),this.options.id&&this.res.setAttribute("id",this.options.id),u(t,"setID",this,3)([this.options.id]),e.initLetter&&this.initLetter(e.initLetter),e.onTap&&this.onTap(e.onTap),"S6"===e.fluidc?e.fluidc&&this.elCSS.push("font-size: calc(1.1rem + 2.075vw); \n"):e.fluidc&&this.elCSS.push("font-size: calc(1.625rem + 5.075vw); \n"),this.options.class&&this.res.setAttribute("class",this.options.class),u(t,"setClass",this,3)([this.options.class]),e.clampc&&this.clampCopy(e.clampc),null!=e.exact&&(this.res.style.fontSize=e.exact),e.absolute&&(this.res.style.position="absolute"),e.em&&this.em(e.em),e.fluid&&this.fluid(e.fluid),e.tag&&/^(h[1-6]|p)$/.test(String(e.tag))){var r=String(e.tag).toLowerCase();if(this.res&&this.res.tagName.toLowerCase()!==r){for(var n=document.createElement(r),o=0,i=Array.from(this.res.attributes);o<i.length;o++){var a=i[o];n.setAttribute(a.name,a.value)}for(;this.res.firstChild;)n.appendChild(this.res.firstChild);this.res=n}}return e.fluidc&&this.elCSS.push("font-family: ".concat(e.font,"; \n")),e.align&&(this.res.style.textAlign=e.align),e.breakWord&&(this.res.style.wordWrap="break-word"),e.center&&this.deprecatedOption("center on Text",'mar: "center"'),e.italic&&this.italic(),e.responsive&&this.responsive(),e.border&&(this.res.style.border="".concat(e.border)),e.onScroll&&this.onScroll(e.onScroll),e.keySet&&this.keySet(e.keySet),this.callReact(e),this}},{key:"callReact",value:function(e){var r=[],n=e.transform&&"object"===i(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||n){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&u(t,"setAny",this,3)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var o=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,n?e.transform:void 0];o=o.filter(function(e){return null!=e});for(var a=0;a<o.length;a++)r.push({range:o[a].range,log:o[a].op.name,target:o[a].target,op:o[a].op});var s=[];e.borderObj&&s.push("border"),e.background&&s.push("background"),e.mar&&s.push("margin"),e.animation&&s.push("animation"),e.span&&s.push("span"),this.chainReact(r,this.options.id,s)}}},{key:"excludeFromCode",value:function(){return this.excludeFromCodeTrue=!0,this}},{key:"addIcon",value:function(e){var t=document.createElement("img");return t.style.width="20px",t.style.marginLeft="10px",t.style.height="auto",t.setAttribute("src",e.url),t.setAttribute("alt",void 0===e.alt?"":String(e.alt)),this.res.appendChild(t),this}},{key:"between",value:function(e){return"S1"===e&&(this.res.style.fontSize="clamp(2rem, 8vw, 2.5rem)"),"S2"===e&&(this.res.style.fontSize="clamp(4rem, 8vw, 5rem)"),"S3"===e&&(this.res.style.fontSize="clamp(2rem, 5vw, 2.5rem)"),"S4"===e&&(this.res.style.fontSize="clamp(1.5rem, 2vw, 1.6rem)"),"S5"===e&&(this.res.style.fontSize="clamp(1.2rem, 2vw, 1.3rem)"),"S6"===e&&(this.res.style.fontSize="clamp(1rem, 2vw, 1.3rem)"),this}},{key:"stringGen",value:function(e){for(var t="",r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz".charAt(Math.floor(26*Math.random()));return t}},{key:"initLetter",value:function(e){var t=document.createElement("style");document.body.appendChild(t),Math.random();var r=this.stringGen(1e3);return this.res.setAttribute("id",r),document.styleSheets[0].insertRule("#".concat(r,"::first-letter { color: green; font-size: 3em; padding: 0.1em }"),0),this}},{key:"minusMargin",value:function(){return this.res.style.marginRight="-3.1em",this}},{key:"fluid",value:function(e){if("S1"===e){this.res=document.createElement("h1");var t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 4.3vw)"}if("S2"===e){this.res=document.createElement("h2");var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.525rem + 3.525vw)"}if("S3"===e){this.res=document.createElement("h3");var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.375rem + 2.75vw)"}if("S4"===e){this.res=document.createElement("h4");var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.275rem + 1.975vw)"}return"S5"===e&&(this.res.style.fontSize="calc(1.1rem + 1.2vw)"),this}},{key:"getClampValue",value:function(e){return"S7"===e?"clamp(1.45rem, 2vw + 1.5rem, 1.69rem)":"S6"===e?"clamp(2.25rem, 2vw+1.5rem, 3.25rem)":"S5"===e?"clamp(2.75rem, 2vw + 1.5rem, 3.25rem)":"S4"===e?"clamp(3.5rem, 2vw + 1.5rem, 3.25rem)":"S3"===e?"clamp(4.25rem, 2vw + 1.5rem, 3.25rem)":"S2"===e?"clamp(5rem, 2vw + 1.5rem, 3.25rem)":"S1"===e?"clamp(6rem, 2vw + 1.5rem, 3.25rem)":void 0}},{key:"clampCopy",value:function(e){return this.res.style.fontSize=this.getClampValue(e),this}},{key:"large",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="7rem":e.res.style.fontSize="5rem"};return t(),window.addEventListener("resize",t),this}},{key:"frame",value:function(e){return this.res.style.width=e.width,this.res.style.height=e.height,this}},{key:"responsive",value:function(e){var t=this;this.set=!1,this.setB=!1;var r=function(){window.innerWidth<e.minw?(t.setB=!1,t.set||(t.res.style.color="#3498db",t.res.style.fontSize="".concat(e.baseVW/100*window.innerWidth,"px"),t.set=!0)):window.innerWidth>e.maxw?(t.set=!1,t.setB||(t.res.style.color="orange",t.res.style.fontSize="".concat(e.baseVW/100*e.maxw,"px"),t.setB=!0)):(t.set=!1,t.setB=!1,t.res.style.color="black",t.res.style.fontSize="".concat(e.baseVW,"vw"))};return r(),window.addEventListener("resize",r),this}},{key:"medium",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="2.25rem":e.res.style.fontSize="1.5em"};return t(),window.addEventListener("resize",t),this}},{key:"auto",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="2rem":e.res.style.fontSize="1rem"};return t(),window.addEventListener("resize",t),this}},{key:"small",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="1.5em":e.res.style.fontSize="1em"};return t(),window.addEventListener("resize",t),this}},{key:"sizes",value:function(e){var t=this;this.res.style.fontSize="".concat(e[0].size,"rem");var r=function(){for(var r=0;r<e.length;r++)e[r].width&&window.matchMedia("(min-width: ".concat(e[r].width,"px)")).matches&&(t.res.style.fontSize="".concat(e[r].size));window.matchMedia("(max-device-width: 415px)").matches&&(t.res.style.fontSize="".concat(e[e.length-1].mobile))};return r(),window.addEventListener("resize",r),this}},{key:"setup",value:function(e){var t;e?(t=document.createElement(e.type),void 0!==e.id&&null!==e.id&&t.setAttribute("id",e.id),"span"===e.type&&e.animation&&(t.style.position="relative",t.style.display="block")):t=document.createElement("p");var r=document.createTextNode(this.text);return t.appendChild(r),this.res=t,this.res.style.padding=0,this.res.style.margin=0,this}},{key:"hide",value:function(){return this.res.style.visibility="hidden",this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"em",value:function(e){return this.res.style.fontSize="".concat(e,"em"),this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"align",value:function(e){return this.res.style.textAlign="".concat(e),this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"bold",value:function(){return this.res.style.fontWeight="bold",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"width",value:function(e,t){return this.res.style.width=e,t&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),this}},{key:"offset",value:function(e){return this.res.style.gridRow=2,this.res.style.gridColumn=2,this.res.style.marginLeft="-60px",this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"updating",value:function(e,t){var r=this.res,n=this.text;return Object.defineProperty(e,t,{set:function(e){var t=document.createTextNode(n.replace("$",e));r.replaceChild(t,r.childNodes[0])}}),this}},{key:"apply",value:function(e){var t=this,r=this.res.styles,n=function(){for(var n=0;n<e.length;n++){var o=e[n];o.min&&o.max?window.matchMedia("(min-width: ".concat(o.min,"px) and (max-width: ").concat(o.max,"px)")).matches?Object.assign(t.res.style,o.styles):Object.assign(t.res.style,r):window.matchMedia("(max-width: ".concat(o.max,"px)")).matches?Object.assign(t.res.style,o.styles):Object.assign(t.res.style,r)}};return n(),window.addEventListener("resize",n),this}},{key:"render",value:function(e){if(!e)return this.options&&!this.options.span&&(this.res.textContent=this.text),this.looksLikeMarkdown(this.text)&&(this.res.innerHTML=this.parseMarkdown(this.text)),this.res;this.options&&this.options.id&&this.res.setAttribute("id",this.options.id),this.options&&!this.options.span&&(this.res.textContent=this.text),this.looksLikeMarkdown(this.text)&&(this.res.innerHTML=this.parseMarkdown(this.text)),document.querySelector(e).appendChild(this.res)}}],n&&s(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},6182:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},c.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}r.d(t,{X:()=>f});var f=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("table"),e.res.style.borderCollapse="separate",e.res.style.borderSpacing="0",e.res.style.overflow="hidden",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,i=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(e){var r,n,o,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=c(u(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter(function(e){return null!=e});for(var s=0;s<a.length;s++)i.push({range:a[s].range,log:a[s].op.name,target:a[s].target,op:a[s].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),this.chainReact(i,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"cellPadding",value:function(e){var t,r=o(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,i=o(t.value.cells);try{for(i.s();!(n=i.n()).done;)n.value.style.padding=e}catch(e){i.e(e)}finally{i.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=o(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,i=o(t.value.cells);try{for(i.s();!(n=i.n()).done;)n.value.style.textAlign=e}catch(e){i.e(e)}finally{i.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=o(this.res.rows);try{for(n.s();!(r=n.n()).done;){var i,a=o(r.value.cells);try{for(a.s();!(i=a.n()).done;)i.value.style.border="none"}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}for(var s=0;s<this.res.rows.length-1;s++){var l,c=o(this.res.rows[s].cells);try{for(c.s();!(l=c.n()).done;)l.value.style.borderBottom=e}catch(e){c.e(e)}finally{c.f()}}var u,d=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,f=o(this.res.rows);try{for(f.s();!(u=f.n()).done;)for(var p=u.value,h=0;h<d-1;h++)p.cells[h].style.borderRight=e}catch(e){f.e(e)}finally{f.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),i=o(t);try{for(i.s();!(r=i.n()).done;){var a=r.value,s=document.createElement("th");s.textContent=a,n.appendChild(s)}}catch(e){i.e(e)}finally{i.f()}}},{key:"generateTable",value:function(e,t){var r,n=o(t);try{for(n.s();!(r=n.n()).done;){var i=r.value,a=e.insertRow();for(var s in i)a.insertCell().textContent=i[s]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],i&&a(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},6679:(e,t,r)=>{function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}r.d(t,{T:()=>l}),r(9873);var l=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.res=null,this.currentItem=""},t=[{key:"set",value:function(e){var t=this,r=e;this.options=e;var n=document.createElement("input");n.setAttribute("list","dlCities"),n.setAttribute("id","my");var o=e.data,i=0,a=o.length,s=document.createElement("datalist");for(s.id="dlCities",i=0;i<a;i+=1){var l=document.createElement("option");l.value=o[i],s.appendChild(l)}return n.appendChild(s),n.addEventListener("change",function(){var e=document.querySelector("#my").value;t.currentItem=e}),n.setAttribute("placeholder","Type value"),n.style.padding=".4rem .75rem",n.style.fontSize="1rem",this.res=n,this.responsive(),r.arrayPadding&&this.arrayPadding(r.arrayPadding.sides,r.arrayPadding.value),r.arrayMargin&&this.arrayMargin(r.arrayMargin.sides,r.arrayMargin.value),r.pad&&this.pad(r.pad),r.mar&&this.mar(r.mar),this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return["new DataList().set(".concat(e,")")]}},{key:"getValue",value:function(){return this.res.value}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),e.includes("all")&&(this.res.style.padding=t),this}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),this}},{key:"margin",value:function(e){return this.res.style.margin=e,this}},{key:"responsive",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="100%"),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),c=l;l=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t,r){if(o())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var a=new(e.bind.apply(e,i));return r&&n(a,r.prototype),a}(c,t)},"undefined"!=typeof window&&(window.DataList=l)},7108:(e,t,r)=>{r.d(t,{N:()=>h});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(e,t,r,n){var o=d(f(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){function t(e,r,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).link=r,o.text=e,o.code=[],o.css=[],o.elCSS=[],o.html=[],o.res=null,o.stopEM=n,o.setup(),o.inlineBlock(),o.res.addEventListener("click",function(e){var t=o.link||o.res.getAttribute("href");if(t){var r=new URL(t,window.location.href).href,n=/^https?:\/\//i.test(r),i=r.startsWith("#"),a=/^[a-zA-Z]+:/.test(r);n||i||r.endsWith(".html")||a||(e.preventDefault(),"navigation"in window?navigation.navigate(r):(history.pushState({},"",r),document.dispatchEvent(new PopStateEvent("popstate"))))}}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,(n=[{key:"toElCSS",value:function(){return this.preffersId?this.elCSS.unshift(this.res.id+" { \n"):this.elCSS.unshift("."+this.class+" { \n"),this.elCSS.push(" } \n \n"),this.elCSS}},{key:"getType",value:function(){return"HTMLAnchorElement"}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var e=Object.fromEntries(Object.entries(this.options).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),t=(0,o.sy)(e,4);return["new Link().set(".concat(t,")")]}},{key:"setup",value:function(){var e=document.createElement("a");e.setAttribute("href",this.link),e.style.textDecoration="none",e.style.color="black",e.style.fontFamily="Arial";var t=document.createTextNode(this.text);return e.appendChild(t),this.res=e,!1===this.stopEM&&this.em(1),this}},{key:"appendImageAsChild",value:function(e,t){var r=document.createElement("a");e.options.vtn&&(r.style.viewTransitionName=e.options.vtn),r.setAttribute("href",e.options.url);var n=document.createElement("img");return e.options&&(n.style.width=e.options.size,e.options.radius&&(n.style.borderRadius=e.options.radius),n.setAttribute("src",e.options.img),e.options.pad&&(this.res.style.padding=e.options.pad),r.appendChild(n)),this.res=r,t&&(this.res.style.marginLeft=t),this}},{key:"addIcon",value:function(e){var t=document.createElement("img");return t.style.width="20px",t.style.height="auto",t.style.marginLeft=e.padding?e.padding:"10px",t.setAttribute("src",e.url),this.res.appendChild(t),this}},{key:"removeQuotesFromFirstWord",value:function(e){if(e)return e.replace((0,o._H)(),"$1:")}},{key:"set",value:function(e){this.elCSS.push("text-decoration: none; \n"),this.options=e;var r="";e.onTap&&this.onTap(e.onTap),e.tags&&u(t,"setTags",this,3)([e.tags]),e.id&&this.res.setAttribute("id",e.id),e.id&&u(t,"setID",this,3)([e.id]),this.commonMethods(e),e.flex&&(this.res.style.display="flex"),e.fixMobileTap&&this.fixMobileTap(e.fixMobileTap);var n=this.removeQuotesFromFirstWord(JSON.stringify(e.pad));if(e.pad&&(r+="\n pad: ".concat(n,",")),e.preffersId&&(this.preffersId=e.preffersId),null!=e.preffersId&&(r+="\n preffersId: ".concat(e.preffersId,",")),e.class&&u(t,"setClass",this,3)([e.class]),e.class&&(r+='\n class: "'.concat(e.class,'",')),e.borderObj){this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius);var o=this.removeQuotesFromFirstWord(JSON.stringify(e.borderObj));r+="\n borderObj: ".concat(o,",")}if(!1===this.options.preffersId?this.html.push('<a class="'.concat(e.class,'" href="#hello">').concat(e.text,"</a> \n \n")):e.id&&this.html.push('<a id="'.concat(e.id.substr(1),'" href="#hello">').concat(e.text,"</a> \n \n")),null!=e.blastData){var i=this.removeQuotesFromFirstWord(JSON.stringify(e.blastData));u(t,"setAny",this,3)([{globalBlast:"1px ".concat(e.blastData.color)}]),e.blastData&&(r+="\n blastData: ".concat(i,","))}e.nowrap&&(this.res.style.whiteSpace="nowrap"),e.font&&this.font(e.font),e.font&&(r+='\n font: "'.concat(e.font,'",')),e.font&&this.elCSS.push('font-family: "'.concat(e.font,'"; \n')),e.fluidc&&this.fluidCopy(e.fluidc),e.fluidc&&(r+='\n fluidc: "'.concat(e.fluidc,'",')),e.clampc&&this.clampCopy(e.clampc),this.options.id&&(r+='\n id: "'.concat(this.options.id,'",')),e.align&&this.leftAlign(e.align),e.align&&(r+='\n align: "'.concat(e.align,'",')),e.type&&(this.res.style.display="block"),e.color&&this.color(e.color),e.color&&(r+='\n color: "'.concat(e.color,'",')),e.color&&this.elCSS.push('color: "'.concat(e.color,'"; \n')),e.background&&this.background(e.background);var a=this.removeQuotesFromFirstWord(JSON.stringify(e.background));e.background&&(r+="\n background: ".concat(a,",")),e.hover&&this.hover(e.hover);var s=this.removeQuotesFromFirstWord(JSON.stringify(e.hover));if(e.hover&&(r+="\n hover: ".concat(s,",")),e.blast&&(this.blastData=e.blast),e.bold&&(r+="\n bold: ".concat(e.bold,",")),e.block&&this.toBlock(),e.block&&(r+="\n block: ".concat(e.block,",")),e.radius&&(r+='\n radius: "'.concat(e.radius,'",')),e.width&&(r+='\n width: "'.concat(e.width,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.url&&this.res.setAttribute("href",e.url),r+='\n url: "'.concat(e.url,'",'),e.text&&(this.res.textContent=e.text),r+='\n text: "'.concat(e.text,'",'),e.data){e.data&&this.appendImageAsChild(e.data,"20px");var l=this.removeQuotesFromFirstWord(JSON.stringify(e.data));e.data&&(r+="\n data: ".concat(l))}if(e.icon){this.addIcon(e.icon);var c=this.removeQuotesFromFirstWord(JSON.stringify(e.icon));r+="\n icon: ".concat(c,",")}if(e.shadow){var d=e.shadow,f=this.removeQuotesFromFirstWord(JSON.stringify(d));r+="\n shadow: ".concat(f,",")}if(e.stroke){var p=this.removeQuotesFromFirstWord(JSON.stringify(e.stroke));e.stroke&&(r+="\n stroke: ".concat(p,","))}if(e.backgroundOp){var h=this.removeQuotesFromFirstWord(JSON.stringify(e.backgroundOp));r+="\n backgroundOp: ".concat(h,",")}if(e.marginOp){var y=this.removeQuotesFromFirstWord(JSON.stringify(e.marginOp));r+="\n marginOp: ".concat(y,",")}if(e.gradient){var m=this.removeQuotesFromFirstWord(JSON.stringify(e.gradient));r+="\n gradient: ".concat(m,",")}if(e.animation){var v=this.removeQuotesFromFirstWord(JSON.stringify(e.animation));r+="\n animation: ".concat(v,",")}if(e.transform){var b=this.removeQuotesFromFirstWord(JSON.stringify(e.transform));r+="\n transform: ".concat(b,",")}if(e.blast){var g=this.removeQuotesFromFirstWord(JSON.stringify(e.blast));r+="\n blast: ".concat(g,",")}var w="new Link().set({".concat(r,"}) \n");this.code.push(w),e.color&&this.color(e.color),e.rounded&&this.radius("0.5rem"),e.new&&(this.res.setAttribute("target","_blank"),this.res.setAttribute("rel","noopener noreferrer")),e.transform&&this.reactOnTransform(e.transform);var _=[],x=[e.border,e.blast,e.gradient,e.animation,e.span,e.shadow,e.backgroundOp,e.animation,e.transform];if((x=x.filter(function(e){return null!=e})).length>0){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&u(t,"setAny",this,3)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]);for(var k=0;k<x.length;k++)_.push({range:x[k].range,log:x[k].op.name,target:x[k].target,op:x[k].op});var O=[];e.borderObj&&O.push("border"),e.background&&O.push("background"),e.mar&&O.push("margin"),e.animation&&O.push("animation"),this.chainReact(_,e.id,O,e.isNavA),this.res.style.zIndex=1}return this}},{key:"fixMobileTap",value:function(e){this.res.style.pointerEvents="auto",this.res.style.touchAction="manipulation",this.res.style.cursor="pointer",this.res.style.zIndex="1",this.res.style.position="relative"}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"leftAlign",value:function(e){return this.res.style.textAlign=e,this}},{key:"getClampValue",value:function(e){return"S6"===e?"clamp(2.25rem, 2vw+1.5rem, 3.25rem)":"S5"===e?"clamp(2.75rem, 2vw + 1.5rem, 3.25rem)":"S4"===e?"clamp(3.5rem, 2vw + 1.5rem, 3.25rem)":"S3"===e?"clamp(4.25rem, 2vw + 1.5rem, 3.25rem)":"S2"===e?"clamp(5rem, 2vw + 1.5rem, 3.25rem)":"S1"===e?"clamp(6rem, 2vw + 1.5rem, 3.25rem)":void 0}},{key:"clampCopy",value:function(e){return this.res.style.fontSize=this.getClampValue(e),this}},{key:"fluidCopy",value:function(e){return"S1"===e&&(this.res.style.fontSize="calc(1.625rem + 5.075vw)"),"S2"===e&&(this.res.style.fontSize="calc(1.500rem + 4.3vw)"),"S3"===e&&(this.res.style.fontSize="calc(1.375rem + 3.525vw)"),"S4"===e&&(this.res.style.fontSize="calc(1.250rem + 2.75vw)"),"S5"===e&&(this.res.style.fontSize="calc(1.125rem + 1.975vw)"),"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"inlineBlock",value:function(){return this.res.style.display="inline-block",this}},{key:"toBlock",value:function(){return this.res.style.display="block",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"newWindow",value:function(){return this.res.target="_new",this}},{key:"transition",value:function(e){return this.res.style.transition="".concat(e,"s ease-in-out"),this.res.style.transionProperty="background, color",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"medium",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="2rem":e.res.style.fontSize="1.5em"};return t(),window.addEventListener("resize",t),this}},{key:"opacity",value:function(e){return this.res.style.opacity=e,this}},{key:"em",value:function(e){var t=this,r=window.matchMedia("(max-device-width: 415px)"),n=function(){r.matches?t.res.style.fontSize="2em":t.res.style.fontSize="1em"};return n(),window.addEventListener("resize",n),this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"render",value:function(e){return e?(document.querySelector(e).appendChild(this.res),this):this.res}}])&&s(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},7135:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{J:()=>a});var a=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.setupa()},t=[{key:"seto",value:function(e){return this.e=e.a,e.speed&&(this.divisor=e.speed),e.height&&(this.setH=e.height),this}},{key:"setupa",value:function(){return this.parallaxIDs(["#rta"]),this.divisor(1),this}},{key:"add",value:function(e){return this.items=e,this.setup(),this}},{key:"parallaxIDs",value:function(e){return this.parallaxIDs=e,this}},{key:"divisor",value:function(e){return this.divisor=e,this}},{key:"setup",value:function(){var e,t=this;this.pts=0;var r=document.createElement("div");r.style.width="100%",r.style.height=null!==(e=this.setH)&&void 0!==e?e:"100%";var n=document.createElement("div");n.style.display="flex",n.style.width="100%";for(var o=0;o<this.items.length;o++){var i=this.items[o].render();n.appendChild(i)}r.appendChild(n);var a=window.localStorage.getItem("pts");null!==a&&(this.pts=a),r.addEventListener("wheel",function(e){e.deltaY<0?t.pts--:e.deltaY>0&&t.pts++,window.localStorage.setItem("pts",t.pts),e.preventDefault();for(var r=0;r<n.childNodes.length;r++){var o=n.childNodes[r];t.parallaxIDs.includes(o.id)&&(o.style.transform="translateX(".concat(t.pts/t.divisor,"%)"))}n.style.transform="translateX(".concat(t.pts/t.divisor,"%)"),window.localStorage.setItem("translation",t.pts/t.divisor)});var s=window.localStorage.getItem("translation");null!==s&&(n.style.transform="translateX(".concat(s,"%)")),this.div=r}},{key:"render",value:function(e){if(!e)return this.div;document.querySelector(e).appendChild(this.div)}}],t&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},7258:(e,t,r)=>{r.d(t,{b:()=>f});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var f=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=u(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("div"),e.res.style.display="grid",e.attributes={},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,n=[{key:"set",value:function(e){return this.options=e,this.attributes=e,this.templateCols=e.templateCols,e.templateCols&&(this.res.style.gridTemplateColumns="repeat(".concat(e.templateCols.cols,", 1fr)"),this.res.style.gridTemplateRows="repeat(".concat(e.templateCols.cols,", 1fr)")),this.res.style.height=e.height?e.height:"600px",e.positions&&(this.storedPositions=e.positions),this}},{key:"generateGridPositions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=document.createElement("div");o.classList.add("container"),o.style.display="grid",o.style.gridTemplateColumns="repeat(".concat(n,", 1fr)"),o.style.gridTemplateRows="repeat(".concat(r,", 1fr)"),o.style.width="100%",o.style.height="100vh";var i=e.map(function(e,t){return{row:Math.floor(r/2)+t,col:Math.floor(n/2)+t}});return e.forEach(function(o,a){var s=i[a],l=s.row,c=s.col,u=function(t){var r=0,n=0;return e.forEach(function(e,o){var a=e.weight,s=e.direction,l=i[t],c=i[o],u=l.col-c.col,d=l.row-c.row,f=a*(1/(Math.sqrt(u*u+d*d)+1));switch(s){case"L":r-=f;break;case"R":r+=f;break;case"U":n-=f;break;case"B":n+=f}}),{forceX:r,forceY:n}}(a),d=u.forceX,f=u.forceY;c=Math.max(1,Math.min(n,c+Math.round(d))),l=Math.max(1,Math.min(r,l+Math.round(f)));var p=t.items.filter(function(e){return e.id===o.attract.slice(1)})[0].render();p.style.gridRowStart=l,p.style.gridColumnStart=c,p.style.display="flex",p.style.alignItems="center",p.style.justifyContent="center",p.style.fontWeight="bold",t.res.appendChild(p)}),this}},{key:"add",value:function(e){this.items=e;var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;this.res.appendChild(n.render())}}catch(e){r.e(e)}finally{r.f()}return this.storedPositions&&this.generateGridPositions(this.storedPositions),this}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var e=(0,o.sy)(this.options,4),t="";return t+=".add([\n",t+=this.items.map(function(e){return e.toCode().join("").trim()}).join(",\n"),t+="\n])",["new Free().set(".concat(e,")").concat(t)]}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],n&&s(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.yU)},7698:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{t:()=>c});var c=function(e){function t(){var e,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=this,o=t,o=s(o),e=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,a()?Reflect.construct(o,i||[],s(r).constructor):o.apply(r,i)))._noTheme=!0,e.gridContainer=document.createElement("div"),e.gridContainer.classList.add("grid-container"),e.gridContainer.style.display="grid",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"set",value:function(e){return e&&null!=e.id&&""!==e.id&&this.gridContainer.setAttribute("id",String(e.id)),e.gap&&(this.gridContainer.style.gap=e.gap),e.height&&(this.gridContainer.style.height=e.height),e.width&&(this.gridContainer.style.width=e.width),this}},{key:"react",value:function(e){var t=this,r=function(){for(var r=0;r<e.length-1;r++){var n=parseInt(e[r].at),o=parseInt(e[r+1].at);if(window.innerWidth>n&&window.innerWidth<o){var i=e[r].template.map(function(e){return e.split("").join(" ")}).map(function(e){return'"'.concat(e,'"')}).join(" ");t.gridContainer.style.gridTemplateAreas=i}else if(window.innerWidth>o){var a=e[e.length-1].template.map(function(e){return e.split("").join(" ")}).map(function(e){return'"'.concat(e,'"')}).join(" ");t.gridContainer.style.gridTemplateAreas=a}}};return r(),window.addEventListener("resize",r),this}},{key:"add",value:function(e){for(var t=function(e){for(var t=[],r=0;r<e;r++){var n="",o=r;do{n=String.fromCharCode(65+o%26)+n,o=Math.floor(o/26)-1}while(o>=0);t.push(n)}return t}(e.length),r=0;r<e.length;r++){var n=e[r].render();n.style.gridArea=t[r].toLowerCase();var o=document.createElement("div");o.textContent=e[r].text,o.style.gridArea=t[r].toLowerCase(),this.gridContainer.appendChild(n)}return this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.gridContainer),this.gridContainer}},{key:"toCode",value:function(){return"new Simple().set({}).react([])"}}],i&&o(r.prototype,i),c&&o(r,c),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,c}(r(9873).yU)},7879:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}r.d(t,{f:()=>d});var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=c(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,(i=[{key:"setup",value:function(e){return this.obj=e,this.setTags(this.obj.tags),this.animate=void 0===this.obj.animate||this.obj.animate,this.res=this.createSideNav(e),e&&null!=e.id&&""!==e.id&&this.res&&this.res.setAttribute&&this.res.setAttribute("id",String(e.id)),this.res.style.position="relative",this.res.style.zIndex=3,this.closed=!0,this}},{key:"toggleSideNav",value:function(e){var t=this;this.closed=!this.closed;var r=this.res.children[0];if(this.closed)if(r.style.overflowX="hidden",e.style.opacity=1,this.animate){this.ope=r.animate([{transform:"translateX(0)"},{transform:"translateX(100%)"}],{duration:300,fill:"forwards"}),this.ope.finished.then(function(){var e=new CustomEvent(t.obj.tags.close);window.dispatchEvent(e)});var n,i=-1,a=o(r.children);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(i+=1,this.masterEL[i]){var l,c=o(s.children);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=this.masterEL[i].options.animation;d&&this.mappedIDS.includes(u.id)&&u.animate(d.op.keyframesClose,d.op.closeOptions)}}catch(e){c.e(e)}finally{c.f()}}}}catch(e){a.e(e)}finally{a.f()}}else r.style.display="none";else{r.style.overflowX="none";var f,p=-1,h=o(r.children);try{for(h.s();!(f=h.n()).done;){var y=f.value;p+=1;var m,v=o(y.children);try{for(v.s();!(m=v.n()).done;){var b=m.value;if(this.mappedIDS.includes(b.id)&&void 0!==this.masterEL[0]){var g=this.masterEL[p].options.animation;if(g){var w=g.op.openOptions;w.delay||(w.delay=1),w.duration||(w.duration=300),b.animate(g.op.keyframesOpen,w)}}}}catch(e){v.e(e)}finally{v.f()}}}catch(e){h.e(e)}finally{h.f()}e.style.opacity=0,this.animate?(r.style.display="flex",this.opeClose=r.animate([{transform:"translateX(100%)"},{transform:"translateX(0)"}],{duration:300,fill:"forwards"}),this.opeClose.finished.then(function(){var e=new CustomEvent(t.obj.tags.open);window.dispatchEvent(e)})):r.style.display="flex"}}},{key:"createToggleButton",value:function(e){var t=document.createElement("button");return t.textContent="☰",t.style.padding="10px 20px",t.style.minWidth="24px",t.style.minHeight="24px",t.style.lineHeight="1",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"#3498db",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.fontSize="1.6rem",this.obj.fixed&&(t.style.position="fixed"),t}},{key:"createCloseButton",value:function(e){var t=document.createElement("button");return t.textContent="×",t.style.fontSize="1.6rem",t.style.padding="10px 20px",t.style.minWidth="24px",t.style.minHeight="24px",t.style.lineHeight="1",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"black",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.alignSelf="flex-end",t}},{key:"createSideNav",value:function(e){var t=this,r=document.createElement("div");r.style.display="flex",r.style.justifyContent="flex-end";var n=document.createElement("div");n.style.display="none",n.style.background=this.obj.background||"#1abc9c",n.style.height="100%",window.matchMedia("(max-device-width: 415px)").matches?n.style.width="100%":n.style.width=this.obj.width||"400px",n.style.position="fixed",n.style.right=0,this.animate&&(n.style.transform="translateX(100%)"),n.style.flexDirection="column",n.style.justifyContent="flex-start";var o=this.createToggleButton(this.obj.hamColour.opened),i=this.createCloseButton(this.obj.hamColour.closed);return o.addEventListener("click",function(){return t.toggleSideNav(o)}),i.addEventListener("click",function(){return t.toggleSideNav(o)}),n.appendChild(i),r.appendChild(n),r.appendChild(o),r}},{key:"items",value:function(e){this.masterEL=e.items.filter(function(e){return void 0!==e.link});var t=e.items.filter(function(e){return void 0===e.items}).map(function(e){return e.id});if(this.mappedIDS=t,this.item=e,this.res.children[0].appendChild(e.render()),void 0!==this.masterEL[0]){var r=this.masterEL[0].options.animation;if(r){var n,i=o(this.res.children[0].children);try{for(i.s();!(n=i.n()).done;){var a,s=o(n.value.children);try{for(s.s();!(a=s.n()).done;){var l=a.value;this.mappedIDS.includes(l.id)&&(r.op.closeOptions.delay=0,l.animate(r.op.keyframesClose,r.op.closeOptions))}}catch(e){s.e(e)}finally{s.f()}}}catch(e){i.e(e)}finally{i.f()}}}return this}},{key:"toCode",value:function(){var e="new SideNav().setup(".concat(this.formatObj(this.obj),")");if(this.item){var t=this.item.toCode?this.item.toCode().join(""):this.formatObj(this.item);t=t.replace(/,\s*(\.set\(|\.add\()/g,"\n $1"),e+=".items(".concat(t,")")}return e}},{key:"formatObj",value:function(e){return JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}])&&a(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},7926:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{B:()=>c});var c=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,r.res=null,r.st=e,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"setup",value:function(){var e=document.createElement("div");return e.style.display="grid",this.res=e,this.st&&this.sticky(),this}},{key:"set",value:function(e){return this.options=e||{},this.setup(),e.height&&(this.res.style.height=e.height),e.sticky&&this.sticky(),this}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"add",value:function(e){this.children=e;for(var t=0;t<e.length;t++){var r=e[t].render();r.style.gridColumn=1,r.style.gridRow=1,this.res.appendChild(r)}return this}},{key:"toCode",value:function(){var e=this.options&&this.options.id,t="new Stack().set(".concat(e?"{ id: ".concat(JSON.stringify(String(e))," }"):"{}",")");if(this.children.length>0){var r=this.children.map(function(e){return e.toCode()}).join(",\n");t+=".add([\n \n ".concat(r," \n \n])")}return[t]}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(e).appendChild(this.res)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},7994:(e,t,r)=>{r.d(t,{AR:()=>E,Gd:()=>S});var n=r(5379),o=r(5275),i={linear:function(e){return e},in:function(e){return e*e*e},out:function(e){return 1-Math.pow(1-e,3)},"in-out":function(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}},a=function(){return"undefined"!=typeof performance?performance.now():Date.now()},s=function(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches};function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!=typeof e.setProgress){var r=0;e={setProgress:function(e){return r=Math.min(1,Math.max(0,Number(e)||0))},get progress(){return r}}}var n=null!=t.duration?t.duration:600,o=i[t.easing]||i["in-out"],l=!1!==t.respectReducedMotion,c=0,u=e.progress||0,d=u,f=0,p=0,h=0,y=0,m=!1,v=null,b=null,g=!1,w=function(){if(!g){var t=a();f||(f=t,p=t),h+=Math.min(t-p,Math.max(y/6,50)),p=t;var r=y<=0?1:Math.min(1,h/y);if(e.setProgress(u+(d-u)*o(r)),r>=1)return function(){m=!1,c=0;var t=v;v=null,t&&t(e.progress)}();c=requestAnimationFrame(w)}},_={get value(){return e.progress},get running(){return m},set:function(t){return _.stop(),e.setProgress(t),e.progress},to:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(g)return Promise.resolve(e.progress);var o=Math.min(1,Math.max(0,Number(t)||0));if(l&&s())return _.set(o),Promise.resolve(o);if(v){var i=v;v=null,i(e.progress)}c&&cancelAnimationFrame(c),u=e.progress,d=o;var a=Math.abs(d-u);return a<1e-4?(e.setProgress(o),Promise.resolve(o)):(y=(null!=r.duration?r.duration:n)*a,f=0,h=0,m=!0,c=requestAnimationFrame(w),new Promise(function(e){v=e}))},stop:function(){if(c&&cancelAnimationFrame(c),c=0,m=!1,v){var t=v;v=null,t(e.progress)}return e.progress},bindScroll:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"==typeof t?document.querySelector(t):t;if(!n)return _;_.unbindScroll(),_.stop();var o=null!=r.start?r.start:0,i=null!=r.end?r.end:1,a=function(){if(!g){var t=n.getBoundingClientRect(),r=window.innerHeight||1,a=(r-t.top)/(r+t.height||1),s=(Math.min(1,Math.max(0,a))-o)/(i-o||1);e.setProgress(Math.min(1,Math.max(0,s)))}};return b={node:n,update:a},window.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a,{passive:!0}),a(),_},unbindScroll:function(){return b?(window.removeEventListener("scroll",b.update),window.removeEventListener("resize",b.update),b=null,_):_},drive:function(e){return _.set(e)},destroy:function(){g=!0,_.stop(),_.unbindScroll()}};return _}function c(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return u(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function d(){}t=Object.getPrototypeOf;var f=[][n]?t(t([][n]())):(u(t={},n,function(){return this}),t),p=d.prototype=s.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=d,u(p,"constructor",d),u(d,"constructor",l),l.displayName="GeneratorFunction",u(d,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,n,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:i,m:h}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){u(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},u(e,t,r,n)}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function b(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){v(i,n,o,a,s,"next",e)}function s(e){v(i,n,o,a,s,"throw",e)}a(void 0)})}}var g=function(e,t){var r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y,w:n.width,h:n.height}};function w(e,t,r){return _.apply(this,arguments)}function _(){return _=b(c().m(function e(t,r,n){var o,i,a,s,l,u,d,f,h,y,m=arguments;return c().w(function(e){for(;;)switch(e.n){case 0:for(o=m.length>3&&void 0!==m[3]?m[3]:1,(i=t.cloneNode(!0)).style.position="static",i.style.left=i.style.top="0",i.style.margin="0",i.style.visibility="visible",a=[t].concat(p(t.querySelectorAll("*"))),s=[i].concat(p(i.querySelectorAll("*"))),l=0;l<a.length;l++)u=getComputedStyle(a[l]),s[l].style.fontSize=u.fontSize,s[l].style.lineHeight=u.lineHeight,s[l].style.fontWeight=u.fontWeight,s[l].style.fontFamily=u.fontFamily,s[l].style.letterSpacing=u.letterSpacing,s[l].style.width=u.width,s[l].style.height=u.height,s[l].style.padding=u.padding,s[l].style.boxSizing=u.boxSizing,l>0&&(s[l].style.margin=u.margin),s[l].style.color=u.color,s[l].style.backgroundColor=u.backgroundColor,s[l].style.backgroundImage=u.backgroundImage,s[l].style.borderStyle=u.borderStyle,s[l].style.borderWidth=u.borderWidth,s[l].style.borderColor=u.borderColor,s[l].style.borderRadius=u.borderRadius,s[l].style.boxShadow=u.boxShadow;return d=Math.max(1,Math.min("undefined"!=typeof window&&window.devicePixelRatio||1,3)),f=Math.max(1,Math.min(d*Math.max(1,o||1),4096/Math.max(r,n,1))),h='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(r*f,'" ')+'height="'.concat(n*f,'" viewBox="0 0 ').concat(r," ").concat(n,'">')+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+(new XMLSerializer).serializeToString(i)+"</div></foreignObject></svg>",y=document.createElement("img"),e.n=1,new Promise(function(e,t){y.onload=e,y.onerror=t,y.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(h)});case 1:return e.a(2,y)}},e)})),_.apply(this,arguments)}var x=function(e){if(!e)return[];if(Array.isArray(e))return e;try{return(0,o.IS)(e)||[]}catch(e){return[]}},k=function(e){return String(e||"").replace(/\s+/g," ").trim().toLowerCase()},O=function(e){return"string"==typeof e&&e.startsWith("#")?e.slice(1):e},S=function(e){return(Array.isArray(e.chain)&&e.chain.length?e.chain:[{from:e.from,to:e.to}]).map(function(t){var r=function(r,n){return void 0!==t[r]?t[r]:void 0!==e[r]?e[r]:n},n=t.to&&!Array.isArray(t.to)&&"object"===m(t.to)?t.to:null,o=n?p(new Set(Object.values(t.to))).map(O):(Array.isArray(t.to)?t.to:[t.to]).map(O),i=new Map;if(n)for(var a=0,s=Object.entries(t.to);a<s.length;a++){var l=f(s[a],2),c=l[0],u=l[1];i.set(k(c),O(u))}return{from:O(t.from),byLabel:n,toIds:o,labelToId:i,effect:r("effect"),duration:r("duration",900),back:!1!==r("back",!0),live:!0===r("live"),fade:r("fade","morph")}})};function E(e,t,r){if(!e||"undefined"==typeof document)return[];var o=(r||[]).filter(function(e){return e&&"morph"===e.op});if(!o.length)return[];var i=p(e.children),a=function(r){var n=O(r),o=document.getElementById(n);if(o&&e.contains(o))return o;var a=(t||[]).findIndex(function(e){return e&&O(e.id)===n});return a>=0?i[a]:null};return o.map(function(t){return function(e,t,r){var o=S(t),i=o[0],a=i&&i.from,s=null!=a?r(a):null,u=new Map;s&&u.set(a,s);var h,y=d(o);try{for(y.s();!(h=y.n()).done;){var m=h.value,v=r(m.from);v&&!u.has(m.from)&&u.set(m.from,v);var _,O=d(m.toIds);try{for(O.s();!(_=O.n()).done;){var E=_.value,j=r(E);j&&!u.has(E)&&u.set(E,j)}}catch(e){O.e(e)}finally{O.f()}}}catch(e){y.e(e)}finally{y.f()}if(!s||!i.toIds.some(function(e){return u.has(e)}))return console.warn("[nodality] morph: could not resolve",a,"->",i?i.toIds:[]),null;var P=function(e){return o.find(function(t){return t.from===e})||null},C=document.createElement("div");C.className="nod-morph",C.style.cssText="position:relative;",e.insertBefore(C,s);var T=document.createElement("div");T.className="nod-morph-host",T.style.cssText="position:absolute;inset:0;";var A=document.createElement("div");A.className="nod-morph-live",A.style.cssText="position:absolute;inset:0;",C.appendChild(T),C.appendChild(A),A.appendChild(s),s.style.position="absolute",s.style.left=s.style.top="0";var R,M=d(u);try{for(M.s();!(R=M.n()).done;){var I=f(R.value,2),D=I[0],L=I[1];D!==a&&L.remove()}}catch(e){M.e(e)}finally{M.f()}var B=a,W=[],F=function(){return u.get(B)||s},z=function(e){C.style.minHeight=Math.max(F().getBoundingClientRect().height,e||0)+24+"px"};z(0);var N=null,q=null,U=-1,H=null,G=null,K=null,X=!1,J=null,$=null,V=o.length>1,Y=function(){var e=b(c().m(function e(t,r,o){var i,a,s,u,d,h,y;return c().w(function(e){for(;;)switch(e.n){case 0:if(!(i=p(r.querySelectorAll("img"))).length){e.n=2;break}return e.n=1,Promise.all(i.map(function(e){return e.complete&&e.naturalWidth?null:"function"==typeof e.decode?e.decode().catch(function(){}):new Promise(function(t){e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})})}));case 1:return e.n=2,new Promise(function(e){return requestAnimationFrame(e)});case 2:return a=g(T,t),s=g(T,r),z(Math.max(a.y+a.h,s.y+s.h)),e.n=3,Promise.all([w(t,a.w,a.h),w(r,s.w,s.h)]);case 3:u=e.v,d=f(u,2),h=d[0],y=d[1],N=(0,n.sB)(T,x(o.effect),{transition:{oldImage:h,newImage:y,oldRect:a,oldTo:s,newRect:s,newFrom:a,standDownAtStart:!0,live:!0===o.live,fade:o.fade||"morph"}}),q&&q.destroy(),q=l(N,{duration:null!=o.duration?o.duration:900});case 4:return e.a(2)}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),Q=function(){var e=b(c().m(function e(t){var r,o,i,a,s,l,f,h,y,m;return c().w(function(e){for(;;)switch(e.n){case 0:if((r=P(B))&&r.toIds.includes(t)){e.n=1;break}return e.a(2);case 1:if(o=u.get(t)){e.n=2;break}return e.a(2);case 2:i=F(),U=r.toIds.indexOf(t),K=B,a=d((0,n.hE)());try{for(a.s();!(s=a.n()).done;)l=s.value,C.contains(l.canvas)&&l.destroy()}catch(e){a.e(e)}finally{a.f()}for(f=0,h=p(T.children);f<h.length;f++)(y=h[f])!==i&&y.remove();return T.appendChild(o),G=i,H=o,o.style.visibility="hidden",m=g(T,i),Object.assign(o.style,{position:"absolute",left:"0",top:Math.round(V?m.y:m.h+20)+"px"}),e.n=3,Y(i,o,r);case 3:if(q){e.n=4;break}return e.a(2);case 4:return J=K,$=t,q.set(0),le(t),r.back&&ae(o),e.n=5,q.to(1);case 5:1===e.v&&H===o&&ie(t,i,r);case 6:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Z=!1,ee=0,te=function(){var e=b(c().m(function e(){var t,r,n;return c().w(function(e){for(;;)switch(e.n){case 0:if(W.length){e.n=1;break}return e.a(2);case 1:if(t=W[W.length-1],r=u.get(t)){e.n=2;break}return e.a(2);case 2:if(n=F(),!N||!q||J!==t||$!==B){e.n=4;break}return e.n=3,q.to(0);case 3:return 0===e.v&&oe(t),e.a(2);case 4:return e.n=5,ne(t,r,n);case 5:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),re=function(){var e=b(c().m(function e(){return c().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!Z){e.n=1;break}return ee++,e.a(2);case 1:return Z=!0,e.p=2,e.n=3,te();case 3:if(!(ee>0&&W.length)){e.n=5;break}return ee--,e.n=4,te();case 4:e.n=3;break;case 5:return e.p=5,Z=!1,ee=0,e.f(5);case 6:return e.a(2)}},e,null,[[2,,5,6]])}));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=b(c().m(function e(t,r,o){var i,a,l,u,f;return c().w(function(e){for(;;)switch(e.n){case 0:return i=p((0,n.hE)()).filter(function(e){return C.contains(e.canvas)}),a=P(t)||{},r===s?(X=!0,A.style.display=""):r.parentNode!==T&&(r.style.visibility="hidden",T.appendChild(r),l=g(T,o),Object.assign(r.style,{position:"absolute",left:"0",top:Math.round(V?l.y:0)+"px"})),e.n=1,Y(r,o,a);case 1:u=d(i);try{for(u.s();!(f=u.n()).done;)f.value.destroy()}catch(e){u.e(e)}finally{u.f()}if(X=!1,q){e.n=2;break}return e.a(2);case 2:return J=t,$=B,G=r,H=o,q.set(1),e.n=3,q.to(0);case 3:0===e.v&&oe(t);case 4:return e.a(2)}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),oe=function(e){W[W.length-1]===e&&W.pop(),B=e;var t,r=d((0,n.hE)());try{for(r.s();!(t=r.n()).done;){var o=t.value;C.contains(o.canvas)&&o.destroy()}}catch(e){r.e(e)}finally{r.f()}N=null,q=null,J=null,$=null,K=W.length?W[W.length-1]:null,le(e)},ie=function(e,t,r){null!=K&&K!==e&&W.push(K),B=e,G=t&&t!==s?t:null,le(e),r&&r.back&&ae(u.get(e))},ae=function(e){if(e){var t=p(e.querySelectorAll("button")).find(function(e){return!e.dataset.nodMorphWired&&!e.dataset.nodMorphBack&&!e.closest("form")});t&&(t.dataset.nodMorphBack="1",t.addEventListener("click",function(){re()}))}},se=new Set,le=function(e){var t=P(e),r=u.get(e);if(t&&r){var n=function(e){var t=p(e.querySelectorAll("a"));if(t.length)return t;var r=p(e.querySelectorAll("button, [role=button]"));return r.length?r:[e]}(r),o=!!t.byLabel&&n.some(function(e){return t.labelToId.has(k(e.textContent))});n.forEach(function(e){return function(e,t,r,n){if(!e.dataset.nodMorphWired&&!e.dataset.nodMorphBack){var o=n?t.labelToId.get(k(e.textContent)):1===t.toIds.length?t.toIds[0]:t.byLabel?t.labelToId.get(k(e.textContent)):t.toIds[r.indexOf(e)];o&&u.has(o)&&(e.dataset.nodMorphWired="1",e.dataset.nodMorphTo=o,e.addEventListener("click",function(e){u.has(o)&&(e.preventDefault(),Q(o))}))}}(e,t,n,o)}),"undefined"==typeof MutationObserver||se.has(e)||(se.add(e),new MutationObserver(function(){return le(e)}).observe(r,{childList:!0,subtree:!0}))}};le(a);var ce=function(){if(C.isConnected){var e=N?N.progress:0,t=T.querySelector("canvas"),r=!!t&&"visible"===(t.style.visibility||"visible"),n=!N||!r,o=X||n&&e<=0&&(B===a||G===s)?"":"none";A.style.display!==o&&(A.style.display=o);var i=H||T.firstElementChild;if(i&&i.style){var l=N&&n&&e>=1?"":"hidden";i.style.visibility!==l&&(i.style.visibility=l)}if(G&&G!==s&&G.style){var c=n&&e<=0?"":"hidden";G.style.visibility!==c&&(G.style.visibility=c)}requestAnimationFrame(ce)}};return requestAnimationFrame(ce),{stage:C,from:s,get destinations(){return i.toIds.map(function(e){return u.get(e)||null})},get states(){return u},get current(){return B},get history(){return[].concat(W)},get progress(){return N?N.progress:0},get active(){return U},goTo:function(e){var t=P(B);return t?Q(t.toIds[e]):void 0},goToState:Q,back:function(){q&&q.to(0)},goBack:re,destroy:function(){q&&q.destroy();var e,t=d((0,n.hE)());try{for(t.s();!(e=t.n()).done;){var r=e.value;C.contains(r.canvas)&&r.destroy()}}catch(e){t.e(e)}finally{t.f()}C.remove()}}}(e,t,a)}).filter(Boolean)}},8424:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{$:()=>c});var c=function(e){function t(e,r){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).text=e,o.res=null,o.val=r,o.setup(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"setup",value:function(e){return this}},{key:"set",value:function(e){this.options=e;var t=document.createElement("button");if(t.style.background="transparent",t.style.border="none",e.img)t.append(e.img.render());else if(e.svg)if("string"==typeof e.svg){var r=(new DOMParser).parseFromString(e.svg,"image/svg+xml").documentElement;t.appendChild(r)}else e.svg instanceof SVGElement&&t.appendChild(e.svg);else if(e.url&&!e.img){var n,o,i=document.createElement("img");i.setAttribute("src",e.url),i.style.width=(null===(n=e.frame)||void 0===n?void 0:n.width)||"50px",i.style.height=(null===(o=e.frame)||void 0===o?void 0:o.height)||"50px",t.appendChild(i)}else{var a=document.createTextNode(this.text.replace("$",this.val));t.appendChild(a)}return this.res=t,this.commonMethods(e),e&&"submit"===e.type&&t.setAttribute("type",e.type),this.border("none"),this.res.style.display="block",e.background&&this.background(e.background),e.padding&&(this.deprecatedOption("padding","pad"),this.pad([{a:e.padding}])),e.margin&&(this.deprecatedOption("margin","mar"),this.mar([{a:e.margin}])),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.centered&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto",this.res.style.backgroundColor="black"),e.border&&this.border(e.border),e.radius&&this.borderRadius(e.radius),e.class&&this.setClass(e.class),e.color&&this.color(e.color),e.auto&&this.auto(),e.weight&&(this.res.style.fontWeight=e.weight),e.fluidc&&this.fluidButtonCopy(e.fluidc),e.fluidc&&'\n fluidc: "'.concat(e.fluidc,'",'),e.onTap&&this.onTap(e.onTap),e.frame&&this.frame(e.frame),e.frame&&'\n frame: "'.concat(e.frame,'",'),e.keySet&&this.keySet(e.keySet),e.align&&(this.res.style.textAlign=e.align),e.weight&&(this.res.style.fontWeight=e.weight),e.bold&&(this.res.style.fontWeight="bold"),e.width&&(this.res.style.width=e.width),e.exact&&(this.res.style.fontSize=e.exact),this}},{key:"fluidButtonCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setClass",value:function(e){return this.res.setAttribute("class",e),this}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="number"==typeof e?"".concat(e,"px"):e,this}},{key:"auto",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="2.2rem":e.res.style.fontSize="1rem"};return t(),window.addEventListener("resize",t),this}},{key:"large",value:function(){var e=this,t=function(){window.matchMedia("(max-device-width: 415px)").matches?e.res.style.fontSize="6rem":e.res.style.fontSize="3rem"};return t(),window.addEventListener("resize",t),this}},{key:"border",value:function(e,t){return"none"===e&&(this.res.style.border="none"),this.res.style.border="".concat(e," solid ").concat(t,"px"),this}},{key:"frame",value:function(e){return this.res.style.width=e.width,this.res.style.height=e.height,this}},{key:"updating",value:function(e,t){var r=this.res,n=this.text;return Object.defineProperty(e,t,{set:function(e){var t=document.createTextNode(n.replace("$",e));r.replaceChild(t,r.childNodes[0])}}),this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,function(e,t){return"function"==typeof t?t.toString():t},4).replace(/"(\w+)":/g,"$1:").replace(/"(\(\)\s*=>\s*{[^}]*})"/g,"$1").replace(/\\n/g,"").replace(/\\"/g,'"');return['new Button("'.concat(this.text,'").set(').concat(e,")")]}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},8597:(e,t,r)=>{function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=String(e);return t.filter(function(e){return function(e,t){if(e===t)return 0;for(var r=new Array(t.length+1),n=0;n<=t.length;n++)r[n]=n;for(var o=1;o<=e.length;o++){for(var i=[o],a=1;a<=t.length;a++){var s=e.charCodeAt(o-1)===t.charCodeAt(a-1)?0:1;i[a]=Math.min(r[a]+1,i[a-1]+1,r[a-1]+s)}r=i}return r[t.length]}(n,e)<=r})}(e,t),o="Unknown ".concat(r,' "').concat(e,'".');return n.length&&(o+=' Did you mean "'.concat(n[0],'"?')),t.length&&(o+=" Valid ".concat(r,"s: ").concat(t.join(", "),".")),o}r.d(t,{au:()=>n})},8807:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{c:()=>a});var a=function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.obj=t||{},this.items=r||[]},(t=[{key:"render",value:function(){var e=document.createElement("div");e.style.display="flex",e.style.width="100%",e.style.justifyContent="space-around",e.setAttribute("id","innerItemsWrapper");var t=window.matchMedia("(max-device-width: 415px)"),r=window.matchMedia("(max-width: 600px)");(t.matches||r.matches)&&(e.style.marginTop="3rem");for(var n=0;n<this.items.length;n++){var o=this.items[n];e.appendChild(o.render())}var i=document.createElement("div");return i.style.width=this.obj.isSide?"333px":"100%",i.style.background=this.obj.background||"white",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.style.height="100%",i.setAttribute("id","outerItemsWrapper"),i.appendChild(e),this.obj.customStyle&&(e.style.width="auto",e.style.top="0rem",e.style.borderRadius="1rem",e.style.background=this.obj.background||"white",e.style.margin="1rem",e.style.position="absolute",e.style.opacity=.8),i}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();"undefined"!=typeof window&&(window.CustomDivRenderer=a)},9110:(e,t,r)=>{r.d(t,{Ko:()=>q});var n=r(7994),o=["kind","formId","productId"];function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t,r){return(t=function(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(m(e)+" is not iterable")}function u(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return d(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var f=[][n]?t(t([][n]())):(d(t={},n,function(){return this}),t),p=c.prototype=s.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,d(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=c,d(p,"constructor",c),d(c,"constructor",l),l.displayName="GeneratorFunction",d(c,o,"GeneratorFunction"),d(p),d(p,o,"Generator"),d(p,n,function(){return this}),d(p,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:h}})()}function d(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}d=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){d(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},d(e,t,r,n)}var f=u().m(w);function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}var v=new Set(["input","labelInput","checkbox","radio","picker"]),b={text:{type:"string"},email:{type:"string",format:"email"},tel:{type:"string"},url:{type:"string",format:"uri"},number:{type:"number"},password:{type:"string"},date:{type:"string",format:"date"},time:{type:"string",format:"time"},search:{type:"string"}},g=function(e){return!!e&&"object"===m(e)};function w(e){var t,r,n,o,i;return u().w(function(a){for(;;)switch(a.p=a.n){case 0:if(g(e)){a.n=1;break}return a.a(2);case 1:return a.n=2,e;case 2:t=Array.isArray(e.children)?e.children:[],r=p(t),a.p=3,r.s();case 4:if((n=r.n()).done){a.n=6;break}return o=n.value,a.d(c(w(o)),5);case 5:a.n=4;break;case 6:a.n=8;break;case 7:a.p=7,i=a.v,r.e(i);case 8:return a.p=8,r.f(),a.f(8);case 9:return a.a(2)}},f,null,[[3,7,8,9]])}function _(e){var t,r="string"==typeof e.name?e.name:e.id;if("string"!=typeof r||!r)return null;if("checkbox"===e.type)t={type:"boolean"};else if("radio"===e.type||"picker"===e.type){var n=Array.isArray(e.items)?e.items.filter(function(e){return"string"==typeof e}):[];t=n.length?{type:"string",enum:n}:{type:"string"},"radio"===e.type&&!0===e.multiple&&(t={type:"array",items:t})}else t=s({},b[e.inputType]||b.text);var o=[e.label,e.placeholder,e.title].find(function(e){return"string"==typeof e&&e.trim()});return o&&(t.description=o.trim()),{key:r,schema:t,required:!0===e.required}}function x(e){return e.routes.map(function(e){var t=e.to.map(function(e){return e.label?"".concat(e.label," → ").concat(e.to):e.to}).join(", ");return"from ".concat(e.from,": ").concat(t)}).join("; ")}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function O(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(k(e)+" is not iterable")}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return j(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(j(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,j(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,j(d,"constructor",c),j(c,"constructor",l),l.displayName="GeneratorFunction",j(c,o,"GeneratorFunction"),j(d),j(d,o,"Generator"),j(d,n,function(){return this}),j(d,"toString",function(){return"[object Generator]"}),(E=function(){return{w:i,m:f}})()}function j(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}j=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){j(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},j(e,t,r,n)}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach(function(t){T(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function T(e,t,r){return(t=function(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function M(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){R(i,n,o,a,s,"next",e)}function s(e){R(i,n,o,a,s,"throw",e)}a(void 0)})}}function I(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=D(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function D(e,t){if(e){if("string"==typeof e)return L(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(e,t):void 0}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var B="2026-07-21",W="nodality-agent-manifest",F=function(e){var t=String(e);return"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(t):t.replace(/([^a-zA-Z0-9_-])/g,"\\$1")};function z(e){if(!e)return{text:"",actions:[]};var t,r=function(e){var t=getComputedStyle(e);if("none"===t.display||"0"===t.opacity)return!1;var r=e.getBoundingClientRect();return r.width>0&&r.height>0},n=[],o=I(e.querySelectorAll("h1,h2,h3,h4,h5,h6,p,li"));try{for(o.s();!(t=o.n()).done;){var i=t.value;if(r(i)){var a=(i.textContent||"").replace(/\s+/g," ").trim();if(a){var s=i.tagName.toLowerCase();n.push(/^h[1-6]$/.test(s)?"".concat("#".repeat(+s[1])," ").concat(a):a)}}}}catch(e){o.e(e)}finally{o.f()}var l,c=[],u=I(e.querySelectorAll("a,button,[role=button]"));try{for(u.s();!(l=u.n()).done;){var d=l.value;if(r(d)){var f=(d.textContent||"").replace(/\s+/g," ").trim();f&&!c.includes(f)&&c.push(f)}}}catch(e){u.e(e)}finally{u.f()}return{text:n.join("\n"),actions:c}}var N=function(e,t,r){return{ok:!1,code:e,got:t,valid:r}};function q(e){var t=e.mount,r=e.elements,a=e.nodes,l=e.morphs,c=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).specDraft,a=void 0===r?null:r,l=(Array.isArray(t)?t:[]).find(function(e){return g(e)&&"agent-surface"===e.op});if(!l)return null;var c,u=function(e){var t,r=[],n=p(Array.isArray(e)?e:[]);try{for(n.s();!(t=n.n()).done;){var o,i=p(w(t.value));try{for(i.s();!(o=i.n()).done;){var a=o.value;r.push(a)}}catch(e){i.e(e)}finally{i.f()}}}catch(e){n.e(e)}finally{n.f()}return r}(e),d=new Map,f=p(u);try{for(f.s();!(c=f.n()).done;){var m=c.value;"string"==typeof m.id&&d.set(m.id,m)}}catch(e){f.e(e)}finally{f.f()}var b=new Set((Array.isArray(l.exclude)?l.exclude:[]).filter(function(e){return"string"==typeof e})),k="string"==typeof l.name&&l.name.trim()?l.name.trim().replace(/[^a-zA-Z0-9_-]/g,"_"):null,O=function(e){return k?"".concat(k,"_").concat(e):e},S=[],E=function(e,t){var r=(Array.isArray(e)?e:[]).filter(function(e){return g(e)&&"morph"===e.op});if(!r.length)return null;var o,a,s=[],l=p(r);try{for(l.s();!(o=l.n()).done;){var c,u=o.value,d=p((0,n.Gd)(u));try{for(d.s();!(c=d.n()).done;){var f=c.value;"string"==typeof f.from&&s.push(f)}}catch(e){d.e(e)}finally{d.f()}}}catch(e){l.e(e)}finally{l.f()}if(!s.length)return null;for(var m=s[0].from,v=function(e){return s.filter(function(t){return t.from===e})},b=new Set([m]),w=[m];w.length;){var _,x=p(v(w.shift()));try{for(x.s();!(_=x.n()).done;){var k,O=p(_.value.toIds);try{for(O.s();!(k=O.n()).done;){var S=k.value;"string"!=typeof S||b.has(S)||(b.add(S),w.push(S))}}catch(e){O.e(e)}finally{O.f()}}}catch(e){x.e(e)}finally{x.f()}}for(var E=[],j=0,P=s;j<P.length;j++){var C=P[j];if(b.has(C.from)&&!t.has(C.from)){var T=[];if(C.byLabel)for(var A=0,R=Object.entries(C.byLabel);A<R.length;A++){var M=i(R[A],2),I=M[0],D=M[1],L="string"==typeof D&&D.startsWith("#")?D.slice(1):D;t.has(L)||T.push({label:I,to:L})}else{var B,W=p(C.toIds);try{for(W.s();!(B=W.n()).done;){var F=B.value;t.has(F)||T.push({label:null,to:F})}}catch(e){W.e(e)}finally{W.f()}}T.length&&E.push({from:C.from,to:T,back:!0===C.back})}}for(var z=[],N=0,q=E;N<q.length;N++){var U,H=p(q[N].to);try{for(H.s();!(U=H.n()).done;){var G=U.value;z.includes(G.to)||z.push(G.to)}}catch(e){H.e(e)}finally{H.f()}}return{root:m,states:[m].concat((a=z.filter(function(e){return e!==m}),function(e){if(Array.isArray(e))return y(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||h(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),destinations:z,routes:E,canGoBack:E.some(function(e){return e.back})}}(t,b);if(E){var j=E.destinations.filter(function(e){return!b.has(e)});j.length&&S.push({name:O("navigate"),kind:"navigate",description:"Move to another view of this page. These are in-page views reached by a transition, not separate URLs. Routes: "+x(E)+".",inputSchema:{type:"object",properties:{destination:{type:"string",enum:j,description:"The view to move to."}},required:["destination"]}}),E.canGoBack&&S.push({name:O("go_back"),kind:"back",description:"Return to the previous view, unwinding the path actually taken rather than following an edge.",inputSchema:{type:"object",properties:{}}})}var P,C=p((Array.isArray(l.forms)?l.forms:[]).filter(function(e){return"string"==typeof e}));try{for(C.s();!(P=C.n()).done;){var T=P.value,A=d.get(T);if(A&&"form"===A.type){var R,M={},I=[],D=p(w(A));try{for(D.s();!(R=D.n()).done;){var L=R.value;if(v.has(L.type)){var B=_(L);B&&!M[B.key]&&(M[B.key]=B.schema,B.required&&I.push(B.key))}}}catch(e){D.e(e)}finally{D.f()}Object.keys(M).length&&S.push({name:O("submit_".concat(T.replace(/[^a-zA-Z0-9_-]/g,"_"))),kind:"submit",formId:T,description:"string"==typeof A.title&&A.title.trim()?A.title.trim():'Fill and submit the "'.concat(T,'" form on this page.'),inputSchema:s({type:"object",properties:M},I.length?{required:I}:{})})}}}catch(e){C.e(e)}finally{C.f()}var W,F=p((Array.isArray(l.products)?l.products:[]).filter(function(e){return"string"==typeof e}).map(function(e){return e.replace(/^#/,"")}));try{for(F.s();!(W=F.n()).done;){var z=W.value,N=d.get(z)||d.get("#".concat(z));N&&"product"===N.type&&S.push({name:O("get_product_".concat(z.replace(/[^a-zA-Z0-9_-]/g,"_"))),kind:"product",productId:z,description:'Read the product "'.concat(N.handle,'" as it is shown on this page: ')+"name, price for the visitor's market, options and availability. Read-only; buying happens on the shop's checkout.",inputSchema:{type:"object",properties:{}}})}}catch(e){F.e(e)}finally{F.f()}S.push({name:O("read_view"),kind:"read",description:"Read the content currently on screen as structured text: headings, body text and the labels of anything actionable.",inputSchema:{type:"object",properties:{}}});var q=s({spec:a,tools:S.map(function(e){return e.kind,e.formId,e.productId,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o)})},E?{views:{root:E.root,states:E.states.filter(function(e){return!b.has(e)}),routes:E.routes}}:{});return{tools:S,manifest:q}}(r,a,{specDraft:B});if(!c)return null;var u=c.tools,d=c.manifest,f=Array.isArray(l)?l.filter(Boolean):[],m=function(e){return f.find(function(t){return t.states&&t.states.has(e)})||null},b=function(){var e,r=I(f);try{for(r.s();!(e=r.n()).done;){var n=e.value,o=n.states&&null!=n.current?n.states.get(n.current):null;if(o)return o}}catch(e){r.e(e)}finally{r.f()}return t},k=function(e){var r=function(t){if(!t||"function"!=typeof t.querySelector)return null;if(t.id===e)return"FORM"===t.tagName?t:t.querySelector("form");var r=t.querySelector("#".concat(F(e)));return r?"FORM"===r.tagName?r:r.querySelector("form"):null},n=r(t);if(n)return n;var o,i=I(f);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.states){var s,l=I(a.states.values());try{for(l.s();!(s=l.n()).done;){var c=r(s.value);if(c)return c}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){i.e(e)}finally{i.f()}return null};if("undefined"!=typeof document){var j=document.getElementById(W);j&&j.remove();var P=document.createElement("script");P.type="application/json",P.id=W,P.textContent=JSON.stringify(d,null,2),(document.body||document.documentElement).appendChild(P)}var T,R=I(u);try{for(R.s();!(T=R.n()).done;){var D=T.value;if("submit"===D.kind&&t){var L=k(D.formId);L&&(L.setAttribute("toolname",D.name),L.setAttribute("tooldescription",D.description))}}}catch(e){R.e(e)}finally{R.f()}var q,U,H,G=Promise.resolve(),K=function(e){var t=G.then(e,e);return G=t.then(function(){},function(){}),t},X=function(){var e,t=I(f);try{for(t.s();!(e=t.n()).done;){var r=e.value;if(null!=r.current)return r.current}}catch(e){t.e(e)}finally{t.f()}return null},J={navigate:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).destination;return K(M(E().m(function r(){var n,o,i;return E().w(function(r){for(;;)switch(r.n){case 0:if(n=m(e)){r.n=1;break}return r.a(2,N("UNKNOWN_VIEW",e,f.flatMap(function(e){return A(e.states.keys())})));case 1:return o=n.current,r.n=2,n.goToState(e);case 2:if(n.current===e){r.n=3;break}return i=A(n.states.keys()),r.a(2,N("UNREACHABLE_FROM_HERE",e,i.filter(function(e){return e!==o})));case 3:return r.a(2,C({ok:!0,view:n.current},z(n.states.get(n.current)||t)))}},r)})))},back:function(){return K(M(E().m(function e(){var r;return E().w(function(e){for(;;)switch(e.n){case 0:if(r=f.find(function(e){return e.history&&e.history.length})){e.n=1;break}return e.a(2,N("NO_HISTORY",null,[]));case 1:return e.n=2,r.goBack();case 2:return e.a(2,C({ok:!0,view:r.current},z(r.states.get(r.current)||t)))}},e)})))},read:(H=M(E().m(function e(){return E().w(function(e){for(;;)if(0===e.n)return e.a(2,C({ok:!0,view:X()},z(b())))},e)})),function(){return H.apply(this,arguments)}),product:(U=M(E().m(function e(r,n){var o,i,a,s,l,c;return E().w(function(e){for(;;)switch(e.n){case 0:if(o=t&&t.querySelector('[id="'.concat(n.productId,'"]'))){e.n=1;break}return e.a(2,N("NO_PRODUCT",n.productId,[]));case 1:return i=o.querySelector("[shopify-loading-placeholder]"),a=i&&"undefined"!=typeof window&&"none"===window.getComputedStyle(i).display,s=[],l=[],c=function(e){var t,r=I(e.childNodes);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(3===n.nodeType){var o=n.textContent.replace(/\s+/g," ").trim();o&&s.push(o)}else if(1===n.nodeType){if(/^(TEMPLATE|SCRIPT|STYLE)$/.test(n.tagName))continue;if("none"===window.getComputedStyle(n).display)continue;if(/^(A|BUTTON)$/.test(n.tagName)){var i=n.textContent.replace(/\s+/g," ").trim();i&&!l.includes(i)&&l.push(i)}n.shadowRoot&&c(n.shadowRoot),c(n)}}}catch(e){r.e(e)}finally{r.f()}},c(o),e.a(2,{ok:!0,product:n.productId,handle:o.getAttribute("handle"),live:!!a,text:s.join("\n"),actions:l})}},e)})),function(e,t){return U.apply(this,arguments)}),submit:(q=M(E().m(function e(){var t,r,n,o,i,a,s,l,c,u,d,p,h,y,m,v,b,g,w,_,x=arguments;return E().w(function(e){for(;;)switch(e.n){case 0:if(t=x.length>0&&void 0!==x[0]?x[0]:{},n=k((r=x.length>1?x[1]:void 0).formId)){e.n=1;break}return e.a(2,N("NO_FORM",r.formId,[]));case 1:if(n.isConnected){e.n=2;break}return o=f.flatMap(function(e){return e.states?A(e.states):[]}).filter(function(e){return S(e,2)[1].contains(n)}).map(function(e){return S(e,1)[0]}),e.a(2,N("FORM_NOT_IN_VIEW",r.formId,o));case 2:if(i=r.inputSchema&&r.inputSchema.properties||{},a=r.inputSchema&&r.inputSchema.required||[],!(s=a.filter(function(e){return void 0===t[e]||""===t[e]||null===t[e]})).length){e.n=3;break}return e.a(2,N("MISSING_REQUIRED",s,Object.keys(i)));case 3:l=[],c=[],u=[],d=function(e){return"SELECT"===e.tagName?A(e.options).map(function(e){return e.value}):[]},p="input, select, textarea",h=function(e){var t=n.querySelector('[name="'.concat(e,'"], #').concat(CSS.escape(e)));return!t||t.matches(p)?t:t.querySelector(p)},y=E().m(function e(){var r,o,i,a,s,f;return E().w(function(e){for(;;)switch(e.n){case 0:if(r=v[m],void 0!==t[r]){e.n=1;break}return e.a(2,0);case 1:if(o=t[r],i=h(r)){e.n=2;break}return u.push(r),e.a(2,0);case 2:if("checkbox"!==i.type){e.n=3;break}i.checked=!!o,e.n=7;break;case 3:if("radio"!==i.type){e.n=6;break}if(a=A(n.querySelectorAll('[name="'.concat(r,'"]'))),!(s=a.find(function(e){return e.value===String(o)}))){e.n=4;break}s.checked=!0,e.n=5;break;case 4:return c.push({field:r,got:null,valid:a.map(function(e){return e.value})}),e.a(2,0);case 5:e.n=7;break;case 6:i.value=String(o);case 7:i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),f="checkbox"===i.type?i.checked:"radio"===i.type?String(o):i.value,("checkbox"===i.type?!!o===f:String(o)===f)?l.push(r):c.push({field:r,got:f,valid:d(i)});case 8:return e.a(2)}},e)}),m=0,v=Object.keys(i);case 4:if(!(m<v.length)){e.n=7;break}return e.d(O(y()),5);case 5:if(0!==e.v){e.n=6;break}return e.a(3,6);case 6:m++,e.n=4;break;case 7:if(!c.length&&!u.length){e.n=8;break}return e.a(2,C(C({},N("FIELD_NOT_SET",[].concat(A(c.map(function(e){return e.field})),u),[].concat(A(c.map(function(e){return e.valid.length?'"'.concat(e.field,'" accepts ').concat(e.valid.map(function(e){return JSON.stringify(e)}).join(", ")):'"'.concat(e.field,'" did not take the value given')})),A(u.map(function(e){return'"'.concat(e,'" is named by the schema but no control in the form carries it')}))))),{},{filled:l,submitted:null}));case 8:if("function"==typeof n.requestSubmit){e.n=9;break}return n.submit(),e.a(2,{ok:!0,submitted:r.formId,filled:l});case 9:if(b=n.ownerDocument.defaultView,g=!1,w=function(e){e.target===n&&(g=!0)},b.addEventListener("submit",w,!0),n.requestSubmit(),b.removeEventListener("submit",w,!0),g){e.n=10;break}return _=Object.keys(i).map(function(e){return[e,h(e)]}).filter(function(e){var t=S(e,2)[1];return t&&t.willValidate&&!t.validity.valid}).map(function(e){var t=S(e,2);return{field:t[0],message:t[1].validationMessage}}),e.a(2,C(C({},N("NOT_SUBMITTED",r.formId,_)),{},{filled:l,submitted:null}));case 10:return e.a(2,{ok:!0,submitted:r.formId,filled:l})}},e)})),function(){return q.apply(this,arguments)})},$="undefined"!=typeof document&&document.modelContext?document.modelContext:"undefined"!=typeof navigator&&navigator.modelContext?navigator.modelContext:null,V=!1;if($&&"function"==typeof $.registerTool){var Y,Q=I(u);try{var Z=function(){var e=Y.value;try{$.registerTool({name:e.name,description:e.description,inputSchema:e.inputSchema,execute:function(t){return J[e.kind](t,e)}}),V=!0}catch(t){console.warn("[nodality] agent surface: tool rejected",e.name,t)}};for(Q.s();!(Y=Q.n()).done;)Z()}catch(e){Q.e(e)}finally{Q.f()}}return{manifest:d,tools:u,registered:V,destroy:function(){if($&&"function"==typeof $.unregisterTool){var e,t=I(u);try{for(t.s();!(e=t.n()).done;){var r=e.value;try{$.unregisterTool(r.name)}catch(e){}}}catch(e){t.e(e)}finally{t.f()}}if("undefined"!=typeof document){var n=document.getElementById(W);n&&n.remove()}}}}},9290:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{m:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("div"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.appendChild(e[t].render());return this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},9310:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},s.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}r.d(t,{Z:()=>u});var u=function(e){function t(e,r){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t)).text=e,o.url=r,o.setup(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,i=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setup",value:function(){window.matchMedia("(max-device-width: 415px)");var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.backgroundColor="#fff",e.style.fontFamily="Arial",e.style.width="100%",e.style.overflow="hidden",this.res=e,this}},{key:"set",value:function(e){return this.obj=e,e.onTap&&this.onTap(e.onTap),e.background&&(this.res.style.background=e.background),e.border&&(this.res.style.border=e.border),e.radius&&(this.res.style.borderRadius=e.radius),e.width&&(this.res.style.width=e.width),this.options=e,this.callReact(e),this.commonMethods(e),this}},{key:"callReact",value:function(e){var r,n,o,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=s(l(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter(function(e){return null!=e});for(var c=0;c<a.length;c++)i.push({range:a[c].range,log:a[c].op.name,target:a[c].target,op:a[c].op});var u=[];e.borderObj&&u.push("border"),e.backgroundOp&&u.push("background"),e.mar&&u.push("margin"),e.animation&&u.push("animation"),e.span&&u.push("span"),u.push("border"),this.chainReact(i,this.options.id,u)}}},{key:"frame",value:function(e){return e.height&&(this.res.style.height=e.height),e.width&&(this.res.style.width=e.width),this}},{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.appendChild(e[t].render());return this}},{key:"shadow",value:function(){return this.res.style.boxShadow="1px 1px 20px rgba(0, 0, 0, 0.60)",this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},9383:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e,t,r,n){var o=u(d(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},u.apply(null,arguments)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}r.d(t,{_:()=>p});var p=function(e){function t(e,r,o,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(a=function(e,t,r){return t=d(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}(this,t)).url=e,a.res=null,a.code=[],a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),r=t,i=[{key:"setType",value:function(e){e.url;var t=e.type,r=e.mode;if(this.code=[],"exact"===t){var n='new Image("'.concat(this.url,'", "exact")');this.code.push(n)}else if("uncover"===t){var o='new Image("'.concat(this.url,'", "uncover")');this.code.push(o)}else this.code.push("new Image('".concat(this.url,"')"));return this.image(this.url,r,t),this}},{key:"hand",value:function(){return this.res.style.cursor="pointer",this}},{key:"getType",value:function(){return"HTMLImageElement"}},{key:"toCode",value:function(){var e=this.options;this.res.style.border&&(e.border=this.res.style.border);var t=Object.fromEntries(Object.entries(e).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]}));return["new Image().set(".concat(JSON.stringify(t,null,2).replace(/"(\w+)"\s*:/g,"$1:"),")")]}},{key:"formatObj",value:function(e){return JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"set",value:function(e){var r="";this.options=e;var n=e;n.onTap&&this.onTap(n.onTap);var o=e.isFull;if(o?this.image(e.url,"exact",o,"a"):this.setup(),"IMG"===this.res.tagName?e.url&&this.res.setAttribute("src",e.url):void 0!==e.alt&&(this.res.setAttribute("role","img"),this.res.setAttribute("aria-label",e.alt)),"IMG"===this.res.tagName&&(e.srcset&&this.res.setAttribute("srcset",e.srcset),e.sizes&&this.res.setAttribute("sizes",e.sizes),void 0!==e.alt&&this.res.setAttribute("alt",e.alt),e.loading&&this.res.setAttribute("loading",e.loading),e.decoding&&this.res.setAttribute("decoding",e.decoding),e.fetchPriority&&this.res.setAttribute("fetchpriority",e.fetchPriority)),e.id&&this.res.setAttribute("id",e.id),e.id&&(r+=' id: "'.concat(e.id,'", \n')),this.id=e.id,"exact"===o?'new Image("'.concat(this.url,'", "exact")'):"uncover"===o&&'new Image("'.concat(this.url,'", "uncover")'),this.commonMethods(n),e.vtn&&(this.res.style.viewTransitionName=e.vtn),this.vtn=e.vtn,e.minHeight&&(this.res.style.minHeight=e.minHeight),e.index&&c(t,"setIndex",this,3)([e.index]),e.index&&(this.index=e.index),e.index&&(r+='\n index: "'.concat(e.index,'",')),e.resprop&&this.resprop(e.resprop,e),e.centerSelf&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto"),e.fitContent&&(this.res.style.width="100%",this.res.style.height="100%",this.res.style.marginRight="auto",this.res.style.marginTop="auto",this.res.style.objectFit="cover"),e.objectFit&&(this.res.style.objectFit=e.objectFit),e.objectFit&&(r+='\n objectFit: "'.concat(e.objectFit,'",')),e.objectPosition&&(this.res.style.objectPosition=e.objectPosition),e.objectPosition&&(r+='\n objectPosition: "'.concat(e.objectPosition,'",')),e.as&&this.as(e.as),e.onScroll&&this.onScroll(e.onScroll),e.class&&this.res.setAttribute("class",e.class),e.gpos&&(this.gposObject=e.gpos),e.gpos&&(this.gpos(e.gpos),r+="\n gpos: ".concat(this.removeQuotesFromFirstWord(JSON.stringify(e.gpos)),", ")),e.filtera){var i;i=Array.isArray(e.filtera)?n.filtera.filter(function(e){return"filter"===e.op.name})[0]:e.filtera;var a=this.removeQuotesFromFirstWord(JSON.stringify(i));r+="\n filtera: ".concat(a,", \n")}if(e.keySet&&this.keySet(e.keySet),e.stype&&this.setType(e.stype),e.isBackground&&(this.isBackground=e.isBackground),e.zIndex&&(r+='\n zIndex: "'.concat(e.zIndex,'", \n')),e.area&&this.setArea(e.area),e.area&&(r+='area: "'.concat(e.area,'", \n')),e.opacity&&(this.res.style.opacity=e.opacity),e.width&&(this.res.style.width=e.width),e.width&&(r+='width: "'.concat(e.width,'", ')),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.maxWidth&&(r+='maxWidth: "'.concat(e.maxWidth,'", ')),e.height&&(this.res.style.height=e.height),e.height&&(r+='height: "'.concat(e.height,'", ')),e.maxWidth&&this.maxWidth(e.maxWidth),e.maxWidth&&(r+='maxWidth: "'.concat(e.maxWidth,'", \n')),e.radius&&this.cornerRadius(e.radius),e.radius&&(r+='radius: "'.concat(e.radius,'", \n')),e.marginOp){var s=this.removeQuotesFromFirstWord(JSON.stringify(e.marginOp));r+="\n marginOp: ".concat(s,",")}if(e.clipPath&&this.clipPath(e.clipPath),e.clipPath&&(r+='clipPath: "'.concat(e.clipPath,'", \n')),e.reveal&&this.reveal(e.reveal),n.stroke||n.gradient||n.span||n.backgroundOp||n.layout||n.marginOp||n.shadow||n.filtera||n.animation){n.gradient,n.gradient&&(this.globalGradient=n.gradient.op.gradient),n.stroke&&c(t,"setAny",this,3)([{globalBlast:"".concat(n.stroke.op.width," ").concat(n.stroke.op.color)}]);var l=[n.stroke,n.gradient,n.animation,n.span,n.backgroundOp,n.layout,n.marginOp,n.shadow,n.filtera,n.animation];l=l.filter(function(e){return null!=e});for(var u=[],d=0;d<l.length;d++)u.push({range:l[d].range,log:l[d].op.name,target:l[d].target,op:l[d].op});this.chainReact(u,this.options.id)}if(n.shadow){var f=n.shadow,p=this.removeQuotesFromFirstWord(JSON.stringify(f));r+="\n shadow: ".concat(p,",")}if(n.animation){var h=n.animation,y=this.removeQuotesFromFirstWord(JSON.stringify(h));r+="\n animation: ".concat(y,",")}var m="\n .set({".concat(r,"}) \n \n");return Object.keys(e).length>0?this.code.push(m):this.code.push(","),this}},{key:"setID",value:function(e){return null!=e&&this.res.setAttribute("id",e),this}},{key:"opacity",value:function(e){return this.res.style.opacity="".concat(e),this}},{key:"setGrid",value:function(){return this.res.style.gridRow="span 2",this.res.style.gridColumn="span 3",this}},{key:"transform",value:function(e){return this.res.style.transform=e,this}},{key:"offset",value:function(){return this.res.style.marginLeft="-60px",this}},{key:"setClass",value:function(e){return this.res.setAttribute("class",e),this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"border",value:function(e){return this.res.style.borderTopLeftRadius="16px",this.res.style.borderTopRightRadius="16px",this}},{key:"mobileWidth",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="120%"),this}},{key:"image",value:function(e,t,r,n,o){var i=window.matchMedia("(max-device-width: 415px)"),a=document.createElement("div");return a.style.viewTransitionName=n,a.style.width="100%",a.style.height=this.options.height?this.options.height:"400px",o&&(a.style.gridColumn=o.gridColumn,a.style.gridRow=o.gridRow),i.matches&&(a.style.height="500"),a.style.backgroundImage="url(".concat(e,")"),a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="cover","uncover"===r&&(a.style.backgroundSize="contain"),"contain"===t&&(a.style.backgroundSize="contain"),this.res=a,this}},{key:"setup",value:function(){var e=document.createElement("img");return e.style.width="100%",e.src=this.url,this.res=e,this}},{key:"float",value:function(e){return this.res.style.float="".concat(e),this}},{key:"grayscale",value:function(e){return this.res.style.filter="grayscale(".concat(e,"%)"),this}},{key:"flex",value:function(e){return this.res.style.flex=1,this}},{key:"height",value:function(e){return this._declared=this._declared||{},this._declared.height=!0,this.res.style.height=e,this.declaresDimension("width")||(this.res.style.width="auto"),this}},{key:"expand",value:function(e){var t=this,r=function(){var r,n;if(window.matchMedia("(min-width: ".concat(e.at,")")).matches){t.res.style.width="".concat(e.width);var o=window.innerWidth/2-(n=r=e.width,(r.includes("%")||r.includes("px"))&&(n=n.substr(0,2)),(r.includes("%")?Number(n/100*window.innerWidth):r.includes("px")?Number(n):void 0)/2);t.res.style.marginLeft="".concat(o,"px")}else t.res.style.width="100%",t.res.style.marginLeft="0px";window.matchMedia("(max-device-width: 415px)").matches&&(t.res.style.width="100%",t.res.style.marginLeft="0px")};return r(),window.addEventListener("resize",r),this}},{key:"width",value:function(e){return this._declared=this._declared||{},this._declared.width=!0,this.res.style.width=e,this.declaresDimension("height")||(this.res.style.height="auto"),this}},{key:"declaresDimension",value:function(e){if(this._declared&&this._declared[e])return!0;var t=this.options||{};return null!=t[e]&&""!==t[e]||(Array.isArray(t.keySet)?t.keySet:t.keySet?[t.keySet]:[]).some(function(t){return t&&t.key===e})}},{key:"dimensions",value:function(e,t){return e&&t?(this.res.style.width=e,this.res.style.height=t):(this.res.style.width=e,this.res.style.height=e),this}},{key:"size",value:function(e,t){return this.deprecatedOption("size() on this component","dimensions(w, h)"),this.dimensions(e,t)}},{key:"frame",value:function(e){var t=e.width,r=e.height;return t&&r?(this.res.style.width=t,this.res.style.height=r):(this.res.style.width=t,this.res.style.height=t),this}},{key:"shadow",value:function(e){return"mild"===e.type?this.res.style.boxShadow="0px 3px 15px rgba(0,0,0,0.2)":this.res.style.boxShadow="".concat(e.x,"px ").concat(e.y,"px ").concat(e.radius,"px ").concat(e.color),this}},{key:"cornerRadius",value:function(e){return this.res.style.borderRadius=e,this}},{key:"reveal",value:function(e){var t,r,i,a,s,l,c,u=this.res,d=e&&"object"===n(e)?e:{},f=null!==(t=d.mask)&&void 0!==t?t:"square";if("square"!==f)return console.warn('nodality: img.reveal mask "'.concat(f,'" is not supported — use "square".')),this;if("undefined"==typeof window||"function"!=typeof window.IntersectionObserver)return this;if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return this;var p=Math.min(1,Math.max(0,Number(null!==(r=d.size)&&void 0!==r?r:.3))),h=null!==(i=d.duration)&&void 0!==i?i:"1.2s",y=null!==(a=d.easing)&&void 0!==a?a:"cubic-bezier(0.76, 0, 0.24, 1)",m=null!==(s=d.delay)&&void 0!==s?s:"0s",v=Number(null!==(l=d.zoom)&&void 0!==l?l:1.12),b=!1!==d.once,g=["clip-path","scale"].map(function(e){return"".concat(e," ").concat(h," ").concat(y," ").concat(m)}).join(", "),w=!1,_=function(){var e=u.clientWidth,t=u.clientHeight;if(!e||!t)return"inset(".concat(50*(1-p),"% ").concat(50*(1-p),"%)");var r=Math.min(e,t)*p;return"inset(".concat((t-r)/2,"px ").concat((e-r)/2,"px)")};u.style.clipPath=_(),u.style.scale=String(v),u.style.willChange="clip-path, scale",u.style.transition=g;var x="function"==typeof window.ResizeObserver?new window.ResizeObserver(function(){w||(u.style.transition="none",u.style.clipPath=_(),u.offsetWidth,u.style.transition=g)}):null;x&&x.observe(u);var k=Math.min(.9,Math.max(0,Number(null!==(c=d.offset)&&void 0!==c?c:.2))),O=new window.IntersectionObserver(function(e){var t,r=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=o(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.isIntersecting&&!w?(w=!0,u.style.clipPath="inset(0px 0px)",u.style.scale="1",b&&(O.disconnect(),x&&x.disconnect())):n.isIntersecting||!w||b||(w=!1,u.style.clipPath=_(),u.style.scale=String(v))}}catch(e){r.e(e)}finally{r.f()}},{threshold:0,rootMargin:"0px 0px ".concat(100*-k,"% 0px")});return O.observe(u),u.addEventListener("transitionend",function(){w&&b&&(u.style.willChange="auto")}),this}},{key:"clipPath",value:function(e){this.res.style.clipPath='path("'.concat(e,'")');var t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.style.display="block",t.style.width="100%",t.style.height="100%",t.style.overflow="visible",this}},{key:"render",value:function(e){var t=this.res;if(!e)return t;document.querySelector(e).appendChild(t)}}],i&&a(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},9521:(e,t,r)=>{r.d(t,{m:()=>h});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=["background","color","radius","maxHeight"];function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,c=[{key:"removeQuotesFromFirstWord",value:function(e){if(e)return e.replace((0,o._H)(),"$1:")}},{key:"toCode",value:function(){var e=this,t=this.items.map(function(e){return e.toCode()}).flatMap(function(e){return e}),r=(this.removeQuotesFromFirstWord(JSON.stringify(this.obj)),["background","color","mar","pad","resmar","respad","radius","maxHeight","hamburgerColour","keySet","menuLabel","menuId","brandLink"]),o=[].concat(r,function(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object.keys(this.obj).filter(function(e){return e in n.dp&&!r.includes(e)}))).filter(function(t){return void 0!==e.obj[t]}).map(function(t){return"".concat(t,": ").concat(JSON.stringify(e.obj[t]),",")}).join("\n");return this.obj.brand&&"function"==typeof this.obj.brand.toCode&&(o+="\nbrand: ".concat([].concat(this.obj.brand.toCode()).join(""),",")),"new MobileBar().set({".concat(o,"}).add([\n ").concat(t.join(","),"\n\n ])")}},{key:"set",value:function(e){var r,n,o;this.obj=e,this.obj=e,this.makeNavbar(e),e.mar&&(r=t,n=this,"function"==typeof(o=d(f(1&3?r.prototype:r),"mar",n))?function(e){return o.apply(n,e)}:o)([e.mar]),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.radius&&(this.res.style.borderRadius=e.radius),e.hamburgerColour&&(this.hamburgerColour=e.hamburgerColour),this.setStyles(e),e.color&&(this.navbar.style.color=e.color),e.pad&&this.pad(e.pad),e.background,e.color,e.radius,e.maxHeight;var i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a);return this.applyStyleOptions(i),e.keySet&&this.keySet(e.keySet),this}},{key:"makeNavbar",value:function(e){var t,r=this,o=e.brand;this.navbar=document.createElement("nav"),this.navbar.classList.add("mobile-navbar"),this.navbarHeader=document.createElement("div"),this.navbarHeader.classList.add("navbar-header"),this.brand=document.createElement("div"),this.brand.classList.add("navbar-brand"),e.brand&&"function"==typeof o.render&&this.brand.appendChild((0,n.bl)(o.render(),e.brandLink)),this.toggleButton=document.createElement("button"),this.toggleButton.classList.add("navbar-toggle"),this.toggleButton.innerHTML="&#9776;",this.toggleButton.setAttribute("type","button"),this.toggleButton.setAttribute("aria-label",null!==(t=e.menuLabel)&&void 0!==t?t:"Menu"),this.toggleButton.setAttribute("aria-expanded","false"),this.navContent=document.createElement("div"),this.navContent.classList.add("navbar-content"),e.menuId&&(this.navContent.setAttribute("id",e.menuId),this.toggleButton.setAttribute("aria-controls",e.menuId)),this.navContent.addEventListener("click",function(e){r.isMobileNavOpen&&e.target&&e.target.closest&&e.target.closest("a")&&r.toggleMobileNav()}),this.navbarHeader.appendChild(this.brand),this.navbarHeader.appendChild(this.toggleButton),this.navbar.appendChild(this.navbarHeader),this.navbar.appendChild(this.navContent),this.isMobileNavOpen=!1,this.toggleButton.addEventListener("click",function(){r.toggleMobileNav()}),this.res=this.navbar}},{key:"setStyles",value:function(e){var t,r;this.navbar.style.display="flex",this.navbar.style.flexDirection="column",this.navbar.style.padding="1rem",this.navbar.style.backgroundColor=null!==(t=e.background)&&void 0!==t?t:"orange",this.navbarHeader.style.display="flex",this.navbarHeader.style.alignItems="center",this.navbarHeader.style.justifyContent="space-between",this.navbarHeader.style.width="100%",this.brand.style.fontSize="1.5rem",this.toggleButton.style.background="none",this.toggleButton.style.border="none",this.toggleButton.style.color=null!==(r=this.hamburgerColour)&&void 0!==r?r:"#34495e",this.toggleButton.style.fontSize="1.5rem",this.toggleButton.style.cursor="pointer",this.navContent.style.display="none"}},{key:"add",value:function(e){this.items=e;for(var t=0;t<e.length;t++){var r=e[t];this.navContent.appendChild(r.render())}return this}},{key:"toggleMobileNav",value:function(){this.isMobileNavOpen=!this.isMobileNavOpen,this.toggleButton.setAttribute("aria-expanded",String(this.isMobileNavOpen)),this.navContent.style.display=this.isMobileNavOpen?"flex":"none",this.isMobileNavOpen?(this.navContent.style.flexDirection="column",this.navContent.style.gap="0.5rem",this.navContent.style.padding="1rem"):(this.navContent.style.flexDirection="",this.navContent.style.gap="",this.navContent.style.backgroundColor="",this.navContent.style.padding="")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.navbar),this.navbar}}],c&&l(r.prototype,c),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,c}(n.yU)},9622:(e,t,r)=>{function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}r.d(t,{F0:()=>d,ny:()=>u});var l="$ref",c=function(e){return!!e&&"object"===s(e)&&!Array.isArray(e)&&"string"==typeof e[l]};function u(e){var t=[],r=function(e,n){if(Array.isArray(e))return e.forEach(function(e,t){return r(e,"".concat(n,"[").concat(t,"]"))});if(e&&"object"===s(e))if(c(e))t.push({name:e[l],path:n});else for(var o=0,i=["children","items"];o<i.length;o++){var a=i[o];void 0!==e[a]&&r(e[a],"".concat(n,".").concat(a))}};return r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"elements"),t}function d(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if(!t||"object"!==s(t))return e;var n=function(e){if(Array.isArray(e))return e.map(n);if(!e||"object"!==s(e))return e;if(c(e)){var i=e[l];if(!Object.prototype.hasOwnProperty.call(t,i))return e;if(r.has(i))return e;var u=new Set(r).add(i),f=d([t[i]],t,u)[0],p=(e[l],function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,[l].map(a)));return Object.keys(p).length?o(o({},f&&"object"===s(f)?f:{}),p):f}for(var h=o({},e),y=0,m=["children","items"];y<m.length;y++){var v=m[y];void 0!==h[v]&&(h[v]=n(h[v]))}return h};return Array.isArray(e)?e.map(n):e}},9668:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{l:()=>s}),r(9873);var s=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POST";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=t,this.method=r,this.elements=[],this.formElement=document.createElement("form"),this.formElement.action=this.action,this.formElement.method=this.method},t=[{key:"add",value:function(e){var t=this;return this.elements=e,e.forEach(function(e){if(!e||"function"!=typeof e.render)throw new Error("Each element in the array must have a render method that returns an HTML DOM element.");t.formElement.appendChild(e.render())}),this}},{key:"toCode",value:function(){var e=this.elements.map(function(e){return e.toCode()}),t=Object.entries(this.obj).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],n=t[1],i="string"==typeof n?JSON.stringify(n):n;return"".concat(r,": ").concat(i)}).join(", ");return["new Form().set({".concat(t,"}).add([ \n ").concat(e.join(", \n"),"])")]}},{key:"set",value:function(e){return this.obj=e,e.action&&this.setAction(e.action),e.method&&this.setMethod(e.method),e.id&&(this.formElement.id=e.id),e.title&&this.formElement.setAttribute("aria-label",e.title),this}},{key:"setAction",value:function(e){this.action=e,this.formElement.action=this.action}},{key:"setMethod",value:function(e){this.method=e,this.formElement.method=this.method}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.formElement),this.formElement}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},9793:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{C:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t))._noTheme=!0,e.oldLength=0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,(i=[{key:"observe",value:function(e){return this.initialState=e,this.Proxima(e)}},{key:"Proxima",value:function(e){var t=this;return new Proxy(e,{set:function(e,r,n){return e[r]=n,t.initialState&&t.initialState.data&&"function"==typeof t.initialState.data.push&&t.initialState.data.push(r),"length"!==r&&t.refreshUI("Added"),!0},has:function(e,r){return"length"!==r&&t.refreshUI("Deleted"),Reflect.has(e,r)}})}},{key:"refreshUI",value:function(e){var t=this.initialState;this.adjustState(t)}},{key:"loadState",value:function(e,t){return this.loadEl=t,this.initialState=e,this.observe(this.state.data)}},{key:"adjustState",value:function(e){document.querySelector(this.loadEl);var t=e[e.length-1],r=document.createElement("p"),n=document.createTextNode(t);r.appendChild(n),document.body.appendChild(r)}},{key:"mount",value:function(e){this.res=e,this.render(e).render(e)}},{key:"toCode",value:function(){return[""]}}])&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU)},9800:(e,t,r)=>{r.d(t,{t:()=>y});var n=r(9873),o=r(1382);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var y=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=p(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,t)).res=null,e.options={},e.code=[],e.elCSS=[],e.html=[],e.react=[],e.setup(r),e.code.push("new Polygon(".concat(JSON.stringify(r),")")),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),r=t,n=[{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=document.createElement("div");return e.id&&t.setAttribute("id",e.id),this.res=t,this.res.style.padding=0,this.res.style.margin=0,this.res.style.display=e.inline?"inline-block":"block",this}},{key:"toCode",value:function(){var e=this.options||{},t=(0,o.sy)(e,2);return"new Polygon().set(".concat(t,")")}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=s(s({},this.options),e),e.id&&(this.res.id=e.id),e.class&&(this.res.className=e.class),e.sides&&this.sides(e.sides),e.size&&this.size(e.size.width||e.size,e.size.height),e.color&&this.color(e.color),e.border&&this.border(e.border),e.margin&&this.mar([{a:e.margin}]),e.padding&&this.pad([{a:e.padding}]),e.background&&this.background(e.background),e.center&&this.center();var r=e;this.obj=e;var n,o,i,a=[];if(r.stroke||r.gradient||r.backgroundOp||r.layout||r.marginOp||r.shadow||r.animation||r.filtera||r.transform){var l;r.gradient&&(this.globalGradient=r.gradient.op.gradient),r.stroke&&(null===(n=t,o=this,l="function"==typeof(i=f(p(1&3?n.prototype:n),"setAny",o))?function(e){return i.apply(o,e)}:i)||void 0===l||l([{globalBlast:"".concat(r.stroke.op.width," ").concat(r.stroke.op.color)}]));for(var c=[r.stroke,r.gradient,r.animation,r.backgroundOp,r.layout,r.marginOp,r.shadow,r.animation,r.filtera,r.transform].filter(function(e){return null!=e}),u=0;u<c.length;u++)a.push({range:c[u].range,log:c[u].op.name,target:c[u].target,op:c[u].op});var d=[];r.border&&d.push("border"),r.background&&d.push("background"),(r.mar||r.margin)&&d.push("margin"),r.animation&&d.push("animation"),"radial"===r.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)"),this.chainReact(a,this.options.id,d)}return this}},{key:"size",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.res.style.width="number"==typeof e?e+"px":e,this.res.style.height="number"==typeof t?t+"px":t,this}},{key:"sides",value:function(e){return e<3&&(e=3),this.res.style.clipPath=t.makePolygon(e),this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"border",value:function(e){return this.res.style.border="string"==typeof e?e:"".concat((null==e?void 0:e.width)||"1px"," solid ").concat((null==e?void 0:e.color)||"black"),this}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"render",value:function(e){return"string"==typeof e?document.querySelector(e).appendChild(this.res):e instanceof HTMLElement&&e.appendChild(this.res),this}}],a=[{key:"makePolygon",value:function(e){for(var t=2*Math.PI/e,r=[],n=0;n<e;n++){var o=50+50*Math.cos(n*t-Math.PI/2),i=50+50*Math.sin(n*t-Math.PI/2);r.push("".concat(o,"% ").concat(i,"%"))}return"polygon(".concat(r.join(","),")")}}],n&&c(r.prototype,n),a&&c(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(n.yU)},9873:(e,t,r)=>{r.d(t,{HN:()=>g,JB:()=>h,bl:()=>b,dp:()=>y,yU:()=>w});var n=r(5318),o=r(5379),i=r(1382);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var p=new Set;function h(){p.clear()}var y={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",color:"color",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",cols:"gridTemplateColumns",rows:"gridTemplateRows",areas:"gridTemplateAreas",area:"gridArea",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",overflowWrap:"overflowWrap",wordBreak:"wordBreak",wordWrap:"wordWrap",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition",alignContent:"alignContent",alignItems:"alignItems",justifyContent:"justifyContent",justifyItems:"justifyItems",justifySelf:"justifySelf",aspectRatio:"aspectRatio",borderTop:"borderTop",borderRight:"borderRight",borderBottom:"borderBottom",borderLeft:"borderLeft",textDecoration:"textDecoration",objectFit:"objectFit",objectPosition:"objectPosition",weight:"fontWeight",colorScheme:"colorScheme"},m=new Set(["radius","width","height","maxWidth","maxHeight","minWidth","minHeight","top","left","right","bottom","gap"]),v=function(e){return!0===e||"hand"===e?"pointer":e};function b(e,t){if(!t||!e)return e;var r=document.createElement("a");return r.setAttribute("href",t),r.style.display="flex",r.style.alignItems="center",r.style.textDecoration="none",r.style.color="inherit",r.appendChild(e),r}function g(e){var t={};if(!e||"object"!==f(e))return t;for(var r in y)null!=e[r]&&(t[r]=e[r]);return t}var w=function(){function e(){var t,r,o,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,o=function(e){if(e.transform||e.op){var t=e.op;if(e.transform||(t=e.op),!t||!Array.isArray(t.values))return void console.warn('[nodality] reactOnTransform: a transform node needs a `values` array, e.g. ["ty:-20px"] - ignored');t.duration||(t.duration="3s-ease-in-out"),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",o="",a="",s="",l="",c="",u="",d="";if(0!==t.values.length){t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?o=e.replace("tz:",""):e.startsWith("scale(")?a=e:e.startsWith("skew(")?s=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(d=e.replace("opacity:",""))}),r=i.setDefault(r),n=i.setDefault(n),o=i.setDefault(o);var f="";if("0px"!=n&&"0px"!=r&&"0px"!=o?f+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(f+="translate(".concat(r,", ").concat(n,")")),a&&(f+=" ".concat(a)),l&&(f+=" ".concat(l)),s&&(f+=" ".concat(s)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(e.op.duration){var p=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(p,", opacity ").concat(p);i.res.style.transition=h}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=f,i.res.style.opacity=d}else console.warn("[nodality] transform produced no geometric value - check `values`")}};t.on?i.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):i._on(window,"load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"}),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",function(){t.keep||n()});else{var o=1e3*parseFloat(t.duration),a=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},o/2+a)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else console.warn("[nodality] reactOnTransform: unrecognised transform descriptor - ignored")},(r=d(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1};var a=this.set;if("function"==typeof a&&!a.__appliesId){var s=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=a.call.apply(a,[this,e].concat(r)),i=e&&e.id,s=this.res;return null!=i&&""!==i&&s&&"function"==typeof s.setAttribute&&!s.getAttribute("id")&&s.setAttribute("id",String(i)),e&&e.loop&&"object"===f(e.loop)&&this.loop(e.loop),o};s.__appliesId=!0,this.set=s}this.openedElements=new WeakMap,"undefined"!=typeof document&&(this._themeUnsub=n.S.subscribe(function(e){return i._applyTheme(e)}),Promise.resolve().then(function(){return i._applyTheme(n.S.mode)}))}return t=e,r=[{key:"rasterize",value:function(e){var t=this;if(e&&0!==e.length&&!this._rasterHandle&&!this._rasterCancelled&&"undefined"!=typeof document&&"undefined"!=typeof setTimeout){var r=0,n=function(){if(!t._rasterHandle&&!t._rasterCancelled){if(t.res&&t.res.isConnected){try{t._rasterHandle=(0,o.sB)(t.res,e)}catch(e){return void console.warn("[nodality] raster pipeline skipped:",e)}if(t._rasterHandle)return}++r<80&&(t._rasterTimer=setTimeout(n,50))}};this._rasterTimer=setTimeout(n,0),this._track(function(){return clearTimeout(t._rasterTimer)})}}},{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===f(e)?(this._themeMap=e,this._applyTheme(n.S.mode),this._themeUnsub||(this._themeUnsub=n.S.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"_track",value:function(e){return"function"!=typeof e||(this._disposables||(this._disposables=[])).push(e),e}},{key:"_on",value:function(e,t,r,n){return e&&"function"==typeof e.addEventListener?(e.addEventListener(t,r,n),this._track(function(){return e.removeEventListener(t,r,n)}),r):r}},{key:"destroy",value:function(){if("function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this._rasterHandle&&"function"==typeof this._rasterHandle.destroy)try{this._rasterHandle.destroy()}catch(e){}if(this._rasterHandle=null,this._rasterCancelled=!0,this._disposables){var e,t=s(this._disposables);try{for(t.s();!(e=t.n()).done;){var r=e.value;try{r()}catch(e){}}}catch(e){t.e(e)}finally{t.f()}this._disposables.length=0}return this._responsiveTasks=null,this._responsiveHandler=null,this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var o=n.S.defaults&&n.S.defaults[e];if(o)for(var i in this._themeOriginal||(this._themeOriginal={}),o)i in this._themeOriginal||(this._themeOriginal[i]=this.res.style[i]||""),this._themeOriginal[i]||(this.res.style[i]=o[i])}}},{key:"vars",value:function(e){if(!e||"object"!==f(e))return this;for(var t in e)this.res.style.setProperty(t,String(e[t]));return this}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"applyStyleOptions",value:function(e){if(!e||!this.res)return this;for(var t in y)if(null!=e[t]){var r="number"==typeof e[t]&&0!==e[t]&&m.has(t)?"".concat(e[t],"px"):"cursor"===t?v(e[t]):e[t];this.res.style[y[t]]=r}return this}},{key:"commonMethods",value:function(e){return this.applyStyleOptions(e),"string"==typeof e.transform&&(this.res.style.transform=e.transform),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.borderObj&&e.borderObj.width&&this.borderObj(e.borderObj),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.vars&&this.vars(e.vars),e.keySet&&this.keySet(e.keySet),e.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.raster&&this.rasterize(e.raster),e.center&&this.center(e.center,{display:e.disp||e.display,flexDirection:e.flexDir||e.flexDirection}),e.transform&&"object"===f(e.transform)&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options&&this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transitionProperty="background-color, color, border, box-shadow, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}if(null!=e.scale||null!=e.transform){var i=t.prevTransform?"".concat(t.prevTransform," "):"",a=[];null!=e.transform&&a.push(e.transform),null!=e.scale&&a.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(i).concat(a.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var i={},a=["tx","ty"],s=0;s<a.length;s++){var l=a[s],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var d=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),f=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),p=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:d.num,max:f.num});i[l]="".concat(p).concat(d.unit)}}n(i)}};this._on(window,"scroll",o),0===e.from&&o()}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,this._on(window,"resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(t,r){var n=this;r&&"object"===f(r)?this.options=r:this.options&&"object"===f(this.options)||(this.options={});var o={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},i=["resprop","breakpoint","value","values","range"],l={flexDir:"flexDirection",dir:"flexDirection",justify:"justifyContent",align:"alignItems",wrap:"flexWrap",bg:"background",radius:"borderRadius",z:"zIndex",exact:"fontSize"};t.forEach(function(e){void 0!==o[e.breakpoint]?e.range=o[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),t.sort(function(e,t){return e.range[1]-t.range[1]});var c=t.find(function(e){return"default"===e.breakpoint});c||(c={breakpoint:"default",range:o.default},t.unshift(c));var u=new Set;t.forEach(function(e){Object.keys(e).forEach(function(e){i.includes(e)||"range"===e||u.add(e)})});var d=new Map;u.forEach(function(e){void 0===c[e]&&(null==n.options[e]?"keySet"!==e&&d.set(e,void 0):c[e]=n.options[e])});var p=function(e){return"exact"===e?"fontSize":l[e]||e},h=function(e,t){var r=null==t?"":t;n.res.style[e]!==String(r)&&(n.res.style[e]=r)};this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){var r,o=s(d);try{for(o.s();!(r=o.n()).done;){var i=a(r.value,2),f=i[0];if(void 0===i[1]){var y=n.res.style[p(f)];d.set(f,"string"==typeof y?y:"")}}}catch(e){o.e(e)}finally{o.f()}for(var m=e.viewportWidth(),v=c,b=0;b<t.length;b++){var g=t[b],w=a(g.range,2),_=w[0],x=w[1];if("default"!==g.breakpoint&&Math.floor(m)>=_&&Math.floor(m)<=x){v=g;break}}u.forEach(function(e){var t=v!==c&&e in v,r=t?v[e]:d.has(e)?d.get(e):c[e];"keySet"!==e?"exact"!==e?t&&"function"==typeof n[e]?n[e](r):h(function(e){var t=l[e]||e;return"undefined"==typeof console||"function"==typeof n[e]||t in n.res.style||console.warn('[nodality] resprop: "'.concat(e,'" is not a CSS property or component method — ignored.')+(l[e]?"":" Did you mean one of: ".concat(Object.keys(l).join(", "),"?"))),t}(e),r):h("fontSize",r):r&&r.key&&h(r.key,r.value)})}),this._setupResponsiveManager()}},{key:"respad",value:function(t){var r=this,n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};t.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),t.sort(function(e,t){return e.range[0]-t.range[0]});var o=t.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:n.default},t.unshift(o)),void 0===o.values&&(o.values=this.options&&this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var n=e.viewportWidth(),i=o,s=0;s<t.length;s++){var l=t[s],c=a(l.range,2),u=c[0],d=c[1];if("default"!==l.breakpoint&&Math.floor(n)>=u&&Math.floor(n)<=d){i=l;break}}var f=void 0!==i.values?i.values:o.values;null!=f&&r.pad(f)}),this._setupResponsiveManager()}},{key:"resmar",value:function(t){var r=this,n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};t.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),t.sort(function(e,t){return e.range[0]-t.range[0]});var o=t.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:n.default},t.unshift(o)),void 0===o.values&&(o.values=this.options&&(this.options.mar||this.options.pad)||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var n=e.viewportWidth(),i=o,s=0;s<t.length;s++){var l=t[s],c=a(l.range,2),u=c[0],d=c[1];if("default"!==l.breakpoint&&Math.floor(n)>=u&&Math.floor(n)<=d){i=l;break}}var f=void 0!==i.values?i.values:o.values;null!=f&&r.mar(f)}),this._setupResponsiveManager()}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"loop",value:function(e){var t=this.res,r=e&&"object"===f(e)?e:{},n=Array.isArray(r.keyframes)?r.keyframes.filter(function(e){return e&&"object"===f(e)}):[];return!t||n.length<2?(n.length<2&&console.warn("nodality: loop needs at least two keyframes"),this):(this._loop&&"function"==typeof this._loop.cancel&&this._loop.cancel(),this._loop=null,"undefined"==typeof window||"function"!=typeof t.animate||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this._loop=t.animate(n,{duration:Number(r.duration)>0?Number(r.duration):1e4,easing:r.easing||"linear",direction:r.direction||"normal",delay:Number(r.delay)||0,iterations:1/0})),this)}},{key:"radius",value:function(e){return this.res.style.borderRadius="number"==typeof e?"".concat(e,"px"):e,this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"scale",value:function(e){var t=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",function(){t.res.style.width,t.res.style.transform="scale(1.04)"}),this.res.addEventListener("mouseout",function(){t.res.style.width,t.res.style.transform="scale(1.0)"}),this}},{key:"round",value:function(e){return this.deprecatedOption("round()","radius()"),this.radius(e)}},{key:"toCSS",value:function(){return this.css}},{key:"toHTMLA",value:function(){return this.html}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"deprecatedOption",value:function(e,t){var r="nodality: `".concat(e,"` is deprecated — use `").concat(t,"` instead.");return p.has(r)||(p.add(r),console.error(r)),this}},{key:"center",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.res.style,n=r.display||t.display||"",o=r.flexDirection||t.flexDirection||"",i=!0===e||"both"===e||"x"===e,a=!0===e||"both"===e||"y"===e;if(n.includes("grid"))return i&&(r.justifyItems="center",r.justifyContent="center"),a&&(r.alignItems="center",r.alignContent="center"),this;n.includes("flex")||(r.display="flex"),r.flexDirection||(r.flexDirection=o||"column");var s=(r.flexDirection||"column").startsWith("column");return(s?a:i)&&(r.justifyContent="center"),(s?i:a)&&(r.alignItems="center"),this}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],i=e[t][o],a=0;a<o.length;a++)switch(o[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++){for(var o=r[n],i=e[t][o],a=0;a<o.length;a++)switch(o[a]){case"a":"auto"===i?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"center"===o&&!0===i&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===i&&(o.includes("l")||o.includes("r"))&&(o.includes("l")&&(this.res.style.marginLeft="auto"),o.includes("r")&&(this.res.style.marginRight="auto"))}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);return t.min>t.max&&(n=(e-t.max)/(t.min-t.max)),r.min+(r.max-r.min)*n}},{key:"gpos",value:function(e){return e&&null!=e.col&&(this.res.style.gridColumn=e.col),e&&null!=e.row&&(this.res.style.gridRow=e.row),this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),void 0!==e.radius&&(this.res.style.borderRadius=e.radius),this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close}},{key:"chainReact",value:function(t,r,n){var o=this;this.ap=!1,this.cta=0,this.once=!1;var i,l=s(t);try{for(l.s();!(i=l.n()).done;){var c=i.value;c.range||(c.range=["0px","999999px"])}}catch(e){l.e(e)}finally{l.f()}t.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var u=function(i){var l=e.viewportWidth(),c=[],u=[];o.resCopy=o.res,o.storedQueries=t.map(function(e){return e.target}).filter(function(e){return null!=e});var d,f=s(t);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.counterIndex++;var h=a(p.range,2),y=h[0],m=h[1],v=parseInt(y),b=parseInt(m),g=!0;if(p.target){g=!1;for(var w=0;w<p.target.length;w++){var _=function(e){return"string"==typeof e&&"#"===e.charAt(0)?e.slice(1):e};_(p.target[w])===_(r)&&(g=!0)}}l>=v&&l<=b&&g&&(c.push(p.log),u.push(p),p.op&&p.op.margin&&(o.useMargin=p.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(n&&!n.includes("background")&&(o.res.style.background="",o.res.style.backgroundColor=""),o.res.style.textShadow="",n&&!n.includes("border")&&(o.res.style.border=""),n&&!n.includes("margin")&&(o.res.style.margin=""),o.res.style["-webkit-text-fill-color"]="",o.res.style["-webkit-text-stroke-color"]="",o.res.style["-webkit-text-stroke-width"]="",o.res.style.filter="",o.options.background&&(o.res.style.background=o.options.background),c.includes("gradient"),(c.includes("gradient")||c.includes("shadow"))&&(o.res.style.position="relative"),c.includes("blast")){var x,k=u.filter(function(e){return"blast"===e.log})[0].op.color,O=null!==(x=u.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()?(o.res.style.border="".concat("number"==typeof O?O+"px":O," solid orange"),o.res.style.display="inline-block","FlexRowLayoutElement"===o.getType()&&(o.res.style.display="flex"),o.res.style.boxSizing="border-box",o.res.style.transformOrigin="center",o.blastTarget=o.res):(o.text,o.res.style["-webkit-text-fill-color"]="transparent",o.res.style["-webkit-text-stroke-color"]=k,o.res.style["-webkit-text-stroke-width"]="".concat(O))}if(c.includes("filter")){var S=u.filter(function(e){return"filter"===e.log})[0].op.filter;o.res.style.filter=S}if(c.includes("background")&&(o.res.style.backgroundColor="green"),c.includes("gradient")&&o.globalGradient&&("LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["-webkit-text-fill-color"]="transparent"),o.res.style.background=o.globalGradient,"LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["background-clip"]="text")),c.includes("shadow")){var E,j,P,C,T=o.options.shadow.op,A=null!==(E=T.steps)&&void 0!==E?E:1,R=null!==(j=T.colors)&&void 0!==j?j:["gray"],M=null!==(P=T.movements)&&void 0!==P?P:["3px","3px"],I=null!==(C=T.radius)&&void 0!==C?C:"3px";if(1===M.length&&(M=[M[0],M[0]]),"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()){for(var D=[],L=0;L<A;L++){var B,W=null!==(B=R[L])&&void 0!==B?B:R[0],F=M[0],z=M[1];D.push("".concat(F," ").concat(z," ").concat(I," ").concat(W))}o.res.style.boxShadow=D.join(", ")}else{for(var N=[],q=0;q<A;q++){var U,H=null!==(U=R[q])&&void 0!==U?U:R[0],G=M[0],K=M[1];N.push("drop-shadow(".concat(G," ").concat(K," ").concat(I," ").concat(H,")"))}o.res.style.filter=N.join(" ")}}if(c.includes("margin"))for(w=0;w<t.length;w++)if(t[w].op){var X=t[w].op.offsets;X&&void 0!==o.index&&(o.res.style.margin=X[Number(o.index)]+"px")}if(c.includes("spana")||c.includes("span")){var J=document.createElement("div");if(J.setAttribute("id","oroa"),Object.assign(J.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),o.res&&o.res.querySelector("span"))return;o.res=o.resCopy,o.res.textContent="",o.options.span&&(Array.isArray(o.options.span)?o.options.span:[o.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=o.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,i=e.style||{};if(t<r.length){var a=r.indexOf(n,t);if(a>t){var s=r.substring(t,a);o.res.appendChild(new o.constructor(s).setup({type:"span",id:i.id,animation:i.animation}).set({}).render())}t=a+n.length}var l=new o.constructor(n).setup({type:"span",id:i.id,animation:i.animation}).set(i).render();o.res.appendChild(l)}),t<r.length){var n=r.substring(t);o.res.appendChild(new o.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new o.constructor(o.prevText).set({}).render();o.prevText&&o.prevText.length>0&&i&&o.res.appendChild($)}if(c.includes("animation")){if(o.options.animation&&!o.hasAnimated&&!o.options.animation.op.fireAt){o.hasAnimated=!0;var V=o.options.animation.op;o._on(window,"sidebar:open",function(){o.res.animate(V.keyframesOpen,V.openOptions)}),o._on(window,"sidebar:closed",function(){o.res.animate(V.keyframesClose,V.closeOptions)}),o.res.animate(V.keyframesClose,{duration:0,fill:"forwards"}),o.openTag&&o.closeTag&&(o._on(window,o.openTag,function(){o.res.animate(V.keyframesOpen,V.openOptions)}),o._on(window,o.closeTag,function(){o.res.animate(V.keyframesClose,V.closeOptions)}))}if(o.options.animation&&o.options.animation.op.fireAt&&o.options.animation.op.fireAt.endsWith("px")){var Y=o.options.animation.op;o.res.animate(Y.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(Y.fireAt)&&(o.res.animate(Y.keyframesOpen,Y.openOptions),window.removeEventListener("scroll",Q))};o._on(window,"scroll",Q)}if(o.options.animation&&"inview"===o.options.animation.op.fireAt){var Z=o.options.animation.op;o.res.animate(Z.keyframesClose,{duration:0,fill:"forwards"});var ee=!1,te=new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!ee&&(ee=!0,o.res.animate(Z.keyframesOpen,Z.openOptions),t.disconnect())})});te.observe(o.res),o._track(function(){return te.disconnect()})}}};this.options.animation||this._on(window,"resize",function(){return u()}),u()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace((0,i._H)(),"$1:")}}],l=[{key:"viewportWidth",value:function(){if("undefined"==typeof window)return 0;var e=window.visualViewport;return e&&"number"==typeof e.width?e.width:window.innerWidth}}],r&&u(t.prototype,r),l&&u(t,l),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,l}()},9932:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}r.d(t,{I:()=>c});var c=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=s(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}(this,t)).el=null,e.file=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,i=[{key:"set",value:function(e){var t=this;this.options=e,this.okayColor=e.okayColor,window.matchMedia("(max-device-width: 415px)");var r=document.createElement("div");r.style.paddingBottom="1em",r.style.display="flex",document.createElement("div");var n=document.createElement("input");n.setAttribute("type","text"),n.style.display="none",n.style.margin="0.5em";var o=document.createElement("input");o.setAttribute("type","file"),o.setAttribute("name",e.name),e.accept&&(o.accept=e.accept),void 0!==e.id&&null!==e.id&&o.setAttribute("id",e.id),o.style.visibility="hidden",o.style.display="none",window.matchMedia("(max-device-width: 415px)").matches&&(o.style.fontSize="1rem");var i=document.createElement("label");return i.setAttribute("for",e.id),i.textContent=e.title,i.style.marginRight=12,i.style.padding="0.5em",e.color&&(i.style.color=e.color),e.background&&(i.style.background=e.background,i.style.padding="10"),o.addEventListener("change",function(){n.style.display="block",e.hideField&&(n.style.display="none"),i.textContent="Change",t.file=o.files[0],t.onLoad(t.file),u[e.index]=t.file,n.setAttribute("value",t.file.name),n.setAttribute("readonly","true"),t.getLoaded(),t.highlight()}),r.appendChild(o),r.appendChild(i),r.appendChild(n),this.el=r,e.font&&this.font(e.font),e.radius&&this.borderRadius(e.radius),this}},{key:"borderRadius",value:function(e){return this.el.style.borderRadius=e,this}},{key:"addClass",value:function(e){return this.el.setAttribute("class",e),this}},{key:"font",value:function(e){return this.el.style.fontFamily=e,this}},{key:"bold",value:function(){return this.el.style.fontWeight="bold",this}},{key:"rounded",value:function(){return this.el.children[1].style.borderRadius="8px",this}},{key:"highlight",value:function(){return null===this.file?(this.hasFile=!1,this.el.children[1].style.background="red"):(this.hasFile=!0,this.okayColor?this.el.children[1].style.background=this.okayColor:this.el.children[1].style.background="#1abc9c"),this}},{key:"auto",value:function(){var e=function(){window.matchMedia("(max-device-width: 415px)").matches};return e(),window.addEventListener("resize",e),this}},{key:"onLoad",value:function(e){return this.returnObject(this.file),this}},{key:"getLoaded",value:function(){return this.file}},{key:"returnObject",value:function(e){return e}},{key:"loadCall",value:function(e){return this.func=e,this.func(this.file),this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new FilePickera().set(".concat(e,")")]}},{key:"render",value:function(e){return e?(document.querySelector(e).appendChild(this.el),this):this.el}}],i&&o(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(r(9873).yU),u=[]}},__nodality_wp_module_cache__={};function __nodality_wp_require__(e){var t=__nodality_wp_module_cache__[e];if(void 0!==t)return t.exports;var r=__nodality_wp_module_cache__[e]={exports:{}};return __nodality_wp_modules__[e](r,r.exports,__nodality_wp_require__),r.exports}__nodality_wp_require__.d=(e,t)=>{for(var r in t)__nodality_wp_require__.o(t,r)&&!__nodality_wp_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__nodality_wp_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__nodality_wp_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __nodality_wp_exports__={},element_mapper=__nodality_wp_require__(849),animator=__nodality_wp_require__(9873),base=__nodality_wp_require__(9793),layout_text=__nodality_wp_require__(6131),layout_image=__nodality_wp_require__(9383),layout_link=__nodality_wp_require__(7108),flex_row=__nodality_wp_require__(3050),custom_div=__nodality_wp_require__(8807),new_nav_bar=__nodality_wp_require__(3440),side_bar=__nodality_wp_require__(5367),side_nav_bar=__nodality_wp_require__(7879),free=__nodality_wp_require__(7258);function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}var NAudio=function(e){function t(e){var r;return _classCallCheck(this,t),(r=_callSuper(this,t)).url=e,r.res=null,r.setup(),r}return _inherits(t,animator.yU),_createClass(t,[{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"set",value:function(e){return this.options=e,e.background&&this.background(e.background),this}},{key:"background",value:function(e){var t=document.createElement("style");return t.type="text/css",t.textContent="\n\taudio::-webkit-media-controls-panel {\n\t\tbackground-color: ".concat(e,";\n\t}\n"),document.head.appendChild(t),this}},{key:"toCode",value:function(){return JSON.stringify(this.options,null,4),['new NAudio("'.concat(this.url,'")')]}},{key:"size",value:function(e){return this.res.style.width=e,this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])}(),progress=__nodality_wp_require__(827),center=__nodality_wp_require__(1873),code=__nodality_wp_require__(2789),stack=__nodality_wp_require__(7926),container=__nodality_wp_require__(153),codegen=__nodality_wp_require__(1382);function svg_typeof(e){return svg_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},svg_typeof(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function svg_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function svg_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,svg_toPropertyKey(n.key),n)}}function svg_createClass(e,t,r){return t&&svg_defineProperties(e.prototype,t),r&&svg_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function svg_toPropertyKey(e){var t=svg_toPrimitive(e,"string");return"symbol"==svg_typeof(t)?t:t+""}function svg_toPrimitive(e,t){if("object"!=svg_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=svg_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function svg_callSuper(e,t,r){return t=svg_getPrototypeOf(t),svg_possibleConstructorReturn(e,svg_isNativeReflectConstruct()?Reflect.construct(t,r||[],svg_getPrototypeOf(e).constructor):t.apply(e,r))}function svg_possibleConstructorReturn(e,t){if(t&&("object"==svg_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return svg_assertThisInitialized(e)}function svg_assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function svg_isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(svg_isNativeReflectConstruct=function(){return!!e})()}function svg_getPrototypeOf(e){return svg_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},svg_getPrototypeOf(e)}function svg_inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&svg_setPrototypeOf(e,t)}function svg_setPrototypeOf(e,t){return svg_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},svg_setPrototypeOf(e,t)}var Svg=function(e){function t(e){var r;return svg_classCallCheck(this,t),(r=svg_callSuper(this,t)).svgMarkup="string"==typeof e?e:"",r.res.style.display="inline-flex",r.res.style.alignItems="center",r.res.style.justifyContent="center",r.res.style.flexShrink="0",r.res.style.lineHeight="0",r.res.innerHTML=r.svgMarkup,r._sizeInner(),r.code=[],r.code.push("\n new Svg() \n"),r}return svg_inherits(t,container.m),svg_createClass(t,[{key:"_sizeInner",value:function(){var e=this.res.querySelector("svg");e&&(e.getAttribute("width")||e.setAttribute("width","100%"),e.getAttribute("height")||e.setAttribute("height","100%"),e.style.display="block")}},{key:"setSvg",value:function(e){return this.svgMarkup="string"==typeof e?e:"",this.res.innerHTML=this.svgMarkup,this._sizeInner(),this}},{key:"size",value:function(e){var t="number"==typeof e?"".concat(e,"px"):e;return this.res.style.width=t,this.res.style.height=t,this}},{key:"toCode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.excludeFromCodeTrue)return[""];var t=" ".repeat(e),r=(this.svgMarkup||"").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),n="".concat(t,"new Svg(`").concat(r,"`)");if(this.obj&&Object.keys(this.obj).length){var o=Object.fromEntries(Object.entries(this.obj).filter(function(e){var t=_slicedToArray(e,2);return t[0],null!==t[1]})),i=(0,codegen.sy)(o,2);n+="\n".concat(t," .set(").concat(i,")")}return[n+="\n".concat(t)]}}])}(),meta_adder=__nodality_wp_require__(1980),table=__nodality_wp_require__(6182),dropdown_2025=__nodality_wp_require__(3665),modal_2025=__nodality_wp_require__(3243),text_field=__nodality_wp_require__(3014),flex_card=__nodality_wp_require__(9310),wrap=__nodality_wp_require__(1632),flex_grid=__nodality_wp_require__(5860),zoom_card=__nodality_wp_require__(4550),simple_bar=__nodality_wp_require__(9290),beta_desktop_bar=__nodality_wp_require__(2387),beta_mobile_bar=__nodality_wp_require__(9521),multiswitcher=__nodality_wp_require__(1236),spacer=__nodality_wp_require__(3180),horizontal_scroller=__nodality_wp_require__(7135),layout_checkbox=__nodality_wp_require__(1557),video=__nodality_wp_require__(2689),ulist=__nodality_wp_require__(4617),slider_2025=__nodality_wp_require__(1353),floating_input=__nodality_wp_require__(3257),range=__nodality_wp_require__(5613),form_components_radio=__nodality_wp_require__(1371),picker=__nodality_wp_require__(2588),image_picker=__nodality_wp_require__(9932),data_list=__nodality_wp_require__(6679),form_components_form=__nodality_wp_require__(9668),layout_button=__nodality_wp_require__(8424),designer=__nodality_wp_require__(2234),link_getter=__nodality_wp_require__(2027),card_getter=__nodality_wp_require__(4753);function keyframe_animation_typeof(e){return keyframe_animation_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},keyframe_animation_typeof(e)}function keyframe_animation_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function keyframe_animation_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,keyframe_animation_toPropertyKey(n.key),n)}}function keyframe_animation_createClass(e,t,r){return t&&keyframe_animation_defineProperties(e.prototype,t),r&&keyframe_animation_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=keyframe_animation_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function keyframe_animation_toPropertyKey(e){var t=keyframe_animation_toPrimitive(e,"string");return"symbol"==keyframe_animation_typeof(t)?t:t+""}function keyframe_animation_toPrimitive(e,t){if("object"!=keyframe_animation_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=keyframe_animation_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var KeyframeAnim=function(){return keyframe_animation_createClass(function e(t){var r=this;return keyframe_animation_classCallCheck(this,e),_defineProperty(this,"scrollFunction",function(){void 0===r.flagValue&&(r.flagValue=0);var e=(r.html.scrollTop-r.flagValue)/(r.html.scrollHeight-window.innerHeight)*16,t=Math.min(r.frameCount-1,Math.ceil(e*r.frameCount));isNaN(t)&&(t=1),t<0&&(t=0),r.data.limit?t<r.data.limit&&requestAnimationFrame(function(){return r.updateImage(t+1)}):requestAnimationFrame(function(){return r.updateImage(t+1)}),window.matchMedia("(max-device-width: 415px)")}),_defineProperty(this,"currentFrame",function(e){return"".concat(r.data.path).concat(e.toString().padStart(4,"0"),".").concat(r.data.extension)}),_defineProperty(this,"preloadImages",function(){for(var e=1;e<r.frameCount;e++)document.createElement("img"),r.img.src=r.currentFrame(e)}),_defineProperty(this,"updateImage",function(e){r.img.src=r.currentFrame(e)}),this.fromFirstImageFlag=!1,this.flag=0,this.flagValue=t.flagValue,this.data=t,this.mask=t.mask,this.maskData=t.maskData,this.id=t.id,this.halfHeight=t.halfHeight,void 0===this.data.type?this.type="default":this.type=this.data.type,this.stickData=t.stickData,this.targetHeight=this.data.targetHeight,this.html=document.body,this.res=document.createElement("div"),void 0!==this.data.id&&null!==this.data.id&&this.res.setAttribute("id",this.data.id),this.res.style.border="1px solid green",this.res.style.width="100%",this.res.style.display="grid",this.res.style.position="sticky",this.res.style.top=0,this.res.style.alignSelf="flex-start",this.res.style.justifyContent="center",this.res.style.alignItems="center",this.data.added||(this.res.style.marginTop=this.data.noAddedDistance),this.frameCount=100,this.lastScrollTop=window.scrollY,this.setupTopElement(),this.scrollFunction(),window.addEventListener("scroll",function(){r.scrollFunction()}),this.preloadImages(),this},[{key:"marginTop",value:function(e){return this.res.style.marginTop=e,this}},{key:"toCode",value:function(){return[""]}},{key:"drawImageProp",value:function(e,t,r,n,o,i,a,s){2===arguments.length&&(r=n=0,o=e.canvas.width,i=e.canvas.height),(a="number"==typeof a?a:.5)<0&&(a=0),(s="number"==typeof s?s:.5)<0&&(s=0),a>1&&(a=1),s>1&&(s=1);var l,c,u,d,f=t.width,p=t.height,h=Math.min(o/f,i/p),y=f*h,m=p*h,v=1;y<o&&(v=o/y),Math.abs(v-1)<1e-14&&m<i&&(v=i/m),(l=(f-(u=f/((y*=v)/o)))*a)<0&&(l=0),(c=(p-(d=p/((m*=v)/i)))*s)<0&&(c=0),u>f&&(u=f),d>p&&(d=p),e.drawImage(t,l,c,u,d,r,n,o,i)}},{key:"maska",value:function(e){var t=this;return window.addEventListener("scroll",function(){t.innerMask(e)}),this}},{key:"innerMask",value:function(e){if(e){var t=smartRange(window.scrollY,{min:e.start,max:e.end},{min:0,max:7}),r=smartRange(window.scrollY,{min:e.start,max:e.end},{min:37,max:37});this.res.style.clipPath="inset(".concat(t,"% ").concat(t,"% round 0 0 ").concat(r,"px ").concat(r,"px)")}}},{key:"setupTopElement",value:function(){var e=this,t=document.createElement("canvas");if(t.style.gridArea="1/1",t.zIndex=1,t.style.display="grid",t.style.gridTemplate="1fr/1fr",t.style.justifyContent="center",t.style.alignItems="center",t.style.marginLeft="auto",t.style.marginRight="auto",this.context=t.getContext("2d"),this.context.canvas.width=window.innerWidth,this.context.canvas.height=1.2*window.innerHeight,this.img=document.createElement("img"),this.img.onload=function(){e.data.halfHeight?e.drawImageProp(e.context,e.img,0,0,window.innerWidth,window.innerHeight/2):e.drawImageProp(e.context,e.img,0,0,window.innerWidth,1.2*window.innerHeight)},window.addEventListener("resize",function(){e.context.canvas.width=window.innerWidth,e.context.canvas.height=1.2*window.innerHeight,e.drawImageProp(e.context,e.img,0,0,window.innerWidth,1.2*window.innerHeight)}),this.res.appendChild(t),this.data.text){var r=document.createElement("div");r.style.gridArea="1/1";var n=this.data.text.render();if(this.h2a=n,r.appendChild(n),r.setAttribute("id","rem"),this.data.hasRect){var o=document.createElement("div");o.style.width="30px",o.style.height="30px",o.style.backgroundColor="orange"}else for(var i=0;i<this.res.children.length;i++)"rem"===this.res.children[i].id&&this.res.removeChild(this.res.children[i]);this.res.appendChild(r)}this.lastScrollTop=0,this.count=1,this.isUp=!1,this.done=!1,this.fireOnce=!0,this.dec=1,this.tdec=1,this.atdec=0,this.textOpacity=1,this.res.children[this.res.children.length-1].children[0].style.opacity=0,this.data.text&&window.addEventListener("scroll",function(){e.h2a.style.backgroundColor="rgba(0, 0, 0, 0.8)",e.h2a.style.opacity=1}),window.addEventListener("scroll",function(t){if(e.data.stickyData&&e.data.stickyData.top){var r=e.data.stickyData.top;e.data.uncomment&&(window.scrollY>r?(wrapDiv.style.background="pink",wrapDiv.style.position="relative",wrapDiv.style.top=r):(wrapDiv.style.background="orange",wrapDiv.style.top=0,wrapDiv.style.position="fixed"))}var n=window.scrollY||document.documentElement.scrollTop;if(n>e.lastScrollTop?e.isUp=!1:e.isUp=!0,e.lastScrollTop=n<=0?0:n,e.isUp&&e.textOpacity<.98&&(e.textOpacity+=.01),!1===e.isUp&&e.textOpacity>.02&&(e.textOpacity-=.01),e.data.mask){var o=e.res,i=smartRange(window.scrollY,{min:e.data.maskData.start,max:e.data.maskData.end},{min:0,max:7});if(o.style.clipPath="inset(".concat(i,"% ").concat(i,"% round 20px)"),!e.hasH2){var a=document.createElement("div");a.style.background="#ecf0f1",a.style.width="86%",a.style.marginLeft="7%",a.style.borderRadius="1rem",e.hasH2=!0,a.appendChild(e.data.newSection.render()),o.parentElement.appendChild(a)}}e.data.targetHeight})}},{key:"setLazyText",value:function(e){var t=this;return this.lazyText=e,window.addEventListener("scroll",function(){for(var e=smartRange(window.scrollY,{min:t.lazyText.start,max:t.lazyText.end},{min:0,max:200}),r=smartRange(window.scrollY,{min:t.lazyText.start,max:t.lazyText.end},{min:0,max:1}),n=0;n<t.h2a.children[0].children.length;n++)t.h2a.children[0].children[n].style.transform="matrix(1, 0, 0, 1, 0, -".concat(e,")"),t.h2a.children[0].children[n].style.opacity="".concat(r-.2*n)}),this}},{key:"setProps",value:function(e){return e.targetHeight&&(this.data.targetHeight=e.targetHeight),e.flagValue&&(this.flagValue=e.flagValue),this}},{key:"fixedToRelative",value:function(e){this.data.uncomment=e}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"setOpacityRange",value:function(e){var t=this;return this.data.opacityRange=e.opacityRange,this.data.scaleRange=e.scaleRange,window.addEventListener("scroll",function(){var e=smartRange(window.scrollY,{min:t.data.opacityRange.start,max:t.data.opacityRange.end},{min:0,max:1});t.h2a.style.opacity=e;var r=smartRange(window.scrollY,{min:t.data.scaleRange.start,max:t.data.scaleRange.end},{min:3,max:1});window.matchMedia("(max-device-width: 415px)").matches||(t.h2a.children[0].style.transform="scale(".concat(r,")"))}),this}},{key:"stick",value:function(e){return e?(e.offset&&(null!=this.data.stickyData?this.data.stickyData.top=e.offset:this.data.stickyData={top:e.offset}),e.value?this.makeSticky():this.noSticky(),this):(this.makeSticky(),this)}},{key:"to100vh",value:function(){this.res.style.height="100vh"}},{key:"makeSticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"noSticky",value:function(){return this.res.style.position="",this}},{key:"toOpacity",value:function(e){this.res.style.opacity="".concat(e)}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])}();function transform_anim_typeof(e){return transform_anim_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},transform_anim_typeof(e)}function transform_anim_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function transform_anim_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,transform_anim_toPropertyKey(n.key),n)}}function transform_anim_createClass(e,t,r){return t&&transform_anim_defineProperties(e.prototype,t),r&&transform_anim_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function transform_anim_toPropertyKey(e){var t=transform_anim_toPrimitive(e,"string");return"symbol"==transform_anim_typeof(t)?t:t+""}function transform_anim_toPrimitive(e,t){if("object"!=transform_anim_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=transform_anim_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function convertRange(e,t,r){var n=(e-t.min)*(r.max-r.min)/(t.max-t.min)+r.min;return n>1&&(n=2-n),n}var TransformAnim=function(){return transform_anim_createClass(function e(t){transform_anim_classCallCheck(this,e),this.data=t,this.targetHeight=this.data.targetHeight,void 0===this.data.type?this.type="default":this.type=this.data.type,this.layout="flex",this.setup()},[{key:"toCode",value:function(){return[""]}},{key:"set",value:function(e){return e.arrayPadding&&(this.wrdiv.style.marginTop=e.arrayPadding.value),e.height&&(this.wrdiv.style.height=e.height),e.position&&(this.wrdiv.style.position=e.position),this}},{key:"setup",value:function(){var e=this,t=document.createElement("div");this.wrdiv=t,t.style.display="flex",t.style.flexDirection="column",this.data.overflow&&(t.style.overflow="hidden"),t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.style.height="900px",this.data.position?t.style.position=this.data.position:this.data.sticky||(t.style.position="fixed"),t.style.marginTop="0px";var r=document.createElement("img");r.style.gridArea="1/1",r.style.display="none",r.style.width="50%",r.setAttribute("class","m2"),t.appendChild(r),this.data.view&&(this.m2img=this.data.view.render(),t.appendChild(this.m2img)),this.data.paragraph&&(this.paragraph=this.data.paragraph.render(),t.appendChild(this.paragraph)),this.data.view&&(r.style.display="none");var n=document.createElement("h2");n.style.fontFamily="Arial",n.style.fontSize="2.4rem",n.style.background="linear-gradient(#3498db, #1abc9c)",n.style.webkitBackgroundClip="text",n.style.webkitTextFillColor="transparent";var o=document.createTextNode("Supercharged");n.appendChild(o),!0!==this.data.showTitle&&void 0!==this.data.showTitle||(this.data.content&&this.data.content.render?t.appendChild(this.data.content.render()):t.appendChild(n));var i=document.createElement("p");document.createTextNode("Hello"),t.appendChild(i),this.res=t,window.addEventListener("scroll",function(o){return e.resize(t,r,n)}),this.resize(t,r,n)}},{key:"setStickyData",value:function(e){return this.data.stickyData=e,this}},{key:"toAuto",value:function(){return this.res.style.height="auto",this}},{key:"stick",value:function(e){return e?(e.offset&&(null!=this.data.stickyData?this.data.stickyData.top=e.offset:(this.data.stickyData={top:e.offset},this.fixedToRelative(!0))),e.value?this.makeSticky():this.noSticky(),this):(this.makeSticky(),this)}},{key:"makeSticky",value:function(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top=0,this}},{key:"setProps",value:function(e){return e.targetHeight&&(this.data.targetHeight=e.targetHeight),e.flagValue&&(this.data.flagValue=e.flagValue),this}},{key:"noSticky",value:function(){return this.wrdiv.style.position="",this}},{key:"toSticky",value:function(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top="0",this}},{key:"toOpacity",value:function(e){this.res.style.opacity="".concat(e)}},{key:"setUncomment",value:function(e){this.data.uncomment=e}},{key:"fixedToRelative",value:function(e){return this.data.uncomment=e,this}},{key:"mask",value:function(e){var t=this;return window.addEventListener("scroll",function(){t.innerMask(e)}),this}},{key:"innerMask",value:function(e){return e&&(transform_anim_smartRange(window.scrollY,{min:e.start,max:e.end},{min:7,max:0}),transform_anim_smartRange(window.scrollY,{min:e.start,max:e.end},{min:37,max:37})),this}},{key:"setScale",value:function(e){var t=this;return this.data.range=e,this.m2img.style.transform="scale(".concat(this.data.range.scaleMax,")"),window.addEventListener("scroll",function(){var e=transform_anim_smartRange(window.scrollY,{min:t.data.range.min,max:t.data.range.max},{min:t.data.range.scaleMax,max:t.data.range.scaleMin});null!=t.m2img&&(t.m2img.style.transform="scale(".concat(e,")"))}),this}},{key:"resize",value:function(e,t,r){var n=window.scrollY||document.documentElement.scrollTop;if(n>this.lastScrollTop?this.isUp=!1:this.isUp=!0,this.data.sticky)e.style.background="#fafafa";else if(this.data.stickyData){var o=this.data.stickyData.top;this.data.uncomment&&(window.scrollY>o?(e.style.position="relative",e.style.top=o):(e.style.top=0,e.style.position="fixed"))}this.lastScrollTop=n<=0?0:n;var i=t;this.m2img=t,this.data.view&&(i=this.m2img);var a=transform_anim_smartRange(window.scrollY,{min:3150,max:3300},{min:0,max:100}),s=transform_anim_smartRange(window.scrollY,{min:3150,max:3300},{min:60,max:80}),l=transform_anim_smartRange(window.scrollY,{min:3150,max:3300},{min:0,max:40});this.data.operation&&"translate"===this.data.operation.type&&(i.style.transform="translate3d(".concat(a,"%, ").concat(a/2,"%, 0px) scale(").concat(s/100,") rotate(").concat(l,"deg)"))}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])}();function transform_anim_smartRange(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;o=r.min+i}return o}function stacker_typeof(e){return stacker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},stacker_typeof(e)}function stacker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function stacker_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,stacker_toPropertyKey(n.key),n)}}function stacker_createClass(e,t,r){return t&&stacker_defineProperties(e.prototype,t),r&&stacker_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function stacker_toPropertyKey(e){var t=stacker_toPrimitive(e,"string");return"symbol"==stacker_typeof(t)?t:t+""}function stacker_toPrimitive(e,t){if("object"!=stacker_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=stacker_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Stacker=function(){return stacker_createClass(function e(){stacker_classCallCheck(this,e),this.res=document.createElement("div"),this.res.style.display="flex",this.res.style.flexDirection="column"},[{key:"add",value:function(e){for(var t=0;t<e.length;t++){var r=e[t].render();0===t&&(r.style.zIndex=1),this.res.appendChild(r)}return this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])}();function scroll_video_typeof(e){return scroll_video_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},scroll_video_typeof(e)}function scroll_video_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function scroll_video_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,scroll_video_toPropertyKey(n.key),n)}}function scroll_video_createClass(e,t,r){return t&&scroll_video_defineProperties(e.prototype,t),r&&scroll_video_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function scroll_video_toPropertyKey(e){var t=scroll_video_toPrimitive(e,"string");return"symbol"==scroll_video_typeof(t)?t:t+""}function scroll_video_toPrimitive(e,t){if("object"!=scroll_video_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=scroll_video_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var ScrollVideo=function(){return scroll_video_createClass(function e(){scroll_video_classCallCheck(this,e),this.frameNumber=0,this.res=document.createElement("div"),this.vid=null,this.minScrollHeight=0,this.maxScrollHeight=1e3,this.videoUrl=""},[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.minScrollHeight,r=void 0===t?0:t,n=e.maxScrollHeight,o=void 0===n?1e3:n,i=e.videoUrl,a=void 0===i?"":i;return this.minScrollHeight=r,this.maxScrollHeight=o,this.videoUrl=a,this.createElements("V0"),this.vid=this.res.children[0],this.init(),this}},{key:"createElements",value:function(e){var t=document.createElement("video");t.id=e,t.setAttribute("tabindex","0"),t.setAttribute("autobuffer","autobuffer"),t.setAttribute("preload","preload"),t.style.position="sticky",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100vh",t.style.border="1px solid orange";var r=document.createElement("source");r.type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"',r.src=this.videoUrl,t.appendChild(r),this.res.appendChild(t);var n=document.createElement("p");n.id="time",n.style.fontFamily="Helvetica, Arial, sans-serif",n.style.fontSize="24px",this.res.appendChild(n);var o=document.createElement("div");o.id="set-height",o.style.display="block",this.setop=o,this.res.appendChild(o)}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"init",value:function(){var e=this;this.vid.addEventListener("loadedmetadata",function(){var t=e.setop;if(t){var r=e.maxScrollHeight-e.minScrollHeight;t.style.height="".concat(r,"px")}else console.error("Error: 'set-height' element not found.")}),this.scrollPlay()}},{key:"scrollPlay",value:function(){var e=this;if(this.vid&&!isNaN(this.vid.duration)){var t=Math.max(this.minScrollHeight,Math.min(window.pageYOffset,this.maxScrollHeight)),r=this.maxScrollHeight-this.minScrollHeight,n=(t-this.minScrollHeight)/r;this.vid.currentTime=n*this.vid.duration,window.requestAnimationFrame(function(){return e.scrollPlay()})}else window.requestAnimationFrame(function(){return e.scrollPlay()})}},{key:"toCode",value:function(){return[""]}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])}(),theme=__nodality_wp_require__(5318),grid_switcher=__nodality_wp_require__(7698),polygon=__nodality_wp_require__(9800),circle=__nodality_wp_require__(5632),grid_overlay=__nodality_wp_require__(1200),shop=__nodality_wp_require__(5748);function seo_typeof(e){return seo_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},seo_typeof(e)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){seo_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function seo_defineProperty(e,t,r){return(t=seo_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function seo_toPropertyKey(e){var t=seo_toPrimitive(e,"string");return"symbol"==seo_typeof(t)?t:t+""}function seo_toPrimitive(e,t){if("object"!=seo_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=seo_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var configuredOrigin="",_process$versions;function setSeoOrigin(e){configuredOrigin=String(null!=e?e:"").replace(/\/+$/,"")}function resolveOrigin(){var e;return configuredOrigin||("undefined"!=typeof window&&null!==(e=window.location)&&void 0!==e&&e.origin?window.location.origin:"")}function upsert(e,t){if("undefined"!=typeof document){document.head.querySelectorAll(e).forEach(function(e){return e.remove()});var r=t();r&&document.head.appendChild(r)}}function metaTag(e,t,r){if(null==r||""===r)return null;var n=document.createElement("meta");return n.setAttribute(e,t),n.setAttribute("content",String(r)),n.setAttribute("data-seo","1"),n}function applySeoMeta(e){if("undefined"!=typeof document){var t=resolveOrigin(),r=e.path?t?new URL(e.path,t).toString():e.path:t||"",n=null;e.image&&(n=/^https?:/i.test(e.image)?e.image:t?new URL(e.image,t).toString():e.image),upsert('meta[name="description"][data-seo]',function(){return metaTag("name","description",e.description)}),upsert('link[rel="canonical"][data-seo]',function(){if(!r)return null;var e=document.createElement("link");return e.setAttribute("rel","canonical"),e.setAttribute("href",r),e.setAttribute("data-seo","1"),e}),upsert('meta[property="og:type"][data-seo]',function(){var t;return metaTag("property","og:type",null!==(t=e.ogType)&&void 0!==t?t:"website")}),upsert('meta[property="og:title"][data-seo]',function(){return metaTag("property","og:title",e.title)}),upsert('meta[property="og:description"][data-seo]',function(){return metaTag("property","og:description",e.description)}),upsert('meta[property="og:url"][data-seo]',function(){return metaTag("property","og:url",r)}),upsert('meta[property="og:image"][data-seo]',function(){return metaTag("property","og:image",n)}),upsert('meta[property="og:site_name"][data-seo]',function(){return metaTag("property","og:site_name",e.siteName)}),upsert('meta[name="twitter:card"][data-seo]',function(){return metaTag("name","twitter:card",n?"summary_large_image":"summary")}),upsert('meta[name="twitter:title"][data-seo]',function(){return metaTag("name","twitter:title",e.title)}),upsert('meta[name="twitter:description"][data-seo]',function(){return metaTag("name","twitter:description",e.description)}),upsert('meta[name="twitter:image"][data-seo]',function(){return metaTag("name","twitter:image",n)}),upsert('script[type="application/ld+json"][data-seo]',function(){if(!e.jsonLd)return null;var t=document.createElement("script");return t.setAttribute("type","application/ld+json"),t.setAttribute("data-seo","1"),t.textContent=JSON.stringify(e.jsonLd),t})}}function websiteJsonLd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=e.url,n=e.inLanguage;return _objectSpread({"@context":"https://schema.org","@type":"WebSite",name:t,url:r},n?{inLanguage:n}:{})}function organizationJsonLd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=e.url,n=e.logo,o=e.sameAs;return _objectSpread(_objectSpread({"@context":"https://schema.org","@type":"Organization",name:t,url:r},n?{logo:n}:{}),o?{sameAs:o}:{})}function productJsonLd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=e.description,n=e.image,o=e.brand,i=e.category,a=e.sku,s=e.url,l=e.price,c=e.priceCurrency,u=void 0===c?"USD":c,d=e.availability,f=void 0===d?"https://schema.org/InStock":d,p=_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({"@context":"https://schema.org","@type":"Product",name:t},r?{description:r}:{}),n?{image:Array.isArray(n)?n:[n]}:{}),o?{brand:"string"==typeof o?{"@type":"Brand",name:o}:o}:{}),i?{category:i}:{}),a?{sku:a}:{});return null!=l&&(p.offers=_objectSpread(_objectSpread({"@type":"Offer"},s?{url:s}:{}),{},{priceCurrency:u,price:String(l),availability:f})),p}function articleJsonLd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.headline,r=e.description,n=e.image,o=e.author,i=e.datePublished,a=e.dateModified,s=e.publisher,l=e.url;return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({"@context":"https://schema.org","@type":"Article",headline:t},r?{description:r}:{}),n?{image:Array.isArray(n)?n:[n]}:{}),o?{author:"string"==typeof o?{"@type":"Person",name:o}:o}:{}),i?{datePublished:i}:{}),a?{dateModified:a}:{}),s?{publisher:"string"==typeof s?{"@type":"Organization",name:s}:s}:{}),l?{mainEntityOfPage:l}:{})}function breadcrumbJsonLd(){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e,t){return{"@type":"ListItem",position:t+1,name:e.name,item:e.url}})}}function _regenerator(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,c=Object.create(l.prototype);return _regeneratorDefine2(c,"_invoke",function(r,n,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,s=0,l=e,f.n=r,a}};function p(r,n){for(s=r,l=n,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];r>3?(o=h===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(s=0,f.v=n,f.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,f.n=h,s=0))}if(o||r>1)return a;throw d=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:r.call(n,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,_regeneratorDefine2(d,"constructor",c),_regeneratorDefine2(c,"constructor",l),l.displayName="GeneratorFunction",_regeneratorDefine2(c,o,"GeneratorFunction"),_regeneratorDefine2(d),_regeneratorDefine2(d,o,"Generator"),_regeneratorDefine2(d,n,function(){return this}),_regeneratorDefine2(d,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:f}})()}function _regeneratorDefine2(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_regeneratorDefine2=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){_regeneratorDefine2(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},_regeneratorDefine2(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,n,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,n,o,a,s,"throw",e)}a(void 0)})}}var IS_NODE="undefined"!=typeof process&&!(null===(_process$versions=process.versions)||void 0===_process$versions||!_process$versions.node),nodeImport="undefined"!=typeof Function?new Function("s","return import(s)"):null;function loadJson(e){return _loadJson.apply(this,arguments)}function _loadJson(){return _loadJson=_asyncToGenerator(_regenerator().m(function e(t){var r,n,o,i,a,s,l,c,u,d,f,p,h,y,m,v=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=(r=v.length>1&&void 0!==v[1]?v[1]:{}).fallback,o=void 0===n?void 0:n,i=r.quiet,a=void 0!==i&&i,e.p=1,!IS_NODE||!nodeImport){e.n=7;break}return e.n=2,nodeImport("node:fs");case 2:return s=e.v,e.n=3,nodeImport("node:path");case 3:l=e.v,c=process.cwd(),u=0,d=[l.join("upload",t),t];case 4:if(!(u<d.length)){e.n=6;break}if(f=d[u],p=l.resolve(c,f),!s.existsSync(p)){e.n=5;break}return e.a(2,JSON.parse(s.readFileSync(p,"utf8")));case 5:u++,e.n=4;break;case 6:throw new Error("loadJson: ".concat(t," not found (tried ./upload/").concat(t," and ./").concat(t,")"));case 7:return e.n=8,fetch("./".concat(t));case 8:if((h=e.v).ok){e.n=9;break}throw new Error("HTTP ".concat(h.status));case 9:return e.n=10,h.json();case 10:return e.a(2,e.v);case 11:if(e.p=11,m=e.v,void 0===o){e.n=12;break}return a||"undefined"==typeof console||console.warn("[loadJson] ".concat(t," failed (").concat(null!==(y=null==m?void 0:m.message)&&void 0!==y?y:m,") — using fallback")),e.a(2,o);case 12:throw m;case 13:return e.a(2)}},e,null,[[1,11]])})),_loadJson.apply(this,arguments)}"undefined"!=typeof window&&(window.ElementMapper=element_mapper.I,window.Animator=animator.yU,window.Text=layout_text.E,window.Image=layout_image._,window.Link=layout_link.N,window.FlexRow=flex_row.Y,window.UINavBar=new_nav_bar.X,window.Free=free.b,window.NAudio=NAudio,window.Progress=progress.k,window.Center=center.o,window.Code=code.C,window.Stack=stack.B,window.Wrapper=container.m,window.Svg=Svg,window.MetaAdder=meta_adder.W,window.Table=table.X,window.Dropdown=dropdown_2025.m,window.Modal=modal_2025.a,window.TextField=text_field.A,window.Card=flex_card.Z,window.Wrap=wrap.B,window.FlexGrid=flex_grid.M,window.ZoomCard=zoom_card.U,window.CustomDivRenderer=custom_div.c,window.SideBar=side_bar.z,window.SideNav=side_nav_bar.f,window.SimpleBar=simple_bar.m,window.DesktopBar=beta_desktop_bar.C,window.MobileBar=beta_mobile_bar.m,window.Switcher=multiswitcher.i,window.Spacer=spacer.h,window.HScroller=horizontal_scroller.J,window.Checkbox=layout_checkbox.S,window.Base=base.C,window.FilePickera=image_picker.I,window.Picker=picker.L,window.Range=range.Q,window.RadioGroup=form_components_radio.z,window.DataList=data_list.T,window.Button=layout_button.$,window.Des=designer.H,window.LinkStyler=link_getter.a,window.CardGen=card_getter.Z,window.KeyframeAnim=KeyframeAnim,window.TransformAnim=TransformAnim,window.Stacker=Stacker,window.ScrollVideo=ScrollVideo,window.Theme=theme.S,window.AreaSwitcher=grid_switcher.t,window.Video=video.C,window.UList=ulist.e,window.Slider=slider_2025.A,window.Polygon=polygon.t,window.Circle=circle.j,window.GridOverlay=grid_overlay.$,window.Shop=shop.D,window.FloatingInput=floating_input.l,window.Form=form_components_form.l),void 0!==__nodality_wp_require__.g&&(__nodality_wp_require__.g.ElementMapper=element_mapper.I,__nodality_wp_require__.g.Animator=animator.yU,__nodality_wp_require__.g.Text=layout_text.E,__nodality_wp_require__.g.Image=layout_image._,__nodality_wp_require__.g.Link=layout_link.N,__nodality_wp_require__.g.FlexRow=flex_row.Y,__nodality_wp_require__.g.UINavBar=new_nav_bar.X,__nodality_wp_require__.g.Free=free.b,__nodality_wp_require__.g.NAudio=NAudio,__nodality_wp_require__.g.Progress=progress.k,__nodality_wp_require__.g.Center=center.o,__nodality_wp_require__.g.Code=code.C,__nodality_wp_require__.g.Stack=stack.B,__nodality_wp_require__.g.Wrapper=container.m,__nodality_wp_require__.g.Svg=Svg,__nodality_wp_require__.g.MetaAdder=meta_adder.W,__nodality_wp_require__.g.Table=table.X,__nodality_wp_require__.g.Dropdown=dropdown_2025.m,__nodality_wp_require__.g.Modal=modal_2025.a,__nodality_wp_require__.g.TextField=text_field.A,__nodality_wp_require__.g.Card=flex_card.Z,__nodality_wp_require__.g.Wrap=wrap.B,__nodality_wp_require__.g.FlexGrid=flex_grid.M,__nodality_wp_require__.g.ZoomCard=zoom_card.U,__nodality_wp_require__.g.CustomDivRenderer=custom_div.c,__nodality_wp_require__.g.SideBar=side_bar.z,__nodality_wp_require__.g.SideNav=side_nav_bar.f,__nodality_wp_require__.g.SimpleBar=simple_bar.m,__nodality_wp_require__.g.DesktopBar=beta_desktop_bar.C,__nodality_wp_require__.g.MobileBar=beta_mobile_bar.m,__nodality_wp_require__.g.Switcher=multiswitcher.i,__nodality_wp_require__.g.Spacer=spacer.h,__nodality_wp_require__.g.HScroller=horizontal_scroller.J,__nodality_wp_require__.g.Checkbox=layout_checkbox.S,__nodality_wp_require__.g.Base=base.C,__nodality_wp_require__.g.FilePickera=image_picker.I,__nodality_wp_require__.g.Picker=picker.L,__nodality_wp_require__.g.Range=range.Q,__nodality_wp_require__.g.RadioGroup=form_components_radio.z,__nodality_wp_require__.g.DataList=data_list.T,__nodality_wp_require__.g.Button=layout_button.$,__nodality_wp_require__.g.Des=designer.H,__nodality_wp_require__.g.LinkStyler=link_getter.a,__nodality_wp_require__.g.CardGen=card_getter.Z,__nodality_wp_require__.g.KeyframeAnim=KeyframeAnim,__nodality_wp_require__.g.TransformAnim=TransformAnim,__nodality_wp_require__.g.Stacker=Stacker,__nodality_wp_require__.g.ScrollVideo=ScrollVideo,__nodality_wp_require__.g.Theme=theme.S,__nodality_wp_require__.g.AreaSwitcher=grid_switcher.t,__nodality_wp_require__.g.Video=video.C,__nodality_wp_require__.g.UList=ulist.e,__nodality_wp_require__.g.Slider=slider_2025.A,__nodality_wp_require__.g.Polygon=polygon.t,__nodality_wp_require__.g.Circle=circle.j,__nodality_wp_require__.g.GridOverlay=grid_overlay.$,__nodality_wp_require__.g.Shop=shop.D,__nodality_wp_require__.g.FloatingInput=floating_input.l,__nodality_wp_require__.g.Form=form_components_form.l);export{KeyframeAnim,NAudio,ScrollVideo,Stacker,Svg,TransformAnim,applySeoMeta,articleJsonLd,breadcrumbJsonLd,loadJson,organizationJsonLd,productJsonLd,setSeoOrigin,websiteJsonLd};const __nodality_wp_x_Animator=animator.yU;const __nodality_wp_x_AreaSwitcher=grid_switcher.t;const __nodality_wp_x_Base=base.C;const __nodality_wp_x_Button=layout_button.$;const __nodality_wp_x_Card=flex_card.Z;const __nodality_wp_x_CardGen=card_getter.Z;const __nodality_wp_x_Center=center.o;const __nodality_wp_x_Checkbox=layout_checkbox.S;const __nodality_wp_x_Circle=circle.j;const __nodality_wp_x_Code=code.C;const __nodality_wp_x_CustomDivRenderer=custom_div.c;const __nodality_wp_x_DataList=data_list.T;const __nodality_wp_x_Des=designer.H;const __nodality_wp_x_DesktopBar=beta_desktop_bar.C;const __nodality_wp_x_Dropdown=dropdown_2025.m;const __nodality_wp_x_ElementMapper=element_mapper.I;const __nodality_wp_x_FilePickera=image_picker.I;const __nodality_wp_x_FlexGrid=flex_grid.M;const __nodality_wp_x_FlexRow=flex_row.Y;const __nodality_wp_x_FloatingInput=floating_input.l;const __nodality_wp_x_Form=form_components_form.l;const __nodality_wp_x_Free=free.b;const __nodality_wp_x_GridOverlay=grid_overlay.$;const __nodality_wp_x_HScroller=horizontal_scroller.J;const __nodality_wp_x_Image=layout_image._;const __nodality_wp_x_Link=layout_link.N;const __nodality_wp_x_LinkStyler=link_getter.a;const __nodality_wp_x_MetaAdder=meta_adder.W;const __nodality_wp_x_MobileBar=beta_mobile_bar.m;const __nodality_wp_x_Modal=modal_2025.a;const __nodality_wp_x_Picker=picker.L;const __nodality_wp_x_Polygon=polygon.t;const __nodality_wp_x_Progress=progress.k;const __nodality_wp_x_RadioGroup=form_components_radio.z;const __nodality_wp_x_Range=range.Q;const __nodality_wp_x_Shop=shop.D;const __nodality_wp_x_SideBar=side_bar.z;const __nodality_wp_x_SideNav=side_nav_bar.f;const __nodality_wp_x_SimpleBar=simple_bar.m;const __nodality_wp_x_Slider=slider_2025.A;const __nodality_wp_x_Spacer=spacer.h;const __nodality_wp_x_Stack=stack.B;const __nodality_wp_x_Switcher=multiswitcher.i;const __nodality_wp_x_Table=table.X;const __nodality_wp_x_Text=layout_text.E;const __nodality_wp_x_TextField=text_field.A;const __nodality_wp_x_Theme=theme.S;const __nodality_wp_x_UINavBar=new_nav_bar.X;const __nodality_wp_x_UList=ulist.e;const __nodality_wp_x_Video=video.C;const __nodality_wp_x_Wrap=wrap.B;const __nodality_wp_x_Wrapper=container.m;const __nodality_wp_x_ZoomCard=zoom_card.U;
3
- export{__nodality_wp_x_Animator as Animator,__nodality_wp_x_AreaSwitcher as AreaSwitcher,__nodality_wp_x_Base as Base,__nodality_wp_x_Button as Button,__nodality_wp_x_Card as Card,__nodality_wp_x_CardGen as CardGen,__nodality_wp_x_Center as Center,__nodality_wp_x_Checkbox as Checkbox,__nodality_wp_x_Circle as Circle,__nodality_wp_x_Code as Code,__nodality_wp_x_CustomDivRenderer as CustomDivRenderer,__nodality_wp_x_DataList as DataList,__nodality_wp_x_Des as Des,__nodality_wp_x_DesktopBar as DesktopBar,__nodality_wp_x_Dropdown as Dropdown,__nodality_wp_x_ElementMapper as ElementMapper,__nodality_wp_x_FilePickera as FilePickera,__nodality_wp_x_FlexGrid as FlexGrid,__nodality_wp_x_FlexRow as FlexRow,__nodality_wp_x_FloatingInput as FloatingInput,__nodality_wp_x_Form as Form,__nodality_wp_x_Free as Free,__nodality_wp_x_GridOverlay as GridOverlay,__nodality_wp_x_HScroller as HScroller,__nodality_wp_x_Image as Image,__nodality_wp_x_Link as Link,__nodality_wp_x_LinkStyler as LinkStyler,__nodality_wp_x_MetaAdder as MetaAdder,__nodality_wp_x_MobileBar as MobileBar,__nodality_wp_x_Modal as Modal,__nodality_wp_x_Picker as Picker,__nodality_wp_x_Polygon as Polygon,__nodality_wp_x_Progress as Progress,__nodality_wp_x_RadioGroup as RadioGroup,__nodality_wp_x_Range as Range,__nodality_wp_x_Shop as Shop,__nodality_wp_x_SideBar as SideBar,__nodality_wp_x_SideNav as SideNav,__nodality_wp_x_SimpleBar as SimpleBar,__nodality_wp_x_Slider as Slider,__nodality_wp_x_Spacer as Spacer,__nodality_wp_x_Stack as Stack,__nodality_wp_x_Switcher as Switcher,__nodality_wp_x_Table as Table,__nodality_wp_x_Text as Text,__nodality_wp_x_TextField as TextField,__nodality_wp_x_Theme as Theme,__nodality_wp_x_UINavBar as UINavBar,__nodality_wp_x_UList as UList,__nodality_wp_x_Video as Video,__nodality_wp_x_Wrap as Wrap,__nodality_wp_x_Wrapper as Wrapper,__nodality_wp_x_ZoomCard as ZoomCard};
2
+ var t={};function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n="nodality.theme.mode",r="nodality:theme",o={mode:function(){try{var t=localStorage.getItem(n);if("light"===t||"dark"===t)return t}catch(t){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{color:"#111"},dark:{}},setDefaults:function(t){return t&&"object"===e(t)&&(t.light&&(this.defaults.light=Object.assign({},this.defaults.light,t.light)),t.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,t.dark)),this._broadcast()),this},setTokens:function(t){return t&&"object"===e(t)&&(t.light&&Object.assign(this.tokens.light,t.light),t.dark&&Object.assign(this.tokens.dark,t.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(t){if("light"!==t&&"dark"!==t)return this;if(t===this.mode)return this;this.mode=t;try{localStorage.setItem(n,t)}catch(t){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(t){if("undefined"==typeof document)return function(){};var e=function(e){return t(e.detail.mode,e.detail.tokens)};document.addEventListener(r,e);try{t(this.mode,this.current)}catch(t){}return function(){return document.removeEventListener(r,e)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(r,{detail:{mode:this.mode,tokens:this.current}}))}};function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function s(n,r,o,i){var s=r&&r.prototype instanceof c?r:c,u=Object.create(s.prototype);return a(u,"_invoke",function(n,r,o){var i,a,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,a=0,s=t,d.n=n,l}};function h(n,r){for(a=n,s=r,e=0;!f&&c&&!o&&e<u.length;e++){var o,i=u[e],h=d.p,p=i[2];n>3?(o=p===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(a=0,d.v=r,d.n=i[1]):h<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,a=0))}if(o||n>1)return l;throw f=!0,r}return function(o,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),a=u,s=p;(e=a<2?t:s)||!f;){i||(a?a<3?(a>1&&(d.n=-1),h(a,s)):d.n=s:d.v=s);try{if(c=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(f=d.n<0)?s:n.call(r,d))!==l)break}catch(e){i=t,a=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,o,i),!0),u}var l={};function c(){}function u(){}function f(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=f.prototype=c.prototype=Object.create(d);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a(t,o,"GeneratorFunction")),t.prototype=Object.create(h),t}return u.prototype=f,a(h,"constructor",f),a(f,"constructor",u),u.displayName="GeneratorFunction",a(f,o,"GeneratorFunction"),a(h),a(h,o,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m:p}})()}function a(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}a=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){a(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},a(t,e,n,r)}function s(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){s(i,r,o,a,l,"next",t)}function l(t){s(i,r,o,a,l,"throw",t)}a(void 0)})}}function c(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function f(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=h(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return p(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var y={static:function(t){return{x:.5*t.w,y:.5*t.h,amt:1}},mouse:function(t){return{x:t.mouseX,y:t.mouseY,amt:1}},hover:function(t){return{x:t.mouseX,y:t.mouseY,amt:t.hover}},scroll:function(t){return{x:.5*t.w,y:t.h*t.scroll,amt:1}},time:function(t){return{x:t.w*(.5+.34*Math.cos(.6*t.t)),y:t.h*(.5+.34*Math.sin(.8*t.t)),amt:1}}},m=Object.keys(y),v={hexalize:{doc:{summary:'Hexagonal cell grid. Snaps sampling to a hex lattice and draws cell borders; with `lift`, cells near the driver swell toward the viewer and their content magnifies to match. Away from the focus a lifted chain is untouched — no magnification, no border — so with `by: "hover"` the element is pixel-identical at rest and the cells appear only under the pointer.',params:{size:{default:24,unit:"px",summary:"lattice pitch — the width of one cell"},lift:{default:0,unit:"ratio",structural:!0,summary:"how much bigger a cell gets at the focus: 0.3 renders the nearest hexagons at 1.3x. 0 compiles the cheap path entirely away, so crossing zero rebuilds."},radius:{default:200,unit:"px",summary:"falloff distance around the driver focus"}}},structuralOnToggle:["lift"],stage:"cell",decl:function(t){return"\n uniform float ".concat(t,"size;\n uniform float ").concat(t,"lift;\n uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"dpos;\n uniform float ").concat(t,"damt;")},code:function(t,e){return e.lift?"\n {\n vec2 hp = warped / ".concat(t,"size;\n vec2 hr = vec2(1.0, 1.7320508), hh = hr * 0.5;\n vec2 ha = mod(hp, hr) - hh, hb = mod(hp - hh, hr) - hh;\n vec2 gv = dot(ha, ha) < dot(hb, hb) ? ha : hb;\n vec2 ").concat(t,"AX = normalize(vec2(1.0, 1.7320508));\n vec2 ").concat(t,"c0 = hp - gv;\n // Seed with the owning cell. Its own hexagon always covers the\n // fragment at any scale >= 1, so there is always a winner.\n vec2 ").concat(t,"bestC = ").concat(t,"c0;\n float ").concat(t,"bestF = (1.0 - smoothstep(0.0, ").concat(t,"radius,\n length(").concat(t,"c0 * ").concat(t,"size - ").concat(t,"dpos))) * ").concat(t,"damt;\n float ").concat(t,"bestS = 1.0 + ").concat(t,"lift * ").concat(t,"bestF;\n").concat([[1,0],[-1,0],[.5,.8660254],[-.5,.8660254],[.5,-.8660254],[-.5,-.8660254]].map(function(e){var n,r,o=d(e,2);return n=o[0],r=o[1],"\n {\n vec2 c = ".concat(t,"c0 + vec2(").concat(n.toFixed(7),", ").concat(r.toFixed(7),");\n float f = 1.0 - smoothstep(0.0, ").concat(t,"radius,\n length(c * ").concat(t,"size - ").concat(t,"dpos));\n f *= ").concat(t,"damt;\n float s = 1.0 + ").concat(t,"lift * f;\n vec2 q = hp - c;\n float hd = max(dot(abs(q), ").concat(t,"AX), abs(q).x);\n // Covered by this cell's grown hexagon, and nearer than\n // whatever we have so far.\n if (hd <= 0.5 * s && s > ").concat(t,"bestS) {\n ").concat(t,"bestS = s; ").concat(t,"bestC = c; ").concat(t,"bestF = f;\n }\n }")}).join(""),"\n center = ").concat(t,"bestC * ").concat(t,"size;\n // Divide by the winner's scale: the border test then reaches\n // 0.5 further out (a bigger hexagon) and the sample moves in\n // toward the centre (its content magnified to match), both by\n // the same factor, so proportions are preserved exactly.\n gv = (hp - ").concat(t,"bestC) / max(").concat(t,"bestS, 1e-3);\n warped = center + gv * ").concat(t,'size;\n gv = abs(gv);\n // Border strength follows the SAME falloff as the scale, so a\n // cell that has not been raised draws no border at all. Away\n // from the pointer bestF is 0, which means scale 1, sampling\n // untouched and edge 0 — bit-identical to the source image, so\n // nothing reveals that an effect is attached until the pointer\n // arrives. Pair with by:"hover" for a fully flush resting\n // state; by:"mouse" holds amt at 1 and so keeps a permanent\n // hotspot wherever the pointer last was.\n edge = max(edge, smoothstep(0.44, 0.5,\n max(dot(gv, ').concat(t,"AX), gv.x)) * ").concat(t,"bestF);\n }"):"\n {\n vec2 hp = warped / ".concat(t,"size;\n vec2 hr = vec2(1.0, 1.7320508), hh = hr * 0.5;\n vec2 ha = mod(hp, hr) - hh, hb = mod(hp - hh, hr) - hh;\n vec2 gv = dot(ha, ha) < dot(hb, hb) ? ha : hb;\n center = (hp - gv) * ").concat(t,"size;\n gv = abs(gv);\n edge = max(edge, smoothstep(0.44, 0.5,\n max(dot(gv, normalize(vec2(1.0, 1.7320508))), gv.x)));\n }")},uniforms:function(t,e){return{size:["1f",(t.size||24)*e],lift:["1f",null!=t.lift?t.lift:0],radius:["1f",(t.radius||200)*e]}},map:function(t,e){return e.lift?null:t}},offset:{doc:{summary:"Pushes the coordinate space away from the driver focus. Warp stage, so cell grids and borders move WITH the content instead of staying a fixed screen-space lattice.",params:{strength:{default:20,unit:"px",summary:"how far the space is pushed at full amount"},radius:{default:260,unit:"px",summary:"falloff distance around the focus"}}},stage:"warp",defaultDriver:"mouse",decl:function(t){return"uniform float ".concat(t,"strength; uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"dpos; uniform float ").concat(t,"damt;")},code:function(t){return"\n {\n float d = length(warped - ".concat(t,"dpos);\n float fall = 1.0 - smoothstep(0.0, ").concat(t,"radius, d);\n vec2 dir = d > 0.5 ? (warped - ").concat(t,"dpos) / d : vec2(0.0);\n warped -= dir * ").concat(t,"strength * fall * ").concat(t,"damt;\n }")},uniforms:function(t,e){return{strength:["1f",(t.strength||20)*e],radius:["1f",(t.radius||260)*e]}},map:function(t,e,n){var r,o,i,a=(e.strength||20)*n.dpr,s=(e.radius||260)*n.dpr,l=t[0]-n.dpos[0],c=t[1]-n.dpos[1],u=Math.hypot(l,c),f=1-(r=s,o=u,(i=Math.min(1,Math.max(0,(o-0)/(r-0||1e-6))))*i*(3-2*i));if(!(u>.5))return t;var d=a*f*n.damt/u;return[t[0]-l*d,t[1]-c*d]}},flow:{doc:{summary:"Curl-noise current. The coordinate space drifts along a divergence-free field, so content slides as if carried by water. Divergence-free means the flow never piles up or tears.",params:{strength:{default:18,unit:"px",summary:"how far the current carries the space"},scale:{default:120,unit:"px",summary:"size of one eddy — small is turbulent, large is a slow drift"},speed:{default:.25,unit:"seconds",summary:"how fast the field evolves; 0 freezes it"},seed:{default:0,unit:"count",summary:"picks a different field of the same character"},radius:{default:320,unit:"px",summary:"falloff around the focus. Only used when `by` names a driver; without one the current covers the whole element."}}},structural:["by"],stage:"warp",decl:function(t){return"\n uniform float ".concat(t,"scale;\n uniform float ").concat(t,"strength;\n uniform float ").concat(t,"speed;\n uniform float ").concat(t,"seed;\n uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"dpos;\n uniform float ").concat(t,"damt;\n // Polynomial bit-mixing hash, deliberately NOT the usual\n // fract(sin(dot(...))). Trig-based hashes disagree across GPU\n // vendors — sin's precision at large arguments is not\n // specified — so the same seed would render a different field\n // on different hardware. This one is multiply/fract only, so\n // the field is at least stable per-device. (Determinism rule,\n // MORPH-IMPL-SPEC §2.9.5a.)\n float ").concat(t,"h(vec2 v) {\n vec3 q = fract(vec3(v.xyx) * 0.1031 + ").concat(t,"seed);\n q += dot(q, q.yzx + 33.33);\n return fract((q.x + q.y) * q.z);\n }\n float ").concat(t,"n(vec2 v) {\n vec2 i = floor(v), f = v - i;\n f = f * f * (3.0 - 2.0 * f);\n return mix(mix(").concat(t,"h(i), ").concat(t,"h(i + vec2(1.0, 0.0)), f.x),\n mix(").concat(t,"h(i + vec2(0.0, 1.0)), ").concat(t,"h(i + vec2(1.0, 1.0)), f.x), f.y);\n }\n // The potential. Two octaves: enough structure to read as a\n // current without the cost of a full fBm.\n float ").concat(t,"psi(vec2 v) {\n return ").concat(t,"n(v) * 0.65 + ").concat(t,"n(v * 2.3 + 11.0) * 0.35;\n }")},code:function(t,e){return"\n {\n float sc = max(".concat(t,"scale, 1.0);\n vec2 drift = vec2(0.0, u_time * ").concat(t,"speed);").concat(e.by?"\n float fall = 1.0 - smoothstep(0.0, ".concat(t,"radius, length(warped - ").concat(t,"dpos));\n float amt = ").concat(t,"strength * fall * ").concat(t,"damt;"):"\n float amt = ".concat(t,"strength;"),"\n // Three fixed Euler steps along curl(psi). Fixed count, not\n // adaptive: the step budget is a compile-time property so the\n // shader cost cannot vary with the content.\n for (int i = 0; i < 3; i++) {\n vec2 q = warped / sc + drift;\n float e = 0.35;\n float dy = ").concat(t,"psi(q + vec2(0.0, e)) - ").concat(t,"psi(q - vec2(0.0, e));\n float dx = ").concat(t,"psi(q + vec2(e, 0.0)) - ").concat(t,"psi(q - vec2(e, 0.0));\n // curl of a 2D scalar potential = (dpsi/dy, -dpsi/dx)\n warped += vec2(dy, -dx) / (2.0 * e) * amt * 0.3333;\n }\n }")},uniforms:function(t,e){return{scale:["1f",(null!=t.scale?t.scale:120)*e],strength:["1f",(null!=t.strength?t.strength:18)*e],speed:["1f",null!=t.speed?t.speed:.25],seed:["1f",null!=t.seed?t.seed:0],radius:["1f",(null!=t.radius?t.radius:320)*e]}}},duotone:{doc:{summary:"Maps luminance onto a two-colour ramp. With `by`, the mapping is confined to a spot around the driver focus and the rest of the element keeps its own colour.",params:{colors:{default:["#104B87","#E8FF00"],unit:"color",summary:"[shadow, highlight] — the two ends of the ramp"},radius:{default:220,unit:"px",summary:"spot size when `by` names a driver"}}},structural:["by"],stage:"color",decl:function(t){return"uniform vec3 ".concat(t,"a; uniform vec3 ").concat(t,"b; uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"dpos; uniform float ").concat(t,"damt;")},code:function(t,e){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n vec3 duo = mix(".concat(t,"a, ").concat(t,"b, lum);\n ").concat(e.by?"float mask = (1.0 - smoothstep(".concat(t,"radius * 0.35, ").concat(t,"radius,\n length(center - ").concat(t,"dpos))) * ").concat(t,"damt;"):"float mask = 1.0;","\n col = mix(col, duo, mask);\n }")},uniforms:function(t,e){var n=t.colors||["#104B87","#E8FF00"];return{a:["3fv",b(n[0])],b:["3fv",b(n[1])],radius:["1f",(t.radius||220)*e]}}},edges:{doc:{summary:"Draws the cell borders a cell-stage op produced. On its own it shows nothing — it colours `edge`, which only hexalize (or another cell op) writes.",params:{color:{default:"#FFFFFF",unit:"color",summary:"border colour"},strength:{default:1,unit:"ratio",summary:"border opacity"}}},stage:"color",needs:"cell",decl:function(t){return"uniform vec3 ".concat(t,"color; uniform float ").concat(t,"strength;")},code:function(t){return"\n {\n edgeCol = ".concat(t,"color;\n edgeCov = max(edgeCov, edge * ").concat(t,"strength);\n }")},uniforms:function(t){return{color:["3fv",b(t.color||"#FFFFFF")],strength:["1f",null!=t.strength?t.strength:1]}}},halftone:{doc:{summary:"Print halftone: the image is redrawn as a grid of ink dots on paper, dot size following local luminance.",params:{size:{default:6,unit:"px",summary:"dot pitch"},angle:{default:15,unit:"deg",summary:"screen angle of the dot grid"},ink:{default:"#0B1B2B",unit:"color",summary:"dot colour"},paper:{default:"#FFFFFF",unit:"color",summary:"background colour"},softness:{default:.08,unit:"ratio",summary:"dot edge softness — 0 is a hard stencil"},amount:{default:1,unit:"ratio",summary:"blend back toward the un-screened image; 0 is identity. Keyframe it to 0 at both ends of a transition so the shader hands over to the real element without a pop."},radius:{default:220,unit:"px",summary:"spot size when `by` names a driver"}}},structural:["by"],stage:"color",decl:function(t){return"\n uniform float ".concat(t,"size;\n uniform float ").concat(t,"amount;\n uniform float ").concat(t,"angle;\n uniform vec3 ").concat(t,"ink;\n uniform vec3 ").concat(t,"paper;\n uniform float ").concat(t,"soft;\n uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"dpos;\n uniform float ").concat(t,"damt;")},code:function(t,e){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n float sz = ".concat(t,"size;").concat(e.by?"\n float fd = 1.0 - smoothstep(0.0, ".concat(t,"radius, length(frag - ").concat(t,"dpos));\n sz *= 1.0 + fd * ").concat(t,"damt * 1.8;"):"","\n // Screen angle: rotating the grid is what stops the dots\n // reading as a horizontal/vertical texture.\n float ca = cos(").concat(t,"angle), sa = sin(").concat(t,"angle);\n vec2 rp = vec2(ca * frag.x - sa * frag.y,\n sa * frag.x + ca * frag.y) / max(sz, 1.0);\n vec2 cell = fract(rp) - 0.5;\n // Dot radius from tone: darker tone prints a bigger dot.\n // sqrt because ink coverage goes as area, not radius.\n float rr = sqrt(clamp(1.0 - lum, 0.0, 1.0)) * 0.55;\n float dm = smoothstep(rr, rr - ").concat(t,"soft, length(cell));\n col = mix(col, mix(").concat(t,"paper, ").concat(t,"ink, dm), clamp(").concat(t,"amount, 0.0, 1.0));\n }")},uniforms:function(t,e){return{size:["1f",(t.size||6)*e],amount:["1f",null!=t.amount?t.amount:1],angle:["1f",(null!=t.angle?t.angle:15)*Math.PI/180],ink:["3fv",b(t.ink||"#0B1B2B")],paper:["3fv",b(t.paper||"#FFFFFF")],soft:["1f",null!=t.softness?t.softness:.08],radius:["1f",(t.radius||220)*e]}}},dither:{doc:{summary:"Ordered (Bayer) dithering to a small palette — the look of an 8-bit display, and the one op that gets sharper as the element gets smaller.",params:{size:{default:1,unit:"px",summary:"size of one dither cell; 1 is per-pixel"},levels:{default:6,unit:"count",summary:"quantisation steps per channel"},amount:{default:1,unit:"ratio",summary:"blend back toward the undithered image"},mono:{default:!1,unit:"bool",structural:!0,summary:"quantise luminance to ink/paper instead of per-channel colour. A different shader, so toggling rebuilds."},ink:{default:"#0B1B2B",unit:"color",summary:"dark end, mono only"},paper:{default:"#FFFFFF",unit:"color",summary:"light end, mono only"},radius:{default:220,unit:"px",summary:"spot size when `by` names a driver"}}},structural:["by","mono"],stage:"color",decl:function(t){return"\n uniform float ".concat(t,"levels;\n uniform float ").concat(t,"size;\n uniform float ").concat(t,"amount;\n uniform vec3 ").concat(t,"ink;\n uniform vec3 ").concat(t,"paper;\n uniform vec2 ").concat(t,"dpos;\n uniform float ").concat(t,"damt;\n uniform float ").concat(t,"radius;\n // Bayer matrices by recursive bit-interleave rather than a\n // 64-entry table: WebGL1 has no constant array indexing, and\n // the nesting is exactly the recursive definition of the\n // ordered-dither matrix.\n float ").concat(t,"b2(vec2 a) {\n a = floor(a);\n return fract(a.x * 0.5 + a.y * a.y * 0.75);\n }\n float ").concat(t,"b4(vec2 a) { return ").concat(t,"b2(0.5 * a) * 0.25 + ").concat(t,"b2(a); }\n float ").concat(t,"b8(vec2 a) { return ").concat(t,"b4(0.5 * a) * 0.25 + ").concat(t,"b2(a); }")},code:function(t,e){return"\n {\n float sz = max(".concat(t,"size, 1e-3);").concat(e.by?"\n float fd = 1.0 - smoothstep(0.0, ".concat(t,"radius, length(frag - ").concat(t,"dpos));\n sz *= 1.0 + fd * ").concat(t,"damt * 1.8;"):"","\n // Centre the threshold on zero so dithering does not lift or\n // crush the overall exposure, only redistributes it.\n float t = ").concat(t,"b8(frag / sz) - 0.5;\n float lv = max(").concat(t,"levels, 1.0);\n ").concat(e.mono?"\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n float q = step(0.5, lum + t);\n vec3 dq = mix(".concat(t,"ink, ").concat(t,"paper, q);"):"\n // Per channel: scale to level index, offset by the threshold,\n // round, scale back. The +t before rounding is what turns a\n // hard band edge into an interleaved pattern of the two\n // neighbouring levels.\n vec3 dq = floor(col * lv + 0.5 + t) / lv;","\n col = mix(col, clamp(dq, 0.0, 1.0), clamp(").concat(t,"amount, 0.0, 1.0));\n }")},uniforms:function(t,e){return{levels:["1f",null!=t.levels?t.levels:6],size:["1f",(null!=t.size?t.size:1)*e],amount:["1f",null!=t.amount?t.amount:1],ink:["3fv",b(t.ink||"#0B1B2B")],paper:["3fv",b(t.paper||"#FFFFFF")],radius:["1f",(t.radius||220)*e]}}},aberration:{movesCoords:!1,doc:{summary:"Chromatic aberration: the three colour channels are sampled at slightly different offsets, like a cheap lens.",params:{amount:{default:6,unit:"px",summary:"channel separation"},radius:{default:240,unit:"px",summary:"falloff around the focus when `by` names a driver"}}},structural:["by"],stage:"displace",chroma:!0,decl:function(t){return"\n uniform float ".concat(t,"amount;\n uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"dpos;\n uniform float ").concat(t,"damt;")},code:function(t,e){return"\n {\n vec2 ctr = ".concat(e.by?"".concat(t,"dpos"):"u_res * 0.5",";\n vec2 dv = sampleP - ctr;\n float dl = length(dv);\n vec2 dir = dl > 0.5 ? dv / dl : vec2(0.0);\n ").concat(e.by?"float amt = ".concat(t,"amount * ").concat(t,"damt *\n (1.0 - smoothstep(0.0, ").concat(t,"radius, dl));"):"float amt = ".concat(t,"amount * (dl / max(length(u_res) * 0.5, 1.0));"),"\n chroma += dir * amt;\n }")},uniforms:function(t,e){return{amount:["1f",(null!=t.amount?t.amount:6)*e],radius:["1f",(t.radius||240)*e]}}},particles:{doc:{summary:"Breaks the image into one particle per cell, which shrinks to a dot and scatters on its own heading. Built for transitions (t-particles), where the gaps are transparent; elsewhere they show the image unmoved.",params:{size:{default:6,unit:"px",summary:"particle size: one particle per cell this big"},amount:{default:1,unit:"ratio",summary:"0 is the intact image, 1 fully scattered"},reach:{default:4,unit:"count",structural:!0,summary:"travel limit: a particle moves at most reach - 1 cells. Compiled in, and the cost: each pixel searches (2·reach + 1)² cells."},seed:{default:0,unit:"count",summary:"picks a different scatter of the same character"}}},structural:["reach"],stage:"displace",decl:function(t){return"\n uniform float ".concat(t,"size;\n uniform float ").concat(t,"amount;\n uniform float ").concat(t,"seed;\n // Polynomial hash, as in flow: trig hashes band on Apple\n // silicon and differ between GPU vendors.\n float ").concat(t,"h(vec2 v) {\n vec3 q = fract(vec3(v.xyx) * 0.1031 + ").concat(t,"seed * 0.1);\n q += dot(q, q.yzx + 33.33);\n return fract((q.x + q.y) * q.z);\n }")},code:function(t,e){var n=Math.max(1,Math.min(6,Math.round(null!=e.reach?e.reach:4)));return"\n {\n float sz = max(".concat(t,"size, 1.0);\n float a = clamp(").concat(t,"amount, 0.0, 1.0);\n if (a > 0.0) {\n vec2 x = sampleP;\n vec2 q = floor(x / sz);\n // Square and full-size at rest, so at a = 0 the cells tile\n // the image exactly; round and at 45% in full flight.\n float h = sz * 0.5 * (1.0 - 0.55 * a);\n float travel = ").concat(n-1,".0 * sz * a;\n float best = -1.0;\n vec2 hit = vec2(-1.0e5);\n for (int j = -").concat(n,"; j <= ").concat(n,"; j++) {\n for (int i = -").concat(n,"; i <= ").concat(n,"; i++) {\n vec2 c = q + vec2(float(i), float(j));\n vec2 dir = vec2(").concat(t,"h(c), ").concat(t,"h(c + vec2(57.3, 11.9))) * 2.0 - 1.0;\n // How far this one goes, and how high it stacks.\n float k = ").concat(t,"h(c + vec2(31.7, 83.1));\n vec2 home = (c + 0.5) * sz;\n vec2 d = x - (home + dir * travel * (0.35 + 0.65 * k));\n float dist = mix(max(abs(d.x), abs(d.y)), length(d), a);\n if (dist <= h && k > best) {\n best = k;\n // The particle carries its own cell, shrunk.\n hit = home + d * (0.5 * sz / h);\n }\n }\n }\n#ifdef NOD_TRANSITION\n // A gap lands outside both boxes, which is transparent.\n sampleP = hit;\n#else\n // No backdrop outside a transition: a gap would clamp to an\n // edge texel, so it shows the image unmoved instead.\n if (best >= 0.0) sampleP = hit;\n#endif\n }\n }")},uniforms:function(t,e){return{size:["1f",(null!=t.size?t.size:6)*e],amount:["1f",null!=t.amount?t.amount:1],seed:["1f",null!=t.seed?t.seed:0]}}},mask:{doc:{summary:'Writes a scalar FIELD for later ops to read — draws nothing itself. Give a downstream op `masked: "name"` and it applies only where this field is high. This is how any op becomes local without knowing anything about masking.',params:{as:{default:"mask",unit:"name",structural:!0,summary:"name of the field written. Consumers name it in `masked:`."},from:{default:"radial",unit:"name",structural:!0,summary:"field shape — compiled in, so changing it rebuilds"},at:{default:[.5,.5],unit:"point",structural:!0,summary:"centre as a fraction of the element box; survives resizes"},radius:{default:260,unit:"px",summary:"field radius"},invert:{default:!1,unit:"bool",summary:"swap inside and outside"},remap:{default:[0,1],unit:"range",summary:"rescale the field's output range"}}},structural:["as","from","at"],stage:"field",producesField:!0,defaultDriver:"static",decl:function(t){return"\n uniform vec2 ".concat(t,"dpos;\n uniform float ").concat(t,"damt;\n uniform float ").concat(t,"radius;\n uniform vec2 ").concat(t,"at;\n uniform vec2 ").concat(t,"remap;\n uniform float ").concat(t,"invert;")},code:function(t,e){var n=e.from||"radial",r=e.at?"(".concat(t,"at * u_res)"):"".concat(t,"dpos"),o="vertical"===n?"frag.y / max(u_res.y, 1.0)":"horizontal"===n?"frag.x / max(u_res.x, 1.0)":"1.0 - smoothstep(0.0, ".concat(t,"radius, length(frag - ").concat(r,"))");return"\n {\n float m = ".concat(o,";\n m = clamp((m - ").concat(t,"remap.x) / max(").concat(t,"remap.y - ").concat(t,"remap.x, 1e-4), 0.0, 1.0);\n m = mix(m, 1.0 - m, ").concat(t,"invert);\n ").concat(C(e.as||"mask")," *= m * ").concat(t,"damt;\n }")},uniforms:function(t,e){return{radius:["1f",(null!=t.radius?t.radius:260)*e],at:["2fv",t.at||[.5,.5]],remap:["2fv",t.remap||[0,1]],invert:["1f",t.invert?1:0]}}},noise:{doc:{summary:"Writes an animated noise FIELD. Same contract as `mask` — it draws nothing; downstream ops read it via `masked:`. Use it to make any other op flicker, breathe or crawl.",params:{as:{default:"mask",unit:"name",structural:!0,summary:"name of the field written"},scale:{default:3,unit:"ratio",summary:"noise frequency across the element"},speed:{default:.3,unit:"seconds",summary:"how fast it evolves; 0 freezes it"},amount:{default:1,unit:"ratio",summary:"blend between flat 1.0 and full noise"},remap:{default:[0,1],unit:"range",summary:"rescale the field's output range"}}},structural:["as"],stage:"field",producesField:!0,decl:function(t){return"\n uniform float ".concat(t,"scale;\n uniform float ").concat(t,"speed;\n uniform vec2 ").concat(t,"remap;\n uniform float ").concat(t,"amp;\n float ").concat(t,"h(vec2 v) {\n return fract(sin(dot(v, vec2(41.113, 289.717))) * 43758.545);\n }\n float ").concat(t,"n(vec2 v) {\n vec2 i = floor(v), f = v - i;\n f = f * f * (3.0 - 2.0 * f);\n return mix(mix(").concat(t,"h(i), ").concat(t,"h(i + vec2(1.0, 0.0)), f.x),\n mix(").concat(t,"h(i + vec2(0.0, 1.0)), ").concat(t,"h(i + vec2(1.0, 1.0)), f.x), f.y);\n }")},code:function(t,e){return"\n {\n vec2 np = frag / max(u_res.y, 1.0) * ".concat(t,"scale;\n // Two octaves: enough structure to read as turbulence\n // without the cost of a full fBm.\n float n = ").concat(t,"n(np + u_time * ").concat(t,"speed) * 0.65 +\n ").concat(t,"n(np * 2.7 - u_time * ").concat(t,"speed * 0.6) * 0.35;\n n = clamp((n - ").concat(t,"remap.x) / max(").concat(t,"remap.y - ").concat(t,"remap.x, 1e-4), 0.0, 1.0);\n ").concat(C(e.as||"mask")," *= mix(1.0, n, ").concat(t,"amp);\n }")},uniforms:function(t){return{scale:["1f",null!=t.scale?t.scale:3],speed:["1f",null!=t.speed?t.speed:.3],remap:["2fv",t.remap||[0,1]],amp:["1f",null!=t.amount?t.amount:1]}}},copy:{multiSample:!0,doc:{summary:"Stamps extra copies of the element over itself. Copies sample the ORIGINAL texture, not the result of earlier colour ops, so a copy of a halftoned element is a copy of the unhalftoned source.",params:{count:{default:5,unit:"count",structural:!0,summary:'stamps arranged in a ring around the focus. The loop is unrolled at compile time, so this rebuilds — not something to animate. This default is the shader\'s; the DOM path that an element of type "copy" takes uses 3 instead.'},points:{default:null,unit:"point",structural:!0,summary:"explicit [[x,y], ...] in fractions of the element box, instead of a ring. Survives resizes. Overrides `count`."},radius:{default:110,unit:"px",summary:"ring radius when using `count`"},scale:{default:.5,unit:"ratio",summary:"size of each copy"},rotate:{default:0,unit:"deg",summary:"rotation applied per copy"},fade:{default:1,unit:"ratio",summary:"opacity falloff across the set"},amount:{default:1,unit:"ratio",summary:"overall blend of the copies over the original"},animation:{default:!1,unit:"bool",readBy:"element-mapper",summary:'DOM path only. An element of type "copy" is built by the mapper rather than by the shader, and this asks that mapper for animated copies; the shader path ignores it. Declared because the mapper has always read it and the docs have always taught it, while the registry did not list it – so the validator reported a documented, working node as an unknown parameter.'}}},structural:["count","points"],stage:"color",defaultDriver:"static",decl:function(t){return"\n uniform vec2 ".concat(t,"dpos;\n uniform float ").concat(t,"damt;\n uniform float ").concat(t,"radius;\n uniform float ").concat(t,"scale;\n uniform float ").concat(t,"rotate;\n uniform float ").concat(t,"fade;\n uniform float ").concat(t,"amount;")},code:function(t,e){for(var n=Array.isArray(e.points)&&e.points.length>0,r=n?e.points.length:Math.max(1,Math.min(24,Math.round(e.count||5))),o="",i=function(i){var a,s=n?"vec2(".concat((+e.points[i][0]).toFixed(5),", ").concat((+e.points[i][1]).toFixed(5),") * u_res"):(a=i/r*Math.PI*2,"".concat(t,"dpos + vec2(").concat(Math.cos(a).toFixed(5),", ")+"".concat(Math.sin(a).toFixed(5),") * ").concat(t,"radius"));o+="\n {\n float ang = ".concat(t,"rotate * ").concat((i+1).toFixed(1),";\n float cs = cos(ang), sn = sin(ang);\n // Inverse transform: to draw a stamp scaled by s about a\n // centre c, fetch from the source at (frag - c) / s.\n vec2 d = mat2(cs, -sn, sn, cs) * (frag - (").concat(s,"));\n vec2 q = d / max(").concat(t,"scale, 1e-3) + u_res * 0.5;\n vec2 quv = vec2(q.x / u_res.x, 1.0 - q.y / u_res.y);\n vec2 inside = step(vec2(0.0), quv) * step(quv, vec2(1.0));\n vec4 s = texture2D(u_tex, clamp(quv, 0.0, 1.0));\n float w = s.a * inside.x * inside.y * ").concat(t,"amount * ").concat(t,"damt\n * pow(").concat(t,"fade, ").concat(i.toFixed(1),");\n // Straight-alpha OVER, newest stamp on top.\n float na = w + ovA * (1.0 - w);\n ovCol = (s.rgb * w + ovCol * ovA * (1.0 - w)) / max(na, 1e-4);\n ovA = na;\n }")},a=0;a<r;a++)i(a);return o},uniforms:function(t,e){return{radius:["1f",(null!=t.radius?t.radius:110)*e],scale:["1f",null!=t.scale?t.scale:.5],rotate:["1f",null!=t.rotate?t.rotate:0],fade:["1f",null!=t.fade?t.fade:1],amount:["1f",null!=t.amount?t.amount:1]}}},merge:{doc:{summary:"Runs two sub-chains over the same source and blends the results. The only op that takes other ops as arguments — everything else composes by sequence, this composes in parallel.",params:{a:{default:null,summary:"first branch: an array of nodes",structural:!0},b:{default:null,summary:"second branch: an array of nodes",structural:!0},mode:{default:"over",unit:"name",structural:!0,summary:"how the branches combine: over, add, screen, multiply, difference, lighten. Compiled in, so it rebuilds."},mix:{default:1,unit:"ratio",summary:"how far to blend b into a"}}},structural:["mode","a","b"],stage:"color",decl:function(t){return"uniform float ".concat(t,"mix;")},code:function(){return""},uniforms:function(t){return{mix:["1f",null!=t.mix?t.mix:1]}}},echo:{doc:{summary:"Temporal accumulation — a fading trail of what CHANGED. Typing smears, a ticking counter leaves a comet. The one op that does nothing on the snapshot backend, because a frozen image has no motion to record.",params:{strength:{default:.85,unit:"ratio",summary:"opacity of the trail"},decay:{default:.92,unit:"ratio",summary:"per-second persistence — higher is a longer tail"},tint:{default:"#7FD4FF",unit:"color",summary:"colour pushed into the trail"},tintAmount:{default:.5,unit:"ratio",summary:"how far the trail is tinted"}}},stage:"color",decl:function(t){return"\n uniform sampler2D ".concat(t,"hist;\n uniform float ").concat(t,"strength;\n uniform vec3 ").concat(t,"tint;\n uniform float ").concat(t,"tintAmt;")},code:function(t){return"\n {\n // Sampled in screen space: the trail records where things\n // WERE, which is not where a warp op would fetch them from.\n vec2 huv = vec2(frag.x / u_res.x, 1.0 - frag.y / u_res.y);\n vec4 h = texture2D(".concat(t,"hist, clamp(huv, 0.001, 0.999));\n float ha = clamp(h.a * ").concat(t,"strength, 0.0, 1.0);\n vec3 hc = mix(h.rgb, ").concat(t,"tint, ").concat(t,"tintAmt);\n // Straight-alpha OVER into the border layer so an edges op\n // in the same chain still composites correctly.\n float na = ha + edgeCov * (1.0 - ha);\n edgeCol = (hc * ha + edgeCol * edgeCov * (1.0 - ha)) / max(na, 1e-4);\n edgeCov = na;\n }")},uniforms:function(t){return{strength:["1f",null!=t.strength?t.strength:.85],tint:["3fv",b(t.tint||"#7FD4FF")],tintAmt:["1f",t.tint?null!=t.tintAmount?t.tintAmount:.5:0]}},solver:{resolutions:function(t,e,n){return{frame:[e,n]}},targets:{history:{double:!0,res:"frame",fmt:"rgba",smooth:!0}},samplers:{hist:"history"},programs:{accumulate:"\nprecision highp float;\nuniform sampler2D u_content;\nuniform sampler2D u_hist;\nuniform vec2 u_texel;\nuniform float u_decay;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec4 c = texture2D(u_content, uv);\n vec4 h = texture2D(u_hist, uv) * u_decay;\n gl_FragColor = max(c, h);\n}"},splatColor:function(){return[0,0,0]},step:function(t,e,n){var r=Math.min(n.dt,1/30),o=Math.pow(null!=e.decay?e.decay:.92,60*r);t.use("accumulate"),t.f2("u_texel",1/t.canvasW,1/t.canvasH),t.f1("u_decay",o),t.smp("u_content",t.content,0),t.smp("u_hist",t.read("history"),1),t.blit(t.write("history")),t.swap("history")}}},stir:{doc:{summary:"Stirred liquid: a real fluid simulation the content is dragged through. STATEFUL — it owns a ping-pong pair of render targets that evolve frame to frame, so it is the most expensive op here.",params:{strength:{default:26,unit:"px",summary:"how far the fluid carries the content"},force:{default:1,unit:"ratio",summary:"how hard the pointer pushes the fluid"},radius:{default:.1,unit:"ratio",summary:"splat size, as a fraction of the sim grid"},curl:{default:2.2,unit:"ratio",summary:"vorticity — how much the fluid curls into eddies"},decay:{default:.985,unit:"ratio",summary:"per-second velocity persistence"},pressure:{default:.8,unit:"ratio",summary:"pressure retained between frames"},pressureIterations:{default:6,unit:"count",summary:"solver iterations; higher is stiffer and slower"},intensity:{default:1.6,unit:"ratio",summary:"brightness of the dye layer"},sheen:{default:.15,unit:"ratio",summary:"specular highlight on the surface"},tint:{default:"#7FD4FF",unit:"color",summary:"dye colour, unless `rainbow`"},rainbow:{default:!1,unit:"bool",summary:"cycle dye hue instead of using `tint`"},dye:{default:.85,unit:"ratio",summary:"how much dye colour reaches the final image"},dyeAmount:{default:.6,unit:"ratio",summary:"how much dye each splat injects"},dyeFade:{default:.97,unit:"ratio",summary:"per-second dye persistence"},resolution:{default:128,unit:"count",summary:"velocity grid size, clamped 32..512"},dyeResolution:{default:512,unit:"count",summary:"dye grid size, clamped 64..1024"}}},stage:["warp","color"],decl:function(t){return"\n uniform sampler2D ".concat(t,"vel;\n uniform sampler2D ").concat(t,"dye;\n uniform float ").concat(t,"strength;\n uniform float ").concat(t,"dyemix;\n uniform float ").concat(t,"intensity;\n uniform float ").concat(t,"sheen;\n uniform vec3 ").concat(t,"tint;")},code:function(t,e,n){return"warp"===n?"\n {\n // frag/warped are top-down pixels, the field is bottom-up\n // [0,1]: flip y going in, and flip the y of the vector coming\n // out so the content drags WITH the pointer.\n vec2 fuv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec2 v = texture2D(".concat(t,"vel, clamp(fuv, 0.001, 0.999)).xy;\n warped += vec2(v.x, -v.y) * ").concat(t,"strength;\n }"):"\n {\n // Sampled at the CONTINUOUS warped position, never at the\n // cell centre: a cell op upstream (hexalize) snaps the cell\n // centre to one point per tile, which would quantise the\n // liquid into flat per-hex patches instead of smooth swirls.\n vec2 suv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec3 dc = texture2D(".concat(t,"dye, clamp(suv, 0.001, 0.999)).rgb;\n float mag = length(dc);\n // Colour is carried IN the dye field and advected with it, so\n // a ribbon keeps its hue while the flow folds it. Deriving\n // colour from the local flow direction instead would make\n // neighbouring pixels jump hue and read as confetti.\n vec3 liquid = mag > 1e-4 ? clamp(dc / mag * 1.25, 0.0, 1.0) : ").concat(t,"tint;\n float amt = clamp((1.0 - exp(-mag * ").concat(t,"intensity)) * ").concat(t,"dyemix, 0.0, 1.0);\n // Straight-alpha OVER so a later overlay op (blobs) still\n // composites correctly on top of the liquid.\n float na = amt + ovA * (1.0 - amt);\n ovCol = (liquid * amt + ovCol * ovA * (1.0 - amt)) / max(na, 1e-4);\n ovA = na;\n\n // Faint sheen on the content itself where the flow is fast.\n float sp = length(texture2D(").concat(t,"vel, clamp(suv, 0.001, 0.999)).xy);\n col = mix(col, ").concat(t,"tint, (1.0 - exp(-sp * 0.7)) * ").concat(t,"sheen);\n }")},uniforms:function(t,e){return{strength:["1f",(null!=t.strength?t.strength:26)*e],sheen:["1f",null!=t.sheen?t.sheen:.15],tint:["3fv",b(t.tint||"#7FD4FF")],dyemix:["1f",null!=t.dye?t.dye:.85],intensity:["1f",null!=t.intensity?t.intensity:1.6]}},solver:{resolutions:function(t){return{sim:Math.max(32,Math.min(t.resolution||128,512)),dye:Math.max(64,Math.min(t.dyeResolution||512,1024))}},targets:{velocity:{double:!0,res:"sim",fmt:"rg",smooth:!0},dye:{double:!0,res:"dye",fmt:"rgba",smooth:!0},pressure:{double:!0,res:"sim",fmt:"r",smooth:!1},divergence:{double:!1,res:"sim",fmt:"r",smooth:!1},vorticity:{double:!1,res:"sim",fmt:"r",smooth:!1}},samplers:{vel:"velocity",dye:"dye"},programs:{splat:"\nprecision highp float;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform vec2 u_point;\nuniform vec3 u_amount;\nuniform float u_radius;\nuniform float u_aspect;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 d = uv - u_point;\n if (u_aspect >= 1.0) d.y /= u_aspect; else d.x *= u_aspect;\n float g = exp(-dot(d, d) / max(u_radius * u_radius, 1e-6));\n gl_FragColor = vec4(texture2D(u_src, uv).xyz + u_amount * g, 1.0);\n}",advect:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform float u_dt;\nuniform float u_diss;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 back = uv - texture2D(u_vel, uv).xy * u_dt;\n gl_FragColor = vec4(texture2D(u_src, clamp(back, 0.0, 1.0)).xyz * u_diss, 1.0);\n}",curl:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).y;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).y;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).x;\n gl_FragColor = vec4(0.5 * ((r - l) - (t - b)), 0.0, 0.0, 1.0);\n}",confine:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_curl;\nuniform vec2 u_texel;\nuniform float u_eps;\nuniform float u_dt;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_curl, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_curl, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_curl, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_curl, uv - vec2(0.0, u_texel.y)).x;\n float c = texture2D(u_curl, uv).x;\n vec2 grad = 0.5 * vec2(abs(r) - abs(l), abs(t) - abs(b));\n vec2 n = grad / (length(grad) + 1e-5);\n vec2 force = u_eps * c * vec2(n.y, -n.x);\n vec2 v = texture2D(u_vel, uv).xy + force * u_dt;\n gl_FragColor = vec4(clamp(v, -64.0, 64.0), 0.0, 1.0);\n}",divergence:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).y;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).y;\n vec2 c = texture2D(u_vel, uv).xy;\n if (uv.x - u_texel.x < 0.0) l = -c.x;\n if (uv.x + u_texel.x > 1.0) r = -c.x;\n if (uv.y - u_texel.y < 0.0) b = -c.y;\n if (uv.y + u_texel.y > 1.0) t = -c.y;\n gl_FragColor = vec4(0.5 * ((r - l) + (t - b)), 0.0, 0.0, 1.0);\n}",jacobi:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_div;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n float d = texture2D(u_div, uv).x;\n gl_FragColor = vec4((r + l + t + b - d) * 0.25, 0.0, 0.0, 1.0);\n}",subtract:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n vec2 v = texture2D(u_vel, uv).xy - 0.5 * vec2(r - l, t - b);\n gl_FragColor = vec4(v, 0.0, 1.0);\n}",decay:"\nprecision highp float;\nuniform sampler2D u_tex;\nuniform vec2 u_texel;\nuniform float u_value;\nvoid main() {\n gl_FragColor = texture2D(u_tex, gl_FragCoord.xy * u_texel) * u_value;\n}"},splatColor:function(t,e,n){var r=null!=t.dyeAmount?t.dyeAmount:.6;if(!t.rainbow){var o=b(t.tint||"#7FD4FF");return[o[0]*r,o[1]*r,o[2]*r]}var i=Math.atan2(n,e);return[(.5+.5*Math.cos(i))*r,(.5+.5*Math.cos(i+2.0944))*r,(.5+.5*Math.cos(i+4.1888))*r]},step:function(t,e,n){var r=Math.min(n.dt,1/30),o=1/t.res.sim,i=1/t.res.dye,a=function(t,e){return Math.pow(t,60*e)};if(n.moving){var s=null!=e.force?e.force:1;t.use("splat"),t.f1("u_radius",null!=e.radius?e.radius:.1),t.f1("u_aspect",n.aspect),t.f2("u_point",n.px,n.py),t.f2("u_texel",o,o),t.smp("u_src",t.read("velocity"),0),t.f3("u_amount",n.dx*s,n.dy*s,0),t.blit(t.write("velocity")),t.swap("velocity"),t.f2("u_texel",i,i),t.smp("u_src",t.read("dye"),0),t.f3("u_amount",n.col[0],n.col[1],n.col[2]),t.blit(t.write("dye")),t.swap("dye")}t.use("curl"),t.f2("u_texel",o,o),t.smp("u_vel",t.read("velocity"),0),t.blit(t.single("vorticity")),t.use("confine"),t.f2("u_texel",o,o),t.f1("u_eps",null!=e.curl?e.curl:2.2),t.f1("u_dt",r),t.smp("u_vel",t.read("velocity"),0),t.smp("u_curl",t.single("vorticity"),1),t.blit(t.write("velocity")),t.swap("velocity"),t.use("divergence"),t.f2("u_texel",o,o),t.smp("u_vel",t.read("velocity"),0),t.blit(t.single("divergence")),t.use("decay"),t.f2("u_texel",o,o),t.f1("u_value",a(null!=e.pressure?e.pressure:.8,r)),t.smp("u_tex",t.read("pressure"),0),t.blit(t.write("pressure")),t.swap("pressure"),t.use("jacobi"),t.f2("u_texel",o,o),t.smp("u_div",t.single("divergence"),1);for(var l=Math.max(1,Math.min(e.pressureIterations||6,40)),c=0;c<l;c++)t.smp("u_p",t.read("pressure"),0),t.blit(t.write("pressure")),t.swap("pressure");t.use("subtract"),t.f2("u_texel",o,o),t.smp("u_p",t.read("pressure"),0),t.smp("u_vel",t.read("velocity"),1),t.blit(t.write("velocity")),t.swap("velocity"),t.use("advect"),t.f1("u_dt",r),t.f2("u_texel",o,o),t.smp("u_vel",t.read("velocity"),0),t.smp("u_src",t.read("velocity"),0),t.f1("u_diss",a(null!=e.decay?e.decay:.985,r)),t.blit(t.write("velocity")),t.swap("velocity"),t.f2("u_texel",i,i),t.smp("u_vel",t.read("velocity"),0),t.smp("u_src",t.read("dye"),1),t.f1("u_diss",a(null!=e.dyeFade?e.dyeFade:.97,r)),t.blit(t.write("dye")),t.swap("dye")}}},blobs:{doc:{summary:"Liquid-glass blobs that follow the pointer: a chain of metaballs refracting the content behind them, stretching apart on a fast flick and relaxing back to a single circle at rest.",params:{count:{default:1,unit:"count",structural:!0,summary:"independent drifting blobs, on top of the trail chain"},trail:{default:7,unit:"count",structural:!0,summary:"blobs in the follow-the-leader chain. Unrolled at compile time, so it rebuilds."},radius:{default:46,unit:"px",summary:"blob radius at rest"},color:{default:"#EAF4EE",unit:"color",summary:"glass tint"},refract:{default:70,unit:"px",summary:"how far the glass bends what is behind it"},rim:{default:.6,unit:"ratio",summary:"brightness of the rim light"},alpha:{default:1,unit:"ratio",summary:"overall opacity"},iridescence:{default:.8,unit:"ratio",summary:"colour shift across the rim"},dispersion:{default:1,unit:"ratio",summary:"per-channel refraction spread"},frost:{default:.25,unit:"ratio",summary:"blur of what shows through"}}},structural:["count","trail"],stage:"color",overlay:!0,mips:!0,decl:function(t){return"\n uniform vec3 ".concat(t,"blobs[").concat(12,"];\n uniform int ").concat(t,"count;\n uniform vec3 ").concat(t,"tint;\n uniform float ").concat(t,"refract;\n uniform float ").concat(t,"rim;\n uniform float ").concat(t,"alpha;\n uniform float ").concat(t,"irid;\n uniform float ").concat(t,"disp;\n uniform float ").concat(t,"frost;\n float ").concat(t,"hash(vec3 v) {\n return fract(sin(dot(v, vec3(21.9898, 63.233, 41.719))) * 41739.317);\n }\n float ").concat(t,"noise(vec3 v) {\n vec3 f = floor(v);\n vec3 r = v - f;\n r = r * r * (3.0 - 2.0 * r);\n float c000 = ").concat(t,"hash(f);\n float c100 = ").concat(t,"hash(f + vec3(1.0, 0.0, 0.0));\n float c010 = ").concat(t,"hash(f + vec3(0.0, 1.0, 0.0));\n float c110 = ").concat(t,"hash(f + vec3(1.0, 1.0, 0.0));\n float c001 = ").concat(t,"hash(f + vec3(0.0, 0.0, 1.0));\n float c101 = ").concat(t,"hash(f + vec3(1.0, 0.0, 1.0));\n float c011 = ").concat(t,"hash(f + vec3(0.0, 1.0, 1.0));\n float c111 = ").concat(t,"hash(f + vec3(1.0, 1.0, 1.0));\n return mix(\n mix(mix(c000, c100, r.x), mix(c010, c110, r.x), r.y),\n mix(mix(c001, c101, r.x), mix(c011, c111, r.x), r.y), r.z);\n }")},code:function(t){return"\n {\n float field = 0.0;\n vec2 grad = vec2(0.0);\n for (int bi = 0; bi < ".concat(12,"; bi++) {\n if (bi >= ").concat(t,"count) break;\n vec2 bd = frag - ").concat(t,"blobs[bi].xy;\n float br = ").concat(t,"blobs[bi].z;\n float dd = max(dot(bd, bd), 1.0);\n field += (br * br) / dd;\n grad += (-2.0 * (br * br) / (dd * dd)) * bd;\n }\n float bmask = smoothstep(0.6, 1.0, field);\n if (bmask > 0.003) {\n float gmag = length(grad);\n vec2 g2 = gmag > 1e-6 ? -grad / gmag : vec2(0.0);\n // Pseudo-3D surface normal from the 2D field. For a\n // metaball field (sum of r^2/d^2), 1/sqrt(field) IS the\n // normalized radial position: 0 at the centre, 1 at the\n // surface. That yields a true hemisphere profile — the\n // curvature (and therefore refraction) varies smoothly\n // across the WHOLE disc, not just an edge annulus.\n float s = clamp(inversesqrt(max(field, 1e-4)), 0.0, 1.0);\n vec3 n = normalize(vec3(g2 * s, sqrt(max(1.0 - s * s, 0.004))));\n vec3 rd = vec3(0.0, 0.0, -1.0);\n\n // Dispersion: refract each channel with a slightly\n // different index (water-glass ~1.33). Near the rim the\n // exit direction flattens (|z| -> 0), so the sampling\n // offsets stretch — producing the smooth concentric\n // colour-fringed bands of a thick lens.\n float ca = 0.03 * ").concat(t,"disp;\n vec3 tR = refract(rd, n, 1.0 / (1.33 - ca));\n vec3 tG = refract(rd, n, 1.0 / 1.33);\n vec3 tB = refract(rd, n, 1.0 / (1.33 + ca));\n vec2 oR = tR.xy * (").concat(t,"refract / max(abs(tR.z), 0.3));\n vec2 oG = tG.xy * (").concat(t,"refract / max(abs(tG.z), 0.3));\n vec2 oB = tB.xy * (").concat(t,"refract / max(abs(tB.z), 0.3));\n\n // Blur grows with how far the ray was bent (mip bias), so\n // strongly-refracted regions smear smoothly instead of\n // showing sharp displaced copies. frost adds a base blur.\n float lod = ").concat(t,"frost * 5.0 + log2(1.0 + length(oG) * 0.035);\n vec2 px = 1.0 / u_res;\n vec4 sG = texture2D(u_tex, clamp(uv + oG * px, 0.002, 0.998), lod);\n vec3 refr;\n refr.r = texture2D(u_tex, clamp(uv + oR * px, 0.002, 0.998), lod).r;\n refr.g = sG.g;\n refr.b = texture2D(u_tex, clamp(uv + oB * px, 0.002, 0.998), lod).b;\n // Blend in (approximately) linear light for clean fringes.\n refr = pow(max(refr, 0.0), vec3(2.2));\n\n vec3 tintLin = pow(").concat(t,"tint, vec3(2.2));\n vec3 bodyLin = mix(tintLin * 0.35, refr, sG.a);\n\n // Glass darkens toward the silhouette (absorption), the\n // opposite of an additive glow ring.\n float edge = pow(1.0 - clamp(n.z, 0.0, 1.0), 1.5);\n bodyLin *= 1.0 - 0.35 * ").concat(t,"rim * edge;\n vec3 body = pow(max(bodyLin, 0.0), vec3(1.0 / 2.2));\n\n // Sparse iridescent glints: two drifting value-noise\n // fields sampled on the reflection direction, one warm\n // one cool, sharpened hard so only sparkles survive.\n vec3 rf = reflect(rd, n);\n float nA = ").concat(t,"noise(rf * 2.3 + u_time * 0.5);\n float nB = ").concat(t,"noise(rf * 2.3 - u_time * 0.5);\n vec3 glint = pow(max(vec3(0.30, 0.52, 0.86) * nA +\n vec3(0.80, 0.56, 0.34) * nB, 0.0), vec3(6.0));\n body += glint * ").concat(t,"irid;\n\n // Small hard specular from a fixed key light.\n vec3 L = normalize(vec3(-0.5, 0.7, 0.6));\n float spec = pow(max(dot(reflect(-L, n), vec3(0.0, 0.0, 1.0)), 0.0), 60.0);\n body += spec * 0.35;\n\n ovCol = body;\n ovA = max(ovA, bmask * ").concat(t,"alpha);\n }\n }")},uniforms:function(t,e){return{tint:["3fv",b(t.color||"#EAF4EE")],refract:["1f",(null!=t.refract?t.refract:70)*e],rim:["1f",null!=t.rim?t.rim:.6],alpha:["1f",null!=t.alpha?t.alpha:1],irid:["1f",null!=t.iridescence?t.iridescence:.8],disp:["1f",null!=t.dispersion?t.dispersion:1],frost:["1f",null!=t.frost?t.frost:.25]}},init:function(t,e,n,r){for(var o=(t.radius||46)*e,i=Math.max(1,Math.min(null!=t.trail?t.trail:7,12)),a=[],s=0,l=0;l<i;l++){var c=Math.pow(.86,l);a.push(c),s+=c*c}for(var u=Math.sqrt(s),f=a.map(function(t){return o*t/u}),d=a.map(function(t,e){return.85*o*Math.pow(.955,e)}),h=function(t,e){return t+Math.random()*(e-t)},p=Math.max(0,Math.min((t.count||1)-1,12-i)),y=[],m=0;m<p;m++){var v=h(0,2*Math.PI),b=h(30,80)*e;y.push({x:h(o,n-o),y:h(o,r-o),r:o*h(.45,.8),vx:Math.cos(v)*b,vy:Math.sin(v)*b,phase:h(0,2*Math.PI)})}for(var g={x:.5*n,y:.55*r},w=[],x=0;x<i;x++)w.push({x:g.x,y:g.y});return{head:g,chain:w,nTrail:i,drifters:y,trailIdleR:f,trailMoveR:d,stretch:0,seg:.9*o}},tick:function(t,e){var n=Math.min(e.dt,.05),r=e.w,o=e.h,i=1-Math.exp(9*-n);t.head.x+=(e.mouseX-t.head.x)*i,t.head.y+=(e.mouseY-t.head.y)*i;var a=t.chain;a[0].x=t.head.x,a[0].y=t.head.y;for(var s=1-Math.exp(16*-n),l=1;l<a.length;l++){var c=a[l-1],u=a[l],d=c.x-u.x,h=c.y-u.y,p=Math.hypot(d,h)||1e-4,y=t.seg;p>y&&(u.x+=d*(1-y/p),u.y+=h*(1-y/p)),u.x+=(c.x-u.x)*s,u.y+=(c.y-u.y)*s}var m=a[a.length-1],v=Math.hypot(m.x-t.head.x,m.y-t.head.y),b=Math.max(1,t.seg*(t.nTrail-1)),g=Math.min(1,v/b);t.stretch+=(g-t.stretch)*(1-Math.exp(8*-n));var w,x=f(t.drifters);try{for(x.s();!(w=x.n()).done;){var k=w.value;k.x+=k.vx*n,k.y+=k.vy*n,k.x<k.r?(k.x=k.r,k.vx=Math.abs(k.vx)):k.x>r-k.r&&(k.x=r-k.r,k.vx=-Math.abs(k.vx)),k.y<k.r?(k.y=k.r,k.vy=Math.abs(k.vy)):k.y>o-k.r&&(k.y=o-k.r,k.vy=-Math.abs(k.vy)),k.phase+=1.6*n}}catch(t){x.e(t)}finally{x.f()}for(var S=new Float32Array(36),O=t.stretch,j=0;j<t.nTrail;j++){var E=a[j];S[3*j]=E.x,S[3*j+1]=E.y,S[3*j+2]=t.trailIdleR[j]+(t.trailMoveR[j]-t.trailIdleR[j])*O}return t.drifters.forEach(function(e,n){var r=t.nTrail+n;S[3*r]=e.x,S[3*r+1]=e.y,S[3*r+2]=e.r*(1+.12*Math.sin(e.phase))}),[{name:"blobs",kind:"3fv",value:S},{name:"count",kind:"1i",value:t.nTrail+t.drifters.length}]}}};function b(t){return[1,3,5].map(function(e){return parseInt(t.slice(e,e+2),16)/255})}var g=Object.keys(v).concat("switch"),w=["px","ratio","deg","count","seconds"];function x(t,e,n){if(!Array.isArray(n)||n.length<2)return!1;var r,o=f(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;if("number"!=typeof i||!Number.isFinite(i))return!1}}catch(t){o.e(t)}finally{o.f()}var a=v[t],s=a&&a.doc&&a.doc.params&&a.doc.params[e];return!!s&&w.includes(s.unit)}function k(t,e){var n=t.length-1,r=Math.min(1,Math.max(0,e))*n,o=Math.min(n-1,Math.floor(r));return t[o]+(t[o+1]-t[o])*(r-o)}var S={linear:function(t){return t},in:function(t){return t*t*t},out:function(t){return 1-Math.pow(1-t,3)},"in-out":function(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2},back:function(t){return 1+2.70158*Math.pow(t-1,3)+1.70158*Math.pow(t-1,2)}},O=Object.keys(S);function j(t){return t?"texElementSubImage2D"in t?"sub-image":"texElementImage2D"in t?"image":null:null}function E(t){t.removeAttribute("content"),t.removeAttribute("layoutsubtree"),t.removeAttribute("data-nodality-raster-api")}var T="attribute vec2 a; void main(){ gl_Position = vec4(a, 0.0, 1.0); }",_={warp:["warped"],cell:["center","edge"],displace:["sampleP","chroma"],color:["col","edgeCol","edgeCov","ovCol","ovA"]},C=(["field"].concat(c(Object.keys(_))),"what steers the effect: ".concat(m.join(", "),". "),"easing for this node's local progress: ".concat(O.join(", ")),function(t){return"fld_".concat(String(t).replace(/[^A-Za-z0-9_]/g,""))}),A=function(t){return!0===t.masked?"mask":"string"==typeof t.masked?t.masked:null},P=function(t){return"edge"===t||"edgeCov"===t||"ovA"===t?"float":"col"===t||"edgeCol"===t||"ovCol"===t?"vec3":"vec2"},R={over:function(t,e){return e},add:function(t,e){return"min(".concat(t," + ").concat(e,", vec3(1.0))")},screen:function(t,e){return"1.0 - (1.0 - ".concat(t,") * (1.0 - ").concat(e,")")},multiply:function(t,e){return"".concat(t," * ").concat(e)},difference:function(t,e){return"abs(".concat(t," - ").concat(e,")")},lighten:function(t,e){return"max(".concat(t,", ").concat(e,")")},darken:function(t,e){return"min(".concat(t,", ").concat(e,")")}};function I(t,e){var n,r=[],o=f(t||[]);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i&&i.op){var a={node:i,i:e.length};e.push(i),"merge"===i.op&&(a.a=I(i.a,e),a.b=I(i.b,e)),r.push(a)}}}catch(t){o.e(t)}finally{o.f()}return r}function M(t,e){var n,r=f(t);try{var o=function(){var t=n.value,r=t.node;if("merge"===r.op)return function(t,e){var n="u".concat(t.i,"_"),r=R[t.node.mode]||R.over,o={field:"",warp:"",cell:"",displace:"",color:""},i={field:"",warp:"",cell:"",displace:"",color:""};M(t.a||[],o),M(t.b||[],i),e.field+=o.field+i.field;for(var a=function(){var t=l[s];if(!o[t]&&!i[t])return 1;var a=_[t],c=" {\n";a.forEach(function(t,e){c+=" ".concat(P(t)," pre").concat(e," = ").concat(t,";\n")}),c+=o[t],a.forEach(function(t,e){c+=" ".concat(P(t)," bra").concat(e," = ").concat(t,";\n")}),a.forEach(function(t,e){c+=" ".concat(t," = pre").concat(e,";\n")}),c+=i[t],a.forEach(function(t,e){var o="vec3"===P(t)?r("bra".concat(e),t):t;c+=" ".concat(t," = mix(bra").concat(e,", ").concat(o,", ").concat(n,"mix);\n")}),c+=" }\n",e[t]+=c},s=0,l=["warp","cell","displace","color"];s<l.length;s++)a()}(t,e),0;var o=v[r.op];if(!o)return 0;var i="u".concat(t.i,"_"),a=Array.isArray(o.stage)?o.stage:[o.stage],s=A(r);a.forEach(function(t){var n=o.code(i,r,t)+"\n";if(s&&_[t]){var a=_[t],l=a.map(function(t,e){return" ".concat(P(t)," msv").concat(e," = ").concat(t,";")}).join("\n"),c=a.map(function(t,e){return" ".concat(t," = mix(msv").concat(e,", ").concat(t,", ").concat(C(s),");")}).join("\n");n=" {\n".concat(l,"\n").concat(n,"\n").concat(c,"\n }\n")}e["field"===t||"warp"===t||"cell"===t||"displace"===t?t:"color"]+=n})};for(r.s();!(n=r.n()).done;)o()}catch(t){r.e(t)}finally{r.f()}}function D(t,e,n,r){var o=r&&r.fade||"opaque",i=function(t){var e=Number(t);return(Number.isFinite(e)?e:0).toFixed(5)},a=function(t){return t&&t.w>0&&t.h>0?t.h/t.w:0},s=!(!r||"width"!==r.fit),l=r&&Array.isArray(r.crossfade)&&2===r.crossfade.length?r.crossfade:null,u="",f=new Set;e.forEach(function(t){var e=v[t.op];e&&e.producesField&&f.add(t.as||"mask");var n=A(t);n&&f.add(n)});var d=c(f).map(function(t){return" float ".concat(C(t)," = 1.0;")}).join("\n");e.forEach(function(t,e){var n=v[t.op];n&&(u+=n.decl("u".concat(e,"_"),t)+"\n")});var h=function(t){var e=t&&t.node&&t.node.side;if("old"!==e&&"new"!==e)return null;var n=v[t.node.op],o=n?Array.isArray(n.stage)?n.stage:[n.stage]:[];return o.every(function(t){return"color"===t})?r?e:(console.warn('[nodality] side:"'.concat(e,'" has no meaning without a ')+"transition — there is only one image. Ignoring it."),null):(console.warn('[nodality] "'.concat(t.node.op,'" is a ').concat(o.join("+")," op, ")+'so side:"'.concat(e,'" cannot apply to it — a sided op must be colour-only, ')+"because both sides share one sampling coordinate. Running it on the blended result instead."),null)},p=t.filter(function(t){return!h(t)}),y=t.filter(function(t){return"old"===h(t)}),m=t.filter(function(t){return"new"===h(t)}),b={field:"",warp:"",cell:"",displace:"",color:""};M(p,b);var g=function(t,e){if(!t.length)return"";var n={field:"",warp:"",cell:"",displace:"",color:""};if(M(t,n),!n.color)return"";var r=_.color.filter(function(t){return"col"!==t}).map(function(t){return" ".concat(P(t)," ").concat(t," = ").concat("vec3"===P(t)?"vec3(0.0)":"0.0",";")}).join("\n");return" {\n vec2 frag = p;\n vec3 col = ".concat(e,".rgb;\n").concat(r,"\n").concat(n.color,"\n ").concat(e,".rgb = col;\n }\n")},w=g(y,"o"),x=g(m,"n"),k=b.field,S=b.warp,O=b.cell,j=b.displace,E=b.color,T=e,R=T.some(function(t){return"edges"===t.op})?"":" col *= 1.0 - edge * 0.55;",I=T.some(function(t){return(v[t.op]||{}).chroma})?r?"\n vec2 cdev = vec2(chroma.x, chroma.y);\n col.r = nodSampleAt(sampleP + cdev).r;\n col.b = nodSampleAt(sampleP - cdev).b;":"\n vec2 cpx = vec2(chroma.x, -chroma.y) / u_res;\n col.r = texture2D(u_tex, clamp(uv + cpx, 0.001, 0.999)).r;\n col.b = texture2D(u_tex, clamp(uv - cpx, 0.001, 0.999)).b;":"",D=n?"uniform vec2 u_probe;\n":"",F=n?"u_probe + vec2(0.5)":"gl_FragCoord.xy";return"\nprecision highp float;\n".concat(r?"#define NOD_TRANSITION 1\n":"","uniform sampler2D u_tex;\nuniform vec2 u_res;\nuniform vec2 u_mouse;\nuniform float u_time;\nuniform float u_t; // phase T1: transition progress, 0..1\n\n// Op uniforms are declared HERE, above the transition helpers, because a\n// per-side op's code is emitted inside nodSampleAt. GLSL requires\n// declaration before use, and with the declarations further down every\n// sided op failed to compile with \"'u0_amount' : undeclared identifier\".\n").concat(D).concat(u,"\n").concat(r?"\n// ── phase T2: transition mode ──────────────────────────────────────\n// Two captures instead of one. u_tex is the NEW element, u_old the\n// frozen OLD one, and u_box is the content box they are both drawn\n// into — lerped from the old rect to the new rect by u_t. So geometry\n// (the box) and pixels (the effect chain) stay separate problems, which\n// is the split View Transitions also makes and the one that keeps this\n// maintainable.\nuniform sampler2D u_old;\n".concat(r&&r.newImage?"uniform sampler2D u_newimg;":"",'\n// Phase T2, gap 2. TWO boxes, not one. With a single shared box the\n// only expressible motion is "both sides march together", so the classic\n// "old slides out while new slides in" was impossible. Each capture now\n// interpolates in its own rect, which keeps per-side motion in the\n// GEOMETRY tier (P-3) instead of needing per-side op scoping.\nuniform vec4 u_boxOld; // x, y, w, h — device px, top-down\nuniform vec4 u_boxNew;\n\n// sRGB <-> linear. A naive crossfade in gamma space dips visibly in\n// brightness at mid-fade on photographic content; this is the classic\n// artifact and it is why the mix below is not just mix().\nvec3 nodToLinear(vec3 c) { return pow(c, vec3(2.2)); }\nvec3 nodToSRGB(vec3 c) { return pow(c, vec3(1.0 / 2.2)); }\n\n// Premultiplied, so anti-aliased edges over transparency do not pick up\n// a dark halo as the two sides cross.\nvec4 nodBlend(vec4 a, vec4 b, float t, float d) {\n vec3 pa = nodToLinear(a.rgb) * a.a;\n vec3 pb = nodToLinear(b.rgb) * b.a;\n').concat("morph"===o?"\n // MORPH — a per-pixel CHOICE, not a mix. d is a stable hash of the\n // output pixel, so each pixel flips from old to new at its own point\n // in t. At any instant almost every pixel is showing exactly ONE\n // side, and the two contents are never both legible at once.\n //\n // A uniform crossfade cannot do this: at t=0.5 it is by definition\n // 50% of each, which reads as a double exposure the moment the two\n // states differ much — a wide nav bar and a small card, say.\n float k = smoothstep(d - 0.12, d + 0.12, t);\n vec3 pm = pa * (1.0 - k) + pb * k;\n float al = a.a * (1.0 - k) + b.a * k;":"dissolve"===o?'\n // DISSOLVE — a true cross-dissolve: alpha lerps between the two.\n // Correct, and the right choice when one side really should fade to\n // nothing. Wrong for a shape morph, because any region covered by\n // only ONE side is translucent for the whole transition and the\n // morph reads as "everything is disappearing".\n vec3 pm = mix(pa, pb, t);\n float al = mix(a.a, b.a, t);':"\n // OPAQUE (default) — the colour crosses over without the shape\n // thinning out. The coverage-weighted lerp already gives that for\n // free, and it is worth seeing why:\n //\n // both sides cover a.a = b.a = 1 -> w = 1 at every t. Solid\n // throughout. No mid-fade.\n // only the old b.a = 0 -> w = 1-t. Releases.\n // only the new a.a = 0 -> w = t. Arrives.\n //\n // So one expression covers the union case AND each side's release,\n // linearly, with no curve to pop against.\n vec3 pm = pa * (1.0 - t) + pb * t;\n float al = a.a * (1.0 - t) + b.a * t;","\n return vec4(nodToSRGB(pm / max(al, 1e-4)), al);\n}\n\n// EVERY fetch in transition mode goes through here. A displace-stage op\n// that sampled u_tex directly — aberration does exactly that for its\n// per-channel taps — would show fringes from the new capture only, with\n// the old one silently absent from those channels.\n// Takes a position in DEVICE PX (sampleP space), not uv, because the two\n// captures no longer share a uv. Each is mapped through its own box and\n// masked to it, then blended.\nvec2 nodBoxUV(vec4 box, vec2 p) {\n return vec2((p.x - box.x) / max(box.z, 1.0),\n 1.0 - (p.y - box.y) / max(box.w, 1.0));\n}\nfloat nodInBox(vec2 uv) {\n return step(0.0, uv.x) * step(uv.x, 1.0) * step(0.0, uv.y) * step(uv.y, 1.0);\n}\n").concat(s?'// fit: "width" — the capture\'s own height at this box width.\nvec2 nodFitUV(vec4 box, vec2 p, float aspect) {\n return vec2((p.x - box.x) / max(box.z, 1.0),\n 1.0 - (p.y - box.y) / max(box.z * aspect, 1.0));\n}\n':"","vec4 nodSampleAt(vec2 p) {\n").concat(s?" vec2 uo = nodFitUV(u_boxOld, p, ".concat(i(a(r.oldRect)),");\n vec2 un = nodFitUV(u_boxNew, p, ").concat(i(a(r.newRect)),");"):" vec2 uo = nodBoxUV(u_boxOld, p);\n vec2 un = nodBoxUV(u_boxNew, p);","\n vec4 o = texture2D(u_old, clamp(uo, 0.001, 0.999));\n // With newImage the new side is a capture of the ELEMENT, so both\n // sides can travel between their own rects and converge into one\n // shape. Without it the new side is the HOST capture, which can only\n // be mapped 1:1 — the destination then sits at its final place from\n // t=0 while the old shrinks toward it, and the result reads as two\n // things on screen at once rather than one thing morphing.\n vec4 n = texture2D(").concat(r&&r.newImage?"u_newimg":"u_tex",",\n clamp(un, 0.001, 0.999));\n o.a *= nodInBox(uo);\n n.a *= nodInBox(un);\n").concat(s?" // Clipped to the travelling box as well, so a tall capture in a\n // short box shows its top rather than spilling below it.\n o.a *= nodInBox(nodBoxUV(u_boxOld, p));\n n.a *= nodInBox(nodBoxUV(u_boxNew, p));\n":"").concat(w).concat(x,"\n // The threshold each pixel flips at. Mostly a COHERENT ramp down the\n // box with a little grain on top — pure white noise chooses correctly\n // (never two legible images at once) but reads as television static\n // rather than as one thing becoming another. The ramp makes it a\n // wipe; the grain keeps the edge from looking like a ruler.\n float grain = fract(sin(dot(floor(p / 3.0), vec2(12.9898, 78.233))) * 43758.5453);\n float ramp = clamp(un.y, 0.0, 1.0);\n float d = ramp * 0.82 + grain * 0.18;\n return nodBlend(o, n, ").concat(l?"smoothstep(".concat(i(l[0]),", ").concat(i(l[1]),", u_t)"):"u_t",", d);\n}"):"","\nvoid main() {\n vec2 fc = ").concat(F,";\n vec2 frag = vec2(fc.x, u_res.y - fc.y);\n").concat(d,"\n").concat(k,"\n vec2 warped = frag;\n").concat(S,"\n vec2 center = warped;\n float edge = 0.0;\n").concat(O,"\n vec2 sampleP = warped;\n vec2 chroma = vec2(0.0);\n").concat(j).concat(n?"\n vec2 q = clamp(sampleP / u_res, 0.0, 1.0) * 255.0;\n vec2 hi = floor(q);\n vec2 lo = floor(fract(q) * 255.0);\n gl_FragColor = vec4(hi.x, lo.x, hi.y, lo.y) / 255.0;\n}":"\n".concat(r?"\n // uv stays defined, as the NEW box's, for ops that reference it.\n vec2 uv = nodBoxUV(u_boxNew, sampleP);\n vec4 tex = nodSampleAt(sampleP);":"\n vec2 uv = vec2(sampleP.x / u_res.x, 1.0 - sampleP.y / u_res.y);\n vec4 tex = texture2D(u_tex, clamp(uv, 0.001, 0.999));","\n vec3 col = tex.rgb;").concat(I,"\n vec3 edgeCol = vec3(1.0);\n float edgeCov = 0.0;\n vec3 ovCol = vec3(0.0);\n float ovA = 0.0;\n").concat(E,"\n").concat(R,"\n // content OVER border\n float baseA = tex.a + edgeCov * (1.0 - tex.a);\n vec3 baseRGB = (col * tex.a + edgeCol * edgeCov * (1.0 - tex.a)) / max(baseA, 1e-4);\n // overlay OVER (content+border)\n float outA = ovA + baseA * (1.0 - ovA);\n vec3 outRGB = (ovCol * ovA + baseRGB * baseA * (1.0 - ovA)) / max(outA, 1e-4);\n gl_FragColor = vec4(outRGB, outA);\n}"))}var F=/\d(?:vw|vh|vmin|vmax|dvw|dvh|svw|svh|lvw|lvh)\b/i,L=["font-size","line-height","letter-spacing","word-spacing"],z=["color","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-transform","text-decoration-color","white-space","word-break"],N=["background-color","background-image","background-size","background-position","background-repeat","background-clip","border-radius","box-shadow","opacity","outline-color"],B=new Set(["none","rgba(0, 0, 0, 0)","transparent","0px","auto","1","repeat","0% 0%","border-box","0% 0% / auto repeat scroll padding-box border-box"]),W=new Map,U=null,q=/@font-face\s*{[^}]*}/gi,H=/font-family\s*:\s*(['"]?)([^;'"]+)\1/i,G=/font-weight\s*:\s*([^;]+)/i,X=/font-style\s*:\s*([^;]+)/i,V=/url\((['"]?)([^)'"]+)\1\)/gi,J=/unicode-range\s*:\s*([^;}]+)/i;function Y(t,e){if(!t)return!0;var n,r=[],o=f(t.split(","));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=/U\+([0-9a-fA-F?]+)(?:-([0-9a-fA-F]+))?/.exec(i.trim());if(a)if(-1!==a[1].indexOf("?"))r.push([parseInt(a[1].replace(/\?/g,"0"),16),parseInt(a[1].replace(/\?/g,"F"),16)]);else{var s=parseInt(a[1],16);r.push([s,a[2]?parseInt(a[2],16):s])}}}catch(t){o.e(t)}finally{o.f()}if(!r.length)return!0;var l,c=f(e);try{for(c.s();!(l=c.n()).done;)for(var u=l.value.codePointAt(0),d=0;d<r.length;d++)if(u>=r[d][0]&&u<=r[d][1])return!0}catch(t){c.e(t)}finally{c.f()}return!1}function $(t,e){var n,r=[],o=f(t.match(q)||[]);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=H.exec(i);if(a){var s=[],l=void 0;for(V.lastIndex=0;l=V.exec(i);)try{s.push(new URL(l[2],e).href)}catch(t){}s.length&&r.push({family:a[2].trim().toLowerCase(),weight:(G.exec(i)||[,"400"])[1].trim(),style:(X.exec(i)||[,"normal"])[1].trim(),range:(J.exec(i)||[,""])[1].trim(),block:i,urls:s})}}}catch(t){o.e(t)}finally{o.f()}return r}function Q(){return K.apply(this,arguments)}function K(){return(K=l(i().m(function t(){var e,n,r,o,a,s,l,u,f,d,h,p,y,m,v,b,g;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!U){t.n=1;break}return t.a(2,U);case 1:e=[],n=0,r=Array.from(document.styleSheets||[]);case 2:if(!(n<r.length)){t.n=10;break}o=r[n],a=null;try{a=o.cssRules}catch(t){a=null}if(!a){t.n=3;break}for(s=0,l=Array.from(a);s<l.length;s++)(u=l[s]).constructor&&"CSSFontFaceRule"===u.constructor.name&&e.push.apply(e,c($(u.cssText,o.href||location.href)));t.n=9;break;case 3:if(!o.href){t.n=9;break}return t.p=4,t.n=5,fetch(o.href,{mode:"cors"});case 5:if(!(f=t.v).ok){t.n=7;break}return d=e.push,h=e,p=c,y=$,t.n=6,f.text();case 6:m=t.v,v=o.href,b=y(m,v),g=p(b),d.apply.call(d,h,g);case 7:t.n=9;break;case 8:t.p=8,t.v;case 9:n++,t.n=2;break;case 10:return U=e,t.a(2,e)}},t,null,[[4,8]])}))).apply(this,arguments)}function Z(t){return tt.apply(this,arguments)}function tt(){return(tt=l(i().m(function t(e){var n,r,o,a,s,l,c,u;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!W.has(e)){t.n=1;break}return t.a(2,W.get(e));case 1:return n=null,t.p=2,t.n=3,fetch(e,{mode:"cors"});case 3:if(!(r=t.v).ok){t.n=5;break}return c=Uint8Array,t.n=4,r.arrayBuffer();case 4:for(u=t.v,o=new c(u),a="",s=0;s<o.length;s++)a+=String.fromCharCode(o[s]);l=e.endsWith(".woff2")?"font/woff2":e.endsWith(".woff")?"font/woff":"font/ttf",n="data:".concat(l,";base64,").concat(btoa(a));case 5:t.n=7;break;case 6:t.p=6,t.v,n=null;case 7:return W.set(e,n),t.a(2,n)}},t,null,[[2,6]])}))).apply(this,arguments)}function et(t){for(var e=new Map,n=0,r=[t].concat(c(t.querySelectorAll("*")));n<r.length;n++){var o=r[n],i=window.getComputedStyle(o),a=(i.fontFamily||"").split(",")[0].trim().replace(/^['"]|['"]$/g,"");if(a){var s="".concat(a.toLowerCase(),"|").concat(i.fontWeight,"|").concat(i.fontStyle);e.has(s)||e.set(s,{family:a.toLowerCase(),weight:i.fontWeight,style:i.fontStyle})}}return Array.from(e.values())}function nt(){return(nt=l(i().m(function t(e){var n,r,o,a,s,l,c,u,d,h,p,y,m,v;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,Q();case 1:n=t.v,t.n=3;break;case 2:return t.p=2,t.v,t.a(2,"");case 3:if(n.length){t.n=4;break}return t.a(2,"");case 4:if(r=et(e),o=e.textContent||"",a=n.filter(function(t){return Y(t.range,o)&&r.some(function(e){return e.family===t.family&&(t.style===e.style||"normal"===t.style)&&(t.weight===String(e.weight)||/\s/.test(t.weight))})}),a.length){t.n=5;break}return t.a(2,"");case 5:s=[],l=f(a),t.p=6,l.s();case 7:if((c=l.n()).done){t.n=18;break}u=c.value,d=null,h=f(u.urls),t.p=8,h.s();case 9:if((p=h.n()).done){t.n=12;break}return y=p.value,t.n=10,Z(y);case 10:if(!(d=t.v)){t.n=11;break}return t.a(3,12);case 11:t.n=9;break;case 12:t.n=14;break;case 13:t.p=13,m=t.v,h.e(m);case 14:return t.p=14,h.f(),t.f(14);case 15:if(d){t.n=16;break}return t.a(3,17);case 16:s.push("@font-face{font-family:'".concat(u.family,"';font-style:").concat(u.style,";")+"font-weight:".concat(u.weight,";src:url(").concat(d,");}"));case 17:t.n=7;break;case 18:t.n=20;break;case 19:t.p=19,v=t.v,l.e(v);case 20:return t.p=20,l.f(),t.f(20);case 21:return t.a(2,s.join(""))}},t,null,[[8,13,14,15],[6,19,20,21],[0,2]])}))).apply(this,arguments)}var rt={coarse:"(pointer: coarse)",fine:"(pointer: fine)",hover:"(hover: hover)","no-hover":"(hover: none)","reduced-motion":"(prefers-reduced-motion: reduce)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)"};function ot(t){if("function"==typeof t)try{return!!t()}catch(t){return!1}if("boolean"==typeof t)return t;if("string"!=typeof t||""===t)return!1;var e=rt[t]||t;if("undefined"==typeof window||"function"!=typeof window.matchMedia)return!1;try{return window.matchMedia(e).matches}catch(t){return!1}}function it(t,e){if(!Array.isArray(t))return[];if((e||0)>8)return[];var n,r=[],o=f(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i&&"switch"===i.op){var a,s=f(it((ot(i.when)?i.use:i.else)||[],(e||0)+1));try{for(s.s();!(a=s.n()).done;){var l=a.value;r.push(l)}}catch(t){s.e(t)}finally{s.f()}}else r.push(i)}}catch(t){o.e(t)}finally{o.f()}return r}var at=new Set(["IMG","VIDEO","CANVAS","IFRAME","INPUT","EMBED","OBJECT","TEXTAREA","SELECT","BR","HR","AREA","SOURCE","TRACK","WBR"]),st=["objectFit","objectPosition","borderRadius","imageRendering","filter"],lt=new Set;function ct(){return c(lt)}var ut=["op","masked","live"],ft=!1;function dt(t,e,n){var r=e,o=n&&n.transition||null;if(!t||"undefined"==typeof document||"undefined"==typeof window)return null;if(!(e&&0!==e.length||o))return null;if(e||(e=[]),e.some(function(t){return t&&"switch"===t.op})&&0===(e=it(e,0)).length&&!o)return null;var i=[],a=I(e,i);if(e=i,"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return null;if(at.has(t.tagName)){var s=t.parentElement&&t.parentElement.hasAttribute&&t.parentElement.hasAttribute("data-nodality-raster-host")?t.parentElement:null;if(t=s||function(t){if(!t.parentNode)return null;var e,n={},r=f(st);try{for(r.s();!(e=r.n()).done;){var o=e.value;t.style[o]&&(n[o]=t.style[o])}}catch(t){r.e(t)}finally{r.f()}var i=document.createElement("div");return i.setAttribute("data-nodality-raster-host",t.tagName.toLowerCase()),i.style.cssText=t.style.cssText,t.parentNode.insertBefore(i,t),i.appendChild(t),t.removeAttribute("style"),Object.assign(t.style,n),t.style.display="block",t.style.width="100%",t.style.height="100%","static"===("function"==typeof getComputedStyle?getComputedStyle(i).position:"static")&&(i.style.position="relative"),i.style.width||(i.style.width="100%"),i.style.height||(i.style.height="100%"),i}(t),!t)return null}if(t.querySelector&&t.querySelector(":scope > canvas[data-nodality-raster]"))return null;var l=function(){var e=t.getBoundingClientRect();return{width:e.width>=2?e.width:t.scrollWidth||0,height:e.height>=2?e.height:t.scrollHeight||0}},h=l();if(h.width<2||h.height<2)return null;var p=Math.max(1,Math.min(n&&n.resolution?n.resolution:window.devicePixelRatio||1,3)),b=e.some(function(t){return(v[t.op]||{}).overlay}),g=e.length>0&&!o&&e.every(function(t){return(v[t.op]||{}).overlay}),w=!(!o||!0!==o.live),O=!g&&(!o||w)&&!e.some(function(t){return!1===t.live}),_=j("undefined"!=typeof WebGL2RenderingContext&&WebGL2RenderingContext.prototype)||j("undefined"!=typeof WebGLRenderingContext&&WebGLRenderingContext.prototype),C=O&&null!==_;O&&!C&&console.info("[nodality] HTML-in-Canvas API not available - raster ops fall back to snapshot capture.");var P=document.createElement("canvas");C&&function(t,e){"sub-image"===e?t.setAttribute("content","drawable"):t.setAttribute("layoutsubtree","")}(P,_);var R={alpha:!0,premultipliedAlpha:!1},M=P.getContext("webgl2",R)||P.getContext("webgl",R);if(!M)return null;var W="undefined"!=typeof WebGL2RenderingContext&&M instanceof WebGL2RenderingContext,U=W&&e.some(function(t){return(v[t.op]||{}).mips}),q=C?j(M):null;C&&q!==_&&(console.info("[nodality] HTML-in-Canvas upload missing on the created context ("+q+" vs "+_+") - snapshot fallback."),E(P),C=!1),"static"===window.getComputedStyle(t).position&&(t.style.position="relative"),P.width=Math.round(h.width*p),P.height=Math.round(h.height*p),P.setAttribute("data-nodality-raster",C?"live":"snapshot"),C&&P.setAttribute("data-nodality-raster-api",q),console.info("[nodality] raster backend:",C?"html-in-canvas (live, "+q+")":"snapshot");var H={width:h.width,height:h.height},G=t;if(C){var X=document.createElement("div"),V=getComputedStyle(t),J="flex"===V.display||"inline-flex"===V.display,Y="grid"===V.display||"inline-grid"===V.display,$=function(t){return parseFloat(t)||0},Q=$(V.paddingLeft)+$(V.paddingRight),K=$(V.paddingTop)+$(V.paddingBottom);for(H.width=Math.max(2,h.width-Q),H.height=Math.max(2,h.height-K),X.style.cssText="display:".concat(J||Y?V.display:"block",";")+"width:".concat(H.width,"px;height:").concat(H.height,"px;"),Y&&(X.style.gridTemplateColumns=V.gridTemplateColumns,X.style.gridTemplateRows=V.gridTemplateRows,X.style.gridTemplateAreas=V.gridTemplateAreas,X.style.gap=V.gap,X.style.alignItems=V.alignItems,X.style.justifyItems=V.justifyItems),J&&(X.style.flexDirection=V.flexDirection,X.style.alignItems=V.alignItems,X.style.justifyContent=V.justifyContent,X.style.gap=V.gap),"sub-image"===q&&X.setAttribute("drawable","");t.firstChild;)X.appendChild(t.firstChild);P.appendChild(X),G=X,P.style.cssText="display:block;width:".concat(H.width,"px;height:").concat(H.height,"px;")}else if(P.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(h.width,"px;height:").concat(h.height,"px;")+"pointer-events:none;z-index:2147483000;",g)P.setAttribute("aria-hidden","true");else{P.setAttribute("role","img");var Z=(t.textContent||"").replace(/\s+/g," ").trim();Z&&P.setAttribute("aria-label",Z.slice(0,300))}t.appendChild(P);var tt=function(t,e){var n=M.createShader(t);if(M.shaderSource(n,e),M.compileShader(n),!M.getShaderParameter(n,M.COMPILE_STATUS))throw new Error("[nodality] raster shader: "+M.getShaderInfoLog(n));return n},et=M.createProgram();M.attachShader(et,tt(M.VERTEX_SHADER,T)),M.attachShader(et,tt(M.FRAGMENT_SHADER,D(a,e,!1,o))),M.bindAttribLocation(et,0,"a"),M.linkProgram(et),M.useProgram(et),M.bindBuffer(M.ARRAY_BUFFER,M.createBuffer()),M.bufferData(M.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),M.STATIC_DRAW),M.enableVertexAttribArray(0),M.vertexAttribPointer(0,2,M.FLOAT,!1,0,0);var rt=function(t){return M.getUniformLocation(et,t)},ot=function(t,e,n){"1f"===e?M.uniform1f(t,n):"1i"===e?M.uniform1i(t,n):"2fv"===e?M.uniform2fv(t,n):"3fv"===e&&M.uniform3fv(t,n)},ct=0,ht=e.map(function(t,e){return{node:t,i:e}}).filter(function(t){return function(t){for(var e in t)if(x(t.op,e,t[e]))return!0;return!1}(t.node)}),pt=function(t,n){e.forEach(function(e,r){if(!n||n.has(r)){var o=v[e.op];if(o&&o.uniforms){var i=o.uniforms(function(t,e){var n=null,r=t.window||t.ease?function(t,e){var n=Math.min(1,Math.max(0,e)),r=t.window;Array.isArray(r)&&2===r.length&&r[1]!==r[0]&&(n=Math.min(1,Math.max(0,(n-r[0])/(r[1]-r[0]))));var o=t.ease&&S[t.ease];return o?o(n):n}(t,e):e;for(var o in t)x(t.op,o,t[o])&&((n=n||Object.assign({},t))[o]=k(t[o],r));return n||t}(e,ct),p);for(var a in i)ot(t("u".concat(r,"_").concat(a)),i[a][0],i[a][1])}}})};pt(rt);var yt=new Set(ht.map(function(t){return t.i})),mt=[];e.forEach(function(t,e){var n=v[t.op];n&&"function"==typeof n.init&&mt.push({i:e,def:n,state:n.init(t,p,P.width,P.height)})});var vt="undefined"!=typeof performance?performance.now():0,bt=[];e.forEach(function(t,e){var n=v[t.op];if(n&&n.solver){var r=function(t,e){var n=v[t.op];if(!W||!M.getExtension("EXT_color_buffer_float"))return console.info("[nodality] '"+t.op+"' needs WebGL2 float render targets - op skipped."),null;M.getExtension("OES_texture_float_linear");var r=n.solver.resolutions(t,P.width,P.height),o={r:[M.R16F,M.RED],rg:[M.RG16F,M.RG],rgba:[M.RGBA16F,M.RGBA]},i=[],a=function(t,e,n,r){var a=d(o[n],2),s=a[0],l=a[1],c=M.createTexture();M.bindTexture(M.TEXTURE_2D,c);var u=r?M.LINEAR:M.NEAREST;M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,u),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,u),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE),M.texImage2D(M.TEXTURE_2D,0,s,t,e,0,l,M.HALF_FLOAT,null);var f=M.createFramebuffer();M.bindFramebuffer(M.FRAMEBUFFER,f),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,c,0);var h=M.checkFramebufferStatus(M.FRAMEBUFFER)===M.FRAMEBUFFER_COMPLETE;M.viewport(0,0,t,e),M.clearColor(0,0,0,1),M.clear(M.COLOR_BUFFER_BIT);var p={tex:c,fbo:f,w:t,h:e,ok:h};return i.push(p),p},s={},l=!0;for(var c in n.solver.targets){var u=n.solver.targets[c],f=r[u.res],h=d(Array.isArray(f)?f:[f,f],2),p=h[0],y=h[1];u.double?(s[c]={a:a(p,y,u.fmt,u.smooth),b:a(p,y,u.fmt,u.smooth)},l=l&&s[c].a.ok&&s[c].b.ok):(s[c]={a:a(p,y,u.fmt,u.smooth)},l=l&&s[c].a.ok)}M.bindFramebuffer(M.FRAMEBUFFER,null);var m=function(){return i.forEach(function(t){M.deleteFramebuffer(t.fbo),M.deleteTexture(t.tex)})};if(!l)return console.info("[nodality] '"+t.op+"' float targets incomplete - op skipped."),m(),null;var b={};try{for(var g in n.solver.programs){var w=M.createProgram();if(M.attachShader(w,tt(M.VERTEX_SHADER,T)),M.attachShader(w,tt(M.FRAGMENT_SHADER,n.solver.programs[g])),M.bindAttribLocation(w,0,"a"),M.linkProgram(w),!M.getProgramParameter(w,M.LINK_STATUS))throw new Error(g+": "+M.getProgramInfoLog(w));b[g]={prog:w,loc:{}}}}catch(e){for(var x in console.warn("[nodality] '"+t.op+"' solver programs failed:",e),m(),b)M.deleteProgram(b[x].prog);return null}return M.useProgram(et),{i:e,node:t,def:n,res:r,targets:s,progs:b,cleanup:m,prevX:.5,prevY:.5,primed:!1}}(t,e);r&&bt.push(r)}});var gt=function(t,e){var n=null,r={res:t.res,use:function(e){n=t.progs[e],M.useProgram(n.prog)},u:function(t){return t in n.loc||(n.loc[t]=M.getUniformLocation(n.prog,t)),n.loc[t]},f1:function(t,e){M.uniform1f(r.u(t),e)},f2:function(t,e,n){M.uniform2f(r.u(t),e,n)},f3:function(t,e,n,o){M.uniform3f(r.u(t),e,n,o)},smp:function(t,e,n){M.activeTexture(M.TEXTURE0+n),M.bindTexture(M.TEXTURE_2D,e.tex),M.uniform1i(r.u(t),n)},read:function(e){return t.targets[e].a},write:function(e){return t.targets[e].b},single:function(e){return t.targets[e].a},content:{tex:wt},canvasW:P.width,canvasH:P.height,swap:function(e){var n=t.targets[e],r=n.a;n.a=n.b,n.b=r},blit:function(t){M.bindFramebuffer(M.FRAMEBUFFER,t.fbo),M.viewport(0,0,t.w,t.h),M.drawArrays(M.TRIANGLES,0,3)}},o=Bt[0]/P.width,i=1-Bt[1]/P.height,a=0,s=0;t.primed&&Wt&&(a=(o-t.prevX)/Math.max(e,.001),s=(i-t.prevY)/Math.max(e,.001)),t.prevX=o,t.prevY=i,t.primed=!0;var l=Wt&&Math.abs(a)+Math.abs(s)>.001;t.def.solver.step(r,t.node,{dt:e,px:o,py:i,dx:a,dy:s,moving:l,aspect:P.width/Math.max(P.height,1),col:t.def.solver.splatColor(t.node,a,s)})},wt=M.createTexture();M.bindTexture(M.TEXTURE_2D,wt),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,U?M.LINEAR_MIPMAP_LINEAR:M.LINEAR),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE),M.pixelStorei(M.UNPACK_FLIP_Y_WEBGL,!0);var xt=function(){U&&M.generateMipmap(M.TEXTURE_2D)},kt=!1,St=null,Ot=null;if(o&&o.oldImage){St=M.createTexture(),M.bindTexture(M.TEXTURE_2D,St),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,M.LINEAR),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,M.LINEAR),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE);try{M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,o.oldImage)}catch(t){console.warn("[nodality] transition: old capture upload failed:",t),M.deleteTexture(St),St=null}}if(o&&o.newImage){Ot=M.createTexture(),M.bindTexture(M.TEXTURE_2D,Ot),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,M.LINEAR),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,M.LINEAR),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE);try{M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,o.newImage)}catch(t){console.warn("[nodality] transition: new capture upload failed:",t),M.deleteTexture(Ot),Ot=null}}var jt=!1,Et=C?"live":"snapshot",Tt=!1,_t={color:"transparent","-webkit-text-fill-color":"transparent","-webkit-text-stroke-color":"transparent","background-color":"transparent","background-image":"none","border-color":"transparent","box-shadow":"none","text-shadow":"none"},Ct=null,At=function(){if(!Ct){!function(){if(!ft&&"undefined"!=typeof document){ft=!0;var t=document.createElement("style");t.setAttribute("data-nodality","selection"),t.textContent="[data-nodality-ink]::selection,[data-nodality-ink] *::selection{color:var(--nod-ink);-webkit-text-fill-color:var(--nod-ink)}[data-nodality-ink]::-moz-selection,[data-nodality-ink] *::-moz-selection{color:var(--nod-ink);-webkit-text-fill-color:var(--nod-ink)}",(document.head||document.documentElement).appendChild(t)}}(),Ct=[],t.setAttribute("data-nodality-ink","");for(var e=[t].concat(c(t.querySelectorAll("*"))).filter(function(t){return t!==P&&"CANVAS"!==t.tagName}),n=e.map(function(t){return getComputedStyle(t).color}),r=0;r<e.length;r++){var o=e[r],i={op:o.style.getPropertyValue("opacity"),ink:o.style.getPropertyValue("--nod-ink")};for(var a in _t)i[a]=o.style.getPropertyValue(a);for(var s in Ct.push([o,i]),o.style.setProperty("--nod-ink",n[r]),_t)o.style.setProperty(s,_t[s],"important");o!==t&&o.matches&&o.matches("img,svg,video,picture,iframe")&&o.style.setProperty("opacity","0","important")}t.style.isolation="isolate",P.style.zIndex="-1"}},Pt=function(){if(t.style.visibility="",t.removeAttribute("data-nodality-ink"),Ct){var e,n=f(Ct);try{for(n.s();!(e=n.n()).done;){var r=d(e.value,2),o=r[0],i=r[1];for(var a in _t)i[a]?o.style.setProperty(a,i[a]):o.style.removeProperty(a);i.op?o.style.setProperty("opacity",i.op):o.style.removeProperty("opacity"),i.ink?o.style.setProperty("--nod-ink",i.ink):o.style.removeProperty("--nod-ink")}}catch(t){n.e(t)}finally{n.f()}Ct=null,t.style.isolation="",P.style.zIndex=""}},Rt=function(){if(!o)return!1;var e=ct>=1,n=G!==t,r=o.standDownAtStart&&ct<=0,i=e&&!n||r?"hidden":"visible";return P.style.visibility!==i&&(P.style.visibility=i),e||r?Ct&&Pt():Ct||At(),!0},It=function(){if(b){var e=function(){var e="IMG"===t.tagName?t:t.querySelector?t.querySelector("img"):null;return e&&e.complete&&e.naturalWidth>0?e:null}();if(e)try{return M.bindTexture(M.TEXTURE_2D,wt),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,e),xt(),kt=!0,Promise.resolve()}catch(t){}else if(!Tt){var n="IMG"===t.tagName?t:t.querySelector&&t.querySelector("img");n&&(Tt=!0,n.addEventListener("load",function(){jt||It()},{once:!0}))}}P.style.display="none",Pt();var r=function(t,e,n,r){var o=function(t){if(!t)return null;var e=null;if("IMG"===t.tagName)e=t;else if(t.children){var n=Array.prototype.filter.call(t.children,function(t){return!t.hasAttribute||!t.hasAttribute("data-nodality-raster")});1===n.length&&"IMG"===n[0].tagName&&(e=n[0])}if(!e||!e.complete||!e.naturalWidth)return null;try{if(new URL(e.currentSrc||e.src,location.href).origin!==location.origin)return null}catch(t){return null}return e}(t);return o?Promise.resolve(function(t,e,n,r){var o=Math.max(1,Math.round(e*r)),i=Math.max(1,Math.round(n*r)),a=t.naturalWidth,s=t.naturalHeight;if(!a||!s)return t;var l="fill",c="50% 50%";if("function"==typeof getComputedStyle){var u=getComputedStyle(t);l=u.objectFit||"fill",c=u.objectPosition||"50% 50%"}if("fill"===l)return t;var f=o/a,d=i/s,h="cover"===l?Math.max(f,d):"contain"===l?Math.min(f,d):"none"===l?1:"scale-down"===l?Math.min(1,Math.min(f,d)):Math.max(f,d),p=a*h,y=s*h,m=String(c).trim().split(/\s+/),v=function(t,e){if(null==t)return.5;if(t.endsWith("%"))return parseFloat(t)/100;if("left"===t||"top"===t)return 0;if("right"===t||"bottom"===t)return 1;if("center"===t)return.5;var n=parseFloat(t);return isNaN(n)?.5:n/(0===e?Math.max(o-p,1):Math.max(i-y,1))},b=v(m[0],0),g=v(m.length>1?m[1]:m[0],1),w=document.createElement("canvas");w.width=o,w.height=i;var x=w.getContext("2d");return x?(x.drawImage(t,(o-p)*b,(i-y)*g,p,y),w):t}(o,e,n,r)):function(t){return nt.apply(this,arguments)}(t).catch(function(){return""}).then(function(o){return new Promise(function(i,a){var s=(new XMLSerializer).serializeToString(function(t,e){for(var n=[t].concat(c(t.querySelectorAll("*"))),r=[e].concat(c(e.querySelectorAll("*"))),o=0;o<n.length&&o<r.length;o++){var i=r[o].style;if(i){var a=null;if(i.length>0)for(var s=0,l=Array.from(i);s<l.length;s++){var u=l[s];if(F.test(i.getPropertyValue(u))){var d=(a=a||window.getComputedStyle(n[o])).getPropertyValue(u);d&&i.setProperty(u,d,i.getPropertyPriority(u))}}var h,p=f(L);try{for(p.s();!(h=p.n()).done;){var y=h.value,m=(a=a||window.getComputedStyle(n[o])).getPropertyValue(y);m&&"normal"!==m&&i.setProperty(y,m)}}catch(t){p.e(t)}finally{p.f()}var v,b=window.getComputedStyle(n[o]),g=n[o].parentElement,w=0!==o&&g?window.getComputedStyle(g):null,x=f(z);try{for(x.s();!(v=x.n()).done;){var k=v.value,S=b.getPropertyValue(k);S&&(w&&w.getPropertyValue(k)===S||i.getPropertyValue(k)||i.setProperty(k,S))}}catch(t){x.e(t)}finally{x.f()}var O,j=f(N);try{for(j.s();!(O=j.n()).done;){var E=O.value;if(!i.getPropertyValue(E)){var T=b.getPropertyValue(E);T&&!B.has(T)&&i.setProperty(E,T)}}}catch(t){j.e(t)}finally{j.f()}}}return e}(t,t.cloneNode(!0))),l='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(n,'" viewBox="0 0 ').concat(e," ").concat(n,'">')+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+(o?"<style>".concat(o,"</style>"):"")+"".concat(s,"</div>")+"</foreignObject></svg>",u=document.createElement("img");u.onload=function(){var t=document.createElement("canvas");t.width=Math.max(1,Math.round(e*r)),t.height=Math.max(1,Math.round(n*r));var o=t.getContext("2d");o?(o.drawImage(u,0,0,t.width,t.height),i(t)):i(u)},u.onerror=a,u.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(l)})})}(t,h.width,h.height,p).then(function(t){jt||(M.bindTexture(M.TEXTURE_2D,wt),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,t),xt(),kt=!0,Rt()||(g||At(),P.style.visibility="visible"))}).catch(function(t){Pt(),console.warn("[nodality] raster snapshot failed:",t)});return P.style.display="",r},Mt="",Dt=-1,Ft=function(){if(!jt&&"live"===Et){if(M.bindTexture(M.TEXTURE_2D,wt),"sub-image"===q){try{!function(){var t=P.width+"x"+P.height;if(t!==Mt){var e=P.width,n=P.height;if("function"==typeof P.captureElementImage){var r=P.captureElementImage(G);try{e=Math.ceil(r.width),n=Math.ceil(r.height)}finally{r&&"function"==typeof r.close&&r.close()}}M.texImage2D(M.TEXTURE_2D,0,W?M.RGBA8||32856:M.RGBA,Math.max(1,e),Math.max(1,n),0,M.RGBA,M.UNSIGNED_BYTE,null),Mt=t}}(),M.texElementSubImage2D(M.TEXTURE_2D,0,0,0,G)}catch(t){return Mt="",void Lt("texElementSubImage2D failed: "+(t&&t.name?t.name:"?")+": "+(t&&t.message?t.message:t))}return xt(),void(kt=!0)}var t,e=M.RGBA8||32856,n=[[M.TEXTURE_2D,e,G],[M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,G],[M.TEXTURE_2D,0,e,G],[M.TEXTURE_2D,0,G]];if(Dt>=0)t=[Dt];else{t=[0,1,2,3];var r={3:0,6:1,4:2}[M.texElementImage2D.length];null!=r&&(t.splice(t.indexOf(r),1),t.unshift(r))}var o,i=[],a=f(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;try{return M.texElementImage2D.apply(M,n[s]),xt(),Dt<0&&(Dt=s,console.info("[nodality] texElementImage2D signature discovered: form",s,"(declared arity "+M.texElementImage2D.length+")")),void(kt=!0)}catch(t){i.push("form"+s+" -> "+(t&&t.name?t.name:"?")+": "+(t&&t.message?t.message:t))}}}catch(t){a.e(t)}finally{a.f()}Lt("texElementImage2D rejected all known signatures (arity "+M.texElementImage2D.length+"): "+i.join(" | "))}},Lt=function(e){if(!jt&&"live"===Et){for(Et="snapshot",console.warn("[nodality] live raster backend failed ("+e+") - falling back to snapshot."),P.removeEventListener("paint",Ft);G.firstChild;)t.appendChild(G.firstChild);G.parentNode===P&&P.removeChild(G),E(P),P.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(h.width,"px;height:").concat(h.height,"px;")+"pointer-events:none;z-index:2147483000;",P.setAttribute("aria-hidden","true"),P.setAttribute("data-nodality-raster","snapshot-fallback"),It()}};if(C){P.addEventListener("paint",Ft);var zt=function(){return setTimeout(function(){jt||"live"!==Et||kt||Lt("no paint event within 1500ms")},1500)};if("undefined"!=typeof document&&"hidden"===document.visibilityState){var Nt=function(){"hidden"!==document.visibilityState&&(document.removeEventListener("visibilitychange",Nt),jt||zt())};document.addEventListener("visibilitychange",Nt)}else zt()}var Bt=[.5*P.width,.5*P.height],Wt=!1,Ut=function(t){var e=P.getBoundingClientRect(),n=t.touches?t.touches[0]:t,r=[(n.clientX-e.left)*p,(n.clientY-e.top)*p];r[0]===Bt[0]&&r[1]===Bt[1]||(Wt=!0),Bt=r};t.addEventListener("mousemove",Ut,{passive:!0}),t.addEventListener("touchmove",Ut,{passive:!0});var qt=0,Ht=0,Gt=function(){qt=1},Xt=function(){qt=0};t.addEventListener("mouseenter",Gt,{passive:!0}),t.addEventListener("mouseleave",Xt,{passive:!0});var Vt=[];e.forEach(function(t,e){var n=v[t.op]||{},r=t.by||n.defaultDriver;r&&y[r]?Vt.push({i:e,fn:y[r]}):t.by&&console.warn("[nodality] unknown driver '"+t.by+"' on op '"+t.op+"' - known drivers: "+m.join(", "))});var Jt=function(){if("undefined"==typeof window)return.5;var e=t.getBoundingClientRect(),n=window.innerHeight||1;return Math.max(0,Math.min(1,(n-e.top)/(n+e.height)))},Yt=0,$t=null,Qt=function(t,e){M.uniform2f(t("u_res"),e.res[0],e.res[1]),M.uniform2f(t("u_mouse"),e.mouse[0],e.mouse[1]),M.uniform1f(t("u_time"),e.time),M.uniform1f(t("u_t"),e.t);var n,r=f(e.drivers);try{for(r.s();!(n=r.n()).done;){var i=n.value;M.uniform2f(t("u".concat(i.i,"_dpos")),i.x,i.y),M.uniform1f(t("u".concat(i.i,"_damt")),i.amt)}}catch(t){r.e(t)}finally{r.f()}var a,s=f(e.dyn);try{for(s.s();!(a=s.n()).done;){var l,c=a.value,u=f(c.ups);try{for(u.s();!(l=u.n()).done;){var d=l.value;ot(t("u".concat(c.i,"_").concat(d.name)),d.kind,d.value)}}catch(t){u.e(t)}finally{u.f()}}}catch(t){s.e(t)}finally{s.f()}M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,wt),M.uniform1i(t("u_tex"),0);var h=1;if(o&&St){M.activeTexture(M.TEXTURE0+h),M.bindTexture(M.TEXTURE_2D,St),M.uniform1i(t("u_old"),h),h++;var y=e.t,m=function(t,e){return[(t.x+(e.x-t.x)*y)*p,(t.y+(e.y-t.y)*y)*p,(t.w+(e.w-t.w)*y)*p,(t.h+(e.h-t.h)*y)*p]},v=m(o.oldRect,o.oldTo||o.newRect),b=m(o.newFrom||o.oldRect,o.newRect);M.uniform4f(t("u_boxOld"),v[0],v[1],v[2],v[3]),M.uniform4f(t("u_boxNew"),b[0],b[1],b[2],b[3]),Ot&&(M.activeTexture(M.TEXTURE0+h),M.bindTexture(M.TEXTURE_2D,Ot),M.uniform1i(t("u_newimg"),h),h++)}for(var g=0,w=bt;g<w.length;g++){var x=w[g],k=x.def.solver.samplers;for(var S in k)M.activeTexture(M.TEXTURE0+h),M.bindTexture(M.TEXTURE_2D,x.targets[k[S]].a.tex),M.uniform1i(t("u".concat(x.i,"_").concat(S)),h),h++}M.activeTexture(M.TEXTURE0)},Kt=null,Zt=["warp","cell","displace"],te=function(t,n,r){if(jt||!$t||!kt)return null;var i=P.getBoundingClientRect();if(i.width&&i.height&&(!r||!r.gpu)){var s=P.width/i.width,l=P.height/i.height,c=(t-i.left)*s,u=(n-i.top)*l;if(c>=0&&u>=0&&c<P.width&&u<P.height){var d=Math.floor(c),h=Math.floor(P.height-u),y=function(t,n){if(!$t)return null;var r,o={},i=f($t.drivers);try{for(i.s();!(r=i.n()).done;){var a=r.value;o[a.i]=a}}catch(t){i.e(t)}finally{i.f()}for(var s=[t,n],l=0,c=Zt;l<c.length;l++)for(var u=c[l],d=0;d<e.length;d++){var h=e[d],y=v[h.op];if(y&&(Array.isArray(y.stage)?y.stage:[y.stage]).includes(u)){if(A(h))return null;if("function"!=typeof y.map){if(!1===y.movesCoords)continue;return null}var m=o[d],b=y.map(s,h,{res:$t.res,dpr:p,dpos:m?[m.x,m.y]:[$t.res[0]/2,$t.res[1]/2],damt:m?m.amt:1,time:$t.time,mouse:$t.mouse});if(!b)return null;s=b}}return s}(d+.5,P.height-h-.5);if(y)return{x:i.left+Math.min(Math.max(y[0],0),P.width)/s,y:i.top+Math.min(Math.max(y[1],0),P.height)/l}}}var m=function(){if(Kt)return Kt;var t=M.createProgram();if(M.attachShader(t,tt(M.VERTEX_SHADER,T)),M.attachShader(t,tt(M.FRAGMENT_SHADER,D(a,e,!0,o))),M.bindAttribLocation(t,0,"a"),M.linkProgram(t),!M.getProgramParameter(t,M.LINK_STATUS))return console.warn("[nodality] probe program failed:",M.getProgramInfoLog(t)),M.deleteProgram(t),Kt={broken:!0};var n=M.createTexture();M.bindTexture(M.TEXTURE_2D,n),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,1,1,0,M.RGBA,M.UNSIGNED_BYTE,null),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,M.NEAREST),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,M.NEAREST),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE);var r=M.createFramebuffer();M.bindFramebuffer(M.FRAMEBUFFER,r),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,n,0);var i=M.checkFramebufferStatus(M.FRAMEBUFFER);if(M.bindFramebuffer(M.FRAMEBUFFER,null),i!==M.FRAMEBUFFER_COMPLETE)return console.warn("[nodality] probe framebuffer incomplete:",i),M.deleteProgram(t),M.deleteFramebuffer(r),M.deleteTexture(n),Kt={broken:!0};var s={},l=function(e){return e in s?s[e]:s[e]=M.getUniformLocation(t,e)};return M.useProgram(t),pt(l),M.useProgram(et),Kt={prog:t,fbo:r,tex:n,px:new Uint8Array(4),U:l}}();if(m.broken)return null;var b=P.getBoundingClientRect();if(!b.width||!b.height)return null;var g=P.width/b.width,w=P.height/b.height,x=(t-b.left)*g,k=(n-b.top)*w;if(x<0||k<0||x>=P.width||k>=P.height)return null;var S=Math.floor(x),O=Math.floor(P.height-k);M.bindFramebuffer(M.FRAMEBUFFER,m.fbo),M.useProgram(m.prog),M.viewport(0,0,1,1),M.uniform2f(m.U("u_probe"),S,O),Qt(m.U,$t),M.drawArrays(M.TRIANGLES,0,3),M.readPixels(0,0,1,1,M.RGBA,M.UNSIGNED_BYTE,m.px),M.bindFramebuffer(M.FRAMEBUFFER,null),M.useProgram(et),M.viewport(0,0,P.width,P.height);var j=m.px,E=(j[0]+j[1]/255)/255,_=(j[2]+j[3]/255)/255;return{x:b.left+E*P.width/g,y:b.top+_*P.height/w}},ee="__nodalityRetargeted",ne=!e.some(function(t){return!1===t.interactive}),re="data-nodality-hover",oe=e.some(function(t){return!0===t.hoverAttr}),ie=[],ae=function(e){for(var n=[],r=e;r&&r!==t.parentNode;r=r.parentElement)n.push(r);for(var o=new Set(n),i=0,a=ie;i<a.length;i++){var s=a[i];o.has(s)||s.removeAttribute(re)}for(var l=0,c=n;l<c.length;l++){var u=c[l];u.hasAttribute(re)||u.setAttribute(re,"")}ie=n},se=0,le=function(e){if(ne&&!jt&&!e[ee]){if("pointermove"===e.type||"mousemove"===e.type){var n="undefined"!=typeof performance?performance.now():0;if(n-se<12)return;se=n}var r=te(e.clientX,e.clientY);if(r){var o=G!==t;if(!(!o&&Math.abs(r.x-e.clientX)<.5&&Math.abs(r.y-e.clientY)<.5)){var i=o?function(t,e){var n=null,r=function(o){var i,a=f(o.children);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=s.getBoundingClientRect();l.width&&l.height&&(t<l.left||t>l.right||e<l.top||e>l.bottom||(n=s,r(s)))}}catch(t){a.e(t)}finally{a.f()}};return r(G),n}(r.x,r.y):"function"==typeof document.elementFromPoint?document.elementFromPoint(r.x,r.y):null;if(i&&i!==e.target&&t.contains(i)){if(oe&&ae(i),"pointerdown"===e.type||"mousedown"===e.type||"click"===e.type){var a=i.closest&&i.closest("a, button, input, select, textarea, [tabindex]");a&&"function"==typeof a.focus&&a.focus({preventScroll:!0})}e.stopPropagation(),e.cancelable&&e.preventDefault(),i.dispatchEvent(function(t,e,n){var r=new("undefined"!=typeof PointerEvent&&t instanceof PointerEvent?PointerEvent:MouseEvent)(t.type,{bubbles:!0,cancelable:t.cancelable,composed:!0,view:t.view||("undefined"!=typeof window?window:null),detail:t.detail,clientX:e,clientY:n,screenX:t.screenX+(e-t.clientX),screenY:t.screenY+(n-t.clientY),ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget,pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,pressure:t.pressure});return r[ee]=!0,r}(e,r.x,r.y))}}}}},ce=["pointerdown","pointerup","pointermove","click","dblclick","contextmenu","mousedown","mouseup"],ue=function(){oe&&ae(null)};if(ne){var fe,de=f(ce);try{for(de.s();!(fe=de.n()).done;){var he=fe.value;t.addEventListener(he,le,!0)}}catch(t){de.e(t)}finally{de.f()}t.addEventListener("pointerleave",ue,!0)}var pe=!0,ye=function(){if(!jt){if(Rt(),pe&&kt){for(var t="undefined"!=typeof performance?performance.now():vt+16,e=Math.max(0,(t-vt)/1e3),n=0,r=bt;n<r.length;n++){var o=r[n];gt(o,e)}Wt=!1,M.bindFramebuffer(M.FRAMEBUFFER,null),M.useProgram(et),M.viewport(0,0,P.width,P.height),M.clearColor(0,0,0,0),M.clear(M.COLOR_BUFFER_BIT);var i={res:[P.width,P.height],mouse:[Bt[0],Bt[1]],time:t/1e3,t:ct,drivers:[],dyn:[]};if(Vt.length>0){Ht+=(qt-Ht)*(1-Math.exp(8*-e));for(var a={mouseX:Bt[0],mouseY:Bt[1],w:P.width,h:P.height,t:t/1e3,hover:Ht,scroll:Jt()},s=0,l=Vt;s<l.length;s++){var c=l[s],u=c.fn(a);i.drivers.push({i:c.i,x:u.x,y:u.y,amt:u.amt})}}if(mt.length>0)for(var f={w:P.width,h:P.height,mouseX:Bt[0],mouseY:Bt[1],dt:e,t:t/1e3},d=0,h=mt;d<h.length;d++){var p=h[d];i.dyn.push({i:p.i,ups:p.def.tick(p.state,f)})}$t=i,Qt(rt,i),vt=t,M.drawArrays(M.TRIANGLES,0,3)}Yt=requestAnimationFrame(ye)}},me=null;"undefined"!=typeof IntersectionObserver&&(me=new IntersectionObserver(function(t){var e=d(t,1)[0];pe=e.isIntersecting})).observe(t);var ve=null,be=0,ge=function(){if(!jt){var t=l();if(!(t.width<2||t.height<2)){var e=Math.round(t.width*p),n=Math.round(t.height*p);h.width=t.width,h.height=t.height,P.style.width=t.width+"px",P.style.height=t.height+"px";var r=P.width!==e||P.height!==n;r&&(P.width=e,P.height=n),"snapshot"===Et?It():r&&Ft()}}};"undefined"!=typeof ResizeObserver&&(ve=new ResizeObserver(function(){"live"!==Et&&(function(){if(!jt){var t=l();t.width<2||t.height<2||Math.round(t.width)===Math.round(h.width)&&Math.round(t.height)===Math.round(h.height)||(h.width=t.width,h.height=t.height,P.style.width=t.width+"px",P.style.height=t.height+"px")}}(),clearTimeout(be),be=setTimeout(ge,150))})).observe(t);var we=0,xe=function(){clearTimeout(we),we=setTimeout(function(){if(!jt)if("snapshot"!==Et){var e=t.clientWidth||t.parentElement&&t.parentElement.clientWidth||h.width;P.style.width=e+"px",setTimeout(function(){if(!jt&&"live"===Et){var t=Math.max(2,Math.round(G.getBoundingClientRect().height))||h.height;h.width=e,h.height=t,P.style.height=t+"px",P.width=Math.round(e*p),P.height=Math.round(t*p),Ft()}},50)}else ge()},150)};"undefined"!=typeof window&&window.addEventListener("resize",xe),"live"===Et?Yt=requestAnimationFrame(ye):(It().then(function(){Yt=requestAnimationFrame(ye)}),"undefined"!=typeof document&&document.fonts&&"object"===u(document.fonts.ready)&&Promise.resolve(document.fonts.ready).then(ge).catch(function(){}));var ke=function(e,n,r,o,i){"function"==typeof CustomEvent&&"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("nodality:raster-param",{detail:{pipeline:Se,el:t,index:e,key:n,value:r,prev:o,how:i}}))},Se={canvas:P,nodes:e,get backend(){return Et},sourceAt:function(t,e,n){return te(t,e,n)},get progress(){return ct},setProgress:function(t){var e=Math.min(1,Math.max(0,Number(t)||0));return e===ct||(ct=e,ht.length&&(M.useProgram(et),pt(rt,yt),Kt&&!Kt.broken&&(M.useProgram(Kt.prog),pt(Kt.U,yt),M.useProgram(et))),Rt()),ct},setParam:function(t,n,r){var o=e[t];if(!o||jt)return!1;var i=o[n];if(o[n]=r,function(t,e,n,r){if(ut.includes(e))return!0;var o=v[t];if(!o)return!0;if((o.structural||[]).includes(e))return!0;if((o.structuralOnToggle||[]).includes(e))return!n!=!r;if(o.uniforms)try{if(e in o.uniforms(Object.assign({op:t},function(t,e,n){return(e=function(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)),1))return!1}catch(t){}return!0}(o.op,n,r,i))return Se.rebuild(),ke(t,n,r,i,"rebuild"),"rebuild";var a=v[o.op];if(a&&a.uniforms){var s=a.uniforms(o,p);for(var l in M.useProgram(et),s)ot(rt("u".concat(t,"_").concat(l)),s[l][0],s[l][1]);if(Kt&&!Kt.broken){for(var c in M.useProgram(Kt.prog),s)ot(Kt.U("u".concat(t,"_").concat(c)),s[c][0],s[c][1]);M.useProgram(et)}}return ke(t,n,r,i,"uniform"),"uniform"},rebuild:function(){if(jt)return null;var e=t;return Se.destroy(),dt(e,r)}};return lt.add(Se),Object.assign(Se,{refresh:function(){return"live"===Et?Ft():It()},destroy:function(){lt.delete(Se),jt=!0,cancelAnimationFrame(Yt),clearTimeout(be),clearTimeout(we),me&&me.disconnect(),ve&&ve.disconnect(),"undefined"!=typeof window&&window.removeEventListener("resize",xe),t.removeEventListener("mousemove",Ut),t.removeEventListener("touchmove",Ut);for(var e=0,n=ce;e<n.length;e++){var r=n[e];t.removeEventListener(r,le,!0)}t.removeEventListener("pointerleave",ue,!0),ae(null),t.removeEventListener("mouseenter",Gt),t.removeEventListener("mouseleave",Xt),P.removeEventListener("paint",Ft);for(var o=0,i=bt;o<i.length;o++){var a=i[o];for(var s in a.cleanup(),a.progs)M.deleteProgram(a.progs[s].prog)}for(bt.length=0,Kt&&!Kt.broken&&(M.deleteProgram(Kt.prog),M.deleteFramebuffer(Kt.fbo),M.deleteTexture(Kt.tex)),Kt=null,St&&(M.deleteTexture(St),St=null),Ot&&(M.deleteTexture(Ot),Ot=null);G!==t&&G.firstChild;)t.appendChild(G.firstChild);Pt(),t.style.visibility="";try{var l=M.getExtension("WEBGL_lose_context");l&&l.loseContext()}catch(t){}P.remove()}})}function ht(){return new RegExp('"([A-Za-z_$][A-Za-z0-9_$]*)"\\s*:',"g")}function pt(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return"string"!=typeof(e=JSON.stringify(t,null,n))?e:e.replace(ht(),"$1:")}function yt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||vt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=vt(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function vt(t,e){if(t){if("string"==typeof t)return bt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(t,e):void 0}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function gt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wt(r.key),r)}}function wt(t){var e=function(t){if("object"!=xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xt(e)?e:e+""}function xt(t){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(t)}var kt=new Set,St={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",color:"color",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",cols:"gridTemplateColumns",rows:"gridTemplateRows",areas:"gridTemplateAreas",area:"gridArea",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",overflowWrap:"overflowWrap",wordBreak:"wordBreak",wordWrap:"wordWrap",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition",alignContent:"alignContent",alignItems:"alignItems",justifyContent:"justifyContent",justifyItems:"justifyItems",justifySelf:"justifySelf",aspectRatio:"aspectRatio",borderTop:"borderTop",borderRight:"borderRight",borderBottom:"borderBottom",borderLeft:"borderLeft",textDecoration:"textDecoration",objectFit:"objectFit",objectPosition:"objectPosition",weight:"fontWeight",colorScheme:"colorScheme"},Ot=new Set(["radius","width","height","maxWidth","maxHeight","minWidth","minHeight","top","left","right","bottom","gap"]),jt=function(t){return!0===t||"hand"===t?"pointer":t};function Et(t,e){if(!e||!t)return t;var n=document.createElement("a");return n.setAttribute("href",e),n.style.display="flex",n.style.alignItems="center",n.style.textDecoration="none",n.style.color="inherit",n.appendChild(t),n}function Tt(t){var e={};if(!t||"object"!==xt(t))return e;for(var n in St)null!=t[n]&&(e[n]=t[n]);return e}var _t=function(){function t(){var e,n,r,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,r=function(t){if(t.transform||t.op){var e=t.op;if(t.transform||(e=t.op),!e||!Array.isArray(e.values))return void console.warn('[nodality] reactOnTransform: a transform node needs a `values` array, e.g. ["ty:-20px"] - ignored');e.duration||(e.duration="3s-ease-in-out"),i.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var n=function(){var n="",r="",o="",a="",s="",l="",c="",u="",f="";if(0!==e.values.length){e.values.forEach(function(t){t.startsWith("tx:")&&(n=t.replace("tx:","")),t.startsWith("ty:")&&(r=t.replace("ty:","")),t.startsWith("tz:")?o=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?s=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var n=e[1].split(",").map(function(t){return t.trim()});return 1===n.length?"rotate(".concat(n[0],")"):2===n.length?"rotateX(".concat(n[0],") rotateY(").concat(n[1],")"):3===n.length?"rotateX(".concat(n[0],") rotateY(").concat(n[1],") rotate(").concat(n[2],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(f=t.replace("opacity:",""))}),n=i.setDefault(n),r=i.setDefault(r),o=i.setDefault(o);var d="";if("0px"!=r&&"0px"!=n&&"0px"!=o?d+="translate3d(".concat(n,", ").concat(r,", ").concat(o,")"):"0px"==r&&"0px"==n||(d+="translate(".concat(n,", ").concat(r,")")),a&&(d+=" ".concat(a)),l&&(d+=" ".concat(l)),s&&(d+=" ".concat(s)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(t.op.duration){var h=t.op.duration.replace(/^(\d+)(s)-/,function(t,e,n){return e/2+n+" "}),p="transform ".concat(h,", opacity ").concat(h);i.res.style.transition=p}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=d,i.res.style.opacity=f}else console.warn("[nodality] transform produced no geometric value - check `values`")}};e.on?i.res.addEventListener(e.on,function(){e.delay?setTimeout(function(){n()},e.delay):n()}):i._on(window,"load",function(){e.delay?setTimeout(function(){n()},e.delay):n()});var r=function(){var t="";e.values.forEach(function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"}),t&&(i.res.style.transform=t.trim())};if(e.on)i.res.addEventListener("mouseout",function(){e.keep||r()});else{var o=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout(function(){e.keep||r()},o/2+a)}e.hardCSS&&(i.res.style.transform=e.hardCSS)}else console.warn("[nodality] reactOnTransform: unrecognised transform descriptor - ignored")},(n=wt(n="reactOnTransform"))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,t._owner&&t._owner.push(this),this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1};var a=this.set;if("function"==typeof a&&!a.__appliesId){var s=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=a.call.apply(a,[this,t].concat(n)),i=t&&t.id,s=this.res;return null!=i&&""!==i&&s&&"function"==typeof s.setAttribute&&!s.getAttribute("id")&&s.setAttribute("id",String(i)),t&&t.loop&&"object"===xt(t.loop)&&this.loop(t.loop),o};s.__appliesId=!0,this.set=s}var l="undefined"!=typeof globalThis&&globalThis.__NODALITY_DEV__;if(l&&!l.inDes&&"function"==typeof l.sourceOf){try{this.__nodSrc=l.sourceOf((new Error).stack)}catch(e){}if(this.__nodSrc){var c=this.set,u=this.__nodSrc;this.set=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=c.call.apply(c,[this,t].concat(n)),i=this.res;return i&&"function"==typeof i.setAttribute&&!i.hasAttribute("data-nod-src")&&i.setAttribute("data-nod-src",u),o},this.set.__appliesId=!0}}this.openedElements=new WeakMap,"undefined"!=typeof document&&(this._themeUnsub=o.subscribe(function(t){return i._applyTheme(t)}),Promise.resolve().then(function(){return i._applyTheme(o.mode)}))}return e=t,n=[{key:"rasterize",value:function(t){var e=this;if(t&&0!==t.length&&!this._rasterHandle&&!this._rasterCancelled&&"undefined"!=typeof document&&"undefined"!=typeof setTimeout){var n=0,r=function(){if(!e._rasterHandle&&!e._rasterCancelled){if(e.res&&e.res.isConnected){try{e._rasterHandle=dt(e.res,t)}catch(t){return void console.warn("[nodality] raster pipeline skipped:",t)}if(e._rasterHandle)return}++n<80&&(e._rasterTimer=setTimeout(r,50))}};this._rasterTimer=setTimeout(r,0),this._track(function(){return clearTimeout(e._rasterTimer)})}}},{key:"isHidden",value:function(t){t&&(this.res.style.display="none")}},{key:"theme",value:function(t){var e=this;return t&&"object"===xt(t)?(this._themeMap=t,this._applyTheme(o.mode),this._themeUnsub||(this._themeUnsub=o.subscribe(function(t){return e._applyTheme(t)})),this):this}},{key:"_track",value:function(t){return"function"!=typeof t||(this._disposables||(this._disposables=[])).push(t),t}},{key:"_on",value:function(t,e,n,r){return t&&"function"==typeof t.addEventListener?(t.addEventListener(e,n,r),this._track(function(){return t.removeEventListener(e,n,r)}),n):n}},{key:"destroy",value:function(){if("function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this._rasterHandle&&"function"==typeof this._rasterHandle.destroy)try{this._rasterHandle.destroy()}catch(t){}if(this._rasterHandle=null,this._rasterCancelled=!0,this._disposables){var t,e=mt(this._disposables);try{for(e.s();!(t=e.n()).done;){var n=t.value;try{n()}catch(t){}}}catch(t){e.e(t)}finally{e.f()}this._disposables.length=0}return this._responsiveTasks=null,this._responsiveHandler=null,this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(t){if(!this._noTheme&&this.res)if(this._themeMap){var e=this._themeMap[t];if(!e)return;for(var n in e)this.res.style[n]=e[n]}else{var r=o.defaults&&o.defaults[t];if(r)for(var i in this._themeOriginal||(this._themeOriginal={}),r)i in this._themeOriginal||(this._themeOriginal[i]=this.res.style[i]||""),this._themeOriginal[i]||(this.res.style[i]=r[i])}}},{key:"vars",value:function(t){if(!t||"object"!==xt(t))return this;for(var e in t)this.res.style.setProperty(e,String(t[e]));return this}},{key:"keySet",value:function(t){if(this.temporaryVal=1,Array.isArray(t)){for(var e=0;e<t.length;e++)t[e]&&null!=t[e].key&&(this.res.style[t[e].key]=t[e].value);return this}return this.res.style[t.key]=t.value,this}},{key:"applyStyleOptions",value:function(t){if(!t||!this.res)return this;for(var e in St)if(null!=t[e]){var n="number"==typeof t[e]&&0!==t[e]&&Ot.has(e)?"".concat(t[e],"px"):"cursor"===e?jt(t[e]):t[e];this.res.style[St[e]]=n}return this}},{key:"commonMethods",value:function(t){return this.applyStyleOptions(t),"string"==typeof t.transform&&(this.res.style.transform=t.transform),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.respad&&this.respad(t.respad),t.borderObj&&t.borderObj.width&&this.borderObj(t.borderObj),t.resmar&&this.resmar(t.resmar),t.hover&&this.hover(t.hover),t.size&&this.fluidCopy(t.size),t.resprop&&this.resprop(t.resprop,t),t.vars&&this.vars(t.vars),t.keySet&&this.keySet(t.keySet),t.noTheme&&(this._noTheme=!0),t.theme&&this.theme(t.theme),t.hide&&this.isHidden(t.hide),t.raster&&this.rasterize(t.raster),t.center&&this.center(t.center,{display:t.disp||t.display,flexDirection:t.flexDir||t.flexDirection}),t.transform&&"object"===xt(t.transform)&&this.reactOnTransform(t.transform),void 0!==t.opacity&&(this.res.style.opacity=t.opacity),t.bold?this.res.style.fontWeight="bold":null!=t.weight&&(this.res.style.fontWeight=t.weight),this}},{key:"hover",value:function(t){var e=this;if(t.border){var n=t.border.width;this.res.style.border=n?"".concat(n,"px solid transparent"):"1px solid transparent"}var r=this.options&&this.options.borderObj;return r&&(this.res.style.border="".concat(r.width,"px solid ").concat(r.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,this.prevBoxShadow=this.res.style.boxShadow,t.animation&&(this.res.style.transition="".concat(t.animation),this.res.style.transitionProperty="background-color, color, border, box-shadow, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){e.res.style.backgroundColor="".concat(e.prevColor),e.res.style.color="".concat(e.foreColor),e.res.style.border=e.prevBorder,null==t.scale&&null==t.transform||(e.res.style.transform=e.prevTransform||""),null!=t.boxShadow&&(e.res.style.boxShadow=e.prevBoxShadow||"")},this.res.onmouseover=function(){if(e.res.style.color=t.color,e.res.style.backgroundColor=t.background,t.border){var n,r=t.border.width,o=null!==(n=t.border.color)&&void 0!==n?n:"#2ECC71";e.res.style.border=r?"".concat(r,"px solid ").concat(o):"1px solid #2ECC71"}if(null!=t.scale||null!=t.transform){var i=e.prevTransform?"".concat(e.prevTransform," "):"",a=[];null!=t.transform&&a.push(t.transform),null!=t.scale&&a.push("scale(".concat(t.scale,")")),e.res.style.transform="".concat(i).concat(a.join(" "))}null!=t.boxShadow&&(e.res.style.boxShadow=t.boxShadow)},this}},{key:"onScroll",value:function(t){var e=this,n=function(t){if(null==t)return{num:0,unit:"px"};var e=String(t).match(/^(-?[\d.]+)(.*)$/);return e?{num:parseFloat(e[1]),unit:e[2]||"px"}:{num:0,unit:"px"}},r=function(t){var n=t&&null!=t.tx?t.tx:"0px",r=t&&null!=t.ty?t.ty:"0px";e.res.style.transform="translate3d(".concat(n,", ").concat(r,", 0)")};"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value?this.res.style.transform="scale(".concat(t.valMin,")"):"trn"===t.value&&r(t.valMin);var o=function(){if("trn"!==t.value){var o=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=o:"scale"===t.value&&(e.res.style.transform="scale(".concat(o,")"))}else{for(var i={},a=["tx","ty"],s=0;s<a.length;s++){var l=a[s],c=t.valMin&&null!=t.valMin[l],u=t.valMax&&null!=t.valMax[l];if(c||u){var f=n(c?t.valMin[l]:u?t.valMax[l]:"0px"),d=n(u?t.valMax[l]:c?t.valMin[l]:"0px"),h=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:f.num,max:d.num});i[l]="".concat(h).concat(f.unit)}}r(i)}};this._on(window,"scroll",o),0===t.from&&o()}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"_setupResponsiveManager",value:function(){var t=this;this._responsiveTasks=this._responsiveTasks||[];var e=function(){t._responsiveTasks&&t._responsiveTasks.forEach(function(t){t()})};this._responsiveHandler||(this._responsiveHandler=e,this._on(window,"resize",e));var n=setTimeout(function(){e()},0);this._track(function(){return clearTimeout(n)})}},{key:"resprop",value:function(e,n){var r=this;n&&"object"===xt(n)?this.options=n:this.options&&"object"===xt(this.options)||(this.options={});var o={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},i=["resprop","breakpoint","value","values","range"],a={flexDir:"flexDirection",dir:"flexDirection",justify:"justifyContent",align:"alignItems",wrap:"flexWrap",bg:"background",radius:"borderRadius",z:"zIndex",exact:"fontSize"};e.forEach(function(t){void 0!==o[t.breakpoint]?t.range=o[t.breakpoint]:Array.isArray(t.breakpoint)&&2===t.breakpoint.length?t.range=[parseInt(t.breakpoint[0],10),parseInt(t.breakpoint[1],10)]:t.range=[0,parseInt(t.breakpoint,10)]}),e.sort(function(t,e){return t.range[1]-e.range[1]});var s=e.find(function(t){return"default"===t.breakpoint});s||(s={breakpoint:"default",range:o.default},e.unshift(s));var l=new Set;e.forEach(function(t){Object.keys(t).forEach(function(t){i.includes(t)||"range"===t||l.add(t)})});var c=new Map;l.forEach(function(t){void 0===s[t]&&(null==r.options[t]?"keySet"!==t&&c.set(t,void 0):s[t]=r.options[t])});var u=function(t){return"exact"===t?"fontSize":a[t]||t},f=function(t,e){var n=null==e?"":e;r.res.style[t]!==String(n)&&(r.res.style[t]=n)};this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){var n,o=mt(c);try{for(o.s();!(n=o.n()).done;){var i=yt(n.value,2),d=i[0];if(void 0===i[1]){var h=r.res.style[u(d)];c.set(d,"string"==typeof h?h:"")}}}catch(t){o.e(t)}finally{o.f()}for(var p=t.viewportWidth(),y=s,m=0;m<e.length;m++){var v=e[m],b=yt(v.range,2),g=b[0],w=b[1];if("default"!==v.breakpoint&&Math.floor(p)>=g&&Math.floor(p)<=w){y=v;break}}l.forEach(function(t){var e=y!==s&&t in y,n=e?y[t]:c.has(t)?c.get(t):s[t];"keySet"!==t?"exact"!==t?e&&"function"==typeof r[t]?r[t](n):f(function(t){var e=a[t]||t;return"undefined"==typeof console||"function"==typeof r[t]||e in r.res.style||console.warn('[nodality] resprop: "'.concat(t,'" is not a CSS property or component method — ignored.')+(a[t]?"":" Did you mean one of: ".concat(Object.keys(a).join(", "),"?"))),e}(t),n):f("fontSize",n):n&&n.key&&f(n.key,n.value)})}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var n=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(t){void 0!==r[t.breakpoint]?t.range=r[t.breakpoint]:Array.isArray(t.breakpoint)&&2===t.breakpoint.length?t.range=[parseInt(t.breakpoint[0],10),parseInt(t.breakpoint[1],10)]:t.range=[parseInt(t.breakpoint,10),1e5]}),e.sort(function(t,e){return t.range[0]-e.range[0]});var o=e.find(function(t){return"default"===t.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options&&this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=t.viewportWidth(),i=o,a=0;a<e.length;a++){var s=e[a],l=yt(s.range,2),c=l[0],u=l[1];if("default"!==s.breakpoint&&Math.floor(r)>=c&&Math.floor(r)<=u){i=s;break}}var f=void 0!==i.values?i.values:o.values;null!=f&&n.pad(f)}),this._setupResponsiveManager()}},{key:"resmar",value:function(e){var n=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(t){void 0!==r[t.breakpoint]?t.range=r[t.breakpoint]:Array.isArray(t.breakpoint)&&2===t.breakpoint.length?t.range=[parseInt(t.breakpoint[0],10),parseInt(t.breakpoint[1],10)]:t.range=[parseInt(t.breakpoint,10),1e5]}),e.sort(function(t,e){return t.range[0]-e.range[0]});var o=e.find(function(t){return"default"===t.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options&&(this.options.mar||this.options.pad)||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=t.viewportWidth(),i=o,a=0;a<e.length;a++){var s=e[a],l=yt(s.range,2),c=l[0],u=l[1];if("default"!==s.breakpoint&&Math.floor(r)>=c&&Math.floor(r)<=u){i=s;break}}var f=void 0!==i.values?i.values:o.values;null!=f&&n.mar(f)}),this._setupResponsiveManager()}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"onTap",value:function(t){return this.res.addEventListener("click",t),this}},{key:"setArea",value:function(t){return this.res.style.gridArea=t,this}},{key:"font",value:function(t){return this.res.style.fontFamily=t,this}},{key:"loop",value:function(t){var e=this.res,n=t&&"object"===xt(t)?t:{},r=Array.isArray(n.keyframes)?n.keyframes.filter(function(t){return t&&"object"===xt(t)}):[];return!e||r.length<2?(r.length<2&&console.warn("nodality: loop needs at least two keyframes"),this):(this._loop&&"function"==typeof this._loop.cancel&&this._loop.cancel(),this._loop=null,"undefined"==typeof window||"function"!=typeof e.animate||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this._loop=e.animate(r,{duration:Number(n.duration)>0?Number(n.duration):1e4,easing:n.easing||"linear",direction:n.direction||"normal",delay:Number(n.delay)||0,iterations:1/0})),this)}},{key:"radius",value:function(t){return this.res.style.borderRadius="number"==typeof t?"".concat(t,"px"):t,this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"scale",value:function(t){var e=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",function(){e.res.style.width,e.res.style.transform="scale(1.04)"}),this.res.addEventListener("mouseout",function(){e.res.style.width,e.res.style.transform="scale(1.0)"}),this}},{key:"round",value:function(t){return this.deprecatedOption("round()","radius()"),this.radius(t)}},{key:"toCSS",value:function(){return this.css}},{key:"toHTMLA",value:function(){return this.html}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"deprecatedOption",value:function(t,e){var n="nodality: `".concat(t,"` is deprecated — use `").concat(e,"` instead.");return kt.has(n)||(kt.add(n),console.error(n)),this}},{key:"center",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.res.style,r=n.display||e.display||"",o=n.flexDirection||e.flexDirection||"",i=!0===t||"both"===t||"x"===t,a=!0===t||"both"===t||"y"===t;if(r.includes("grid"))return i&&(n.justifyItems="center",n.justifyContent="center"),a&&(n.alignItems="center",n.alignContent="center"),this;r.includes("flex")||(n.display="flex"),n.flexDirection||(n.flexDirection=o||"column");var s=(n.flexDirection||"column").startsWith("column");return(s?a:i)&&(n.justifyContent="center"),(s?i:a)&&(n.alignItems="center"),this}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var n=Object.keys(t[e]),r=0;r<n.length;r++)for(var o=n[r],i=t[e][o],a=0;a<o.length;a++)switch(o[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){if("center"===t)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;for(var e=0;e<t.length;e++)for(var n=Object.keys(t[e]),r=0;r<n.length;r++){for(var o=n[r],i=t[e][o],a=0;a<o.length;a++)switch(o[a]){case"a":"auto"===i?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"center"===o&&!0===i&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===i&&(o.includes("l")||o.includes("r"))&&(o.includes("l")&&(this.res.style.marginLeft="auto"),o.includes("r")&&(this.res.style.marginRight="auto"))}return this}},{key:"smartRange",value:function(t,e,n){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var r=(t-e.min)/(e.max-e.min);return e.min>e.max&&(r=(t-e.max)/(e.min-e.max)),n.min+(n.max-n.min)*r}},{key:"gpos",value:function(t){return t&&null!=t.col&&(this.res.style.gridColumn=t.col),t&&null!=t.row&&(this.res.style.gridRow=t.row),this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,n=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(n," ").concat(t.color),void 0!==t.radius&&(this.res.style.borderRadius=t.radius),this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"setTags",value:function(t){this.openTag=t.open,this.closeTag=t.close}},{key:"chainReact",value:function(e,n,r){var o=this;this.ap=!1,this.cta=0,this.once=!1;var i,a,s=mt(e);try{for(s.s();!(i=s.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(t){s.e(t)}finally{s.f()}e.sort(function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])});var c=function(i){var s=t.viewportWidth(),l=[],c=[];o.resCopy=o.res,o.storedQueries=e.map(function(t){return t.target}).filter(function(t){return null!=t});var u,f=mt(e);try{for(f.s();!(u=f.n()).done;){var d=u.value;o.counterIndex++;var h=yt(d.range,2),p=h[0],y=h[1],m=parseInt(p),v=parseInt(y),b=!0;if(d.target){b=!1;for(var g=0;g<d.target.length;g++){var w=function(t){return"string"==typeof t&&"#"===t.charAt(0)?t.slice(1):t};w(d.target[g])===w(n)&&(b=!0)}}s>=m&&s<=v&&b&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(o.useMargin=d.op.margin))}}catch(t){f.e(t)}finally{f.f()}var x=c.map(function(t){return e.indexOf(t)}).join(",");if(x!==a){if(a=x,r&&!r.includes("background")&&(o.res.style.background="",o.res.style.backgroundColor=""),o.res.style.textShadow="",r&&!r.includes("border")&&(o.res.style.border=""),r&&!r.includes("margin")&&(o.res.style.margin=""),o.res.style["-webkit-text-fill-color"]="",o.res.style["-webkit-text-stroke-color"]="",o.res.style["-webkit-text-stroke-width"]="",o.res.style.filter="",o.options.background&&(o.res.style.background=o.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(o.res.style.position="relative"),l.includes("blast")){var k,S=c.filter(function(t){return"blast"===t.log})[0].op.color,O=null!==(k=c.filter(function(t){return"blast"===t.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()?(o.res.style.border="".concat("number"==typeof O?O+"px":O," solid orange"),o.res.style.display="inline-block","FlexRowLayoutElement"===o.getType()&&(o.res.style.display="flex"),o.res.style.boxSizing="border-box",o.res.style.transformOrigin="center",o.blastTarget=o.res):(o.text,o.res.style["-webkit-text-fill-color"]="transparent",o.res.style["-webkit-text-stroke-color"]=S,o.res.style["-webkit-text-stroke-width"]="".concat(O))}if(l.includes("filter")){var j=c.filter(function(t){return"filter"===t.log})[0].op.filter;o.res.style.filter=j}if(l.includes("background")&&(o.res.style.backgroundColor="green"),l.includes("gradient")&&o.globalGradient&&("LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["-webkit-text-fill-color"]="transparent"),o.res.style.background=o.globalGradient,"LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["background-clip"]="text")),l.includes("shadow")){var E,T,_,C,A=o.options.shadow.op,P=null!==(E=A.steps)&&void 0!==E?E:1,R=null!==(T=A.colors)&&void 0!==T?T:["gray"],I=null!==(_=A.movements)&&void 0!==_?_:["3px","3px"],M=null!==(C=A.radius)&&void 0!==C?C:"3px";if(1===I.length&&(I=[I[0],I[0]]),"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()){for(var D=[],F=0;F<P;F++){var L,z=null!==(L=R[F])&&void 0!==L?L:R[0],N=I[0],B=I[1];D.push("".concat(N," ").concat(B," ").concat(M," ").concat(z))}o.res.style.boxShadow=D.join(", ")}else{for(var W=[],U=0;U<P;U++){var q,H=null!==(q=R[U])&&void 0!==q?q:R[0],G=I[0],X=I[1];W.push("drop-shadow(".concat(G," ").concat(X," ").concat(M," ").concat(H,")"))}o.res.style.filter=W.join(" ")}}if(l.includes("margin"))for(g=0;g<e.length;g++)if(e[g].op){var V=e[g].op.offsets;V&&void 0!==o.index&&(o.res.style.margin=V[Number(o.index)]+"px")}if(l.includes("spana")||l.includes("span")){var J=document.createElement("div");if(J.setAttribute("id","oroa"),Object.assign(J.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),o.res&&o.res.querySelector("span"))return;o.res=o.resCopy,o.res.textContent="",o._spanParts?o._spanParts.splice(0).forEach(function(t){return t.destroy()}):(o._spanParts=[],o._track(function(){return o._spanParts.splice(0).forEach(function(t){return t.destroy()})}));var Y=function(t,e,n){var r=new o.constructor(t);return o._spanParts.push(r),r.setup(e).set(n).render()};o.options.span&&(Array.isArray(o.options.span)?o.options.span:[o.options.span]).forEach(function(t){if(t.op&&"span"===t.op.name&&Array.isArray(t.op.parts)){var e=0,n=o.prevText||"";if(t.op.parts.forEach(function(t){var r=t.text,i=t.style||{};if(e<n.length){var a=n.indexOf(r,e);if(a>e){var s=n.substring(e,a);o.res.appendChild(Y(s,{type:"span",id:i.id,animation:i.animation},{}))}e=a+r.length}var l=Y(r,{type:"span",id:i.id,animation:i.animation},i);o.res.appendChild(l)}),e<n.length){var r=n.substring(e);o.res.appendChild(Y(r,{type:"span"},{}))}}})}else o.rebuildText(i);if(l.includes("animation")){if(o.options.animation&&!o.hasAnimated&&!o.options.animation.op.fireAt){o.hasAnimated=!0;var $=o.options.animation.op;o._on(window,"sidebar:open",function(){o.res.animate($.keyframesOpen,$.openOptions)}),o._on(window,"sidebar:closed",function(){o.res.animate($.keyframesClose,$.closeOptions)}),o.res.animate($.keyframesClose,{duration:0,fill:"forwards"}),o.openTag&&o.closeTag&&(o._on(window,o.openTag,function(){o.res.animate($.keyframesOpen,$.openOptions)}),o._on(window,o.closeTag,function(){o.res.animate($.keyframesClose,$.closeOptions)}))}if(o.options.animation&&o.options.animation.op.fireAt&&o.options.animation.op.fireAt.endsWith("px")){var Q=o.options.animation.op;o.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=function(){window.scrollY>parseFloat(Q.fireAt)&&(o.res.animate(Q.keyframesOpen,Q.openOptions),window.removeEventListener("scroll",K))};o._on(window,"scroll",K)}if(o.options.animation&&"inview"===o.options.animation.op.fireAt){var Z=o.options.animation.op;o.res.animate(Z.keyframesClose,{duration:0,fill:"forwards"});var tt=!1,et=new IntersectionObserver(function(t,e){t.forEach(function(t){t.isIntersecting&&!tt&&(tt=!0,o.res.animate(Z.keyframesOpen,Z.openOptions),e.disconnect())})});et.observe(o.res),o._track(function(){return et.disconnect()})}}}};this.options.animation||this._on(window,"resize",function(){return c()}),c()}},{key:"rebuildText",value:function(t){}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(ht(),"$1:")}}],r=[{key:"viewportWidth",value:function(){if("undefined"==typeof window)return 0;var t=window.visualViewport;return t&&"number"==typeof t.width?t.width:window.innerWidth}}],n&&gt(e.prototype,n),r&&gt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function Ct(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",r=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=String(t);return e.filter(function(t){return function(t,e){if(t===e)return 0;for(var n=new Array(e.length+1),r=0;r<=e.length;r++)n[r]=r;for(var o=1;o<=t.length;o++){for(var i=[o],a=1;a<=e.length;a++){var s=t.charCodeAt(o-1)===e.charCodeAt(a-1)?0:1;i[a]=Math.min(n[a]+1,i[a-1]+1,n[a-1]+s)}n=i}return n[e.length]}(r,t)<=n})}(t,e),o="Unknown ".concat(n,' "').concat(t,'".');return r.length&&(o+=' Did you mean "'.concat(r[0],'"?')),e.length&&(o+=" Valid ".concat(n,"s: ").concat(e.join(", "),".")),o}function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Pt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rt(r.key),r)}}function Rt(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=At(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(It=function(){return!!t})()}function Mt(t){return Mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mt(t)}function Dt(t,e){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dt(t,e)}var Ft=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Mt(e),function(t,e){if(e&&("object"==At(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,It()?Reflect.construct(e,n||[],Mt(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,e.oldLength=0,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dt(t,e)}(t,_t),e=t,n=[{key:"observe",value:function(t){return this.initialState=t,this.Proxima(t)}},{key:"Proxima",value:function(t){var e=this;return new Proxy(t,{set:function(t,n,r){return t[n]=r,e.initialState&&e.initialState.data&&"function"==typeof e.initialState.data.push&&e.initialState.data.push(n),"length"!==n&&e.refreshUI("Added"),!0},has:function(t,n){return"length"!==n&&e.refreshUI("Deleted"),Reflect.has(t,n)}})}},{key:"refreshUI",value:function(t){var e=this.initialState;this.adjustState(e)}},{key:"loadState",value:function(t,e){return this.loadEl=e,this.initialState=t,this.observe(this.state.data)}},{key:"adjustState",value:function(t){document.querySelector(this.loadEl);var e=t[t.length-1],n=document.createElement("p"),r=document.createTextNode(e);n.appendChild(r),document.body.appendChild(n)}},{key:"mount",value:function(t){this.res=t,this.render(t).render(t)}},{key:"toCode",value:function(){return[""]}}],n&&Pt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bt(r.key),r)}}function Bt(t){var e=function(t){if("object"!=Lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lt(e)?e:e+""}function Wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wt=function(){return!!t})()}function Ut(t,e,n,r){var o=qt(Ht(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function qt(){return qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ht(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qt.apply(null,arguments)}function Ht(t){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ht(t)}function Gt(t,e){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gt(t,e)}var Xt=function(){function t(e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,n){return e=Ht(e),function(t,e){if(e&&("object"==Lt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wt()?Reflect.construct(e,n||[],Ht(t).constructor):e.apply(t,n))}(this,t)).text=e,r.res=null,r.setup(n),r.code=[],r.elCSS=[],r.html=[],r.react=[],r.code.push('new Text("'.concat(r.text,'")')),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gt(t,e)}(t,_t),e=t,n=[{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var t=pt(Object.fromEntries(Object.entries(this.options).filter(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return zt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2);return e[0],null!==e[1]})),4);return['new Text("'.concat(this.text,'").set(').concat(t,")")]}},{key:"toElCSS",value:function(){return this.elCSS=this.elCSS.map(function(t){return" "+t}),this.preffersId?this.elCSS.unshift(this.res.id+" { \n"):this.elCSS.unshift("."+this.class+" { \n"),this.elCSS.push(" } \n \n"),this.elCSS}},{key:"rebuildText",value:function(t){if(t&&this.prevText&&this.prevText.length>0){var e=new this.constructor(this.prevText);this.res.appendChild(e.set({}).render()),this._track(function(){return e.destroy()})}}},{key:"getType",value:function(){return"S1"===this.options.fluidc?"HTMLHeaderElement":"HTMLParagraphElement"}},{key:"stroke",value:function(){return this.res.style["-webkit-text-stroke"]="3px orange",this}},{key:"fill",value:function(){return this.res.style["-webkit-text-fill-color"]="transparent",this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"styled",value:function(t){return this.set(t),this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(ht(),"$1:")}},{key:"looksLikeMarkdown",value:function(t){return/(\*\*.*\*\*|\*.*\*|`[^`]+`|\[.*?\]\(.*?\)|^# )/m.test(t)}},{key:"parseMarkdown",value:function(t){var e=t;return(e=(e=(e=(e=(e=(e=(e=e.replace(/^### (.*$)/gim,"<h3>$1</h3>")).replace(/^## (.*$)/gim,"<h2>$1</h2>")).replace(/^# (.*$)/gim,"<h1>$1</h1>")).replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>")).replace(/\*(.*?)\*/g,"<em>$1</em>")).replace(/`([^`]+)`/g,"<code>$1</code>")).replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>')).replace(/\n/g,"<br>")}},{key:"set",value:function(e){if(this.resCopy=this.res,this.options=e,Ut(t,"setPrevText",this,3)([this.text]),e.raster&&this.rasterize(e.raster),this.commonMethods(e),e.left&&(this.res.style.left=e.left),e.flex&&(this.res.style.display="flex"),(e.left||e.top)&&(this.res.style.position="absolute"),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.gpos&&this.gpos(e.gpos),e.vtn&&(this.res.style.viewTransitionName=e.vtn),e.index&&Ut(t,"setIndex",this,3)([e.index]),e.index&&(this.index=e.index),e.preffersId&&(this.preffersId=e.preffersId),Ut(t,"setPref",this,3)([e.preffersId]),e.removeDecoration&&(this.res.style.textDecoration="none"),e.block&&(this.res.style.display="block"),e.area&&this.setArea(e.area),e.icon&&this.addIcon(e.icon),e.color&&this.color(e.color),e.color&&this.elCSS.push("color: ".concat(e.color,"; \n")),e.class&&this.setClass(e.class),e.size&&this.fluidCopy(e.size),e.fluidc&&this.fluidCopy(e.fluidc),this.options.id&&this.res.setAttribute("id",this.options.id),Ut(t,"setID",this,3)([this.options.id]),e.initLetter&&this.initLetter(e.initLetter),e.onTap&&this.onTap(e.onTap),"S6"===e.fluidc?e.fluidc&&this.elCSS.push("font-size: calc(1.1rem + 2.075vw); \n"):e.fluidc&&this.elCSS.push("font-size: calc(1.625rem + 5.075vw); \n"),this.options.class&&this.res.setAttribute("class",this.options.class),Ut(t,"setClass",this,3)([this.options.class]),e.clampc&&this.clampCopy(e.clampc),null!=e.exact&&(this.res.style.fontSize=e.exact),e.absolute&&(this.res.style.position="absolute"),e.em&&this.em(e.em),e.fluid&&this.fluid(e.fluid),e.tag&&/^(h[1-6]|p)$/.test(String(e.tag))){var n=String(e.tag).toLowerCase();if(this.res&&this.res.tagName.toLowerCase()!==n){for(var r=document.createElement(n),o=0,i=Array.from(this.res.attributes);o<i.length;o++){var a=i[o];r.setAttribute(a.name,a.value)}for(;this.res.firstChild;)r.appendChild(this.res.firstChild);this.res=r}}return e.fluidc&&this.elCSS.push("font-family: ".concat(e.font,"; \n")),e.align&&(this.res.style.textAlign=e.align),e.breakWord&&(this.res.style.wordWrap="break-word"),e.center&&this.deprecatedOption("center on Text",'mar: "center"'),e.italic&&this.italic(),e.responsive&&this.responsive(),e.border&&(this.res.style.border="".concat(e.border)),e.onScroll&&this.onScroll(e.onScroll),e.keySet&&this.keySet(e.keySet),this.callReact(e),this}},{key:"callReact",value:function(e){var n=[],r=e.transform&&"object"===Lt(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||r){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&Ut(t,"setAny",this,3)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var o=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,r?e.transform:void 0];o=o.filter(function(t){return null!=t});for(var i=0;i<o.length;i++)n.push({range:o[i].range,log:o[i].op.name,target:o[i].target,op:o[i].op});var a=[];e.borderObj&&a.push("border"),e.background&&a.push("background"),e.mar&&a.push("margin"),e.animation&&a.push("animation"),e.span&&a.push("span"),this.chainReact(n,this.options.id,a)}}},{key:"excludeFromCode",value:function(){return this.excludeFromCodeTrue=!0,this}},{key:"addIcon",value:function(t){var e=document.createElement("img");return e.style.width="20px",e.style.marginLeft="10px",e.style.height="auto",e.setAttribute("src",t.url),e.setAttribute("alt",void 0===t.alt?"":String(t.alt)),this.res.appendChild(e),this}},{key:"between",value:function(t){return"S1"===t&&(this.res.style.fontSize="clamp(2rem, 8vw, 2.5rem)"),"S2"===t&&(this.res.style.fontSize="clamp(4rem, 8vw, 5rem)"),"S3"===t&&(this.res.style.fontSize="clamp(2rem, 5vw, 2.5rem)"),"S4"===t&&(this.res.style.fontSize="clamp(1.5rem, 2vw, 1.6rem)"),"S5"===t&&(this.res.style.fontSize="clamp(1.2rem, 2vw, 1.3rem)"),"S6"===t&&(this.res.style.fontSize="clamp(1rem, 2vw, 1.3rem)"),this}},{key:"stringGen",value:function(t){for(var e="",n=0;n<t;n++)e+="abcdefghijklmnopqrstuvwxyz".charAt(Math.floor(26*Math.random()));return e}},{key:"initLetter",value:function(t){var e=document.createElement("style");document.body.appendChild(e),Math.random();var n=this.stringGen(1e3);return this.res.setAttribute("id",n),document.styleSheets[0].insertRule("#".concat(n,"::first-letter { color: green; font-size: 3em; padding: 0.1em }"),0),this}},{key:"minusMargin",value:function(){return this.res.style.marginRight="-3.1em",this}},{key:"fluid",value:function(t){if("S1"===t){this.res=document.createElement("h1");var e=document.createTextNode(this.text);this.res.appendChild(e),this.res.style.fontSize="calc(1.625rem + 4.3vw)"}if("S2"===t){this.res=document.createElement("h2");var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.525rem + 3.525vw)"}if("S3"===t){this.res=document.createElement("h3");var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.375rem + 2.75vw)"}if("S4"===t){this.res=document.createElement("h4");var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.275rem + 1.975vw)"}return"S5"===t&&(this.res.style.fontSize="calc(1.1rem + 1.2vw)"),this}},{key:"getClampValue",value:function(t){return"S7"===t?"clamp(1.45rem, 2vw + 1.5rem, 1.69rem)":"S6"===t?"clamp(2.25rem, 2vw+1.5rem, 3.25rem)":"S5"===t?"clamp(2.75rem, 2vw + 1.5rem, 3.25rem)":"S4"===t?"clamp(3.5rem, 2vw + 1.5rem, 3.25rem)":"S3"===t?"clamp(4.25rem, 2vw + 1.5rem, 3.25rem)":"S2"===t?"clamp(5rem, 2vw + 1.5rem, 3.25rem)":"S1"===t?"clamp(6rem, 2vw + 1.5rem, 3.25rem)":void 0}},{key:"clampCopy",value:function(t){return this.res.style.fontSize=this.getClampValue(t),this}},{key:"large",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="7rem":t.res.style.fontSize="5rem"};return e(),this._on(window,"resize",e),this}},{key:"frame",value:function(t){return this.res.style.width=t.width,this.res.style.height=t.height,this}},{key:"responsive",value:function(t){var e=this;this.set=!1,this.setB=!1;var n=function(){window.innerWidth<t.minw?(e.setB=!1,e.set||(e.res.style.color="#3498db",e.res.style.fontSize="".concat(t.baseVW/100*window.innerWidth,"px"),e.set=!0)):window.innerWidth>t.maxw?(e.set=!1,e.setB||(e.res.style.color="orange",e.res.style.fontSize="".concat(t.baseVW/100*t.maxw,"px"),e.setB=!0)):(e.set=!1,e.setB=!1,e.res.style.color="black",e.res.style.fontSize="".concat(t.baseVW,"vw"))};return n(),this._on(window,"resize",n),this}},{key:"medium",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="2.25rem":t.res.style.fontSize="1.5em"};return e(),this._on(window,"resize",e),this}},{key:"auto",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="2rem":t.res.style.fontSize="1rem"};return e(),this._on(window,"resize",e),this}},{key:"small",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="1.5em":t.res.style.fontSize="1em"};return e(),this._on(window,"resize",e),this}},{key:"sizes",value:function(t){var e=this;this.res.style.fontSize="".concat(t[0].size,"rem");var n=function(){for(var n=0;n<t.length;n++)t[n].width&&window.matchMedia("(min-width: ".concat(t[n].width,"px)")).matches&&(e.res.style.fontSize="".concat(t[n].size));window.matchMedia("(max-device-width: 415px)").matches&&(e.res.style.fontSize="".concat(t[t.length-1].mobile))};return n(),this._on(window,"resize",n),this}},{key:"setup",value:function(t){var e;t?(e=document.createElement(t.type),void 0!==t.id&&null!==t.id&&e.setAttribute("id",t.id),"span"===t.type&&t.animation&&(e.style.position="relative",e.style.display="block")):e=document.createElement("p");var n=document.createTextNode(this.text);return e.appendChild(n),this.res=e,this.res.style.padding=0,this.res.style.margin=0,this}},{key:"hide",value:function(){return this.res.style.visibility="hidden",this}},{key:"font",value:function(t){return this.res.style.fontFamily=t,this}},{key:"em",value:function(t){return this.res.style.fontSize="".concat(t,"em"),this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"align",value:function(t){return this.res.style.textAlign="".concat(t),this}},{key:"weight",value:function(t){return this.res.style.fontWeight=t,this}},{key:"bold",value:function(){return this.res.style.fontWeight="bold",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"width",value:function(t,e){return this.res.style.width=t,e&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),this}},{key:"offset",value:function(t){return this.res.style.gridRow=2,this.res.style.gridColumn=2,this.res.style.marginLeft="-60px",this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"updating",value:function(t,e){var n=this.res,r=this.text;return Object.defineProperty(t,e,{set:function(t){var e=document.createTextNode(r.replace("$",t));n.replaceChild(e,n.childNodes[0])}}),this}},{key:"apply",value:function(t){var e=this,n=this.res.styles,r=function(){for(var r=0;r<t.length;r++){var o=t[r];o.min&&o.max?window.matchMedia("(min-width: ".concat(o.min,"px) and (max-width: ").concat(o.max,"px)")).matches?Object.assign(e.res.style,o.styles):Object.assign(e.res.style,n):window.matchMedia("(max-width: ".concat(o.max,"px)")).matches?Object.assign(e.res.style,o.styles):Object.assign(e.res.style,n)}};return r(),this._on(window,"resize",r),this}},{key:"render",value:function(t){if(!t)return this.options&&!this.options.span&&(this.res.textContent=this.text),this.looksLikeMarkdown(this.text)&&(this.res.innerHTML=this.parseMarkdown(this.text)),this.res;this.options&&this.options.id&&this.res.setAttribute("id",this.options.id),this.options&&!this.options.span&&(this.res.textContent=this.text),this.looksLikeMarkdown(this.text)&&(this.res.innerHTML=this.parseMarkdown(this.text)),document.querySelector(t).appendChild(this.res)}}],n&&Nt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Jt(t,e){if(t){if("string"==typeof t)return Yt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yt(t,e):void 0}}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function $t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qt(r.key),r)}}function Qt(t){var e=function(t){if("object"!=Vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vt(e)?e:e+""}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kt=function(){return!!t})()}function Zt(t,e,n,r){var o=te(ee(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function te(){return te="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ee(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},te.apply(null,arguments)}function ee(t){return ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ee(t)}function ne(t,e){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ne(t,e)}var re=function(){function t(e,n,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(i=function(t,e,n){return e=ee(e),function(t,e){if(e&&("object"==Vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,n||[],ee(t).constructor):e.apply(t,n))}(this,t)).url=e,i.res=null,i.code=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ne(t,e)}(t,_t),e=t,n=[{key:"setType",value:function(t){t.url;var e=t.type,n=t.mode;if(this.code=[],"exact"===e){var r='new Image("'.concat(this.url,'", "exact")');this.code.push(r)}else if("uncover"===e){var o='new Image("'.concat(this.url,'", "uncover")');this.code.push(o)}else this.code.push("new Image('".concat(this.url,"')"));return this.image(this.url,n,e),this}},{key:"hand",value:function(){return this.res.style.cursor="pointer",this}},{key:"getType",value:function(){return"HTMLImageElement"}},{key:"toCode",value:function(){var t=this.options;this.res.style.border&&(t.border=this.res.style.border);var e=Object.fromEntries(Object.entries(t).filter(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Jt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2);return e[0],null!==e[1]}));return["new Image().set(".concat(JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:"),")")]}},{key:"formatObj",value:function(t){return JSON.stringify(t,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"set",value:function(e){var n="";this.options=e;var r=e;r.onTap&&this.onTap(r.onTap);var o=e.isFull;if(o?this.image(e.url,"exact",o,"a"):this.setup(),"IMG"===this.res.tagName?e.url&&this.res.setAttribute("src",e.url):void 0!==e.alt&&(this.res.setAttribute("role","img"),this.res.setAttribute("aria-label",e.alt)),"IMG"===this.res.tagName&&(e.srcset&&this.res.setAttribute("srcset",e.srcset),e.sizes&&this.res.setAttribute("sizes",e.sizes),void 0!==e.alt&&this.res.setAttribute("alt",e.alt),e.loading&&this.res.setAttribute("loading",e.loading),e.decoding&&this.res.setAttribute("decoding",e.decoding),e.fetchPriority&&this.res.setAttribute("fetchpriority",e.fetchPriority)),e.id&&this.res.setAttribute("id",e.id),e.id&&(n+=' id: "'.concat(e.id,'", \n')),this.id=e.id,"exact"===o?'new Image("'.concat(this.url,'", "exact")'):"uncover"===o&&'new Image("'.concat(this.url,'", "uncover")'),this.commonMethods(r),e.vtn&&(this.res.style.viewTransitionName=e.vtn),this.vtn=e.vtn,e.minHeight&&(this.res.style.minHeight=e.minHeight),e.index&&Zt(t,"setIndex",this,3)([e.index]),e.index&&(this.index=e.index),e.index&&(n+='\n index: "'.concat(e.index,'",')),e.resprop&&this.resprop(e.resprop,e),e.centerSelf&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto"),e.fitContent&&(this.res.style.width="100%",this.res.style.height="100%",this.res.style.marginRight="auto",this.res.style.marginTop="auto",this.res.style.objectFit="cover"),e.objectFit&&(this.res.style.objectFit=e.objectFit),e.objectFit&&(n+='\n objectFit: "'.concat(e.objectFit,'",')),e.objectPosition&&(this.res.style.objectPosition=e.objectPosition),e.objectPosition&&(n+='\n objectPosition: "'.concat(e.objectPosition,'",')),e.as&&this.as(e.as),e.onScroll&&this.onScroll(e.onScroll),e.class&&this.res.setAttribute("class",e.class),e.gpos&&(this.gposObject=e.gpos),e.gpos&&(this.gpos(e.gpos),n+="\n gpos: ".concat(this.removeQuotesFromFirstWord(JSON.stringify(e.gpos)),", ")),e.filtera){var i;i=Array.isArray(e.filtera)?r.filtera.filter(function(t){return"filter"===t.op.name})[0]:e.filtera;var a=this.removeQuotesFromFirstWord(JSON.stringify(i));n+="\n filtera: ".concat(a,", \n")}if(e.keySet&&this.keySet(e.keySet),e.stype&&this.setType(e.stype),e.isBackground&&(this.isBackground=e.isBackground),e.zIndex&&(n+='\n zIndex: "'.concat(e.zIndex,'", \n')),e.area&&this.setArea(e.area),e.area&&(n+='area: "'.concat(e.area,'", \n')),e.opacity&&(this.res.style.opacity=e.opacity),e.width&&(this.res.style.width=e.width),e.width&&(n+='width: "'.concat(e.width,'", ')),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.maxWidth&&(n+='maxWidth: "'.concat(e.maxWidth,'", ')),e.height&&(this.res.style.height=e.height),e.height&&(n+='height: "'.concat(e.height,'", ')),e.maxWidth&&this.maxWidth(e.maxWidth),e.maxWidth&&(n+='maxWidth: "'.concat(e.maxWidth,'", \n')),e.radius&&this.cornerRadius(e.radius),e.radius&&(n+='radius: "'.concat(e.radius,'", \n')),e.marginOp){var s=this.removeQuotesFromFirstWord(JSON.stringify(e.marginOp));n+="\n marginOp: ".concat(s,",")}if(e.clipPath&&this.clipPath(e.clipPath),e.clipPath&&(n+='clipPath: "'.concat(e.clipPath,'", \n')),e.reveal&&this.reveal(e.reveal),r.stroke||r.gradient||r.span||r.backgroundOp||r.layout||r.marginOp||r.shadow||r.filtera||r.animation){r.gradient,r.gradient&&(this.globalGradient=r.gradient.op.gradient),r.stroke&&Zt(t,"setAny",this,3)([{globalBlast:"".concat(r.stroke.op.width," ").concat(r.stroke.op.color)}]);var l=[r.stroke,r.gradient,r.animation,r.span,r.backgroundOp,r.layout,r.marginOp,r.shadow,r.filtera,r.animation];l=l.filter(function(t){return null!=t});for(var c=[],u=0;u<l.length;u++)c.push({range:l[u].range,log:l[u].op.name,target:l[u].target,op:l[u].op});this.chainReact(c,this.options.id)}if(r.shadow){var f=r.shadow,d=this.removeQuotesFromFirstWord(JSON.stringify(f));n+="\n shadow: ".concat(d,",")}if(r.animation){var h=r.animation,p=this.removeQuotesFromFirstWord(JSON.stringify(h));n+="\n animation: ".concat(p,",")}var y="\n .set({".concat(n,"}) \n \n");return Object.keys(e).length>0?this.code.push(y):this.code.push(","),this}},{key:"setID",value:function(t){return null!=t&&this.res.setAttribute("id",t),this}},{key:"opacity",value:function(t){return this.res.style.opacity="".concat(t),this}},{key:"setGrid",value:function(){return this.res.style.gridRow="span 2",this.res.style.gridColumn="span 3",this}},{key:"transform",value:function(t){return this.res.style.transform=t,this}},{key:"offset",value:function(){return this.res.style.marginLeft="-60px",this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"onTap",value:function(t){return this.res.addEventListener("click",t),this}},{key:"border",value:function(t){return this.res.style.borderTopLeftRadius="16px",this.res.style.borderTopRightRadius="16px",this}},{key:"mobileWidth",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="120%"),this}},{key:"image",value:function(t,e,n,r,o){var i=window.matchMedia("(max-device-width: 415px)"),a=document.createElement("div");return a.style.viewTransitionName=r,a.style.width="100%",a.style.height=this.options.height?this.options.height:"400px",o&&(a.style.gridColumn=o.gridColumn,a.style.gridRow=o.gridRow),i.matches&&(a.style.height="500"),a.style.backgroundImage="url(".concat(t,")"),a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="cover","uncover"===n&&(a.style.backgroundSize="contain"),"contain"===e&&(a.style.backgroundSize="contain"),this.res=a,this}},{key:"setup",value:function(){var t=document.createElement("img");return t.style.width="100%",null!=this.url&&""!==this.url&&(t.src=this.url),this.res=t,this}},{key:"float",value:function(t){return this.res.style.float="".concat(t),this}},{key:"grayscale",value:function(t){return this.res.style.filter="grayscale(".concat(t,"%)"),this}},{key:"flex",value:function(t){return this.res.style.flex=1,this}},{key:"height",value:function(t){return this._declared=this._declared||{},this._declared.height=!0,this.res.style.height=t,this.declaresDimension("width")||(this.res.style.width="auto"),this}},{key:"expand",value:function(t){var e=this,n=function(){var n,r;if(window.matchMedia("(min-width: ".concat(t.at,")")).matches){e.res.style.width="".concat(t.width);var o=window.innerWidth/2-(r=n=t.width,(n.includes("%")||n.includes("px"))&&(r=r.substr(0,2)),(n.includes("%")?Number(r/100*window.innerWidth):n.includes("px")?Number(r):void 0)/2);e.res.style.marginLeft="".concat(o,"px")}else e.res.style.width="100%",e.res.style.marginLeft="0px";window.matchMedia("(max-device-width: 415px)").matches&&(e.res.style.width="100%",e.res.style.marginLeft="0px")};return n(),this._on(window,"resize",n),this}},{key:"width",value:function(t){return this._declared=this._declared||{},this._declared.width=!0,this.res.style.width=t,this.declaresDimension("height")||(this.res.style.height="auto"),this}},{key:"declaresDimension",value:function(t){if(this._declared&&this._declared[t])return!0;var e=this.options||{};return null!=e[t]&&""!==e[t]||(Array.isArray(e.keySet)?e.keySet:e.keySet?[e.keySet]:[]).some(function(e){return e&&e.key===t})}},{key:"dimensions",value:function(t,e){return t&&e?(this.res.style.width=t,this.res.style.height=e):(this.res.style.width=t,this.res.style.height=t),this}},{key:"size",value:function(t,e){return this.deprecatedOption("size() on this component","dimensions(w, h)"),this.dimensions(t,e)}},{key:"frame",value:function(t){var e=t.width,n=t.height;return e&&n?(this.res.style.width=e,this.res.style.height=n):(this.res.style.width=e,this.res.style.height=e),this}},{key:"shadow",value:function(t){return"mild"===t.type?this.res.style.boxShadow="0px 3px 15px rgba(0,0,0,0.2)":this.res.style.boxShadow="".concat(t.x,"px ").concat(t.y,"px ").concat(t.radius,"px ").concat(t.color),this}},{key:"cornerRadius",value:function(t){return this.res.style.borderRadius=t,this}},{key:"reveal",value:function(t){var e,n,r,o,i,a,s,l=this.res,c=t&&"object"===Vt(t)?t:{},u=null!==(e=c.mask)&&void 0!==e?e:"square";if("square"!==u)return console.warn('nodality: img.reveal mask "'.concat(u,'" is not supported — use "square".')),this;if("undefined"==typeof window||"function"!=typeof window.IntersectionObserver)return this;if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return this;var f=Math.min(1,Math.max(0,Number(null!==(n=c.size)&&void 0!==n?n:.3))),d=null!==(r=c.duration)&&void 0!==r?r:"1.2s",h=null!==(o=c.easing)&&void 0!==o?o:"cubic-bezier(0.76, 0, 0.24, 1)",p=null!==(i=c.delay)&&void 0!==i?i:"0s",y=Number(null!==(a=c.zoom)&&void 0!==a?a:1.12),m=!1!==c.once,v=["clip-path","scale"].map(function(t){return"".concat(t," ").concat(d," ").concat(h," ").concat(p)}).join(", "),b=!1,g=function(){var t=l.clientWidth,e=l.clientHeight;if(!t||!e)return"inset(".concat(50*(1-f),"% ").concat(50*(1-f),"%)");var n=Math.min(t,e)*f;return"inset(".concat((e-n)/2,"px ").concat((t-n)/2,"px)")};l.style.clipPath=g(),l.style.scale=String(y),l.style.willChange="clip-path, scale",l.style.transition=v;var w="function"==typeof window.ResizeObserver?new window.ResizeObserver(function(){b||(l.style.transition="none",l.style.clipPath=g(),l.offsetWidth,l.style.transition=v)}):null;w&&w.observe(l);var x=Math.min(.9,Math.max(0,Number(null!==(s=c.offset)&&void 0!==s?s:.2))),k=new window.IntersectionObserver(function(t){var e,n=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Jt(t))){e&&(t=e);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.isIntersecting&&!b?(b=!0,l.style.clipPath="inset(0px 0px)",l.style.scale="1",m&&(k.disconnect(),w&&w.disconnect())):r.isIntersecting||!b||m||(b=!1,l.style.clipPath=g(),l.style.scale=String(y))}}catch(t){n.e(t)}finally{n.f()}},{threshold:0,rootMargin:"0px 0px ".concat(100*-x,"% 0px")});return k.observe(l),l.addEventListener("transitionend",function(){b&&m&&(l.style.willChange="auto")}),this}},{key:"clipPath",value:function(t){this.res.style.clipPath='path("'.concat(t,'")');var e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.style.display="block",e.style.width="100%",e.style.height="100%",e.style.overflow="visible",this}},{key:"render",value:function(t){var e=this.res;if(!t)return e;document.querySelector(t).appendChild(e)}}],n&&$t(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function oe(t){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(t)}function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,se(r.key),r)}}function se(t){var e=function(t){if("object"!=oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oe(e)?e:e+""}function le(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(le=function(){return!!t})()}function ce(t,e,n,r){var o=ue(fe(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function ue(){return ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fe(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ue.apply(null,arguments)}function fe(t){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fe(t)}function de(t,e){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},de(t,e)}var he=function(){function t(e,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(t,e,n){return e=fe(e),function(t,e){if(e&&("object"==oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,le()?Reflect.construct(e,n||[],fe(t).constructor):e.apply(t,n))}(this,t)).link=n,o.text=e,o.code=[],o.css=[],o.elCSS=[],o.html=[],o.res=null,o.stopEM=r,o.setup(),o.inlineBlock(),o.res.addEventListener("click",function(t){var e=o.link||o.res.getAttribute("href");if(e){var n=new URL(e,window.location.href).href,r=/^https?:\/\//i.test(n),i=n.startsWith("#"),a=/^[a-zA-Z]+:/.test(n);r||i||n.endsWith(".html")||a||(t.preventDefault(),"navigation"in window?navigation.navigate(n):(history.pushState({},"",n),document.dispatchEvent(new PopStateEvent("popstate"))))}}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&de(t,e)}(t,_t),e=t,(n=[{key:"toElCSS",value:function(){return this.preffersId?this.elCSS.unshift(this.res.id+" { \n"):this.elCSS.unshift("."+this.class+" { \n"),this.elCSS.push(" } \n \n"),this.elCSS}},{key:"getType",value:function(){return"HTMLAnchorElement"}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var t=pt(Object.fromEntries(Object.entries(this.options).filter(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2);return e[0],null!==e[1]})),4);return["new Link().set(".concat(t,")")]}},{key:"setup",value:function(){var t=document.createElement("a");t.setAttribute("href",this.link),t.style.textDecoration="none",t.style.color="black",t.style.fontFamily="Arial";var e=document.createTextNode(this.text);return t.appendChild(e),this.res=t,!1===this.stopEM&&this.em(1),this}},{key:"appendImageAsChild",value:function(t,e){var n=document.createElement("a");t.options.vtn&&(n.style.viewTransitionName=t.options.vtn),n.setAttribute("href",t.options.url);var r=document.createElement("img");return t.options&&(r.style.width=t.options.size,t.options.radius&&(r.style.borderRadius=t.options.radius),r.setAttribute("src",t.options.img),t.options.pad&&(this.res.style.padding=t.options.pad),n.appendChild(r)),this.res=n,e&&(this.res.style.marginLeft=e),this}},{key:"addIcon",value:function(t){var e=document.createElement("img");return e.style.width="20px",e.style.height="auto",e.style.marginLeft=t.padding?t.padding:"10px",e.setAttribute("src",t.url),this.res.appendChild(e),this}},{key:"removeQuotesFromFirstWord",value:function(t){if(t)return t.replace(ht(),"$1:")}},{key:"set",value:function(e){this.elCSS.push("text-decoration: none; \n"),this.options=e;var n="";e.onTap&&this.onTap(e.onTap),e.tags&&ce(t,"setTags",this,3)([e.tags]),e.id&&this.res.setAttribute("id",e.id),e.id&&ce(t,"setID",this,3)([e.id]),this.commonMethods(e),e.flex&&(this.res.style.display="flex"),e.fixMobileTap&&this.fixMobileTap(e.fixMobileTap);var r=this.removeQuotesFromFirstWord(JSON.stringify(e.pad));if(e.pad&&(n+="\n pad: ".concat(r,",")),e.preffersId&&(this.preffersId=e.preffersId),null!=e.preffersId&&(n+="\n preffersId: ".concat(e.preffersId,",")),e.class&&ce(t,"setClass",this,3)([e.class]),e.class&&(n+='\n class: "'.concat(e.class,'",')),e.borderObj){this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius);var o=this.removeQuotesFromFirstWord(JSON.stringify(e.borderObj));n+="\n borderObj: ".concat(o,",")}if(!1===this.options.preffersId?this.html.push('<a class="'.concat(e.class,'" href="#hello">').concat(e.text,"</a> \n \n")):e.id&&this.html.push('<a id="'.concat(e.id.substr(1),'" href="#hello">').concat(e.text,"</a> \n \n")),null!=e.blastData){var i=this.removeQuotesFromFirstWord(JSON.stringify(e.blastData));ce(t,"setAny",this,3)([{globalBlast:"1px ".concat(e.blastData.color)}]),e.blastData&&(n+="\n blastData: ".concat(i,","))}e.nowrap&&(this.res.style.whiteSpace="nowrap"),e.font&&this.font(e.font),e.font&&(n+='\n font: "'.concat(e.font,'",')),e.font&&this.elCSS.push('font-family: "'.concat(e.font,'"; \n')),e.fluidc&&this.fluidCopy(e.fluidc),e.fluidc&&(n+='\n fluidc: "'.concat(e.fluidc,'",')),e.clampc&&this.clampCopy(e.clampc),this.options.id&&(n+='\n id: "'.concat(this.options.id,'",')),e.align&&this.leftAlign(e.align),e.align&&(n+='\n align: "'.concat(e.align,'",')),e.type&&(this.res.style.display="block"),e.color&&this.color(e.color),e.color&&(n+='\n color: "'.concat(e.color,'",')),e.color&&this.elCSS.push('color: "'.concat(e.color,'"; \n')),e.background&&this.background(e.background);var a=this.removeQuotesFromFirstWord(JSON.stringify(e.background));e.background&&(n+="\n background: ".concat(a,",")),e.hover&&this.hover(e.hover);var s=this.removeQuotesFromFirstWord(JSON.stringify(e.hover));if(e.hover&&(n+="\n hover: ".concat(s,",")),e.blast&&(this.blastData=e.blast),e.bold&&(n+="\n bold: ".concat(e.bold,",")),e.block&&this.toBlock(),e.block&&(n+="\n block: ".concat(e.block,",")),e.radius&&(n+='\n radius: "'.concat(e.radius,'",')),e.width&&(n+='\n width: "'.concat(e.width,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.url&&this.res.setAttribute("href",e.url),n+='\n url: "'.concat(e.url,'",'),e.text&&(this.res.textContent=e.text),n+='\n text: "'.concat(e.text,'",'),e.data){e.data&&this.appendImageAsChild(e.data,"20px");var l=this.removeQuotesFromFirstWord(JSON.stringify(e.data));e.data&&(n+="\n data: ".concat(l))}if(e.icon){this.addIcon(e.icon);var c=this.removeQuotesFromFirstWord(JSON.stringify(e.icon));n+="\n icon: ".concat(c,",")}if(e.shadow){var u=e.shadow,f=this.removeQuotesFromFirstWord(JSON.stringify(u));n+="\n shadow: ".concat(f,",")}if(e.stroke){var d=this.removeQuotesFromFirstWord(JSON.stringify(e.stroke));e.stroke&&(n+="\n stroke: ".concat(d,","))}if(e.backgroundOp){var h=this.removeQuotesFromFirstWord(JSON.stringify(e.backgroundOp));n+="\n backgroundOp: ".concat(h,",")}if(e.marginOp){var p=this.removeQuotesFromFirstWord(JSON.stringify(e.marginOp));n+="\n marginOp: ".concat(p,",")}if(e.gradient){var y=this.removeQuotesFromFirstWord(JSON.stringify(e.gradient));n+="\n gradient: ".concat(y,",")}if(e.animation){var m=this.removeQuotesFromFirstWord(JSON.stringify(e.animation));n+="\n animation: ".concat(m,",")}if(e.transform){var v=this.removeQuotesFromFirstWord(JSON.stringify(e.transform));n+="\n transform: ".concat(v,",")}if(e.blast){var b=this.removeQuotesFromFirstWord(JSON.stringify(e.blast));n+="\n blast: ".concat(b,",")}var g="new Link().set({".concat(n,"}) \n");this.code.push(g),e.color&&this.color(e.color),e.rounded&&this.radius("0.5rem"),e.new&&(this.res.setAttribute("target","_blank"),this.res.setAttribute("rel","noopener noreferrer")),e.transform&&this.reactOnTransform(e.transform);var w=[],x=[e.border,e.blast,e.gradient,e.animation,e.span,e.shadow,e.backgroundOp,e.animation,e.transform];if((x=x.filter(function(t){return null!=t})).length>0){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&ce(t,"setAny",this,3)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]);for(var k=0;k<x.length;k++)w.push({range:x[k].range,log:x[k].op.name,target:x[k].target,op:x[k].op});var S=[];e.borderObj&&S.push("border"),e.background&&S.push("background"),e.mar&&S.push("margin"),e.animation&&S.push("animation"),this.chainReact(w,e.id,S,e.isNavA),this.res.style.zIndex=1}return this}},{key:"fixMobileTap",value:function(t){this.res.style.pointerEvents="auto",this.res.style.touchAction="manipulation",this.res.style.cursor="pointer",this.res.style.zIndex="1",this.res.style.position="relative"}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"leftAlign",value:function(t){return this.res.style.textAlign=t,this}},{key:"getClampValue",value:function(t){return"S6"===t?"clamp(2.25rem, 2vw+1.5rem, 3.25rem)":"S5"===t?"clamp(2.75rem, 2vw + 1.5rem, 3.25rem)":"S4"===t?"clamp(3.5rem, 2vw + 1.5rem, 3.25rem)":"S3"===t?"clamp(4.25rem, 2vw + 1.5rem, 3.25rem)":"S2"===t?"clamp(5rem, 2vw + 1.5rem, 3.25rem)":"S1"===t?"clamp(6rem, 2vw + 1.5rem, 3.25rem)":void 0}},{key:"clampCopy",value:function(t){return this.res.style.fontSize=this.getClampValue(t),this}},{key:"fluidCopy",value:function(t){return"S1"===t&&(this.res.style.fontSize="calc(1.625rem + 5.075vw)"),"S2"===t&&(this.res.style.fontSize="calc(1.500rem + 4.3vw)"),"S3"===t&&(this.res.style.fontSize="calc(1.375rem + 3.525vw)"),"S4"===t&&(this.res.style.fontSize="calc(1.250rem + 2.75vw)"),"S5"===t&&(this.res.style.fontSize="calc(1.125rem + 1.975vw)"),"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"inlineBlock",value:function(){return this.res.style.display="inline-block",this}},{key:"toBlock",value:function(){return this.res.style.display="block",this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"newWindow",value:function(){return this.res.target="_new",this}},{key:"transition",value:function(t){return this.res.style.transition="".concat(t,"s ease-in-out"),this.res.style.transionProperty="background, color",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"medium",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="2rem":t.res.style.fontSize="1.5em"};return e(),this._on(window,"resize",e),this}},{key:"opacity",value:function(t){return this.res.style.opacity=t,this}},{key:"em",value:function(t){var e=this,n=window.matchMedia("(max-device-width: 415px)"),r=function(){n.matches?e.res.style.fontSize="2em":e.res.style.fontSize="1em"};return r(),this._on(window,"resize",r),this}},{key:"font",value:function(t){return this.res.style.fontFamily=t,this}},{key:"render",value:function(t){return t?(document.querySelector(t).appendChild(this.res),this):this.res}}])&&ae(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function pe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ye(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function me(t){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(t)}function ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,be(r.key),r)}}function be(t){var e=function(t){if("object"!=me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==me(e)?e:e+""}function ge(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ge=function(){return!!t})()}function we(){return we="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xe(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},we.apply(null,arguments)}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}function ke(t,e){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ke(t,e)}var Se=function(){function t(e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,n){return e=xe(e),function(t,e){if(e&&("object"==me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ge()?Reflect.construct(e,n||[],xe(t).constructor):e.apply(t,n))}(this,t)).code=[],r.saveEl=n,r.frs=e,r.res=null,r.setup(),r.responsive(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ke(t,e)}(t,_t),e=t,n=[{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(t){this.options=t;var e=t;return e.onTap&&this.onTap(e.onTap),e.id&&this.res.setAttribute("id",e.id),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),t.id&&this.res.setAttribute("id",t.id),this.commonMethods(e),t.padding&&this.pad([{a:t.padding}]),t.background&&(this.res.style.backgroundColor="#ecf0f1",this.res.style.cornerRadius="#3rem"),t.alignTo&&(this.res.style.justifyContent=t.alignTo),t.background&&(this.res.style.backgroundColor=t.background),t.justify&&(this.res.style.justifyContent=t.justify),t.border&&("top"===t.border[0]&&(this.res.style.borderTop="".concat(t.border[1]," solid white")),"all"===t.border[0]&&(this.res.style.border="".concat(t.border[1]," solid orange"))),t.borderObj&&(this.borderObj(t.borderObj),JSON.stringify(t.borderObj)),t.width&&(this.res.style.width=t.width),t.height&&(this.res.style.height=t.height),t.gap&&(this.res.style.gap=t.gap),t.align&&(JSON.stringify(t.align),this.res.style.alignItems="flex-start",this.res.style.alignItems="flex-start"),t.wrap&&this.wrap(),t.alignIts&&(JSON.stringify(t.alignIts),this.res.style.alignItems="flex-start"),t.owrap&&this.onlyWrap(),null!=t.owrap&&!1===t.owrap&&(this.res.style.flexWrap="nowrap",this.res.style.background="yellow"),t.toColumn&&this.deprecatedOption("toColumn","colat"),t.column&&this.makeCol(),t.colat&&t.colat&&this.toColumnAt(t.colat),t.align&&this.makeJustify(t.justify),t.justify&&this.makeAlign(t.justify),"flex-start"===t.justifo&&(this.res.style.justifyContent="flex-start"),t.radius&&(this.res.style.borderRadius=t.radius),t.aligns&&this.aligns(t.aligns),this.callReact(e),!0===t.center&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),this}},{key:"callReact",value:function(e){this.options=e;var n,r,o,i=[],a=e.transform&&"object"===me(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||a){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,r=this,"function"==typeof(o=we(xe(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var s=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,a?e.transform:void 0];s=s.filter(function(t){return null!=t});for(var l=0;l<s.length;l++)i.push({range:s[l].range,log:s[l].op.name,target:s[l].target,op:s[l].op});var c=[];e.borderObj&&c.push("border"),e.background&&c.push("background"),e.mar&&c.push("margin"),e.animation&&c.push("animation"),e.span&&c.push("span"),this.chainReact(i,e.id,c)}}},{key:"toColumnAt",value:function(t){var e=this;if(!this.columnAlways){var n=function(){var n=window.matchMedia("(max-width: ".concat(t,")")),r=window.matchMedia("(max-device-width: 415px)");n.matches||r.matches?e.res.style.flexDirection="column":e.res.style.flexDirection="row"};n(),this._on(window,"resize",n)}return this}},{key:"onlyWrap",value:function(){return this.res.style.flexWrap="wrap",this}},{key:"wrap",value:function(){return this.res.style.flexWrap="wrap",this.res.style.justifyContent="space-between",this}},{key:"aligns",value:function(t){return"start"===t&&(this.res.style.alignItems="flex-start"),"end"===t&&(this.res.style.alignItems="flex-end"),"center"===t&&(this.res.style.alignItems="center"),this}},{key:"toCode",value:function(){for(var t={},e=0,n=Object.entries(this.options||{});e<n.length;e++){var r=pe(n[e],2),o=r[0],i=r[1];null!=i&&""!==i&&(t[o]=i)}var a=JSON.stringify(t,null,4).replace(ht(),"$1:").replace(/"([^"]*)"/g,function(t,e){return e.includes("\n")?"`"+e.replace(/`/g,"\\`")+"`":'"'.concat(e,'"')}),s=(this.items||[]).map(function(t){return null!=t&&t.toCode?t.toCode():"/* element */"}).join(",\n ");return[["new FlexRow().set(".concat(a,")"),s?".items([\n ".concat(s,"\n])"):""].join("")]}},{key:"cornerRadius",value:function(t){return this.res.style.borderRadius=t,this}},{key:"makeJustify",value:function(t){return"start"===t&&(this.res.style.justifyContent="flex-start"),this}},{key:"makeAlign",value:function(t){return"center"===t?this.res.style.alignItems="center":this.res.style.justifyContent=t,this}},{key:"makeCol",value:function(){return this.res.style.flexDirection="column",this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"setup",value:function(){var t=document.createElement("div");return t.style.display="flex",t.style.justifyContent="space-around",t.style.alignItems="center",this.res=t,this}},{key:"frame",value:function(t){return this.res.style.width=t.width,this.res.style.height=t.height,window.matchMedia("(max-device-width: 415px)").matches&&t.mobile&&(this.res.style.width=t.mobile),this}},{key:"radius",value:function(t){return this.res.style.borderRadius="".concat(t,"px"),this}},{key:"shadow",value:function(t,e,n){return this.res.style.boxShadow="0px 1px 10px 0px rgb(145 145 145)",this}},{key:"items",value:function(t){this.els=t,this.items=t;for(var e=0;e<t.length;e++){if(null!=t[e])if(t[e].render instanceof Function){var n=t[e].render();this.res.appendChild(n)}else this.res.appendChild(t[e]);if(null!=t[e]&&t[e].render instanceof Function){var r=t[e].render();this.res.appendChild(r),void 0!==t[e].toCode&&this.code.push(t[e].toCode().flatMap(function(t){return t}))}}return this}},{key:"responsive",value:function(t){var e=this,n=window.matchMedia("(max-device-width: 415px)");return window.innerWidth<t||n.matches?this.res.style.gridTemplateColumns="1fr":this.res.style.gridTemplateColumns="1fr 1fr",this._on(window,"resize",function(){window.innerWidth<t||n.matches?e.res.style.gridTemplateColumns="1fr":e.res.style.gridTemplateColumns="1fr 1fr"}),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],n&&ve(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function je(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ee(r.key),r)}}function Ee(t){var e=function(t){if("object"!=Oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oe(e)?e:e+""}var Te=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.obj=e||{},this.items=n||[]},(e=[{key:"render",value:function(){var t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent="space-around",t.setAttribute("id","innerItemsWrapper");var e=window.matchMedia("(max-device-width: 415px)"),n=window.matchMedia("(max-width: 600px)");(e.matches||n.matches)&&(t.style.marginTop="3rem");for(var r=0;r<this.items.length;r++){var o=this.items[r];t.appendChild(o.render())}var i=document.createElement("div");return i.style.width=this.obj.isSide?"333px":"100%",i.style.background=this.obj.background||"white",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.style.height="100%",i.setAttribute("id","outerItemsWrapper"),i.appendChild(t),this.obj.customStyle&&(t.style.width="auto",t.style.top="0rem",t.style.borderRadius="1rem",t.style.background=this.obj.background||"white",t.style.margin="1rem",t.style.position="absolute",t.style.opacity=.8),i}}])&&je(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function _e(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_e=function(){return!!t})()}function Ce(t){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ce(t)}function Ae(t,e){return Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ae(t,e)}function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function Re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,De(r.key),r)}}function Me(t,e,n){return e&&Ie(t.prototype,e),n&&Ie(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function De(t){var e=function(t){if("object"!=Pe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}"undefined"!=typeof window&&(window.CustomDivRenderer=Te);var Fe=function(){return Me(function t(e,n){Re(this,t),this.obj=e||{},this.items=n||[]},[{key:"render",value:function(){var t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.justifyContent="space-around",t.setAttribute("id","innerItemsWrapper");var e=window.matchMedia("(max-device-width: 415px)"),n=window.matchMedia("(max-width: 600px)");(e.matches||n.matches)&&(t.style.marginTop="3rem");for(var r=0;r<this.items.length;r++){var o=this.items[r];t.appendChild(o.render())}var i=document.createElement("div");return i.style.width=this.obj.isSide?"333px":"100%",i.style.background=this.obj.background||"white",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.style.height="100%",i.setAttribute("id","outerItemsWrapper"),i.appendChild(t),this.obj.customStyle&&(t.style.width="auto",t.style.top="0rem",t.style.borderRadius="1rem",t.style.background=this.obj.background||"white",t.style.margin="1rem",t.style.position="absolute",t.style.opacity=.8),i}}])}(),Le=function(){function t(e){var n,r,o,i;return Re(this,t),n=function(t,e,n){return e=Ce(e),function(t,e){if(e&&("object"==Pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_e()?Reflect.construct(e,n||[],Ce(t).constructor):e.apply(t,n))}(this,t),r=n,i=function(){var t,e=window.matchMedia("(max-device-width: 415px)"),r=document.createElement("button");if(r.setAttribute("id","hamburger"),r.setAttribute("type","button"),r.setAttribute("aria-label","Menu"),r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls","innerItemsWrapper"),r.style.border="none",r.style.fontWeight="bold",r.style.position="absolute",r.style.color=null!==(t=n.hamburgerColour)&&void 0!==t?t:"orange",r.style.backgroundColor="transparent",r.style.fontSize=e.matches?"2.1em":"2em",n.hamburgerInset){var o=String(n.hamburgerInset).trim().split(/\s+/);r.style.padding=o.length>1?"".concat(o[0]," ").concat(o[1]):"".concat(o[0]," ").concat(o[0])}var i=document.createTextNode(n.symbol?n.symbol:"☰");return r.appendChild(i),r.style.marginLeft="auto",n.isShown=!1,r.addEventListener("click",function(){n.isShown=!n.isShown,r.setAttribute("aria-expanded",String(n.isShown)),n.hasAnimatedToWide=!1;var t=n.items[0].options;if(t&&t.animation){var e=t.animation.op,o=n.res.children[0].children[1].children[0];if(e){if(n.isShown)for(var i=0;i<o.children.length;i++)o.children[i].animate(e.keyframesClose,{duration:1,fill:"forwards",delay:0}).onfinish=function(){o.parentElement.style.display="block"};else o.parentElement.style.display="none";for(i=0;i<o.children.length;i++){var a=o.children[i];a.animate(e.keyframesClose,{duration:1,fill:"forwards",delay:0}),n.isShown?a.animate(e.keyframesOpen,e.openOptions):a.animate(e.keyframesClose,e.closeOptions)}}}else n.isShown?innerItemsWrapper.parentElement.style.display="block":innerItemsWrapper.parentElement.style.display="none"}),r},(o=De(o="addHamburger"))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,n.titleText="",n.hasHamburger=!1,n.code=[],n.attributes={},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ae(t,e)}(t,_t),Me(t,[{key:"toCode",value:function(){var t="new UINavBar()";return Object.keys(this.attributes).length>0?t+=".setup(".concat(pt(this.attributes,2),")"):t+=".setup({})",t+=".items([\n",t+=this.items.map(function(t){return t.toCode().join("").trim()}).join(",\n"),[t+="\n])"]}},{key:"styled",value:function(t){return this.setup(t),this.styles=t,this}},{key:"setup",value:function(t){this.obj=t,this.obj.isSide||(this.obj.animate=!1),this.attributes=t;var e=document.createElement("div");e.setAttribute("id","sars"),e.style.padding=0,e.style.margin=0;var n=document.createElement("div");return n.setAttribute("id","covid"),n.style.position="absolute",n.style.width="100%",n.style.zIndex=1,n.style.alignItems="flex-start",document.createElement("div").style.position="absolute",n.style.margin="20px",n.style.display="flex",n.style.alignItems="flex-end",n.style.margin=0,n.style.padding=0,n.style.margin=0,e.appendChild(n),this.addCloseButton=!1,this.res=e,t.background&&this.background({color:t.background}),t.openColor&&(this.openColor=t.openColor),t.sticky&&this.sticky(),t.pad&&this.pad(t.pad),t.hamburgerColour&&(this.hamburgerColour=t.hamburgerColour),t.hamburgerInset&&(this.hamburgerInset=t.hamburgerInset),t.mobileSize&&(this.mobileSize=t.mobileSize),t.desktopSize&&(this.desktopSize=t.desktopSize),t.height&&(this.res.children[0].style.height=t.height),this._ui={gap:t.gap,justify:t.justify,alignItems:t.alignItems,barPad:t.barPad,maxWidth:t.maxWidth,borderBottom:t.borderBottom},this.res.setAttribute("role","navigation"),this.res.setAttribute("aria-label",t.ariaLabel||"Primary"),this}},{key:"items",value:function(t){this.items=t;var e=["Link","Image","Spacer","Dropdown"].some(function(e){return t[0].__proto__.constructor.toString().startsWith("class ".concat(e))});this.itemCount=t.length;var n=new Fe(this.obj,this.items).render();this.res.children[0].appendChild(n);var r=this.res.children[0].children[0].children[0],o=this.items[0].options;if(o&&o.animation){var i=o.animation.op;if(i){var a=window.matchMedia("(max-device-width: 415px)"),s=window.matchMedia("(max-width: 600px)");if(a.matches||s.matches){var l={duration:1,fill:"forwards",delay:1};for(c=0;c<r.children.length;c++)r.children[c].animate(i.keyframesClose,l)}else for(var c=0;c<r.children.length;c++)r.children[c].animate(i.keyframesClose,{duration:1,fill:"forwards",delay:1}),r.children[c].animate(i.keyframesOpen,i.openOptions)}}if(this.adjust(),!e){this.itemCount=t.length;var u=document.createElement("div");for(u.style.backgroundColor="orange",c=0;c<t.length;c++){var f=t[c];if(f.logo){var d=new Image(f.logo).width("100px"),h=document.createElement("div");h.style.flex="1",h.style.height=23;var p=document.createElement("div");p.setAttribute("id","WR"),p.style.display="flex",p.style.flexDirection="row",p.appendChild(d.render()),this.res.children[0].appendChild(d.render()),this.obj.spacing&&this.res.children[0].appendChild(h)}if(f.logo&&(this.allowPad=!0),f.logo&&this.obj.spacing&&(this.res.children[0].children[0].style.marginLeft=this.obj.spacing.sides,this.res.children[0].children[0].style.marginRight=this.obj.spacing.sides),f.title){var y=void 0;y=this.allowPad?f.type?new Dropdown(f.items,f.title):new Link(f.title,f.url).pad([{lr:"1em"}]):f.type?new Link("DRPA",f.url):new Link(f.title,f.url),u.appendChild(y.render())}}this.res.children[0].appendChild(u),this.adjust()}var m=this.addHamburger();this.itemCount,this.obj.spacing,m.style.zIndex=1;var v=this.res.children[0];return v&&!v.querySelector("#hamburger")&&v.insertBefore(m,v.firstChild),this}},{key:"instance",value:function(){return this.res.children[0]}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=this.res.style.top||"0px",this.res.style.zIndex=this.res.style.zIndex||50,this._sticky=!0,this}},{key:"font",value:function(t){for(var e=0;e<this.res.children[0].children;e++)this.res.children[0].children[e].style.fontFamily=t;return this}},{key:"background",value:function(t){return t.background?(this.res.children[0].style.backgroundColor=t.color,this.res.children[0].style.opacity=t.opacity,this):(this.res.children[0].style.backgroundColor="transparent",this)}},{key:"adjust",value:function(t){var e=this,n=window.matchMedia("(max-width: 600px)"),r=window.matchMedia("(max-device-width: 415px)"),o=function(){e.isShown=!1,e.res.children[0],function(){for(var t=0;t<e.res.children[0].children.length;t++){var n=e.res.children[0].children[t];n.style.fontSize=r.matches?e.mobileSize?e.mobileSize:"1.2em":e.desktopSize?e.desktopSize:"1em","☰"===n.textContent&&(n.style.fontSize="2em")}}(),e.res.children[0].style.flexDirection="column";for(var t=0;t<e.res.children[0].children.length;t++)"☰"==e.res.children[0].children[t].textContent||e.res.children[0].children[t].textContent==e.keepItem?(e.res.children[0].children[t].id,e.res.children[0].children[t].style.display="flex"):e.res.children[0].children[t].style.display="none"};if(this.obj.isSide)o();else{var i=this.res.children[1];null!=i&&(i.style.background="yellow"),n.matches||r.matches?o():function(){e.res.children[0];for(var t=0;t<e.res.children[0].children.length;t++){var n=e.res.children[0].children[t];n.style.marginTop="0em",n.id,n.style.display="flex",n.textContent===e.titleText&&e.titleText.length>0&&(n.style.fontSize="2em")}var r=e.items[0].options;if(r&&r.animation){var o=r.animation.op,i=e.res.children[0].children[1].children[0];if(i.style.marginTop="0",o&&!e.hasAnimatedToWide)for(e.hasAnimatedToWide=!0,t=0;t<i.children.length;t++)i.children[t].animate(o.keyframesOpen,o.openOptions)}}()}return this}},{key:"render",value:function(t){var e=this,n=function(){var t=window.matchMedia("(max-width: 600px)"),n=window.matchMedia("(max-device-width: 415px)"),r=e.res.querySelector("#outerItemsWrapper")||e.res.children[0].children[1],o=r&&(r.querySelector("#innerItemsWrapper")||r.children[0]),i=e._ui||{};if(o&&(i.gap&&(o.style.gap=i.gap),i.justify&&(o.style.justifyContent=i.justify),i.alignItems&&(o.style.alignItems=i.alignItems),i.barPad&&(o.style.padding=i.barPad),i.maxWidth&&(o.style.maxWidth=i.maxWidth,o.style.marginLeft="auto",o.style.marginRight="auto")),r&&i.borderBottom&&(r.style.borderBottom=i.borderBottom),n.matches&&(o.style.position="relative"),(t.matches||n.matches)&&null!=o?o.style.flexDirection="column":null==o||e.obj.isSide||(o.style.flexDirection="row"),!e.obj.isSide&&!t.matches&&!n.matches){var a=e.res.querySelector("#hamburger");a&&(a.style.display="none")}e.obj.isSide&&(o.style.flexDirection="column"),e.obj.isSide||t.matches||(e.res.children[0].style.position="relative",r.style.transform="translateY(0px)"),!e.obj.isSide&&t.matches,e.obj.customStyle&&(e.res.children[0].style.marginTop="1rem",e.res.children[0].style.position="absolute",e.res.children[0].style.borderRadius="1rem",r.style.borderRadius="1rem"),e.obj.radius&&(e.res.children[0].style.borderRadius="1rem",r.style.borderRadius="1rem")};return this._on(window,"resize",function(){return n()}),n(),t?(document.querySelector(t).style.padding=0,document.querySelector(t).style.margin=0,document.querySelector(t).appendChild(this.res),this.res):this.res}}])}();function ze(t){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(t)}function Ne(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Be(r.key),r)}}function Be(t){var e=function(t){if("object"!=ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}function We(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(We=function(){return!!t})()}function Ue(){return Ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=qe(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ue.apply(null,arguments)}function qe(t){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qe(t)}function He(t,e){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},He(t,e)}var Ge=function(){function t(e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,n){return e=qe(e),function(t,e){if(e&&("object"==ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,We()?Reflect.construct(e,n||[],qe(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,r.res=null,r.width="16em",r.height="100vh",r.els=e,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&He(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(e){var n,r,o,i=this;e.tags&&(n=t,r=this,"function"==typeof(o=Ue(qe(1&3?n.prototype:n),"setTags",r))?function(t){return o.apply(r,t)}:o)([e.tags]),e.width&&(this.width=e.width),e.height&&(this.height=e.height);var a=document.createElement("div");a.style.position="absolute";var s=document.createElement("button");s.style.position="absolute",s.style.background="white",s.style.opacity=.8,s.style.border="none",s.style.width="2rem",s.style.height="2rem",s.style.minWidth="24px",s.style.minHeight="24px",s.getAttribute("aria-label")||s.setAttribute("aria-label","Toggle navigation"),s.style.borderRadius="50%",s.style.zIndex=2;var l=document.createTextNode("☰");s.appendChild(l),s.style.fontSize="2em",window.matchMedia("(max-device-width: 400px)").matches&&(s.style.fontSize="6em"),window.matchMedia("(max-device-width: 400px)").matches&&e.fullMobile&&(this.width="100vw"),a.appendChild(s);var c=document.createElement("div");return c.style.position="absolute",c.style.backgroundColor="#fff",c.style.flexDirection="column",c.style.display="flex",c.style.alignItems="center",c.style.margin=0,c.style.padding=0,c.style.width=this.width,c.style.margin=0,c.style.marginTop="-10px",c.style.paddingTop="1em",c.style.paddingBottom="1em",c.style.height="".concat(this.height),c.style.transform="translateX(-".concat(this.width,")"),c.style.transition="all 0.80s",a.appendChild(c),this.hidden=!1,s.addEventListener("click",function(){i.hidden=!i.hidden;for(var t=0;t<c.children.length;t++)"☰"!==c.textContent&&(i.hidden?c.style.transform="translateX(0em)":c.style.transform="translateX(-".concat(i.width,")"))}),this.res=a,this.els&&this.items(this.els),this}},{key:"background",value:function(t){return this.res.children[1].style.backgroundColor=t.color,this.res.children[1].style.opacity=t.opacity,this}},{key:"items",value:function(t){this.itemCount=t.length;for(var e=0;e<t.length;e++)this.res.children[1].appendChild(t[e].render());return this}},{key:"render",value:function(t){return t?(document.querySelector(t).style.padding=0,document.querySelector(t).style.margin=0,document.querySelector(t).appendChild(this.res),this.res):this.res}}],n&&Ne(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Xe(t){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xe(t)}function Ve(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Je(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Je(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ye(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$e(r.key),r)}}function $e(t){var e=function(t){if("object"!=Xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xe(e)?e:e+""}function Qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Qe=function(){return!!t})()}function Ke(t){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ke(t)}function Ze(t,e){return Ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ze(t,e)}var tn=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e,n){return e=Ke(e),function(t,e){if(e&&("object"==Xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qe()?Reflect.construct(e,n||[],Ke(t).constructor):e.apply(t,n))}(this,t)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ze(t,e)}(t,_t),e=t,(n=[{key:"setup",value:function(t){return this.obj=t,this.setTags(this.obj.tags),this.animate=void 0===this.obj.animate||this.obj.animate,this.res=this.createSideNav(t),t&&null!=t.id&&""!==t.id&&this.res&&this.res.setAttribute&&this.res.setAttribute("id",String(t.id)),this.res.style.position="relative",this.res.style.zIndex=3,this.closed=!0,this}},{key:"toggleSideNav",value:function(t){var e=this;this.closed=!this.closed;var n=this.res.children[0];if(this.closed)if(n.style.overflowX="hidden",t.style.opacity=1,this.animate){this.ope=n.animate([{transform:"translateX(0)"},{transform:"translateX(100%)"}],{duration:300,fill:"forwards"}),this.ope.finished.then(function(){var t=new CustomEvent(e.obj.tags.close);window.dispatchEvent(t)});var r,o=-1,i=Ve(n.children);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(o+=1,this.masterEL[o]){var s,l=Ve(a.children);try{for(l.s();!(s=l.n()).done;){var c=s.value,u=this.masterEL[o].options.animation;u&&this.mappedIDS.includes(c.id)&&c.animate(u.op.keyframesClose,u.op.closeOptions)}}catch(t){l.e(t)}finally{l.f()}}}}catch(t){i.e(t)}finally{i.f()}}else n.style.display="none";else{n.style.overflowX="none";var f,d=-1,h=Ve(n.children);try{for(h.s();!(f=h.n()).done;){var p=f.value;d+=1;var y,m=Ve(p.children);try{for(m.s();!(y=m.n()).done;){var v=y.value;if(this.mappedIDS.includes(v.id)&&void 0!==this.masterEL[0]){var b=this.masterEL[d].options.animation;if(b){var g=b.op.openOptions;g.delay||(g.delay=1),g.duration||(g.duration=300),v.animate(b.op.keyframesOpen,g)}}}}catch(t){m.e(t)}finally{m.f()}}}catch(t){h.e(t)}finally{h.f()}t.style.opacity=0,this.animate?(n.style.display="flex",this.opeClose=n.animate([{transform:"translateX(100%)"},{transform:"translateX(0)"}],{duration:300,fill:"forwards"}),this.opeClose.finished.then(function(){var t=new CustomEvent(e.obj.tags.open);window.dispatchEvent(t)})):n.style.display="flex"}}},{key:"createToggleButton",value:function(t){var e=document.createElement("button");return e.textContent="☰",e.style.padding="10px 20px",e.style.minWidth="24px",e.style.minHeight="24px",e.style.lineHeight="1",e.style.backgroundColor="transparent",e.style.color=null!=t?t:"#3498db",e.style.border="none",e.style.borderRadius="5px",e.style.cursor="pointer",e.style.zIndex=1,e.style.fontSize="1.6rem",this.obj.fixed&&(e.style.position="fixed"),e}},{key:"createCloseButton",value:function(t){var e=document.createElement("button");return e.textContent="×",e.style.fontSize="1.6rem",e.style.padding="10px 20px",e.style.minWidth="24px",e.style.minHeight="24px",e.style.lineHeight="1",e.style.backgroundColor="transparent",e.style.color=null!=t?t:"black",e.style.border="none",e.style.borderRadius="5px",e.style.cursor="pointer",e.style.zIndex=1,e.style.alignSelf="flex-end",e}},{key:"createSideNav",value:function(t){var e=this,n=document.createElement("div");n.style.display="flex",n.style.justifyContent="flex-end";var r=document.createElement("div");r.style.display="none",r.style.background=this.obj.background||"#1abc9c",r.style.height="100%",window.matchMedia("(max-device-width: 415px)").matches?r.style.width="100%":r.style.width=this.obj.width||"400px",r.style.position="fixed",r.style.right=0,this.animate&&(r.style.transform="translateX(100%)"),r.style.flexDirection="column",r.style.justifyContent="flex-start";var o=this.createToggleButton(this.obj.hamColour.opened),i=this.createCloseButton(this.obj.hamColour.closed);return o.addEventListener("click",function(){return e.toggleSideNav(o)}),i.addEventListener("click",function(){return e.toggleSideNav(o)}),r.appendChild(i),n.appendChild(r),n.appendChild(o),n}},{key:"items",value:function(t){this.masterEL=t.items.filter(function(t){return void 0!==t.link});var e=t.items.filter(function(t){return void 0===t.items}).map(function(t){return t.id});if(this.mappedIDS=e,this.item=t,this.res.children[0].appendChild(t.render()),void 0!==this.masterEL[0]){var n=this.masterEL[0].options.animation;if(n){var r,o=Ve(this.res.children[0].children);try{for(o.s();!(r=o.n()).done;){var i,a=Ve(r.value.children);try{for(a.s();!(i=a.n()).done;){var s=i.value;this.mappedIDS.includes(s.id)&&(n.op.closeOptions.delay=0,s.animate(n.op.keyframesClose,n.op.closeOptions))}}catch(t){a.e(t)}finally{a.f()}}}catch(t){o.e(t)}finally{o.f()}}}return this}},{key:"toCode",value:function(){var t="new SideNav().setup(".concat(this.formatObj(this.obj),")");if(this.item){var e=this.item.toCode?this.item.toCode().join(""):this.formatObj(this.item);e=e.replace(/,\s*(\.set\(|\.add\()/g,"\n $1"),t+=".items(".concat(e,")")}return t}},{key:"formatObj",value:function(t){return JSON.stringify(t,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.res),this.res}}])&&Ye(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function en(t){return en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},en(t)}function nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function rn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,on(r.key),r)}}function on(t){var e=function(t){if("object"!=en(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=en(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==en(e)?e:e+""}function an(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(an=function(){return!!t})()}function sn(t){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sn(t)}function ln(t,e){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ln(t,e)}var cn=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=sn(e),function(t,e){if(e&&("object"==en(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,an()?Reflect.construct(e,n||[],sn(t).constructor):e.apply(t,n))}(this,t)).res=document.createElement("div"),e.res.style.display="grid",e.attributes={},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ln(t,e)}(t,_t),e=t,n=[{key:"set",value:function(t){return this.options=t,this.attributes=t,this.templateCols=t.templateCols,t.templateCols&&(this.res.style.gridTemplateColumns="repeat(".concat(t.templateCols.cols,", 1fr)"),this.res.style.gridTemplateRows="repeat(".concat(t.templateCols.cols,", 1fr)")),this.res.style.height=t.height?t.height:"600px",t.positions&&(this.storedPositions=t.positions),this}},{key:"generateGridPositions",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=document.createElement("div");o.classList.add("container"),o.style.display="grid",o.style.gridTemplateColumns="repeat(".concat(r,", 1fr)"),o.style.gridTemplateRows="repeat(".concat(n,", 1fr)"),o.style.width="100%",o.style.height="100vh";var i=t.map(function(t,e){return{row:Math.floor(n/2)+e,col:Math.floor(r/2)+e}});return t.forEach(function(o,a){var s=i[a],l=s.row,c=s.col,u=function(e){var n=0,r=0;return t.forEach(function(t,o){var a=t.weight,s=t.direction,l=i[e],c=i[o],u=l.col-c.col,f=l.row-c.row,d=a*(1/(Math.sqrt(u*u+f*f)+1));switch(s){case"L":n-=d;break;case"R":n+=d;break;case"U":r-=d;break;case"B":r+=d}}),{forceX:n,forceY:r}}(a),f=u.forceX,d=u.forceY;c=Math.max(1,Math.min(r,c+Math.round(f))),l=Math.max(1,Math.min(n,l+Math.round(d)));var h=e.items.filter(function(t){return t.id===o.attract.slice(1)})[0].render();h.style.gridRowStart=l,h.style.gridColumnStart=c,h.style.display="flex",h.style.alignItems="center",h.style.justifyContent="center",h.style.fontWeight="bold",e.res.appendChild(h)}),this}},{key:"add",value:function(t){this.items=t;var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return nn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.res.appendChild(r.render())}}catch(t){n.e(t)}finally{n.f()}return this.storedPositions&&this.generateGridPositions(this.storedPositions),this}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var t=pt(this.options,4),e="";return e+=".add([\n",e+=this.items.map(function(t){return t.toCode().join("").trim()}).join(",\n"),e+="\n])",["new Free().set(".concat(t,")").concat(e)]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],n&&rn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function un(t){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},un(t)}function fn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hn(r.key),r)}}function hn(t){var e=function(t){if("object"!=un(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==un(e)?e:e+""}function pn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(pn=function(){return!!t})()}function yn(t){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yn(t)}function mn(t,e){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mn(t,e)}var vn=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=yn(e),function(t,e){if(e&&("object"==un(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pn()?Reflect.construct(e,n||[],yn(t).constructor):e.apply(t,n))}(this,t)).url=e,n.res=null,n.options={},n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mn(t,e)}(t,_t),e=t,n=[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options=t||{},this}},{key:"toCode",value:function(){var t=Object.fromEntries(Object.entries(this.options||{}).filter(function(t){return null!=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return fn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2)[1]})),e=Object.keys(t).length?".set(".concat(JSON.stringify(t),")"):"";return["new Audio(".concat(JSON.stringify(this.url),")").concat(e)]}},{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],n&&dn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function gn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wn(r.key),r)}}function wn(t){var e=function(t){if("object"!=bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bn(e)?e:e+""}function xn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xn=function(){return!!t})()}function kn(t){return kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kn(t)}function Sn(t,e){return Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Sn(t,e)}var On=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=kn(e),function(t,e){if(e&&("object"==bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xn()?Reflect.construct(e,n||[],kn(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,n.res=null,n.value=e,n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sn(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(){var t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div");return e.style.position="absolute",n.style.position="relative",t.appendChild(e),t.appendChild(n),this.res=t,this}},{key:"padding",value:function(t,e,n,r){return(t||e||n||r)&&(this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=n,this.res.style.paddingBottom=r),e||n||r||(this.res.style.padding=t),this}},{key:"size",value:function(t){var e=this,n=t.width.split("%")[0],r=t.height;this.res.children[0].style.width=n/100*window.innerWidth,this.res.children[0].style.height=r,this.res.children[1].style.width=n/100*window.innerWidth*this.value,this.res.children[1].style.height=r;var o=function(){e.res.children[0].style.width=n/100*window.innerWidth,e.res.children[0].style.height=r,e.res.children[1].style.width=n/100*window.innerWidth*e.value,e.res.children[1].style.height=r};return this._on(window,"resize",o),o(),this}},{key:"colors",value:function(t,e){return this.res.children[0].style.background=t,this.res.children[1].style.background=e,this}},{key:"round",value:function(t){return this.res.children[0].style.borderRadius="".concat(t,"px"),this.res.children[1].style.borderRadius="".concat(t,"px"),this}},{key:"render",value:function(t){if(Array.from(this.res.children).forEach(function(t){return t.style.padding=0}),Array.from(this.res.children).forEach(function(t){return t.style.margin=0}),!t)return this.res;document.querySelector(t).appendChild(this.res)}}],n&&gn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function jn(t){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jn(t)}function En(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tn(r.key),r)}}function Tn(t){var e=function(t){if("object"!=jn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jn(e)?e:e+""}function _n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_n=function(){return!!t})()}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(t,e)}var Pn=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Cn(e),function(t,e){if(e&&("object"==jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_n()?Reflect.construct(e,n||[],Cn(t).constructor):e.apply(t,n))}(this,t)).setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}(t,_t),e=t,(n=[{key:"setup",value:function(){var t=document.createElement("div");t.style.display="flex",t.style.flexDirection="column",t.style.justifyContent="center",t.style.alignItems="center",t.style.width="100%",t.style.height="auto",t.style.margin=0,t.style.padding=0,this.res=t}},{key:"set",value:function(t){return void 0!==t.id&&null!==t.id&&this.res.setAttribute("id",t.id),this.commonMethods(t),this}},{key:"toCode",value:function(){return[""]}},{key:"items",value:function(t){for(var e=0;e<t.length;e++){var n=t[e].render();this.res.appendChild(n)}return this}},{key:"add",value:function(t){for(var e=0;e<t.length;e++){var n=t[e].render();this.res.appendChild(n)}return this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&En(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Rn(t){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(t)}function In(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mn(r.key),r)}}function Mn(t){var e=function(t){if("object"!=Rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rn(e)?e:e+""}function Dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Dn=function(){return!!t})()}function Fn(){return Fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ln(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Fn.apply(null,arguments)}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(t)}function zn(t,e){return zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zn(t,e)}var Nn=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Ln(e),function(t,e){if(e&&("object"==Rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Dn()?Reflect.construct(e,n||[],Ln(t).constructor):e.apply(t,n))}(this,t)).res=document.createElement("code"),e.pre=document.createElement("pre"),e.res.style.background="#18232e",e.res.style.display="block",e.res.style.width="auto",e.res.style.height="auto",e.res.style.borderRadius="1rem",e.pre.appendChild(e.res),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)}(t,_t),e=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"toCode",value:function(){var t=this.options;Object.keys(t).forEach(function(e){return void 0===t[e]&&delete t[e]});var e=JSON.stringify(t,null,2).replace(ht(),"$1:").replace(/"([^"]+)"/g,function(t,e){return e.includes("\n")||e.includes("'")||e.includes('"')?"`"+e.replace(/`/g,"\\`")+"`":'"'.concat(e,'"')});return"new Code().set(".concat(e,")")}},{key:"callReact",value:function(e){this.options=e;var n,r,o,i=[],a=e.transform&&"object"===Rn(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||a){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,r=this,"function"==typeof(o=Fn(Ln(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var s=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,a?e.transform:void 0];s=s.filter(function(t){return null!=t});for(var l=0;l<s.length;l++)i.push({range:s[l].range,log:s[l].op.name,target:s[l].target,op:s[l].op});var c=[];e.borderObj&&c.push("border"),e.background&&c.push("background"),e.mar&&c.push("margin"),e.animation&&c.push("animation"),e.span&&c.push("span"),this.chainReact(i,e.id,c)}}},{key:"set",value:function(t){return t.code&&(this.pre.children[0].innerHTML=t.code),t.class&&this.pre.children[0].setAttribute("class","".concat(t.class)),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),t.resprop&&this.resprop(t.resprop,t),t.width&&(this.res.style.width=t.width),t.background&&(this.res.style.background=t.background),t.color&&(this.res.style.color=t.color),t.borderRadius&&(this.res.style.background=t.borderRadius),t.borderObj&&(this.res.style.border="".concat(t.borderObj.width," solid ").concat(t.borderObj.color),this.res.style.borderRadius="".concat(t.borderObj.radius)),this.callReact(t),this}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.pre),this.res}}],n&&In(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function Wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Un(r.key),r)}}function Un(t){var e=function(t){if("object"!=Bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bn(e)?e:e+""}function qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qn=function(){return!!t})()}function Hn(t){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hn(t)}function Gn(t,e){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gn(t,e)}var Xn=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=Hn(e),function(t,e){if(e&&("object"==Bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qn()?Reflect.construct(e,n||[],Hn(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,n.res=null,n.st=e,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gn(t,e)}(t,_t),e=t,(n=[{key:"setup",value:function(){var t=document.createElement("div");return t.style.display="grid",this.res=t,this.st&&this.sticky(),this}},{key:"set",value:function(t){return this.options=t||{},this.setup(),t.height&&(this.res.style.height=t.height),t.sticky&&this.sticky(),this}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"add",value:function(t){this.children=t;for(var e=0;e<t.length;e++){var n=t[e].render();n.style.gridColumn=1,n.style.gridRow=1,this.res.appendChild(n)}return this}},{key:"toCode",value:function(){var t=this.options&&this.options.id,e="new Stack().set(".concat(t?"{ id: ".concat(JSON.stringify(String(t))," }"):"{}",")");if(this.children.length>0){var n=this.children.map(function(t){return t.toCode()}).join(",\n");e+=".add([\n \n ".concat(n," \n \n])")}return[e]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(t).appendChild(this.res)}}])&&Wn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Vn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Yn(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(t)}function Yn(t,e){if(t){if("string"==typeof t)return $n(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$n(t,e):void 0}}function $n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Kn(r.key),r)}}function Kn(t){var e=function(t){if("object"!=Jn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jn(e)?e:e+""}function Zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Zn=function(){return!!t})()}function tr(){return tr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=er(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},tr.apply(null,arguments)}function er(t){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},er(t)}function nr(t,e){return nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nr(t,e)}var rr=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=er(e),function(t,e){if(e&&("object"==Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zn()?Reflect.construct(e,n||[],er(t).constructor):e.apply(t,n))}(this,t)).res=null,n.setup(e),n.code=[],n.isLast=!1,n.constrObj=e,n.code.push("\n new Wrapper() \n"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nr(t,e)}(t,_t),e=t,n=[{key:"toCode",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var n=" ".repeat(e),r="".concat(n,'new Wrapper("').concat(this.constrObj,'")');if(this.constrObj||(r="".concat(n,"new Wrapper()")),Object.keys(this.obj).length){var o=pt(Object.fromEntries(Object.entries(this.obj).filter(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Yn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2);return e[0],null!==e[1]})),2);r+="\n".concat(n," .set(").concat(o,")")}return null!==(t=this.items)&&void 0!==t&&t.length&&(r+="\n".concat(n," .add([\n")+this.items.map(function(t){return t.toCode(e+4)}).join(",\n")+"\n".concat(n," ])")),[r+="\n".concat(n)]}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){this.obj=e,this.commonMethods(e),e.onTap&&this.onTap(e.onTap);var n=".set({";e.isHidden&&this.isHidden(e.isHidden),e.scale&&(this.res.style.scale=e.scale),e.scale&&(n+="scale: ".concat(e.scale)),e.keySet&&this.keySet(e.keySet),e.resprop&&this.resprop(e.resprop,e),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.gpos&&this.gpos(e.gpos);var r,o,i,a=[],s=e.transform&&"object"===Jn(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||s){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,o=this,"function"==typeof(i=tr(er(1&3?r.prototype:r),"setAny",o))?function(t){return i.apply(o,t)}:i)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var l=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,s?e.transform:void 0];l=l.filter(function(t){return null!=t});for(var c=0;c<l.length;c++)a.push({range:l[c].range,log:l[c].op.name,target:l[c].target,op:l[c].op});var u=[];e.borderObj&&u.push("border"),e.background&&u.push("background"),e.mar&&u.push("margin"),e.animation&&u.push("animation"),e.span&&u.push("span"),s&&u.push("transform"),e.gradient&&u.push("gradient"),e.blast,this.options=e,this.chainReact(a,this.options.id,u)}if(e.centerColumn&&this.deprecatedOption("centerColumn",'center: "x"'),e.mboth&&(this.deprecatedOption("mboth",'mar: "center"'),this.mar("center")),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.simpleCenter&&this.deprecatedOption("simpleCenter","center: true"),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(n+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(n+='\n width: "'.concat(e.width,'",')),e.overflow&&(n+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(n+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(n+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),void 0!==e.borderObj.radius&&(this.res.style.borderRadius=e.borderObj.radius)),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),void 0!==e.borderObja.radius&&(this.res.style.borderRadius=e.borderObja.radius)),e.font&&this.font(e.font),e.font&&(n+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.deprecatedOption("flexCenter",'center: "y"'),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(n+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.area&&this.setArea(e.area),e.area&&(n+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(n+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(n+='\n flexDir: "'.concat(e.flexDir,'",')),e.center&&(n+="center: ".concat(JSON.stringify(e.center),",")),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.transform&&"object"===Jn(e.transform)&&this.reactOnTransform(e.transform),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var f=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));n+="\n stretch: ".concat(f,",")}for(var d in e)if("margin"===d){var h=e[d];if(Array.isArray(h)&&h.length>0){var p,y=Vn(h);try{for(y.s();!(p=y.n()).done;){var m=p.value;m.hasOwnProperty("top")&&(this.res.style.marginTop=m.top),m.hasOwnProperty("right")&&(this.res.style.marginRight=m.right),m.hasOwnProperty("bottom")&&(this.res.style.marginBottom=m.bottom),m.hasOwnProperty("left")&&(this.res.style.marginLeft=m.left)}}catch(t){y.e(t)}finally{y.f()}}}return 8===(n+="})\n").length&&(n=""),this.code.push(n),this}},{key:"rsp",value:function(t){var e=this;this.res.style.display="flex";var n=t.sequence.split("-"),r=function(){var r=t.ranges;"0px"!==r[0]&&r.unshift("0px");for(var o=0;o<r.length-1;o++)(window.matchMedia("(min-width: ".concat(r[o],") and (max-width: ").concat(r[o+1],")")).matches||window.matchMedia("(min-width: ".concat(r[r.length-1],")")).matches)&&("row"===n[o]&&(e.res.style.flexDirection="row",e.res.style.border="3px solid green"),"col"===n[o]&&(e.res.style.flexDirection="column",e.res.style.border="3px solid purple"));return e};this._on(window,"resize",r),r()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(t){var e=this,n=function(){window.matchMedia("(max-width: ".concat(t.at,")")).matches?e.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?e.res.style.width="100%":e.res.style.width=t.backTo};n(),this._on(window,"resize",n)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"weight",value:function(t){return this.res.style.fontWeight=t,this}},{key:"flexAlign",value:function(t){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===t?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"heightNoAuto",value:function(t){return this.res.style.height=t,this}},{key:"border",value:function(t){return this.res.style.borderRadius="".concat(t.radius,"px"),this.res.style.border="".concat(t.width,"px solid ").concat(t.color),this}},{key:"add",value:function(t){this.items=t,this.code.push(".add([ \n");var e=t.map(function(e,n){return e.toCode().flatMap(function(t){return t}).join("")+(n<t.length-1?",":"")}).join("");this.code.push(e);for(var n=0;n<t.length;n++)if(void 0!==t[n]&&void 0!==t[n].toCode){var r=t[n].render();this.res.appendChild(r)}return this.code.push("])"),this}},{key:"setWidth",value:function(t){this.res.style.width="100vw"}},{key:"setHeight",value:function(t){return this.res.style.height="".concat(t),this}},{key:"setup",value:function(t){var e=null;return t?(t.isLink&&(e=document.createElement("a")),"aside"===t&&(e=document.createElement("aside")),"article"===t&&(e=document.createElement("article")),"main"===t&&(e=document.createElement("main")),"section"===t&&(e=document.createElement("section")),"header"===t&&(e=document.createElement("header")),"footer"===t&&(e=document.createElement("footer"))):e=document.createElement("div"),t&&t.isLink&&(e.style.textDecoration="none",e.setAttribute("href",t.child)),this.res=e,this.res.style.margin=0,this.res.style.padding=0,t&&!0===t.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),t&&!0===t.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),t&&"left"===t.align&&(this.res.style.alignItems="flex-start"),t&&"right"===t.align&&(this.res.style.alignItems="flex-end"),t&&t.height&&(this.res.style.height=t.height),t&&t.width&&(this.res.style.width=t.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(t){return this.res.style.width="auto",this.res.style.height="".concat(t),this}},{key:"dimensions",value:function(t,e){return this.w=t,this.h=e,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"size",value:function(t,e){return this.deprecatedOption("size() on this component","dimensions(w, h)"),this.dimensions(t,e)}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"corner",value:function(t){return this.res.style.borderRadius=t,this}},{key:"apply",value:function(t){var e=this,n=function(){for(var n=0;n<t.length;n++){var r=t[n],o=window.matchMedia("(max-width: ".concat(r.width,"px)"));r.device&&(o=window.matchMedia("(max-device-width: ".concat(r.width,"px)"))),o.matches&&Object.assign(e.res.style,r.styles)}},r=window.matchMedia("(max-width: ".concat(t[0].width,"px)"));return t[0].device&&(r=window.matchMedia("(max-device-width: ".concat(t[0].width,"px)"))),r.matches||Object.assign(this.res.style,t[0].styles),n(),this._on(window,"resize",n),this}},{key:"mount",value:function(t){document.querySelector(t).appendChild(this.res)}},{key:"render",value:function(t){return t?(document.querySelector("#mount"),document.querySelector(t).appendChild(this.res),this):this.res}}],n&&Qn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function or(t){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(t)}function ir(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ar(r.key),r)}}function ar(t){var e=function(t){if("object"!=or(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==or(e)?e:e+""}function sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(sr=function(){return!!t})()}function lr(t){return lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lr(t)}function cr(t,e){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cr(t,e)}var ur=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=lr(e),function(t,e){if(e&&("object"==or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,sr()?Reflect.construct(e,n||[],lr(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,e.res=document.createElement("meta"),e.res.setAttribute("name","viewport"),e.res.setAttribute("content","width=device-width, initial-scale=1"),e.charset=document.createElement("meta"),e.charset.setAttribute("charset","UTF-8"),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(t,_t),e=t,(n=[{key:"add",value:function(){document.head.appendChild(this.res),document.head.appendChild(this.charset)}}])&&ir(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function fr(t){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(t)}function dr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return hr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function pr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yr(r.key),r)}}function yr(t){var e=function(t){if("object"!=fr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fr(e)?e:e+""}function mr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mr=function(){return!!t})()}function vr(){return vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=br(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},vr.apply(null,arguments)}function br(t){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},br(t)}function gr(t,e){return gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},gr(t,e)}var wr=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=br(e),function(t,e){if(e&&("object"==fr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mr()?Reflect.construct(e,n||[],br(t).constructor):e.apply(t,n))}(this,t)).res=document.createElement("table"),e.res.style.borderCollapse="separate",e.res.style.borderSpacing="0",e.res.style.overflow="hidden",e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gr(t,e)}(t,_t),e=t,n=[{key:"add",value:function(t){this.data=t,this.datas=t;var e=Object.keys(t[0]);return this.generateTable(this.res,t),this.generateTableHead(this.res,e),this}},{key:"style",value:function(t){return t.font&&(this.res.style.fontFamily=t.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(t){return t.cellPadding&&this.cellPadding(t.cellPadding),t.cellAlign&&this.cellAlign(t.cellAlign),t.style&&this.style(t.style),t.headStyle&&this.headStyle(t.headStyle),t.border&&this.border(t.border),t.center&&this.center(t.center),t.borderRadius&&this.borderRadius(t.borderRadius),t.gradient&&(this.res.style.background=t.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=t,this.options=t,this.callReact(t),this}},{key:"callReact",value:function(e){var n,r,o,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,r=this,"function"==typeof(o=vr(br(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter(function(t){return null!=t});for(var s=0;s<a.length;s++)i.push({range:a[s].range,log:a[s].op.name,target:a[s].target,op:a[s].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),this.chainReact(i,this.options.id,l)}}},{key:"toCode",value:function(){var t=JSON.stringify(this.data,null,2),e=JSON.stringify(this.obj,null,2);return t=t.replace(/"(\w+)"\s*:/g,"$1:"),e=e.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(t,")\n .set(").concat(e,")")]}},{key:"borderRadius",value:function(t){return this.res.style.borderRadius="".concat(4*t,"px"),this.res.style.overflow="hidden",this}},{key:"cellPadding",value:function(t){var e,n=dr(this.res.rows);try{for(n.s();!(e=n.n()).done;){var r,o=dr(e.value.cells);try{for(o.s();!(r=o.n()).done;)r.value.style.padding=t}catch(t){o.e(t)}finally{o.f()}}}catch(t){n.e(t)}finally{n.f()}return this}},{key:"cellAlign",value:function(t){var e,n=dr(this.res.rows);try{for(n.s();!(e=n.n()).done;){var r,o=dr(e.value.cells);try{for(o.s();!(r=o.n()).done;)r.value.style.textAlign=t}catch(t){o.e(t)}finally{o.f()}}}catch(t){n.e(t)}finally{n.f()}return this}},{key:"headStyle",value:function(t){var e=this.res.rows[0];return e&&(e.style.color=t.color,t.background&&(e.style.backgroundColor=t.background)),this}},{key:"border",value:function(t){var e;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=t,this.res.style.borderRadius="12px";var n,r=dr(this.res.rows);try{for(r.s();!(n=r.n()).done;){var o,i=dr(n.value.cells);try{for(i.s();!(o=i.n()).done;)o.value.style.border="none"}catch(t){i.e(t)}finally{i.f()}}}catch(t){r.e(t)}finally{r.f()}for(var a=0;a<this.res.rows.length-1;a++){var s,l=dr(this.res.rows[a].cells);try{for(l.s();!(s=l.n()).done;)s.value.style.borderBottom=t}catch(t){l.e(t)}finally{l.f()}}var c,u=(null===(e=this.res.rows[0])||void 0===e?void 0:e.cells.length)||0,f=dr(this.res.rows);try{for(f.s();!(c=f.n()).done;)for(var d=c.value,h=0;h<u-1;h++)d.cells[h].style.borderRight=t}catch(t){f.e(t)}finally{f.f()}return this}},{key:"generateTableHead",value:function(t,e){var n,r=t.createTHead().insertRow(),o=dr(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=document.createElement("th");a.textContent=i,r.appendChild(a)}}catch(t){o.e(t)}finally{o.f()}}},{key:"generateTable",value:function(t,e){var n,r=dr(e);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=t.insertRow();for(var a in o)i.insertCell().textContent=o[a]}}catch(t){r.e(t)}finally{r.f()}}},{key:"render",value:function(t){var e=document.createElement("div");if(e.style.overflowX="auto",e.appendChild(this.res),!t)return e;document.querySelector(t).appendChild(e)}}],n&&pr(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function xr(t){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(t)}function kr(t,e){if(t){if("string"==typeof t)return Sr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sr(t,e):void 0}}function Sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Or(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jr(r.key),r)}}function jr(t){var e=function(t){if("object"!=xr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xr(e)?e:e+""}function Er(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Er=function(){return!!t})()}function Tr(t){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tr(t)}function _r(t,e){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_r(t,e)}var Cr=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Tr(e),function(t,e){if(e&&("object"==xr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Er()?Reflect.construct(e,n||[],Tr(t).constructor):e.apply(t,n))}(this,t)).res=document.createElement("div"),e.res.style.position="relative",e.toggleWrap=document.createElement("div"),e.toggleWrap.style.zIndex=9999,e.toggleWrap.style.borderRadius="0.3rem",e.toggleWrap.style.cursor="pointer",e.toggleWrap.style.display="flex",e.toggleWrap.style.alignItems="center",e.toggleWrap.style.justifyContent="center",e.res.appendChild(e.toggleWrap),e.contentWrap=document.createElement("div"),e.contentWrap.style.position="fixed",e.contentWrap.style.background="#ecf0f1",e.contentWrap.style.borderRadius="0.3rem",e.contentWrap.style.boxShadow="0 2px 5px rgba(0, 0, 0, 0.15)",e.contentWrap.style.width="250px",e.contentWrap.style.display="none",e.contentWrap.style.zIndex=99999,e._on(document,"DOMContentLoaded",function(){document.body.appendChild(e.contentWrap)}),e._track(function(){return e.contentWrap.remove()}),document.body&&document.body.appendChild(e.contentWrap),e.styles={},e.children=[],e.isExpanded=!1,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_r(t,e)}(t,_t),e=t,n=[{key:"set",value:function(t){var e=this;this.options=t,t.title&&(this.toggleWrap.textContent=t.title),t.width&&(this.toggleWrap.style.width=t.width),t.contentWidth&&(this.contentWrap.style.width=t.contentWidth),t.background&&(this.contentWrap.style.backgroundColor=t.background),t.radius&&(this.contentWrap.style.borderRadius=t.radius);var n=function(){var t=e.toggleWrap.getBoundingClientRect(),n=e.contentWrap.style.display,r=e.contentWrap.style.visibility;"none"===n&&(e.contentWrap.style.visibility="hidden",e.contentWrap.style.display="block");var o=e.contentWrap.getBoundingClientRect();"none"===n&&(e.contentWrap.style.display=n,e.contentWrap.style.visibility=r||"");var i=window.innerWidth,a=t.left+t.width/2-o.width/2;a<8&&(a=8),a+o.width>i-8&&(a=i-8-o.width),a<8&&(a=8),e.contentWrap.style.top=t.bottom+4+"px",e.contentWrap.style.left=a+"px"};this._positionContent=n;var r=function(){"none"!==e.contentWrap.style.display&&n()};if(this._on(window,"resize",r),this._on(window,"scroll",r,!0),t.behaviour){var o=t.behaviour;if("mouseover"===o||"mouseenter"===o){var i,a=function(){clearTimeout(i),e.contentWrap.style.display="block",n()},s=function(){i=setTimeout(function(){e.contentWrap.style.display="none"},200)};this.toggleWrap.addEventListener("mouseenter",a),this.toggleWrap.addEventListener("mouseleave",s),this.contentWrap.addEventListener("mouseenter",a),this.contentWrap.addEventListener("mouseleave",s),this.toggleWrap.addEventListener("click",function(t){t.stopPropagation(),"block"===e.contentWrap.style.display?e.contentWrap.style.display="none":(e.contentWrap.style.display="block",n())}),this._on(document,"click",function(t){"block"!==e.contentWrap.style.display||e.contentWrap.contains(t.target)||e.toggleWrap.contains(t.target)||(e.contentWrap.style.display="none")})}else"click"===o?this.res.addEventListener("click",function(){e.toggle(),"block"===e.contentWrap.style.display&&n()}):this.res.addEventListener(o,function(){e.contentWrap.style.display="block",n()})}else this.res.addEventListener("click",function(){e.toggle(),"block"===e.contentWrap.style.display&&n()});return t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),this}},{key:"add",value:function(t){var e,n=this;if(!Array.isArray(t))throw new Error("The 'add' method expects an array of children.");var r=!this.options||!this.options.title;if(t.forEach(function(t,e){if(!r||0!==e){if(!(t.res instanceof HTMLElement))throw new Error("Each child must have a valid 'element' property that is an HTMLElement.");n.contentWrap.appendChild(t.res)}}),r){var o=t[0];o&&o.res&&this.toggleWrap.appendChild(o.res)}return(e=this.children).push.apply(e,function(t){return function(t){if(Array.isArray(t))return Sr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||kr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),this}},{key:"toggle",value:function(){this.isExpanded=!this.isExpanded,this.contentWrap.style.display=this.isExpanded?"block":"none"}},{key:"toCode",value:function(){var t=this,e=this.options?Object.entries(this.options).map(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||kr(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1];return"string"==typeof r?"".concat(n,': "').concat(r,'"'):"object"===xr(r)?"".concat(n,": ").concat(JSON.stringify(r)):"".concat(n,": ").concat(r)}).join(",\n "):"",n=this.children.map(function(e,n){return e.toCode().flatMap(function(t){return t}).join("")+(n<t.children.length-1?",":"")}).join("");return["new Dropdown().set({\n ".concat(e,"\n}).add([\n ").concat(n,"\n])")]}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.res),this.res}}],n&&Or(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Ar(t){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ar(t)}function Pr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rr(r.key),r)}}function Rr(t){var e=function(t){if("object"!=Ar(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ar(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ar(e)?e:e+""}function Ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ir=function(){return!!t})()}function Mr(t){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mr(t)}function Dr(t,e){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dr(t,e)}var Fr=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Mr(e),function(t,e){if(e&&("object"==Ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ir()?Reflect.construct(e,n||[],Mr(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,e.el=null,e.obj=null,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dr(t,e)}(t,_t),e=t,(n=[{key:"set",value:function(t){var e=document.createElement("div");return e.style.width="100vw",e.style.height="100vh",e.style.backgroundColor=t.background,e.style.zIndex="1",e.style.position="absolute",e.style.overflowY="scroll",this.obj=t,this.res=e,t.close&&this.close(),this}},{key:"close",value:function(){return this.res.style.display="none",this}},{key:"show",value:function(){return this.res.style.display="block",this}},{key:"add",value:function(t){var e=document.createElement("div");e.style.width=this.obj.width,e.style.height="auto",e.style.marginLeft="auto",e.style.marginRight="auto",e.style.backgroundColor="white",window.matchMedia("(max-device-width: 415px)").matches&&(e.style.marginTop="200px",e.style.width="100%");for(var n=0;n<t.length;n++)e.appendChild(t[n].render());return this.res.appendChild(e),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(t).appendChild(this.res)}}])&&Pr(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function zr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nr(r.key),r)}}function Nr(t){var e=function(t){if("object"!=Lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lr(e)?e:e+""}function Br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Br=function(){return!!t})()}function Wr(t){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wr(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}var qr=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=Wr(e),function(t,e){if(e&&("object"==Lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Br()?Reflect.construct(e,n||[],Wr(t).constructor):e.apply(t,n))}(this,t)).text=e,n.res=null,n.valid=!1,n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(){var t=document.createElement("input");return this.res=t,this.res.style.padding=0,this.res.style.margin=0,this.res.style.padding=".4rem .75rem",this.res.style.fontSize="1rem",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="100%"),this}},{key:"set",value:function(t){var e;if(this.options=t,this.res.setAttribute("type",null!==(e=t.type)&&void 0!==e?e:"text"),t.placeholder&&(this.res.placeholder=t.placeholder),this.res.style.boxSizing="border-box",!this.res.getAttribute("aria-label")){var n,r,o=null!==(n=null!==(r=t.label)&&void 0!==r?r:t.title)&&void 0!==n?n:t.placeholder;o&&this.res.setAttribute("aria-label",String(o))}return t.name&&this.res.setAttribute("name",t.name),t.id&&this.res.setAttribute("id",t.id),t.required&&this.res.setAttribute("required",""),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.maxWidth&&(this.res.style.maxWidth=t.maxWidth),t.exact&&(this.res.style.fontSize=t.exact),t.radius&&this.radius(t.radius),t.color&&(this.res.style.color=t.color),t.background&&(this.res.style.background=t.background),t.font&&(this.res.style.fontFamily=t.font),t.weight&&(this.res.style.fontWeight=t.weight),t.bold&&(this.res.style.fontWeight="bold"),t.theme&&this.theme(t.theme),this.commonMethods(t),this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return["new TextField().set(".concat(t,")")]}},{key:"setValid",value:function(t,e){return this.res.style.border=t?"6px solid green":"6px solid red",0===e.length&&(this.res.style.border="none"),this}},{key:"auto",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="3rem":t.res.style.fontSize="1rem"};return e(),this._on(window,"resize",e),this}},{key:"value",value:function(t){return this.res.setAttribute("value",t),this}},{key:"password",value:function(){return this.res.setAttribute("type","password"),this}},{key:"number",value:function(){return this.res.setAttribute("type","number"),this}},{key:"process",value:function(t){return this.res.value}},{key:"size",value:function(t){return this.res.style.fontSize=t,this}},{key:"em",value:function(t){return this.res.style.fontSize="".concat(t,"em"),this}},{key:"weight",value:function(t){return this.res.style.fontWeight=t,this}},{key:"bold",value:function(){return this.res.style.fontWeight="bold",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"placeholder",value:function(t){return this.res.setAttribute("placeholder",t),this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"onChange",value:function(t){var e=this;return this.res.value,this.res.addEventListener("input",function(n){t(e.res.value)}),this}},{key:"render",value:function(t){return t?(document.querySelector(t).appendChild(this.res),this.res):this.res}}],n&&zr(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Hr(t){return Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hr(t)}function Gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xr(r.key),r)}}function Xr(t){var e=function(t){if("object"!=Hr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hr(e)?e:e+""}function Vr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vr=function(){return!!t})()}function Jr(){return Jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Yr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Jr.apply(null,arguments)}function Yr(t){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yr(t)}function $r(t,e){return $r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$r(t,e)}var Qr=function(){function t(e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,n){return e=Yr(e),function(t,e){if(e&&("object"==Hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vr()?Reflect.construct(e,n||[],Yr(t).constructor):e.apply(t,n))}(this,t)).text=e,r.url=n,r.setup(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$r(t,e)}(t,_t),e=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setup",value:function(){window.matchMedia("(max-device-width: 415px)");var t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="center",t.style.backgroundColor="#fff",t.style.fontFamily="Arial",t.style.width="100%",t.style.overflow="hidden",this.res=t,this}},{key:"set",value:function(t){return this.obj=t,t.onTap&&this.onTap(t.onTap),t.background&&(this.res.style.background=t.background),t.border&&(this.res.style.border=t.border),t.radius&&(this.res.style.borderRadius=t.radius),t.width&&(this.res.style.width=t.width),this.options=t,this.callReact(t),this.commonMethods(t),this}},{key:"callReact",value:function(e){var n,r,o,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,r=this,"function"==typeof(o=Jr(Yr(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter(function(t){return null!=t});for(var s=0;s<a.length;s++)i.push({range:a[s].range,log:a[s].op.name,target:a[s].target,op:a[s].op});var l=[];e.borderObj&&l.push("border"),e.backgroundOp&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),this.chainReact(i,this.options.id,l)}}},{key:"frame",value:function(t){return t.height&&(this.res.style.height=t.height),t.width&&(this.res.style.width=t.width),this}},{key:"items",value:function(t){for(var e=0;e<t.length;e++)this.res.appendChild(t[e].render());return this}},{key:"shadow",value:function(){return this.res.style.boxShadow="1px 1px 20px rgba(0, 0, 0, 0.60)",this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],n&&Gr(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Kr(t){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(t)}function Zr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,to(r.key),r)}}function to(t){var e=function(t){if("object"!=Kr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kr(e)?e:e+""}function eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(eo=function(){return!!t})()}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},no(t)}function ro(t,e){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ro(t,e)}var oo=function(){function t(e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=no(e),function(t,e){if(e&&("object"==Kr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eo()?Reflect.construct(e,n||[],no(t).constructor):e.apply(t,n))}(this,t))._noTheme=!0,n.code=[],n.setup();for(var r=0;r<e.length;r++)n.res.appendChild(e[r].render().render());return n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ro(t,e)}(t,_t),e=t,(n=[{key:"setup",value:function(){var t=document.createElement("div");t.style.padding=0,t.style.margin=0,this.res=t}},{key:"width",value:function(t,e){return this.res.style.width=t,e&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),this}},{key:"padding",value:function(t){return this.res.style.padding="".concat(t,"px"),this}},{key:"size",value:function(t,e){return this.w=t,this.h=e,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&Zr(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function io(t){return io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(t)}function ao(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,so(r.key),r)}}function so(t){var e=function(t){if("object"!=io(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=io(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==io(e)?e:e+""}function lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(lo=function(){return!!t})()}function co(){return co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=uo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},co.apply(null,arguments)}function uo(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}function fo(t,e){return fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fo(t,e)}var ho=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=uo(e),function(t,e){if(e&&("object"==io(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lo()?Reflect.construct(e,n||[],uo(t).constructor):e.apply(t,n))}(this,t)).code=[],e.setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fo(t,e)}(t,_t),e=t,n=[{key:"toCode",value:function(){return this.code}},{key:"setup",value:function(){this.code.push("new FlexGrid()"),this.code.push(".setup()");var t=document.createElement("div");return t.style.display="flex",t.style.padding=0,t.style.margin=0,this.res=t,this}},{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(t){t.id&&this.res.setAttribute("id",t.id),this.commonMethods(t),t.onTap&&this.onTap(t.onTap),this.code.push(".set({"),t.gap&&this.code.push("gap: ".concat(t.gap)),t.gap&&(this.res.style.gap=t.gap),t.flex&&(this.res.style.flex=t.flex),t.flex&&this.code.push("flex: ".concat(t.flex,",")),t.wrap&&(this.res.style.flexWrap="wrap"),t.wrap&&this.code.push("wrap: ".concat(t.wrap,",")),t.align&&(this.res.style.justifyContent=t.align),t.align&&this.code.push("align: ".concat(t.align,",")),t.colat&&this.toColumnAt(t.colat),t.colat&&this.code.push('\n colat: "'.concat(t.colat,'",')),this.code.push("}),");var e=t;return this.callReact(e),this}},{key:"callReact",value:function(e){this.options=e;var n,r,o,i=[],a=e.transform&&"object"===io(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||a){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(orange, green)")),e.stroke&&(n=t,r=this,"function"==typeof(o=co(uo(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var s=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,a?e.transform:void 0];s=s.filter(function(t){return null!=t});for(var l=0;l<s.length;l++)i.push({range:s[l].range,log:s[l].op.name,target:s[l].target,op:s[l].op});var c=[];e.borderObj&&c.push("border"),e.background&&c.push("background"),e.mar&&c.push("margin"),e.animation&&c.push("animation"),e.span&&c.push("span"),this.chainReact(i,e.id,c)}}},{key:"toColumnAt",value:function(t){var e=this;if(!this.columnAlways){var n=function(){var n=window.matchMedia("(max-width: ".concat(t,")")),r=window.matchMedia("(max-device-width: 415px)");n.matches||r.matches?(e.res.style.flexDirection="column",e.res.style.alignItems="center"):e.res.style.flexDirection="row"};n(),this._on(window,"resize",n)}}},{key:"flex",value:function(t){return this.arra=Array.from(t.replace(/\s/g,"")),this.areas=Array.from(Array(t.replace(/\s/g,"")).join("")),this.save='"'.concat(t,'"'),this}},{key:"items",value:function(t){this.items=t,this.code.push("\n .items([");for(var e=0;e<t.length;e++){var n=t[e];if(null!=n){var r=n.render();void 0!==n.toCode&&this.code.push(n.toCode().flatMap(function(t){return t})),this.res.appendChild(r)}}return this.code.push("\n ])"),this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"adjust",value:function(t){var e=this,n=function(){var n=window.matchMedia("(max-device-width: 415px)");if(window.innerWidth<t||n.matches)for(var r=0;r<e.res.children.length;r++)e.res.children[r].style.flex="",e.res.children[r].style.width="100%";else for(r=0;r<e.res.children.length;r++)e.res.children[r].style.flex="".concat(e.arra[r])};return n(),this._on(window,"resize",n),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(t).appendChild(this.res)}}],n&&ao(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function po(t){return po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},po(t)}function yo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mo(r.key),r)}}function mo(t){var e=function(t){if("object"!=po(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==po(e)?e:e+""}function vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(vo=function(){return!!t})()}function bo(t){return bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bo(t)}function go(t,e){return go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},go(t,e)}var wo=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e,n){return e=bo(e),function(t,e){if(e&&("object"==po(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vo()?Reflect.construct(e,n||[],bo(t).constructor):e.apply(t,n))}(this,t)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&go(t,e)}(t,_t),e=t,(n=[{key:"set",value:function(t){return this.imageUrl=t.url,this.createCard(),t.useBrightness&&(this.useBrightness=!0),t.useBrightness&&"\n useBrightness: ".concat(this.useBrightness),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.inpad&&this.inpad(t.inpad),t.inpad&&"\n inpad: {".concat(t.inpad,"}"),t.font&&(this.res.style.fontFamily=t.font),t.inpad&&"\n font: ".concat(t.font),this.addListeners(),this}},{key:"inpad",value:function(t){return this.res.children[1].style.boxSizing="border-box",this.res.children[1].style.padding=t,this}},{key:"items",value:function(t){for(var e=0;e<t.length;e++)this.res.children[1].appendChild(t[e].render());return this}},{key:"createCard",value:function(){var t=document.createElement("div");t.style.display="grid",t.style.width="300px",t.style.height="400px",t.setAttribute("id","AAA");var e=document.createElement("div");e.style.gridArea="1/1",e.style.height="400px",e.style.borderRadius="15px",e.style.boxShadow="0 4px 8px 0 rgba(0,0,0,0.2)",e.style.overflow="hidden";var n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.transition="0.9s",n.style.backgroundImage="url(".concat(this.imageUrl,")"),n.style.backgroundSize="cover",n.style.backgroundPostion="cover",n.style.backgroundRepeat="no-repeat",e.appendChild(n);var r=document.createElement("div");return r.style.gridArea="1/1",r.style.zIndex="1",t.appendChild(e),t.appendChild(r),this.res=t,this}},{key:"addListeners",value:function(){var t=this,e=this.res.children[0].children[0];return this.res.onmouseover=function(){e.style.transform="scale(1.3)",t.useBrightness&&(e.style.filter="brightness(31%)")},this.res.onmouseout=function(){e.style.transform="scale(1.0)",t.useBrightness&&(e.style.filter="brightness(100%)")},this}},{key:"render",value:function(t){if(!t)return this.res;this.options.id&&this.res.setAttribute("id",this.options.id),document.querySelector(t).appendChild(this.res)}}])&&yo(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function xo(t){return xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(t)}function ko(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,So(r.key),r)}}function So(t){var e=function(t){if("object"!=xo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xo(e)?e:e+""}function Oo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oo=function(){return!!t})()}function jo(t){return jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jo(t)}function Eo(t,e){return Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Eo(t,e)}var To=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=jo(e),function(t,e){if(e&&("object"==xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oo()?Reflect.construct(e,n||[],jo(t).constructor):e.apply(t,n))}(this,t)).res=document.createElement("div"),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eo(t,e)}(t,_t),e=t,(n=[{key:"items",value:function(t){for(var e=0;e<t.length;e++)this.res.appendChild(t[e].render());return this}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.res),this.res}}])&&ko(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function _o(t){return _o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(t)}var Co=["background","color","radius","maxHeight"];function Ao(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Po(r.key),r)}}function Po(t){var e=function(t){if("object"!=_o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_o(e)?e:e+""}function Ro(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ro=function(){return!!t})()}function Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function Mo(t,e){return Mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mo(t,e)}var Do=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Io(e),function(t,e){if(e&&("object"==_o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ro()?Reflect.construct(e,n||[],Io(t).constructor):e.apply(t,n))}(this,t)).navbar=document.createElement("nav"),e.navbar.classList.add("desktop-navbar"),e.navbarHeader=document.createElement("div"),e.navbarHeader.classList.add("navbar-header"),e.brand=document.createElement("div"),e.brand.classList.add("navbar-brand"),e.navContent=document.createElement("div"),e.navContent.classList.add("navbar-content"),e.navContent.style.width="100%",e.navContent.style.alignItems="center",e.navbarHeader.appendChild(e.brand),e.navbarHeader.appendChild(e.navContent),e.navbar.appendChild(e.navbarHeader),e.res=e.navbar,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mo(t,e)}(t,_t),e=t,n=[{key:"set",value:function(t){this.obj=t,this.setStyles(t),t.background&&(this.res.style.backgroundColor=t.background),t.brand&&this.setBrand(t.brand),t.radius&&(this.res.style.borderRadius=t.radius),t.pad&&this.pad(t.pad),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),t.mar&&this.mar(t.mar),t.maxHeight&&(this.res.style.maxHeight=t.maxHeight),t.hamburgerColour&&(this.hamburgerColour=t.hamburgerColour),t.color&&(this.res.style.color=t.color),t.background,t.color,t.radius,t.maxHeight;var e=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Co);return this.applyStyleOptions(e),t.keySet&&this.keySet(t.keySet),this}},{key:"setStyles",value:function(){var t;this.navbar.style.display="flex",this.navbar.style.flexDirection="column",this.navbar.style.padding="1rem",this.navbar.style.backgroundColor=null!==(t=this.obj.background)&&void 0!==t?t:"#333",this.navbarHeader.style.display="flex",this.navbarHeader.style.alignItems="center",this.navbarHeader.style.justifyContent="space-between",this.navbarHeader.style.width="100%",this.brand.style.fontSize="1.5rem",this.navContent.style.display="flex",this.navContent.style.gap="1rem"}},{key:"setBrand",value:function(t){return this.brand.innerHTML="",this.brand.appendChild(t),this}},{key:"add",value:function(t){this.items=t;for(var e=0;e<t.length;e++){t[e];var n=t[e].render();this.navContent.appendChild(0===e&&this.obj&&this.obj.brandLink?Et(n,this.obj.brandLink):n)}return this}},{key:"toCode",value:function(){var t=this.items.map(function(t){return t.toCode()}).flatMap(function(t){return t});return"new DesktopBar().set(".concat(this.removeQuotesFromFirstWord(JSON.stringify(this.obj)),").add([\n ").concat(t.join(","),"\n\n \n \n\n ])")}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.navbar),this.navbar}}],n&&Ao(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Fo(t){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fo(t)}var Lo=["background","color","radius","maxHeight"];function zo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function No(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bo(r.key),r)}}function Bo(t){var e=function(t){if("object"!=Fo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fo(e)?e:e+""}function Wo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wo=function(){return!!t})()}function Uo(){return Uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=qo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Uo.apply(null,arguments)}function qo(t){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qo(t)}function Ho(t,e){return Ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ho(t,e)}var Go=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e,n){return e=qo(e),function(t,e){if(e&&("object"==Fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wo()?Reflect.construct(e,n||[],qo(t).constructor):e.apply(t,n))}(this,t)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ho(t,e)}(t,_t),e=t,n=[{key:"removeQuotesFromFirstWord",value:function(t){if(t)return t.replace(ht(),"$1:")}},{key:"toCode",value:function(){var t=this,e=this.items.map(function(t){return t.toCode()}).flatMap(function(t){return t}),n=(this.removeQuotesFromFirstWord(JSON.stringify(this.obj)),["background","color","mar","pad","resmar","respad","radius","maxHeight","hamburgerColour","keySet","menuLabel","menuId","brandLink"]),r=[].concat(n,function(t){return function(t){if(Array.isArray(t))return zo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return zo(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object.keys(this.obj).filter(function(t){return t in St&&!n.includes(t)}))).filter(function(e){return void 0!==t.obj[e]}).map(function(e){return"".concat(e,": ").concat(JSON.stringify(t.obj[e]),",")}).join("\n");return this.obj.brand&&"function"==typeof this.obj.brand.toCode&&(r+="\nbrand: ".concat([].concat(this.obj.brand.toCode()).join(""),",")),"new MobileBar().set({".concat(r,"}).add([\n ").concat(e.join(","),"\n\n ])")}},{key:"set",value:function(e){var n,r,o;this.obj=e,this.obj=e,this.makeNavbar(e),e.mar&&(n=t,r=this,"function"==typeof(o=Uo(qo(1&3?n.prototype:n),"mar",r))?function(t){return o.apply(r,t)}:o)([e.mar]),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.radius&&(this.res.style.borderRadius=e.radius),e.hamburgerColour&&(this.hamburgerColour=e.hamburgerColour),this.setStyles(e),e.color&&(this.navbar.style.color=e.color),e.pad&&this.pad(e.pad),e.background,e.color,e.radius,e.maxHeight;var i=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,Lo);return this.applyStyleOptions(i),e.keySet&&this.keySet(e.keySet),this}},{key:"makeNavbar",value:function(t){var e,n=this,r=t.brand;this.navbar=document.createElement("nav"),this.navbar.classList.add("mobile-navbar"),this.navbarHeader=document.createElement("div"),this.navbarHeader.classList.add("navbar-header"),this.brand=document.createElement("div"),this.brand.classList.add("navbar-brand"),t.brand&&"function"==typeof r.render&&this.brand.appendChild(Et(r.render(),t.brandLink)),this.toggleButton=document.createElement("button"),this.toggleButton.classList.add("navbar-toggle"),this.toggleButton.innerHTML="&#9776;",this.toggleButton.setAttribute("type","button"),this.toggleButton.setAttribute("aria-label",null!==(e=t.menuLabel)&&void 0!==e?e:"Menu"),this.toggleButton.setAttribute("aria-expanded","false"),this.navContent=document.createElement("div"),this.navContent.classList.add("navbar-content"),t.menuId&&(this.navContent.setAttribute("id",t.menuId),this.toggleButton.setAttribute("aria-controls",t.menuId)),this.navContent.addEventListener("click",function(t){n.isMobileNavOpen&&t.target&&t.target.closest&&t.target.closest("a")&&n.toggleMobileNav()}),this.navbarHeader.appendChild(this.brand),this.navbarHeader.appendChild(this.toggleButton),this.navbar.appendChild(this.navbarHeader),this.navbar.appendChild(this.navContent),this.isMobileNavOpen=!1,this.toggleButton.addEventListener("click",function(){n.toggleMobileNav()}),this.res=this.navbar}},{key:"setStyles",value:function(t){var e,n;this.navbar.style.display="flex",this.navbar.style.flexDirection="column",this.navbar.style.padding="1rem",this.navbar.style.backgroundColor=null!==(e=t.background)&&void 0!==e?e:"orange",this.navbarHeader.style.display="flex",this.navbarHeader.style.alignItems="center",this.navbarHeader.style.justifyContent="space-between",this.navbarHeader.style.width="100%",this.brand.style.fontSize="1.5rem",this.toggleButton.style.background="none",this.toggleButton.style.border="none",this.toggleButton.style.color=null!==(n=this.hamburgerColour)&&void 0!==n?n:"#34495e",this.toggleButton.style.fontSize="1.5rem",this.toggleButton.style.cursor="pointer",this.navContent.style.display="none"}},{key:"add",value:function(t){this.items=t;for(var e=0;e<t.length;e++){var n=t[e];this.navContent.appendChild(n.render())}return this}},{key:"toggleMobileNav",value:function(){this.isMobileNavOpen=!this.isMobileNavOpen,this.toggleButton.setAttribute("aria-expanded",String(this.isMobileNavOpen)),this.navContent.style.display=this.isMobileNavOpen?"flex":"none",this.isMobileNavOpen?(this.navContent.style.flexDirection="column",this.navContent.style.gap="0.5rem",this.navContent.style.padding="1rem"):(this.navContent.style.flexDirection="",this.navContent.style.gap="",this.navContent.style.backgroundColor="",this.navContent.style.padding="")}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.navbar),this.navbar}}],n&&No(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Vo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Jo(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vo(Object(n),!0).forEach(function(e){Yo(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Yo(t,e,n){return(e=Qo(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qo(r.key),r)}}function Qo(t){var e=function(t){if("object"!=Xo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xo(e)?e:e+""}function Ko(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ko=function(){return!!t})()}function Zo(){return Zo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ti(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Zo.apply(null,arguments)}function ti(t){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ti(t)}function ei(t,e){return ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ei(t,e)}var ni=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=ti(e),function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ko()?Reflect.construct(e,n||[],ti(t).constructor):e.apply(t,n))}(this,t)).breakpoints=[],e.container=null,e.currentView=null,e.internalDiv=null,e.resizeListener=null,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(t,_t),e=t,n=[{key:"set",value:function(t){var e=t.breakpoints,n=t.id,r=t.area;if(this.options={breakpoints:e},this._id=n,this._area=r,!Array.isArray(e))throw new Error("Breakpoints should be an array of objects with 'at' and 'view' properties.");return this.breakpoints=e.map(function(t){if("string"!=typeof t.at||!(t.view.render()instanceof HTMLElement))throw new Error("Each breakpoint must have 'at' as a string and 'view' as an HTMLElement.");return Jo(Jo({},t),{},{at:parseInt(t.at,10)})}),this.breakpoints.sort(function(t,e){return t.at-e.at}),this}},{key:"toCode",value:function(){JSON.stringify(this.options.breakpoints.map(function(t){return t.view.toCode()}).flat(),null,4),JSON.stringify(this.options.breakpoints.map(function(t){return t.at}),null,4),JSON.stringify(this.options.breakpoints,null,4);for(var t="",e=0;e<this.options.breakpoints.length;e++)t+='{ at: "'.concat(this.options.breakpoints[e].at,'", view: ').concat(this.options.breakpoints[e].view.toCode()," }, \n");var n=this._id?"\n id: ".concat(JSON.stringify(String(this._id)),","):"";return["new Switcher().set({".concat(n,"\n breakpoints: [\n ").concat(t,"\n ]\n })")]}},{key:"render",value:function(t){return this.internalDiv?(void 0!==t&&document.querySelector(t).appendChild(this.internalDiv),this.internalDiv):(this.internalDiv=document.createElement("div"),this.res=this.internalDiv,this._id&&this.internalDiv.setAttribute("id",this._id),this._area&&(this.internalDiv.style.gridArea=this._area),this.applyView(),this.resizeListener=this.applyView.bind(this),this._on(window,"resize",this.resizeListener),void 0!==t&&document.querySelector(t).appendChild(this.internalDiv),this.internalDiv)}},{key:"createRanges",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:99999,n=[],r=0;r<t.length;r++)n.push({from:t[r],to:r<t.length-1?t[r+1]-1:e});return n}},{key:"addRanges",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:99999;return t.map(function(t,r){var o=e[r],i=r<e.length-1?e[r+1]-1:n;return Jo(Jo({},t),{},{range:{from:o,to:i}})})}},{key:"applyView",value:function(){var t=this;if("function"==typeof window.matchMedia){window.innerWidth;var e=this.breakpoints.map(function(t){return t.at}),n=this.breakpoints.map(function(t){return t.at});this.createRanges(n),this.addRanges(this.breakpoints,e).forEach(function(e){var n="(min-width: ".concat(e.range.from,"px) and (max-width: ").concat(e.range.to,"px)");window.matchMedia(n).matches&&t.currentView!==e.view.render()&&(t.internalDiv.innerHTML="",t.internalDiv.appendChild(e.view.render()),t.currentView=e.view.render())})}else{var r=this.breakpoints.reduce(function(t,e){return parseFloat(e.at)>parseFloat(t.at)?e:t},this.breakpoints[0]);r&&this.currentView!==r.view.render()&&(this.internalDiv.innerHTML="",this.internalDiv.appendChild(r.view.render()),this.currentView=r.view.render())}}},{key:"destroy",value:function(){var e,n,r;(e=t,n=this,"function"==typeof(r=Zo(ti(1&3?e.prototype:e),"destroy",n))?function(t){return r.apply(n,t)}:r)([]),this.resizeListener=null,this.internalDiv&&this.container&&this.container.removeChild(this.internalDiv),this.container=null,this.currentView=null,this.internalDiv=null}}],n&&$o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function ri(t){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(t)}function oi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ii(r.key),r)}}function ii(t){var e=function(t){if("object"!=ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ri(e)?e:e+""}function ai(t,e){if(e&&("object"==ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function si(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(si=function(){return!!t})()}function li(t){return li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},li(t)}function ci(t,e){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ci(t,e)}var ui=function(){function t(e){var n,r,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=li(o=t),(n=ai(r,si()?Reflect.construct(o,[],li(r).constructor):o.apply(r,i)))._noTheme=!0;var a=document.createElement("div");return a.style.flex="1",n.res=a,n.res.setAttribute("class","innerHider"),ai(n,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ci(t,e)}(t,_t),e=t,(n=[{key:"toCode",value:function(){return["new Spacer(".concat(this.hide,")")]}},{key:"render",value:function(){return this.res}}])&&oi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function fi(t){return fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(t)}function di(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function hi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pi(r.key),r)}}function pi(t){var e=function(t){if("object"!=fi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fi(e)?e:e+""}function yi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yi=function(){return!!t})()}function mi(t){return mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mi(t)}function vi(t,e){return vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vi(t,e)}var bi=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=mi(e),function(t,e){if(e&&("object"==fi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yi()?Reflect.construct(e,n||[],mi(t).constructor):e.apply(t,n))}(this,t)).res=null,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vi(t,e)}(t,_t),e=t,(n=[{key:"set",value:function(t){var e,n;this.options=t;var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center";var o=document.createElement("input");o.type="checkbox",o.style.position="relative",o.style.marginRight="0.5rem";var i=t.size||"24px";o.style.width=i,o.style.height=i,t.customStyle&&(o.style.appearance="none"),o.style.border="2px solid #ccc",o.style.borderRadius="4px",o.style.backgroundColor=t.backgroundColor||"white",o.style.cursor="pointer",o.style.transition="background-color 0.2s ease, border-color 0.2s ease",o.style.display="inline-block",o.style.setProperty("--checked-bg-color",t.checkedBackgroundColor||"#4CAF50"),o.style.setProperty("--checkmark-color","white"),o.style.setProperty("--checkmark-clip-path",null!==(e=this.options.clipPath)&&void 0!==e?e:"polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%)");var a=document.createElement("style");a.textContent='\n input[type="checkbox"] {\n appearance: none;\n -webkit-appearance: none; /* For Safari */\n width: var(--size, 24px);\n height: var(--size, 24px);\n border: 2px solid #ccc;\n border-radius: 4px;\n background-color: white;\n position: relative;\n cursor: pointer;\n transition: background-color 0.2s ease, border-color 0.2s ease;\n }\n\n input[type="checkbox"]:checked {\n background-color: var(--checked-bg-color, #4CAF50);\n border-color: var(--checked-bg-color, #4CAF50);\n }\n\n input[type="checkbox"]::after {\n content: \'\';\n position: absolute;\n width: 50%;\n height: 50%;\n top: 25%;\n left: 25%;\n transform: scale(0);\n background-color: var(--checkmark-color, white);\n clip-path: var(--checkmark-clip-path);\n -webkit-clip-path: var(--checkmark-clip-path);\n transition: transform 0.2s ease;\n }\n\n input[type="checkbox"]:checked::after {\n transform: scale(1);\n }\n',t.customStyle&&document.head.appendChild(a),t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),o.addEventListener("change",function(){o.checked?(o.style.backgroundColor=t.checkedBackgroundColor||"#4CAF50",o.style.borderColor=t.checkedBackgroundColor||"#4CAF50"):(o.style.backgroundColor=t.backgroundColor||"white",o.style.borderColor="#ccc")}),t.name&&o.setAttribute("name",t.name),r.appendChild(o);var s=document.createElement("div");if("function"==typeof(null===(n=t.label)||void 0===n?void 0:n.render))s.appendChild(t.label.render());else{var l=document.createTextNode(t.title||"Label");s.appendChild(l)}return s.style.opacity=.8,s.style.transition="opacity ease 0.2s, transform ease 0.2s",r.appendChild(s),this.res=r,this}},{key:"getValue",value:function(){return this.res.children[0].checked}},{key:"toCode",value:function(){var t=Object.entries(this.options).map(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return di(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1];return"string"==typeof r?"".concat(n,': "').concat(r,'"'):"object"===fi(r)&&null!==r?"function"==typeof r.toCode?"".concat(n,": ").concat(r.toCode()[0]):"".concat(n,": ").concat(JSON.stringify(r,null,4)):"".concat(n,": ").concat(r)}).join(",\n ");return["new Checkbox().set({\n ".concat(t,"\n})")]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&hi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function gi(t){return gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(t)}function wi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=xi(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function xi(t,e){if(t){if("string"==typeof t)return ki(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ki(t,e):void 0}}function ki(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Si(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Oi(r.key),r)}}function Oi(t){var e=function(t){if("object"!=gi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gi(e)?e:e+""}function ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ji=function(){return!!t})()}function Ei(t){return Ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ei(t)}function Ti(t,e){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ti(t,e)}"undefined"!=typeof window&&(window.Checkbox=bi);var _i=function(t){return t&&"function"==typeof t.play},Ci={mp4:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",ogv:"video/ogg",ogg:"video/ogg"},Ai=function(t){var e=String(t||"").split("?")[0].split("#")[0].split(".").pop().toLowerCase();return Ci[e]||""},Pi=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=Ei(e),function(t,e){if(e&&("object"==gi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ji()?Reflect.construct(e,n||[],Ei(t).constructor):e.apply(t,n))}(this,t)).url=e,n.options={},n.res=null,n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ti(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(){var t=document.createElement("video");return null!=this.url&&t.setAttribute("src",this.url),t.setAttribute("controls","controls"),this.res=t,this}},{key:"set",value:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=n;var r=this.res;if(Array.isArray(n.sources)&&n.sources.length){r.removeAttribute("src");for(var o=0,i=function(t){return function(t){if(Array.isArray(t))return ki(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||xi(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r.querySelectorAll("source"));o<i.length;o++)i[o].remove();var a,s=n.sources.concat(null!=this.url?[this.url]:[]),l=new Set,c=wi(s);try{for(c.s();!(a=c.n()).done;){var u=a.value,f="string"==typeof u?u:u&&u.url;if(f&&!l.has(f)){l.add(f);var d=document.createElement("source");d.setAttribute("src",f);var h="object"===gi(u)&&u.type||Ai(f);h&&d.setAttribute("type",h),r.appendChild(d)}}}catch(t){c.e(t)}finally{c.f()}}n.poster&&r.setAttribute("poster",n.poster),n.preload&&r.setAttribute("preload",n.preload),!1===n.controls?r.removeAttribute("controls"):!0===n.controls&&r.setAttribute("controls","controls"),n.loop&&(r.loop=!0,r.setAttribute("loop","loop")),(null!==(t=n.playsinline)&&void 0!==t?t:n.autoplay)&&(r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""));var p=null!==(e=n.muted)&&void 0!==e?e:!!n.autoplay||void 0;if(!0===p?(r.muted=!0,r.setAttribute("muted","")):!1===p&&(r.muted=!1,r.removeAttribute("muted")),n.autoplay&&this._autoplay(!1!==n.lazy),n.objectFit&&(r.style.objectFit=n.objectFit),n.aspectRatio&&(r.style.aspectRatio=n.aspectRatio),n.id&&r.setAttribute("id",n.id),n.label&&r.setAttribute("aria-label",n.label),n.decorative&&r.setAttribute("aria-hidden","true"),n.background&&(r.style.background=n.background),n.poster&&!1!==n.posterBehind&&!/url\(|gradient\(/.test(String(n.background||""))){var y=n.objectFit||"contain";r.style.backgroundImage="url(".concat(JSON.stringify(String(n.poster)),")"),r.style.backgroundSize="cover"===y?"cover":"fill"===y?"100% 100%":"none"===y?"auto":"contain",r.style.backgroundPosition="center",r.style.backgroundRepeat="no-repeat"}return n.height&&(r.style.height=n.height),n.maxWidth&&(r.style.maxWidth=n.maxWidth),n.radius&&(r.style.borderRadius="number"==typeof n.radius?"".concat(n.radius,"px"):n.radius),n.width&&(r.style.width="".concat(n.width)),n.opacity&&(r.style.opacity=n.opacity),n.raster&&this.rasterize(n.raster),this}},{key:"_autoplay",value:function(t){var e=this,n=this.res;if("undefined"==typeof window||!_i(n))return this;if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n.removeAttribute("autoplay"),this;n.setAttribute("autoplay","");var r=function(){var t=n.play();t&&t.catch&&t.catch(function(){})};if(!t||"function"!=typeof window.IntersectionObserver)return r(),this;this._visible=!1;var o=new window.IntersectionObserver(function(t){var o,i=wi(t);try{for(i.s();!(o=i.n()).done;){var a=o.value;e._visible=a.isIntersecting,a.isIntersecting&&!e._hidden?r():n.pause()}}catch(t){i.e(t)}finally{i.f()}},{threshold:.2});return o.observe(n),this._track(function(){return o.disconnect()}),this._hidden=!1,this._on(document,"visibilitychange",function(){e._hidden=document.hidden,document.hidden?n.pause():e._visible&&r()}),this}},{key:"play",value:function(){var t,e;return _i(this.res)&&(null===(t=this.res.play())||void 0===t||null===(e=t.catch)||void 0===e||e.call(t,function(){})),this}},{key:"pause",value:function(){return _i(this.res)&&this.res.pause(),this}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"toCode",value:function(){var t=Object.fromEntries(Object.entries(this.options||{}).filter(function(t){return null!=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||xi(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2)[1]}));return['new Video("'.concat(this.url,'").set(').concat(pt(t,4),")")]}},{key:"render",value:function(t){var e;return t?(null===(e=document.querySelector(t))||void 0===e||e.appendChild(this.res),this.res):this.res}}],n&&Si(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Ri(t,e){if(t){if("string"==typeof t)return Ii(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ii(t,e):void 0}}function Ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Mi(t){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(t)}function Di(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fi(r.key),r)}}function Fi(t){var e=function(t){if("object"!=Mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mi(e)?e:e+""}function Li(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Li=function(){return!!t})()}function zi(){return zi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ni(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},zi.apply(null,arguments)}function Ni(t){return Ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ni(t)}function Bi(t,e){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bi(t,e)}var Wi=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Ni(e),function(t,e){if(e&&("object"==Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Li()?Reflect.construct(e,n||[],Ni(t).constructor):e.apply(t,n))}(this,t)).res=null,e.items=[],e.setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bi(t,e)}(t,_t),e=t,n=[{key:"set",value:function(t){return this.options=t,t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),this.commonMethods(t),this.callReact(t),this}},{key:"callReact",value:function(e){var n,r,o,i=[],a=e.transform&&"object"===Mi(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||a){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,r=this,"function"==typeof(o=zi(Ni(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var s=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,a?e.transform:void 0];s=s.filter(function(t){return null!=t});for(var l=0;l<s.length;l++)i.push({range:s[l].range,log:s[l].op.name,target:s[l].target,op:s[l].op});var c=[];e.borderObj&&c.push("border"),e.background&&c.push("background"),e.mar&&c.push("margin"),e.animation&&c.push("animation"),e.span&&c.push("span"),this.chainReact(i,this.options.id,c)}}},{key:"setup",value:function(){var t=document.createElement("ul");return this.res=t,this.res.style.padding=0,this.res.style.margin=0,this}},{key:"setItems",value:function(t){this.items=t;var e,n=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ri(t))){e&&(t=e);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("string"==typeof r){var o=document.createElement("li");o.textContent=r,this.res.appendChild(o)}else{var i=r.render();this.res.appendChild(i)}}}catch(t){n.e(t)}finally{n.f()}return this}},{key:"font",value:function(t){return this.res.style.fontFamily=t,this}},{key:"size",value:function(t){return this.res.style.fontSize=t,this}},{key:"em",value:function(t){return this.res.style.fontSize="".concat(t,"em"),this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"align",value:function(t){return this.res.style.textAlign="".concat(t),this}},{key:"weight",value:function(t){return this.res.style.fontWeight=t,this}},{key:"bold",value:function(){return this.res.style.fontWeight="bold",this}},{key:"italic",value:function(){return this.res.style.fontStyle="italic",this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"toCode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var e=" ".repeat(t),n="".concat(e,"new UList()"),r=Object.fromEntries(Object.entries(this.options||{}).filter(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Ri(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2)[1];return null!=e&&""!==e}));return Object.keys(r).length&&(n+="\n".concat(e," .set(").concat(JSON.stringify(r,null,2).split("\n").join("\n".concat(e," ")),")")),this.items&&this.items.length&&(n+="\n".concat(e," .setItems([\n")+this.items.map(function(e){return"string"==typeof e?"".concat(" ".repeat(t+4),'"').concat(e,'"'):e.toCode(t+4)}).join(",\n")+"\n".concat(e," ])")),[n+="\n".concat(e)]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],n&&Di(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Ui(t){return Ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(t)}function qi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hi(r.key),r)}}function Hi(t){var e=function(t){if("object"!=Ui(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ui(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ui(e)?e:e+""}function Gi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Gi=function(){return!!t})()}function Xi(t){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xi(t)}function Vi(t,e){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vi(t,e)}var Ji=function(){function t(e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,n){return e=Xi(e),function(t,e){if(e&&("object"==Ui(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gi()?Reflect.construct(e,n||[],Xi(t).constructor):e.apply(t,n))}(this,t)).text=e,r.res=null,r.val=n,r.setup(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vi(t,e)}(t,_t),e=t,(n=[{key:"setup",value:function(t){return this}},{key:"set",value:function(t){this.options=t;var e=document.createElement("button");if(e.style.background="transparent",e.style.border="none",t.img)e.append(t.img.render());else if(t.svg)if("string"==typeof t.svg){var n=(new DOMParser).parseFromString(t.svg,"image/svg+xml").documentElement;e.appendChild(n)}else t.svg instanceof SVGElement&&e.appendChild(t.svg);else if(t.url&&!t.img){var r,o,i=document.createElement("img");i.setAttribute("src",t.url),i.style.width=(null===(r=t.frame)||void 0===r?void 0:r.width)||"50px",i.style.height=(null===(o=t.frame)||void 0===o?void 0:o.height)||"50px",e.appendChild(i)}else{var a=document.createTextNode(this.text.replace("$",this.val));e.appendChild(a)}return this.res=e,this.commonMethods(t),t&&"submit"===t.type&&e.setAttribute("type",t.type),this.border("none"),this.res.style.display="block",t.background&&this.background(t.background),t.padding&&(this.deprecatedOption("padding","pad"),this.pad([{a:t.padding}])),t.margin&&(this.deprecatedOption("margin","mar"),this.mar([{a:t.margin}])),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),t.centered&&(this.res.style.marginRight="auto",this.res.style.marginLeft="auto",this.res.style.backgroundColor="black"),t.border&&this.border(t.border),t.radius&&this.borderRadius(t.radius),t.class&&this.setClass(t.class),t.color&&this.color(t.color),t.auto&&this.auto(),t.weight&&(this.res.style.fontWeight=t.weight),t.fluidc&&this.fluidButtonCopy(t.fluidc),t.fluidc&&'\n fluidc: "'.concat(t.fluidc,'",'),t.onTap&&this.onTap(t.onTap),t.frame&&this.frame(t.frame),t.frame&&'\n frame: "'.concat(t.frame,'",'),t.keySet&&this.keySet(t.keySet),t.align&&(this.res.style.textAlign=t.align),t.weight&&(this.res.style.fontWeight=t.weight),t.bold&&(this.res.style.fontWeight="bold"),t.width&&(this.res.style.width=t.width),t.exact&&(this.res.style.fontSize=t.exact),this}},{key:"fluidButtonCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("button"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"borderRadius",value:function(t){return this.res.style.borderRadius="number"==typeof t?"".concat(t,"px"):t,this}},{key:"auto",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="2.2rem":t.res.style.fontSize="1rem"};return e(),this._on(window,"resize",e),this}},{key:"large",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.res.style.fontSize="6rem":t.res.style.fontSize="3rem"};return e(),this._on(window,"resize",e),this}},{key:"border",value:function(t,e){return"none"===t&&(this.res.style.border="none"),this.res.style.border="".concat(t," solid ").concat(e,"px"),this}},{key:"frame",value:function(t){return this.res.style.width=t.width,this.res.style.height=t.height,this}},{key:"updating",value:function(t,e){var n=this.res,r=this.text;return Object.defineProperty(t,e,{set:function(t){var e=document.createTextNode(r.replace("$",t));n.replaceChild(e,n.childNodes[0])}}),this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,function(t,e){return"function"==typeof e?e.toString():e},4).replace(/"(\w+)":/g,"$1:").replace(/"(\(\)\s*=>\s*{[^}]*})"/g,"$1").replace(/\\n/g,"").replace(/\\"/g,'"');return['new Button("'.concat(this.text,'").set(').concat(t,")")]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&qi(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Yi(t){return Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yi(t)}function $i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qi(r.key),r)}}function Qi(t){var e=function(t){if("object"!=Yi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Yi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yi(e)?e:e+""}var Ki=function(){return t=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.margin="20px auto",this.container.style.textAlign="center",this.elements=e,this.currentSlideIndex=0,this.buttons=n,this.tintColor=r.tintColor||"green",this.inactiveColor=r.inactiveColor||"gray",this.options=r,!this.buttons){var o={leftButton:new Ji("L").set({frame:{width:50,height:50},svg:this.createArrowSVG("left",28,this.tintColor),color:this.tintColor,radius:"100%",mar:[{a:"1rem"}]}),rightButton:new Ji("R").set({frame:{width:50,height:50},svg:this.createArrowSVG("right",28,this.tintColor),color:this.tintColor,radius:"100%",mar:[{a:"1rem"}]})};this.buttons=o}this.createSlider(),this.init()},e=[{key:"createArrowSVG",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"left",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:28,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"currentColor",r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg");o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("width",String(e)),o.setAttribute("height",String(e)),o.setAttribute("aria-hidden","true"),o.style.display="block",o.style.pointerEvents="none";var i=document.createElementNS(r,"path");return i.setAttribute("fill",n),"left"===t?i.setAttribute("d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"):i.setAttribute("d","M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"),o.appendChild(i),o}},{key:"toCode",value:function(){var t="new Slider([".concat(this.elements.map(function(t){return t.toCode()}),"], null)");return[t=t.replace(/,\s*\./g,".")]}},{key:"createSlider",value:function(){var t,e=this;this.slider=document.createElement("div"),this.slider.style.width="100%",this.slider.style.height=null!==(t=this.options.height)&&void 0!==t?t:"400px",this.slider.style.borderRadius="20px",this.slider.style.overflow="hidden",this.slider.style.position="relative",this.slider.style.marginBottom="15px";var n=document.createElement("div");this.slidesWrapper=n,n.style.display="flex",n.style.overflowX="scroll",n.style.scrollBehavior="smooth",n.style.scrollSnapType="x mandatory",this.elements.forEach(function(t,r){var o=document.createElement("div");o.setAttribute("class","slide"),o.style.display="flex",o.style.justifyContent="center",o.style.alignItems="center",o.style.flexShrink="0",o.style.width="100%",o.style.height="400px",o.style.transformOrigin="center center",o.style.transform="scale(1)",o.style.scrollSnapAlign="center";var i=t.render();o.appendChild(i),i.style.cursor="pointer",i.addEventListener("click",function(){e.showLightbox(r)}),n.appendChild(o)}),this.arrowPrev=this.buttons.leftButton.render(),this.arrowPrev.style.position="absolute",this.arrowPrev.style.left="10px",this.arrowPrev.style.top="50%",this.arrowPrev.style.transform="translateY(-50%)",this.arrowPrev.style.zIndex="1",this.arrowPrev.style.display="flex",this.arrowPrev.style.alignItems="center",this.arrowPrev.style.justifyContent="center",this.arrowPrev.style.backgroundColor="white",this.arrowPrev.style.padding=".4rem",this.arrowNext=this.buttons.rightButton.render(),this.arrowNext.style.position="absolute",this.arrowNext.style.right="10px",this.arrowNext.style.top="50%",this.arrowNext.style.transform="translateY(-50%)",this.arrowNext.style.zIndex="1",this.arrowNext.style.display="flex",this.arrowNext.style.alignItems="center",this.arrowNext.style.justifyContent="center",this.arrowNext.style.backgroundColor="white",this.arrowNext.style.padding=".4rem";var r=document.createElement("div");r.style.position="absolute",r.style.bottom="10%",r.style.left="50%",r.style.transform="translateX(-50%)",r.style.textAlign="center",r.style.background="#ffffff",r.style.borderRadius="1rem",r.style.padding=".2rem",r.style.boxShadow="3px 3px 10px #000",this.options.hideSelector&&(r.style.display="none"),this.elements.forEach(function(t,n){var o=document.createElement("a");o.style.display="inline-block",o.style.height="15px",o.style.width="15px",o.style.borderRadius="50%",o.style.backgroundColor=e.inactiveColor,o.style.margin="0 10px",o.style.cursor="pointer",o.dataset.index=n,r.appendChild(o)});var o=document.createElement("div");o.style.display="flex",o.style.justifyContent="flex-start",o.style.margin="1rem",o.style.gap="10px",o.style.flexWrap="nowrap",o.style.overflowX="auto",this.options.hideThumbnails&&(o.style.display="none"),n.querySelectorAll(".slide").forEach(function(t,n){var r=document.createElement("div");r.className="slider-thumb",r.dataset.index=n.toString(),r.style.width="60px",r.style.height="40px",r.style.border="2px solid ".concat(e.inactiveColor),r.style.borderRadius="5px",r.style.overflow="hidden",r.style.cursor="pointer",r.style.flexShrink="0",r.style.position="relative";var i=(t.firstElementChild||t.cloneNode(!0)).cloneNode(!0);i.style.transform="scale(0.2)",i.style.transformOrigin="top left",i.style.width="300px",i.style.height="300px",i.style.backgroundSize="contain",i.style.pointerEvents="none",r.appendChild(i),o.appendChild(r)}),this.slider.appendChild(this.arrowPrev),this.slider.appendChild(this.arrowNext),this.slider.appendChild(n),this.slider.appendChild(r),this.container.appendChild(this.slider),this.container.appendChild(o),this.slidesWrapper=n,this.navLinks=Array.from(r.querySelectorAll("a")),this.thumbs=Array.from(o.querySelectorAll(".slider-thumb"))}},{key:"init",value:function(){this.updateActiveSlide(),this.attachEventListeners()}},{key:"attachEventListeners",value:function(){var t=this;this.arrowPrev.addEventListener("click",function(){t.moveToSlide(t.currentSlideIndex-1<0?t.elements.length-1:t.currentSlideIndex-1)}),this.arrowNext.addEventListener("click",function(){t.moveToSlide((t.currentSlideIndex+1)%t.elements.length)}),this.navLinks.forEach(function(e){e.addEventListener("click",function(n){n.preventDefault();var r=parseInt(e.dataset.index,10);t.moveToSlide(r)})}),this.thumbs.forEach(function(e){e.addEventListener("click",function(){var n=parseInt(e.dataset.index,10);t.moveToSlide(n)})}),document.addEventListener("keydown",function(e){"ArrowLeft"===e.key?t.moveToSlide(t.currentSlideIndex-1<0?t.elements.length-1:t.currentSlideIndex-1):"ArrowRight"===e.key&&t.moveToSlide((t.currentSlideIndex+1)%t.elements.length)})}},{key:"moveToSlide",value:function(t){this.currentSlideIndex=t,this.updateActiveSlide()}},{key:"updateActiveSlide",value:function(){var t=this;this.navLinks.forEach(function(e){var n=parseInt(e.dataset.index,10);e.style.backgroundColor=n===t.currentSlideIndex?t.tintColor:t.inactiveColor}),this.thumbs.forEach(function(e){var n=parseInt(e.dataset.index,10);e.style.borderColor=n===t.currentSlideIndex?t.tintColor:t.inactiveColor});var e=this.slidesWrapper.querySelector(".slide"),n=e?e.offsetWidth:this.slidesWrapper.clientWidth;this.slidesWrapper.scrollTo({left:this.currentSlideIndex*n,behavior:"smooth"})}},{key:"showLightbox",value:function(t){var e=this,n=t,r=document.createElement("div");r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100vw",r.style.height="100vh",r.style.backgroundColor="rgba(0,0,0,0.9)",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.zIndex="9999",r.style.cursor="default";var o=document.createElement("div");o.style.position="relative",o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.maxWidth="90%",o.style.maxHeight="90%",r.appendChild(o);var i=function(t){o.innerHTML="";var n,r=e.elements[t].render();if(n="IMG"===r.tagName?r:r.querySelector("img")){var i=document.createElement("img");i.src=n.src,i.style.maxWidth="90vw",i.style.maxHeight="90vh",i.style.objectFit="contain",i.style.pointerEvents="none",i.style.display="block",o.appendChild(i)}else{var a=r.cloneNode(!0);a.style.width="90vw",a.style.height="90vh",a.style.maxWidth="90vw",a.style.maxHeight="90vh",a.style.pointerEvents="none",o.appendChild(a)}};i(n);var a=this.buttons.leftButton.render().cloneNode(!0),s=this.buttons.rightButton.render().cloneNode(!0),l={position:"absolute",top:"50%",transform:"translateY(-50%)",background:"white",border:"none",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",width:"50px",height:"50px",margin:"1rem",padding:"0",zIndex:"10000",cursor:"pointer",boxShadow:"0 2px 8px rgba(0,0,0,0.4)"};Object.assign(a.style,l,{left:"10px"}),Object.assign(s.style,l,{right:"10px"}),a.addEventListener("click",function(t){t.stopPropagation(),n=n-1<0?e.elements.length-1:n-1,i(n)}),s.addEventListener("click",function(t){t.stopPropagation(),n=(n+1)%e.elements.length,i(n)}),r.appendChild(a),r.appendChild(s);var c=document.createElement("div");c.innerHTML="✕",c.style.position="absolute",c.style.top="15px",c.style.right="20px",c.style.fontSize="2rem",c.style.color="white",c.style.cursor="pointer",c.style.zIndex="10000",c.style.userSelect="none",c.style.transition="transform 0.2s ease",c.addEventListener("mouseenter",function(){c.style.transform="scale(1.2)"}),c.addEventListener("mouseleave",function(){c.style.transform="scale(1)"}),c.addEventListener("click",function(t){t.stopPropagation(),document.body.removeChild(r),document.removeEventListener("keydown",u)}),r.appendChild(c),r.addEventListener("click",function(){document.body.removeChild(r),document.removeEventListener("keydown",u)});var u=function(t){"Escape"===t.key?(document.body.removeChild(r),document.removeEventListener("keydown",u)):"ArrowLeft"===t.key?(n=n-1<0?e.elements.length-1:n-1,i(n)):"ArrowRight"===t.key&&(n=(n+1)%e.elements.length,i(n))};document.addEventListener("keydown",u),document.body.appendChild(r)}},{key:"render",value:function(t){if(!t)return this.container;document.querySelector(t).appendChild(this.container)}}],e&&$i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Zi(t){return Zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zi(t)}function ta(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ea(r.key),r)}}function ea(t){var e=function(t){if("object"!=Zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zi(e)?e:e+""}function na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(na=function(){return!!t})()}function ra(t){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ra(t)}function oa(t,e){return oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oa(t,e)}var ia=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=ra(e),function(t,e){if(e&&("object"==Zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,na()?Reflect.construct(e,n||[],ra(t).constructor):e.apply(t,n))}(this,t)).el=null,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oa(t,e)}(t,_t),e=t,(n=[{key:"set",value:function(t){this.options=t;var e=document.createElement("div"),n=document.createElement("label");n.style.position="relative",n.style.display="block";var r=null==t.title?"":String(t.title),o=document.createTextNode(r);n.appendChild(o),n.style.opacity=0;var i=document.createElement("input");return"textarea"===t.type&&(i=document.createElement("textarea")),i.style.position="relative",i.placeholder=r,i.style.boxSizing="border-box",r&&!i.getAttribute("aria-label")&&i.setAttribute("aria-label",r),i.style.fontSize="1rem",i.style.padding=".4rem .75rem",e.appendChild(n),e.appendChild(i),this.res=e,t.mar&&this.mar(t.mar),t.pad&&this.pad(t.pad),i.addEventListener("focus",function(){n.style.transition="transform ease 0.2s",n.style.transform="scale(0.80)",n.style.textTransform="uppercase",n.style.transformOrigin="left top",n.style.fontWeight="bold",i.placeholder="",n.style.opacity="1.0",t.font&&(n.style.fontFamily=t.font),t.color&&(n.style.color=t.color),t.exact&&(n.style.fontSize=t.exact)}),i.addEventListener("focusout",function(){n.style.transform="scale(1.0)",i.placeholder=r,n.style.opacity="0.0"}),t.name&&i.setAttribute("name",t.name),"INPUT"===i.tagName&&t.type&&"input"!==t.type&&i.setAttribute("type",t.type),t.required&&i.setAttribute("required",""),window.matchMedia("(max-device-width: 415px)").matches&&(i.style.width="100%",e.style.width="100%"),i.style.fontSize="1rem",this.el=e,this}},{key:"getValue",value:function(){return this.el.children[1].value}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return t=t.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new FloatingInput().set(".concat(t,")")]}},{key:"margin",value:function(t){return this.el.style.margin=t,this}},{key:"render",value:function(t){if(!t)return this.el;document.querySelector(t).appendChild(this.el)}}])&&ta(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function aa(t){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(t)}function sa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,la(r.key),r)}}function la(t){var e=function(t){if("object"!=aa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=aa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==aa(e)?e:e+""}"undefined"!=typeof window&&(window.FloatingInput=ia);var ca=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=null,this.minLabel=null,this.maxLabel=null,this.currentLabel=null},(e=[{key:"padding",value:function(t){return this.el.style.padding=t,this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return["new Range().set(".concat(t,")")]}},{key:"set",value:function(t){var e,n,r=this;this.options=t;var o=document.createElement("input");if(o.setAttribute("id","slider"),o.setAttribute("type","range"),o.setAttribute("min",t.min),o.setAttribute("max",t.max),o.setAttribute("value",t.min),o.style.width=null!==(e=t.width)&&void 0!==e?e:"100%",!t.plain){var i,a;o.style.setProperty("-webkit-appearance","none"),o.style.appearance="none",o.style.height="9px",o.style.background=null!==(i=t.style.trackColor)&&void 0!==i?i:"orange",o.style.borderRadius="5px";var s="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(a=t.style.thumbColor)&&void 0!==a?a:"4CAF50",";\n cursor: pointer;\n }\n "),l=document.createElement("style");l.appendChild(document.createTextNode(s)),document.head.appendChild(l)}var c=document.createElement("div");c.style.display="flex",c.style.flexDirection="column",c.style.alignItems="center",c.style.width="100%";var u=document.createElement("div");if(u.style.display="flex",u.style.justifyContent="space-between",u.style.width=null!==(n=t.width)&&void 0!==n?n:"100%",this.minLabel=document.createElement("span"),this.minLabel.textContent=t.min,this.maxLabel=document.createElement("span"),this.maxLabel.textContent=t.max,this.currentLabel=document.createElement("span"),this.currentLabel.textContent=o.value,t.font&&(this.currentLabel.style.fontFamily=t.font),t.font&&(this.minLabel.style.fontFamily=t.font),t.font&&(this.maxLabel.style.fontFamily=t.font),t.plain||(u.appendChild(this.minLabel),u.appendChild(this.currentLabel),u.appendChild(this.maxLabel)),o.addEventListener("input",function(){r.currentLabel.textContent=o.value}),window.matchMedia("(max-device-width: 415px)").matches)if(t.plain)o.style.width="80%";else{var f,d;o.style.height="20px",o.style.background=null!==(f=t.style.trackColor)&&void 0!==f?f:"1abc9C",o.style.borderRadius="10px",o.style.fontSize="3rem",o.style.width="80%";var h="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(d=t.style.thumbColor)&&void 0!==d?d:"blue",";\n cursor: pointer;\n }\n "),p=document.createElement("style");p.appendChild(document.createTextNode(h)),document.head.appendChild(p)}return c.appendChild(u),c.appendChild(o),this.el=c,this}},{key:"value",value:function(){return this.el.querySelector("#slider").value}},{key:"render",value:function(t){if(!t)return this.el;document.querySelector(t).appendChild(this.el)}}])&&sa(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function ua(t){return ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ua(t)}function fa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,da(r.key),r)}}function da(t){var e=function(t){if("object"!=ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ua(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ua(e)?e:e+""}"undefined"!=typeof window&&(window.Range=ca);var ha=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=null,this.radioCount=0},(e=[{key:"set",value:function(t){this.options=t,this.radioCount=t.items.length;for(var e=document.createElement("div"),n=t.items,r=0;r<n.length;r++){var o=document.createElement("label");n.font&&(o.style.font=n.font),n.color&&(o.style.color=n.color),n.exact&&(o.style.fontSize=n.exact);var i=document.createTextNode(n[r]);o.appendChild(i),o.setAttribute("for",n[r]);var a=document.createElement("input");a.setAttribute("type","radio"),a.setAttribute("id","S".concat(r)),a.setAttribute("value",n[r].split(" ").join("")),a.style.appearance="none",a.style.width="20px",a.style.height="20px",a.style.border=this.options.tint?"2px solid ".concat(this.options.tint):"2px solid #007BFF",a.style.borderRadius="50%",a.style.outline="none",a.style.cursor="pointer",a.style.transition="0.3s",this.options.font&&(o.style.fontFamily=this.options.font),t.multiple?a.setAttribute("name",n[r].split(" ").join("")):a.setAttribute("name",t.name),e.appendChild(a),e.appendChild(o),e.innerHTML+="</br>"}return this.el=e,t&&null!=t.id&&""!==t.id&&this.el.setAttribute("id",String(t.id)),this.responsive(),this}},{key:"padding",value:function(t){return this.el.style.padding=t,this}},{key:"getCheckedValues",value:function(){for(var t=[],e=0;e<this.radioCount;e++)if(document.querySelector("#S".concat(e)).checked){var n=document.querySelector("#S".concat(e));t.push(n.value)}return t}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return t=t.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new RadioGroup().set(".concat(t,")")]}},{key:"responsive",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.el.style.fontSize="1.7em"),this}},{key:"render",value:function(t){var e=this;if(!t){for(var n=function(){var t=e.el.children[r];"[object HTMLInputElement]"===t.toString()&&t.addEventListener("change",function(){if(t.checked){t.style.backgroundColor=e.options.tint?e.options.tint:"#007BFF",t.style.boxShadow=e.options.tint?"0 0 0 2px ".concat(e.options.tint," inset"):"0 0 0 2px #0056b3 inset";for(var n=0;n<e.el.children.length;n++){var r=e.el.children[n];"INPUT"===r.tagName&&"radio"===r.type&&!1===e.options.multiple&&r!==t&&(r.style.backgroundColor="transparent",r.style.boxShadow="none")}}else t.style.backgroundColor="transparent",t.style.boxShadow="none"})},r=0;r<this.el.children.length;r++)n();return this.el}document.querySelector(t).appendChild(this.el)}}])&&fa(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function pa(t){return pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(t)}function ya(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ma(r.key),r)}}function ma(t){var e=function(t){if("object"!=pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pa(e)?e:e+""}function va(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(va=function(){return!!t})()}function ba(t){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ba(t)}function ga(t,e){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ga(t,e)}"undefined"!=typeof window&&(window.RadioGroup=ha);var wa=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=ba(e),function(t,e){if(e&&("object"==pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,va()?Reflect.construct(e,n||[],ba(t).constructor):e.apply(t,n))}(this,t)).el=null,e.file=null,e.selected="",e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ga(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(t,e){document.createElement("div");var n=document.createElement("select");n.setAttribute("type","file"),n.setAttribute("name",e),n.addEventListener("change",function(){n.options[n.selectedIndex].value});for(var r=0;r<t.length;r++){var o=t[r],i="string"==typeof o||"number"==typeof o?[String(o),String(o)]:[o&&o[0],o&&o[1]];n.appendChild(this.addNode(i[0],i[1]))}return this.el=n,this.res=n,this}},{key:"set",value:function(t){this.options=t;var e=t.name;t.items&&this.setup(t.items,e),t.arrayPadding&&(this.deprecatedOption("arrayPadding",'pad: [{a: "0.5rem"}]'),this.arrayPadding(t.arrayPadding.sides,t.arrayPadding.value)),t.arrayMargin&&(this.deprecatedOption("arrayMargin","mar: [{a: 10}]"),this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value)),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.radius&&(this.el.style.borderRadius=t.radius),t.background&&(this.el.style.background=t.background);var n=t.title,r=void 0!==t.label?t.label:n;return null==r||this.el.getAttribute("aria-label")||this.el.setAttribute("aria-label",String(r)),this.commonMethods(t),this}},{key:"arrayPadding",value:function(t,e){return t.includes("left")&&(this.el.style.paddingLeft=e),t.includes("right")&&(this.el.style.paddingRight=e),t.includes("top")&&(this.el.style.paddingTop=e),t.includes("bottom")&&(this.el.style.paddingBottom=e),t.includes("all")&&(this.el.style.padding=e),this}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.el.style.marginLeft=e),t.includes("right")&&(this.el.style.marginRight=e),t.includes("top")&&(this.el.style.marginTop=e),t.includes("bottom")&&(this.el.style.marginBottom=e),t.includes("all")&&(this.el.style.margin=e),this}},{key:"addNode",value:function(t,e){var n=document.createElement("option");n.setAttribute("value",t);var r=document.createTextNode(e);return n.appendChild(r),n}},{key:"padding",value:function(t){return this.el.style.padding=t,this}},{key:"font",value:function(t){return this.el.style.fontFamily=t,this}},{key:"margin",value:function(t){return this.el.style.margin=t,this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return t=t.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new Picker().set(".concat(t,")")]}},{key:"rounded",value:function(t){return this.el.style.borderRadius="4px",this}},{key:"auto",value:function(){var t=this,e=function(){window.matchMedia("(max-device-width: 415px)").matches?t.el.style.fontSize="3rem":t.el.style.fontSize="1rem"};return e(),this._on(window,"resize",e),this}},{key:"render",value:function(t){if(!t)return this.el;document.querySelector(t).appendChild(this.el)}}],n&&ya(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function xa(t){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(t)}function ka(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sa(r.key),r)}}function Sa(t){var e=function(t){if("object"!=xa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xa(e)?e:e+""}function Oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oa=function(){return!!t})()}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ja(t)}function Ea(t,e){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ea(t,e)}"undefined"!=typeof window&&(window.Picker=wa);var Ta=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=ja(e),function(t,e){if(e&&("object"==xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oa()?Reflect.construct(e,n||[],ja(t).constructor):e.apply(t,n))}(this,t)).el=null,e.file=null,e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ea(t,e)}(t,_t),e=t,(n=[{key:"set",value:function(t){var e=this;this.options=t,this.okayColor=t.okayColor,window.matchMedia("(max-device-width: 415px)");var n=document.createElement("div");n.style.paddingBottom="1em",n.style.display="flex",document.createElement("div");var r=document.createElement("input");r.setAttribute("type","text"),r.style.display="none",r.style.margin="0.5em";var o=document.createElement("input");o.setAttribute("type","file"),o.setAttribute("name",t.name),t.accept&&(o.accept=t.accept),void 0!==t.id&&null!==t.id&&o.setAttribute("id",t.id),o.style.visibility="hidden",o.style.display="none",window.matchMedia("(max-device-width: 415px)").matches&&(o.style.fontSize="1rem");var i=document.createElement("label");return i.setAttribute("for",t.id),i.textContent=t.title,i.style.marginRight=12,i.style.padding="0.5em",t.color&&(i.style.color=t.color),t.background&&(i.style.background=t.background,i.style.padding="10"),o.addEventListener("change",function(){r.style.display="block",t.hideField&&(r.style.display="none"),i.textContent="Change",e.file=o.files[0],e.onLoad(e.file),_a[t.index]=e.file,r.setAttribute("value",e.file.name),r.setAttribute("readonly","true"),e.getLoaded(),e.highlight()}),n.appendChild(o),n.appendChild(i),n.appendChild(r),this.el=n,t.font&&this.font(t.font),t.radius&&this.borderRadius(t.radius),this}},{key:"borderRadius",value:function(t){return this.el.style.borderRadius=t,this}},{key:"addClass",value:function(t){return this.el.setAttribute("class",t),this}},{key:"font",value:function(t){return this.el.style.fontFamily=t,this}},{key:"bold",value:function(){return this.el.style.fontWeight="bold",this}},{key:"rounded",value:function(){return this.el.children[1].style.borderRadius="8px",this}},{key:"highlight",value:function(){return null===this.file?(this.hasFile=!1,this.el.children[1].style.background="red"):(this.hasFile=!0,this.okayColor?this.el.children[1].style.background=this.okayColor:this.el.children[1].style.background="#1abc9c"),this}},{key:"auto",value:function(){var t=function(){window.matchMedia("(max-device-width: 415px)").matches};return t(),this._on(window,"resize",t),this}},{key:"onLoad",value:function(t){return this.returnObject(this.file),this}},{key:"getLoaded",value:function(){return this.file}},{key:"returnObject",value:function(t){return t}},{key:"loadCall",value:function(t){return this.func=t,this.func(this.file),this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return t=t.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new FilePickera().set(".concat(t,")")]}},{key:"render",value:function(t){return t?(document.querySelector(t).appendChild(this.el),this):this.el}}])&&ka(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}(),_a=[];function Ca(t,e){return Ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ca(t,e)}function Aa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Aa=function(){return!!t})()}function Pa(t){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(t)}function Ra(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ia(r.key),r)}}function Ia(t){var e=function(t){if("object"!=Pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pa(e)?e:e+""}var Ma=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.res=null,this.currentItem=""},(e=[{key:"set",value:function(t){var e=this,n=t;this.options=t;var r=document.createElement("input");r.setAttribute("list","dlCities"),r.setAttribute("id","my");var o=t.data,i=0,a=o.length,s=document.createElement("datalist");for(s.id="dlCities",i=0;i<a;i+=1){var l=document.createElement("option");l.value=o[i],s.appendChild(l)}return r.appendChild(s),r.addEventListener("change",function(){var t=document.querySelector("#my").value;e.currentItem=t}),r.setAttribute("placeholder","Type value"),r.style.padding=".4rem .75rem",r.style.fontSize="1rem",this.res=r,this.responsive(),n.arrayPadding&&this.arrayPadding(n.arrayPadding.sides,n.arrayPadding.value),n.arrayMargin&&this.arrayMargin(n.arrayMargin.sides,n.arrayMargin.value),n.pad&&this.pad(n.pad),n.mar&&this.mar(n.mar),this}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return["new DataList().set(".concat(t,")")]}},{key:"getValue",value:function(){return this.res.value}},{key:"arrayPadding",value:function(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),t.includes("all")&&(this.res.style.padding=e),this}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),this}},{key:"margin",value:function(t){return this.res.style.margin=t,this}},{key:"responsive",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="100%"),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&Ra(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),Da=Ma;function Fa(t){return Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(t)}function La(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function za(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Na(r.key),r)}}function Na(t){var e=function(t){if("object"!=Fa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fa(e)?e:e+""}Ma=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t,e,n){if(Aa())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&Ca(o,n.prototype),o}(Da,e)},"undefined"!=typeof window&&(window.DataList=Ma);var Ba=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POST";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.action=e,this.method=n,this.elements=[],this.formElement=document.createElement("form"),this.formElement.action=this.action,this.formElement.method=this.method},e=[{key:"add",value:function(t){var e=this;return this.elements=t,t.forEach(function(t){if(!t||"function"!=typeof t.render)throw new Error("Each element in the array must have a render method that returns an HTML DOM element.");e.formElement.appendChild(t.render())}),this}},{key:"toCode",value:function(){var t=this.elements.map(function(t){return t.toCode()}),e=Object.entries(this.obj).map(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return La(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?La(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1],o="string"==typeof r?JSON.stringify(r):r;return"".concat(n,": ").concat(o)}).join(", ");return["new Form().set({".concat(e,"}).add([ \n ").concat(t.join(", \n"),"])")]}},{key:"set",value:function(t){return this.obj=t,t.action&&this.setAction(t.action),t.method&&this.setMethod(t.method),t.id&&(this.formElement.id=t.id),t.title&&this.formElement.setAttribute("aria-label",t.title),this}},{key:"setAction",value:function(t){this.action=t,this.formElement.action=this.action}},{key:"setMethod",value:function(t){this.method=t,this.formElement.method=this.method}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.formElement),this.formElement}}],e&&za(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Wa(t){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(t)}function Ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qa(r.key),r)}}function qa(t){var e=function(t){if("object"!=Wa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wa(e)?e:e+""}var Ha=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"style",value:function(t){for(var e=t.bst,n=t.el,r=t.re,o=(t.options,[]),i=0;i<e.length;i++)e[i].target&&(n.id,e[i].target[0]);for(i=0;i<e.length;i++){var a=!0;e[i].target&&(a=!1,n.id===e[i].target[0]&&(a=!0));var s=e[i].op.ops.split("-");a&&s.includes("air")&&(r.borderObj={color:"#1abc9c",radius:"0rem",width:"3px"},r.color="#1abc9c",r.background="transparent"),a&&s.includes("round")&&(s.includes("air")?r.borderObj={width:"4px",radius:"0.7rem",color:"#1abc9c"}:r.borderObj={width:"0px",radius:"0.7rem",color:"#1abc9c"}),a&&s.includes("full")&&(r.background="#3498db",r.borderObj&&r.borderObj.radius&&(r.borderObj.radius="0.3rem"),r.color="white"),a&&s.includes("pill")&&(r.background="#3498db",r.borderObj.radius="9999px",r.color="white"),a&&s.includes("hover")&&(r.hover={color:"#1abc9c",background:"orange"}),o.push((new he).set(r))}return o}}],null&&Ua(t.prototype,null),e&&Ua(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ga(t){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(t)}function Xa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Va(r.key),r)}}function Va(t){var e=function(t){if("object"!=Ga(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ga(e)?e:e+""}function Ja(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ja=function(){return!!t})()}function Ya(t){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ya(t)}function $a(t,e){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$a(t,e)}var Qa=function(){function t(){var e,n,r,o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=this,r=t,r=Ya(r),e=function(t,e){if(e&&("object"==Ga(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(n,Ja()?Reflect.construct(r,o||[],Ya(n).constructor):r.apply(n,o)))._noTheme=!0,e.gridContainer=document.createElement("div"),e.gridContainer.classList.add("grid-container"),e.gridContainer.style.display="grid",e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$a(t,e)}(t,_t),e=t,n=[{key:"set",value:function(t){return t&&null!=t.id&&""!==t.id&&this.gridContainer.setAttribute("id",String(t.id)),t.gap&&(this.gridContainer.style.gap=t.gap),t.height&&(this.gridContainer.style.height=t.height),t.width&&(this.gridContainer.style.width=t.width),this}},{key:"react",value:function(t){var e=this,n=function(){for(var n=0;n<t.length-1;n++){var r=parseInt(t[n].at),o=parseInt(t[n+1].at);if(window.innerWidth>r&&window.innerWidth<o){var i=t[n].template.map(function(t){return t.split("").join(" ")}).map(function(t){return'"'.concat(t,'"')}).join(" ");e.gridContainer.style.gridTemplateAreas=i}else if(window.innerWidth>o){var a=t[t.length-1].template.map(function(t){return t.split("").join(" ")}).map(function(t){return'"'.concat(t,'"')}).join(" ");e.gridContainer.style.gridTemplateAreas=a}}};return n(),this._on(window,"resize",n),this}},{key:"add",value:function(t){for(var e=function(t){for(var e=[],n=0;n<t;n++){var r="",o=n;do{r=String.fromCharCode(65+o%26)+r,o=Math.floor(o/26)-1}while(o>=0);e.push(r)}return e}(t.length),n=0;n<t.length;n++){var r=t[n].render();r.style.gridArea=e[n].toLowerCase();var o=document.createElement("div");o.textContent=t[n].text,o.style.gridArea=e[n].toLowerCase(),this.gridContainer.appendChild(r)}return this}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.gridContainer),this.gridContainer}},{key:"toCode",value:function(){return"new Simple().set({}).react([])"}}],n&&Xa(e.prototype,n),r&&Xa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function Ka(t){return Ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ka(t)}function Za(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Za(Object(n),!0).forEach(function(e){es(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Za(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function es(t,e,n){return(e=rs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ns(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rs(r.key),r)}}function rs(t){var e=function(t){if("object"!=Ka(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ka(e)?e:e+""}function os(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(os=function(){return!!t})()}function is(){return is="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=as(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},is.apply(null,arguments)}function as(t){return as=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},as(t)}function ss(t,e){return ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ss(t,e)}var ls=function(){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=as(e),function(t,e){if(e&&("object"==Ka(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,os()?Reflect.construct(e,n||[],as(t).constructor):e.apply(t,n))}(this,t)).res=null,e.options={},e.code=[],e.elCSS=[],e.html=[],e.react=[],e.setup(n),e.code.push("new Polygon(".concat(JSON.stringify(n),")")),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=document.createElement("div");return t.id&&e.setAttribute("id",t.id),this.res=e,this.res.style.padding=0,this.res.style.margin=0,this.res.style.display=t.inline?"inline-block":"block",this}},{key:"toCode",value:function(){var t=pt(this.options||{},2);return"new Polygon().set(".concat(t,")")}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=ts(ts({},this.options),e),e.id&&(this.res.id=e.id),e.class&&(this.res.className=e.class),e.sides&&this.sides(e.sides),e.size&&this.size(e.size.width||e.size,e.size.height),e.color&&this.color(e.color),e.border&&this.border(e.border),e.margin&&this.mar([{a:e.margin}]),e.padding&&this.pad([{a:e.padding}]),e.background&&this.background(e.background),e.center&&this.center();var n=e;this.obj=e;var r,o,i,a=[];if(n.stroke||n.gradient||n.backgroundOp||n.layout||n.marginOp||n.shadow||n.animation||n.filtera||n.transform){var s;n.gradient&&(this.globalGradient=n.gradient.op.gradient),n.stroke&&(null===(r=t,o=this,s="function"==typeof(i=is(as(1&3?r.prototype:r),"setAny",o))?function(t){return i.apply(o,t)}:i)||void 0===s||s([{globalBlast:"".concat(n.stroke.op.width," ").concat(n.stroke.op.color)}]));for(var l=[n.stroke,n.gradient,n.animation,n.backgroundOp,n.layout,n.marginOp,n.shadow,n.animation,n.filtera,n.transform].filter(function(t){return null!=t}),c=0;c<l.length;c++)a.push({range:l[c].range,log:l[c].op.name,target:l[c].target,op:l[c].op});var u=[];n.border&&u.push("border"),n.background&&u.push("background"),(n.mar||n.margin)&&u.push("margin"),n.animation&&u.push("animation"),"radial"===n.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)"),this.chainReact(a,this.options.id,u)}return this}},{key:"size",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.res.style.width="number"==typeof t?t+"px":t,this.res.style.height="number"==typeof e?e+"px":e,this}},{key:"sides",value:function(e){return e<3&&(e=3),this.res.style.clipPath=t.makePolygon(e),this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"border",value:function(t){return this.res.style.border="string"==typeof t?t:"".concat((null==t?void 0:t.width)||"1px"," solid ").concat((null==t?void 0:t.color)||"black"),this}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"render",value:function(t){return"string"==typeof t?document.querySelector(t).appendChild(this.res):t instanceof HTMLElement&&t.appendChild(this.res),this}}],r=[{key:"makePolygon",value:function(t){for(var e=2*Math.PI/t,n=[],r=0;r<t;r++){var o=50+50*Math.cos(r*e-Math.PI/2),i=50+50*Math.sin(r*e-Math.PI/2);n.push("".concat(o,"% ").concat(i,"%"))}return"polygon(".concat(n.join(","),")")}}],n&&ns(e.prototype,n),r&&ns(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function cs(t){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(t)}function us(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function fs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ds(r.key),r)}}function ds(t){var e=function(t){if("object"!=cs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cs(e)?e:e+""}function hs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(hs=function(){return!!t})()}function ps(){return ps="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ys(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ps.apply(null,arguments)}function ys(t){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ys(t)}function ms(t,e){return ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ms(t,e)}var vs=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=ys(e),function(t,e){if(e&&("object"==cs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hs()?Reflect.construct(e,n||[],ys(t).constructor):e.apply(t,n))}(this,t)).res=null,e.options={},e.code=[],e.elCSS=[],e.html=[],e.react=[],e.setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ms(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(){var t=document.createElement("div");return this.res=t,this.res.style.padding=0,this.res.style.margin=0,this.res.style.borderRadius="50%",this}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var t=pt(Object.fromEntries(Object.entries(this.options||{}).filter(function(t){return null!=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return us(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?us(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2)[1]})),4);return["new Circle().set(".concat(t,")")]}},{key:"setArea",value:function(t){return this.res.style.gridArea=t,this}},{key:"diameter",value:function(t){return this.res.style.width=this.res.style.height="number"==typeof t?t+"px":t,this.res.style.borderRadius="50%",this}},{key:"size",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.res.style.width="number"==typeof t?t+"px":t,this.res.style.height="number"==typeof e?e+"px":e,this.res.style.borderRadius="50%",this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"border",value:function(t){return this.res.style.border="string"==typeof t?t:"".concat((null==t?void 0:t.width)||1,"px solid ").concat((null==t?void 0:t.color)||"black"),this}},{key:"radius",value:function(t){return this.res.style.borderRadius="number"==typeof t?t+"px":t,this}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e,e.top&&(this.res.style.top=e.top),e.left&&(this.res.style.left=e.left),(e.top||e.left)&&(this.res.style.position="absolute"),e.diameter&&this.diameter(e.diameter),e.size&&this.size(e.size.w||e.size,e.size.h||e.size),e.width&&(this.res.style.width=e.width),e.height&&(this.res.style.height=e.height),e.radius&&this.radius(e.radius),e.id&&this.res.setAttribute("id",e.id),e.class&&this.res.setAttribute("class",e.class),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.pad&&(this.res.style.padding=e.pad),e.mar&&(this.res.style.margin=e.mar),e.background&&(this.res.style.background=e.background),e.color&&this.color(e.color),e.border&&this.border(e.border),e.shadow&&(this.res.style.boxShadow=e.shadow),e.cursor&&(this.res.style.cursor=!0===e.cursor?"pointer":e.cursor);var n,r,o,i=[];if(e.stroke||e.gradient||e.backgroundOp||e.layout||e.marginOp||e.shadow||e.animation||e.filtera||e.transform){var a;e.gradient&&(this.globalGradient=e.gradient.op.gradient),"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)"),e.stroke&&(null===(n=t,r=this,a="function"==typeof(o=ps(ys(1&3?n.prototype:n),"setAny",r))?function(t){return o.apply(r,t)}:o)||void 0===a||a([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]));for(var s=[e.stroke,e.gradient,e.animation,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform].filter(function(t){return null!=t}),l=0;l<s.length;l++)i.push({range:s[l].range,log:s[l].op.name,target:s[l].target,op:s[l].op});var c=[];e.border&&c.push("border"),e.background&&c.push("background"),(e.mar||e.margin)&&c.push("margin"),e.animation&&c.push("animation"),this.chainReact(i,this.options.id,c)}return this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"excludeFromCode",value:function(){return this.excludeFromCodeTrue=!0,this}},{key:"setClass",value:function(t){return this.res.setAttribute("class",t),this}},{key:"onTap",value:function(t){return this.res.addEventListener("click",t),this}},{key:"render",value:function(t){var e;return t&&(null===(e=document.querySelector(t))||void 0===e||e.appendChild(this.res)),this.res}}],n&&fs(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}(),bs=["mobile"];function gs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ws(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gs(Object(n),!0).forEach(function(e){xs(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gs(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function xs(t,e,n){return(e=function(t){var e=function(t){if("object"!=ks(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ks(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ks(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ks(t){return ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ks(t)}var Ss=function(t){var e=Math.floor(Number(t));return Number.isFinite(e)&&e>0?e:0},Os=function(t,e){return Math.max(1,Math.round(Number(e)||1))%2==1?Math.round(t-.5)+.5:Math.round(t)},js=function(t,e,n,r){if(0===t||n<=e)return[];for(var o=(n-e)/t,i=[],a=0;a<=t;a++)i.push(Os(e+o*a,r));return i};function Es(t){return Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(t)}function Ts(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function _s(t,e){if(t){if("string"==typeof t)return Cs(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cs(t,e):void 0}}function Cs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function As(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ps(r.key),r)}}function Ps(t){var e=function(t){if("object"!=Es(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Es(e)?e:e+""}function Rs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Rs=function(){return!!t})()}function Is(t){return Is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Is(t)}function Ms(t,e){return Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ms(t,e)}var Ds="http://www.w3.org/2000/svg",Fs={columns:4,rows:2,inset:16,lineWidth:1,lineOpacity:.35,marks:"square",markSize:8,position:"fixed",zIndex:2,font:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:11,letterSpacing:"0.04em",uppercase:!0,breakpoint:768,readouts:[]},Ls=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Is(e),function(t,e){if(e&&("object"==Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Rs()?Reflect.construct(e,n||[],Is(t).constructor):e.apply(t,n))}(this,t)).options={},e.config=null,e._readoutEls=new Map,e._readoutText=new Map,e.setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ms(t,e)}(t,_t),e=t,n=[{key:"setup",value:function(){var t=document.createElement("div");t.setAttribute("aria-hidden","true"),t.setAttribute("data-nodality","grid-overlay"),t.style.pointerEvents="none",t.style.top="0",t.style.right="0",t.style.bottom="0",t.style.left="0",t.style.overflow="hidden";var e=document.createElementNS(Ds,"svg");return e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("focusable","false"),e.style.display="block",t.appendChild(e),this.res=t,this.svg=e,this}},{key:"set",value:function(){var t,e,n,r,o,i,a,s,l,c,u,f,d,h,p,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=y,this.config={columns:null!==(t=y.columns)&&void 0!==t?t:Fs.columns,rows:null!==(e=y.rows)&&void 0!==e?e:Fs.rows,inset:null!==(n=y.inset)&&void 0!==n?n:Fs.inset,color:y.color,lineWidth:null!==(r=y.lineWidth)&&void 0!==r?r:Fs.lineWidth,lineOpacity:null!==(o=y.lineOpacity)&&void 0!==o?o:Fs.lineOpacity,marks:null!==(i=y.marks)&&void 0!==i?i:Fs.marks,markSize:null!==(a=y.markSize)&&void 0!==a?a:Fs.markSize,position:null!==(s=y.position)&&void 0!==s?s:Fs.position,zIndex:null!==(l=y.zIndex)&&void 0!==l?l:Fs.zIndex,font:null!==(c=y.font)&&void 0!==c?c:Fs.font,fontSize:null!==(u=y.fontSize)&&void 0!==u?u:Fs.fontSize,letterSpacing:null!==(f=y.letterSpacing)&&void 0!==f?f:Fs.letterSpacing,uppercase:null!==(d=y.uppercase)&&void 0!==d?d:Fs.uppercase,breakpoint:null!==(h=y.breakpoint)&&void 0!==h?h:Fs.breakpoint,mobile:y.mobile,readouts:null!==(p=y.readouts)&&void 0!==p?p:Fs.readouts};var m=this.config;return this.res.style.position="absolute"===m.position?"absolute":"fixed",this.res.style.zIndex=String(m.zIndex),y.color&&(this.res.style.color=y.color),y.id&&this.res.setAttribute("id",y.id),this._watchSize(),this.draw(),y.raster&&this.rasterize(y.raster),this}},{key:"readout",value:function(t,e){this._readoutText.set(t,e);var n=this._readoutEls.get(t);return n&&(n.textContent=this._format(e)),this}},{key:"geometry",value:function(){return this._geometry||null}},{key:"draw",value:function(){var t=this;if(!this.config)return this;var e=this._measure(),n=e.width,r=e.height,o=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})||{},n=e.mobile,r=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,bs),o=Number(r.breakpoint)||768;return n&&"object"===ks(n)&&t<o?ws(ws({},r),n):r}(this.config,this._viewportWidth()),i=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.width,n=void 0===e?0:e,r=t.height,o=void 0===r?0:r,i=t.columns,a=void 0===i?4:i,s=t.rows,l=void 0===s?2:s,c=t.inset,u=void 0===c?0:c,f=t.lineWidth,d=void 0===f?1:f,h=Math.max(0,Number(n)||0),p=Math.max(0,Number(o)||0),y=Ss(a),m=Ss(l),v=function(t){if(t&&"object"===ks(t))return{x:Math.max(0,Number(t.x)||0),y:Math.max(0,Number(t.y)||0)};var e=Math.max(0,Number(t)||0);return{x:e,y:e}}(u),b=Math.min(v.x,h/2),g=Math.min(v.y,p/2),w=js(y,b,h-b,d),x=js(m,g,p-g,d),k=[],S=0;S<x.length;S++)for(var O=0;O<w.length;O++)k.push({col:O,row:S,x:w[O],y:x[S]});return{width:h,height:p,columns:y,rows:m,inset:{x:b,y:g},cell:{width:y?(h-2*b)/y:0,height:m?(p-2*g)/m:0},x:w,y:x,intersections:k}}({width:n,height:r,columns:o.columns,rows:o.rows,inset:o.inset,lineWidth:o.lineWidth});this._geometry=i;for(var a=this.svg;a.firstChild;)a.removeChild(a.firstChild);if(this._readoutEls.clear(),!n||!r)return this;a.setAttribute("viewBox","0 0 ".concat(n," ").concat(r));var s,l=this._node("g",{stroke:"currentColor","stroke-width":o.lineWidth,"stroke-opacity":o.lineOpacity,"shape-rendering":"crispEdges"}),c=Ts(i.x);try{for(c.s();!(s=c.n()).done;){var u=s.value;l.appendChild(this._node("line",{x1:u,y1:0,x2:u,y2:r}))}}catch(t){c.e(t)}finally{c.f()}var f,d=Ts(i.y);try{for(d.s();!(f=d.n()).done;){var h=f.value;l.appendChild(this._node("line",{x1:0,y1:h,x2:n,y2:h}))}}catch(t){d.e(t)}finally{d.f()}a.appendChild(l);var p=Number(o.markSize)||0;if(p>0&&"square"===o.marks){var y,m=this._node("g",{fill:"currentColor","shape-rendering":"crispEdges"}),v=Ts(i.intersections);try{for(v.s();!(y=v.n()).done;){var b=y.value;m.appendChild(this._node("rect",{x:b.x-p/2,y:b.y-p/2,width:p,height:p}))}}catch(t){v.e(t)}finally{v.f()}a.appendChild(m)}else if(p>0&&"cross"===o.marks){var g=i.intersections.map(function(t){return"M".concat(t.x-p/2," ").concat(t.y,"H").concat(t.x+p/2,"M").concat(t.x," ").concat(t.y-p/2,"V").concat(t.y+p/2)}).join("");g&&a.appendChild(this._node("path",{d:g,fill:"none",stroke:"currentColor","stroke-width":o.lineWidth,"shape-rendering":"crispEdges"}))}var w=Array.isArray(o.readouts)?o.readouts:[];if(w.length){var x=this._node("g",{fill:"currentColor","font-family":o.font,"font-size":o.fontSize,"letter-spacing":o.letterSpacing}),k=p/2+6;w.forEach(function(e,o){if(e){var a=i.intersections.find(function(t){return t.col===e.col&&t.row===e.row});if(a){var s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"br",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=["tl","tr","bl","br"].includes(e)?e:"br",i="r"===o[1],a="b"===o[0];if(r){var s=Number(r.width)||0,l=Number(r.height)||0,c=n+24;i&&t.x+c>s?i=!1:!i&&t.x-c<0&&(i=!0),a&&t.y+c>l?a=!1:!a&&t.y-c<0&&(a=!0)}return{x:t.x+(i?n:-n),y:t.y+(a?n:-n),textAnchor:i?"start":"end",baseline:a?"hanging":"alphabetic"}}(a,e.anchor,k,{width:n,height:r}),l=null!=e.id?String(e.id):"readout-".concat(o),c=t._node("text",{x:s.x,y:s.y,"text-anchor":s.textAnchor,"dominant-baseline":s.baseline,"data-readout":l});c.textContent=t._format(t._readoutText.has(l)?t._readoutText.get(l):e.text),x.appendChild(c),t._readoutEls.set(l,c)}}}),a.appendChild(x)}return this}},{key:"_format",value:function(t){var e=null==t?"":String(t);return this.config&&!1===this.config.uppercase?e:e.toUpperCase()}},{key:"_node",value:function(t,e){var n=document.createElementNS(Ds,t);for(var r in e)n.setAttribute(r,String(e[r]));return n}},{key:"_viewportWidth",value:function(){return"undefined"!=typeof window&&window.innerWidth?window.innerWidth:1/0}},{key:"_measure",value:function(){var t="undefined"!=typeof window;return{width:this.res.clientWidth||(t?window.innerWidth:0)||0,height:this.res.clientHeight||(t?window.innerHeight:0)||0}}},{key:"_watchSize",value:function(){var t=this;if(!this._watching&&"undefined"!=typeof window)if(this._watching=!0,"function"==typeof window.ResizeObserver){var e=new window.ResizeObserver(function(){return t.draw()});e.observe(this.res),this._track(function(){return e.disconnect()})}else this._on(window,"resize",function(){return t.draw()})}},{key:"toCode",value:function(){if(this.excludeFromCodeTrue)return[""];var t=Object.fromEntries(Object.entries(this.options||{}).filter(function(t){return null!=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||_s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2)[1]}));return["new GridOverlay().set(".concat(pt(t,4),")")]}},{key:"excludeFromCode",value:function(){return this.excludeFromCodeTrue=!0,this}},{key:"render",value:function(t){if(t){var e=document.querySelector(t);e&&(e.appendChild(this.res),this.draw())}return this.res}}],n&&As(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function zs(t){return zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(t)}function Ns(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Ws(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ws(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ws(t,e){if(t){if("string"==typeof t)return Us(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Us(t,e):void 0}}function Us(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hs(r.key),r)}}function Hs(t){var e=function(t){if("object"!=zs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zs(e)?e:e+""}function Gs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Gs=function(){return!!t})()}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Vs(t,e){return Vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vs(t,e)}var Js="https://cdn.shopify.com/storefront/web-components.js",Ys=function(t,e){var n=String(null!=t?t:e).replace(/^#/,"");return/^[A-Za-z][\w-]*$/.test(n)?n:e},$s=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,n){return e=Xs(e),function(t,e){if(e&&("object"==zs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gs()?Reflect.construct(e,n||[],Xs(t).constructor):e.apply(t,n))}(this,t)).items=[],e.fallbackItems=[],e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vs(t,e)}(t,_t),e=t,n=[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var e=t.kind,n=this["build_".concat(e)];if("function"!=typeof n)throw new Error('nodality: Shop has no kind "'.concat(e,'"'));return this.res=n.call(this,t),"product"===e&&(this.res.style.display="block",this.commonMethods(t)),t.id&&this.res.setAttribute("id",String(t.id)),t.font&&(this.res.style.fontFamily=t.font),t.color&&(this.res.style.color=t.color),"product"!==e&&"store"!==e&&"cart"!==e&&(this.applyStyleOptions(t),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar)),t.keySet&&this.keySet(t.keySet),this}},{key:"build_store",value:function(e){var n=document.createElement("shopify-store");return n.setAttribute("store-domain",e.domain),e.token&&n.setAttribute("public-access-token",e.token),e.country&&n.setAttribute("country",e.country),e.language&&n.setAttribute("language",e.language),t.loadScript(),n}},{key:"build_product",value:function(t){var e=document.createElement("shopify-context");return e.setAttribute("type","product"),e.setAttribute("handle",t.handle),this.template=document.createElement("template"),this.placeholder=document.createElement("div"),this.placeholder.setAttribute("shopify-loading-placeholder",""),this.placeholder.style.display="contents",e.appendChild(this.template),e.appendChild(this.placeholder),e}},{key:"build_price",value:function(t){var e;if(t.fallback)return this.text(t.text);var n=document.createElement("shopify-money");return n.setAttribute("query",null!==(e=t.query)&&void 0!==e?e:"product.selectedOrFirstAvailableVariant.price"),null!=t.text&&(n.textContent=t.text),n}},{key:"build_productData",value:function(t){var e;if(t.fallback)return this.text(t.text);var n=document.createElement("shopify-data");return n.setAttribute("query",null!==(e=t.query)&&void 0!==e?e:"product.title"),null!=t.text&&(n.textContent=t.text),n}},{key:"build_productMedia",value:function(t){var e;if(t.fallback){var n,r=document.createElement("img");return t.url&&r.setAttribute("src",t.url),r.setAttribute("alt",null!==(n=t.alt)&&void 0!==n?n:""),t.width&&r.setAttribute("width",String(t.width)),t.height&&r.setAttribute("height",String(t.height)),r}var o=document.createElement("shopify-media");if(o.setAttribute("query",null!==(e=t.query)&&void 0!==e?e:"product.selectedOrFirstAvailableVariant.image"),t.width&&o.setAttribute("width",String(t.width)),t.height&&o.setAttribute("height",String(t.height)),t.url){var i,a=document.createElement("img");a.setAttribute("src",t.url),a.setAttribute("alt",null!==(i=t.alt)&&void 0!==i?i:""),o.appendChild(a)}return o}},{key:"build_variantPicker",value:function(t){if(t.fallback)return this.text(t.text);var e=document.createElement("shopify-variant-selector");return null!=t.text&&(e.textContent=t.text),e}},{key:"build_buy",value:function(t){var e;if(t.fallback){var n,r=document.createElement("a");return t.url&&r.setAttribute("href",t.url),r.textContent=null!==(n=t.text)&&void 0!==n?n:"Buy",r}var o=document.createElement("button");o.setAttribute("type","button"),o.textContent=null!==(e=t.text)&&void 0!==e?e:"Add to cart";var i=Ys(t.cart,"cart"),a=Ys(t.store,"store");return o.setAttribute("onclick","buyNow"===t.mode?"document.getElementById('".concat(a,"').buyNow(event)"):"document.getElementById('".concat(i,"').addLine(event).showModal()")),o}},{key:"build_cart",value:function(e){var n=document.createElement("shopify-cart");e.target&&n.setAttribute("target",e.target),e.discountCodes&&n.setAttribute("discount-codes",e.discountCodes);var r=Ys(e.id,"cart");return e.theme&&t.themeCart(r,e.theme),n}},{key:"text",value:function(t){var e=document.createElement("span");return e.textContent=null!=t?t:"",e}},{key:"add",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.items=t;var e,n=this.template?this.template.content:this.res,r=Bs(t);try{for(r.s();!(e=r.n()).done;){var o=e.value;o&&"function"==typeof o.render&&n.appendChild(o.render())}}catch(t){r.e(t)}finally{r.f()}return this}},{key:"fallback",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.fallbackItems=t;var e,n=this.placeholder||this.res,r=Bs(t);try{for(r.s();!(e=r.n()).done;){var o=e.value;o&&"function"==typeof o.render&&n.appendChild(o.render())}}catch(t){r.e(t)}finally{r.f()}return this}},{key:"toCode",value:function(){var t=Object.fromEntries(Object.entries(this.options||{}).filter(function(t){return null!=Ns(t,2)[1]})),e=function(t){return t.filter(function(t){return t&&"function"==typeof t.toCode}).map(function(t){return[].concat(t.toCode()).join("")}).join(",\n")},n="new Shop().set(".concat(pt(t,4),")");return this.items.length&&(n+=".add([".concat(e(this.items),"])")),this.fallbackItems.length&&(n+=".fallback([".concat(e(this.fallbackItems),"])")),[n]}},{key:"render",value:function(t){if(t){var e=document.querySelector(t);e&&e.appendChild(this.res)}return this.res}}],r=[{key:"loadScript",value:function(){if("undefined"!=typeof document&&document.head&&!document.querySelector('script[src="'.concat(Js,'"]'))){var t=document.createElement("script");t.setAttribute("type","module"),t.setAttribute("src",Js),document.head.appendChild(t)}}},{key:"themeCart",value:function(t,e){var n,r;if("undefined"!=typeof document&&document.head){var o="#".concat(t),i=function(t){return Object.entries(t).filter(function(t){var e=Ns(t,2)[1];return null!=e&&""!==e}).map(function(t){var e=Ns(t,2),n=e[0],r=e[1];return"".concat(n,": ").concat(String(r).replace(/[;{}<>]/g,""))}).join("; ")},a=["".concat(o," { ").concat(i({"font-family":e.font})," }"),"".concat(o,"::part(dialog) { ").concat(i({background:e.background,color:e.color,"font-family":e.font,"border-radius":e.radius})," }"),"".concat(o,"::part(primary-button) { ").concat(i({background:e.accent,color:e.accentText,"font-family":e.font,"border-radius":null!==(n=e.buttonRadius)&&void 0!==n?n:e.radius})," }"),"".concat(o,"::part(secondary-button) { ").concat(i({color:e.color,"font-family":e.font})," }"),"".concat(o,"::part(line-heading) { ").concat(i({"font-family":null!==(r=e.headingFont)&&void 0!==r?r:e.font})," }")].join("\n"),s="nodality-cart-".concat(t),l=document.head.querySelector('style[data-shop="'.concat(s,'"]'));l||((l=document.createElement("style")).setAttribute("data-shop",s),document.head.appendChild(l)),l.textContent=a}}}],n&&qs(e.prototype,n),r&&qs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}(),Qs=["font","color","background","radius"];function Ks(t){return function(t){if(Array.isArray(t))return tl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Zs(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zs(t,e){if(t){if("string"==typeof t)return tl(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tl(t,e):void 0}}function tl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function el(t){return el="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(t)}function nl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,al(r.key),r)}}function rl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ol(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rl(Object(n),!0).forEach(function(e){il(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function il(t,e,n){return(e=al(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function al(t){var e=function(t){if("object"!=el(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=el(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==el(e)?e:e+""}var sl=["h1","h2","h3","h4","h5","h6","p","img","a","cards","free","nav","sideNav","row","dropdown","radio","input","labelInput","filePicker","picker","video","audio","multiswitcher","button","form","checkbox","stack","simple","copy","wrap","circle","polygon","code","table","ulist","gridOverlay","store","product","price","productData","productMedia","variantPicker","buy","cart"],ll=function(t,e){var n=function(t){return"string"==typeof t&&"#"===t.charAt(0)?t.slice(1):t};return n(t)===n(e)},cl=function(t){var e,n;return"string"==typeof t||"number"==typeof t?{title:String(t),link:"#e"}:ol(ol({},t),{},{title:String(null!==(e=null==t?void 0:t.title)&&void 0!==e?e:""),link:null!==(n=null==t?void 0:t.link)&&void 0!==n?n:"#e"})},ul=Object.freeze({cards:"items",table:"items",ulist:"items",nav:"items",sideNav:"items",dropdown:"items",picker:"items",radio:"items",row:"children",form:"children",stack:"children",wrap:"children",product:"children"}),fl=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"mapType",value:function(t){var e=this.dispatchType(t),n=t&&t.el&&t.el.id;if(null!=n&&""!==n){var r=String(n);e&&"object"===el(e)&&(e.options&&"object"===el(e.options)&&(e.options.id=r),e.obj&&"object"===el(e.obj)&&(e.obj.id=r));var o=e&&(e.res||e.formElement||e.el||e.container),i=e&&[e.res,e.formElement,e.el,e.container].some(function(t){return t&&"function"==typeof t.getAttribute&&(t.getAttribute("id")===r||"function"==typeof t.querySelectorAll&&Ks(t.querySelectorAll("[id]")).some(function(t){return t.getAttribute("id")===r}))});o&&!i&&"function"==typeof o.setAttribute&&(o.getAttribute("id")||o.setAttribute("id",String(n)))}return e}},{key:"dispatchType",value:function(t){if(function(t){var e=ul[t&&t.type];if(e){var n="items"===e?"children":"items",r=function(e){return Array.isArray(t[e])&&t[e].length>0};if(r(n)&&!r(e)){var o=t.id?' (id "'.concat(t.id,'")'):"";console.warn('[nodality] "'.concat(t.type,'"').concat(o,' carries content in "').concat(n,'" but reads ')+'"'.concat(e,'". The "').concat(n,'" content is ignored and the placeholder template ')+'rendered instead. Move it to "'.concat(e,'".'))}}}(t&&t.el),["h1","h2","h3","h4","h5","h6","p"].includes(t.el.type))return this.mapText(t);if("img"===t.el.type)return this.mapImage(t);if("a"===t.el.type)return this.mapLink(t);if("cards"===t.el.type)return this.mapGrid(t);if("free"===t.el.type)return this.mapFree(t);if("nav"===t.el.type)return this.protoNav(t);if("sideNav"===t.el.type)return this.sideNav(t);if("row"===t.el.type)return this.mapRow(t);if("dropdown"===t.el.type)return this.dropdown(t);if("radio"===t.el.type)return this.radio(t);if("input"===t.el.type)return this.input(t);if("labelInput"===t.el.type)return this.floatInput(t);if("filePicker"===t.el.type)return this.filePicker(t);if("picker"===t.el.type)return this.picker(t);if("video"===t.el.type)return this.video(t);if("audio"===t.el.type)return this.audio(t);if("multiswitcher"===t.el.type)return this.multiswitcher(t);if("button"===t.el.type)return this.button(t);if("form"===t.el.type)return this.form(t);if("checkbox"===t.el.type)return this.checkbox(t);if("stack"===t.el.type)return this.stack(t);if("simple"===t.el.type)return this.simple(t);if("copy"===t.el.type)return this.mapCopy(t);if("wrap"===t.el.type)return this.mapWrap(t);if("circle"===t.el.type)return this.mapCircle(t);if("polygon"===t.el.type)return this.mapPolygon(t);if("code"===t.el.type)return this.mapCode(t);if("table"===t.el.type)return this.mapTable(t);if("ulist"===t.el.type)return this.mapUList(t);if("gridOverlay"===t.el.type)return this.mapGridOverlay(t);if("store"===t.el.type)return this.mapStore(t);if("product"===t.el.type)return this.mapProduct(t);if("price"===t.el.type)return this.mapPrice(t);if("productData"===t.el.type)return this.mapProductData(t);if("productMedia"===t.el.type)return this.mapProductMedia(t);if("variantPicker"===t.el.type)return this.mapVariantPicker(t);if("buy"===t.el.type)return this.mapBuy(t);if("cart"===t.el.type)return this.mapCart(t);throw new Error("[nodality] "+Ct(t.el.type,sl,"element type"))}},{key:"mapTable",value:function(t){var e,n=t.el,r=Array.isArray(n.items)&&n.items.length?n.items:[{abbr:"AUIUI/AK9PT",name:"Pokročilé mobilní technologie",grade:"A",date:"09.01.2024"},{abbr:"AUIUI/AK9PT",name:"Pokročilé mobilní technologie",grade:"A",date:"09.01.2024"},{abbr:"AUIUI/AK9PT",name:"Pokročilé mobilní technologie",grade:"A",date:"09.01.2024"}];return(new wr).add(r).set(ol(ol({},null!=t.el.id&&""!==t.el.id?{id:String(t.el.id)}:{}),{},{cellPadding:"0.3em",cellAlign:"center",style:{font:"Arial"},headStyle:{color:"white",background:"#c2410c"},border:"2px solid black",center:!0,borderRadius:2.2,stroke:this.filtero("blast",n.id,t.customOptions),gradient:this.filtero("gradient",n.id,t.customOptions),animation:this.filtero("animation",n.id,t.customOptions),shadow:this.filtero("shadow",n.id,t.customOptions),span:this.filtero("span",n.id,t.customOptions),backgroundOp:this.filtero("background",n.id,t.customOptions),marginOp:this.filtero("margin",n.id,t.customOptions),transform:null!==(e=this.filtero("transform",n.id,t.customOptions))&&void 0!==e?e:n.transform,filtera:this.filtero("filter",n.id,t.customOptions),raster:this.filteroRaster(n.id,t.customOptions)}))}},{key:"mapRow",value:function(t){var e,n=this,r=t.el;return(new Se).set(ol(ol({},this.elOpts(r,["stroke","gradient","animation","shadow","span","backgroundOp","marginOp","transform","filtera","raster"])),{},{stroke:this.filtero("blast",r.id,t.customOptions),gradient:this.filtero("gradient",r.id,t.customOptions),animation:this.filtero("animation",r.id,t.customOptions),shadow:this.filtero("shadow",r.id,t.customOptions),span:this.filtero("span",r.id,t.customOptions),backgroundOp:this.filtero("background",r.id,t.customOptions),marginOp:this.filtero("margin",r.id,t.customOptions),transform:null!==(e=this.filtero("transform",r.id,t.customOptions))&&void 0!==e?e:r.transform,filtera:this.filtero("filter",r.id,t.customOptions),raster:this.filteroRaster(r.id,t.customOptions)})).items(Ks(Array.isArray(r.children)&&r.children.length?r.children.map(function(e){return n.mapType(ol(ol({},t),{},{el:e}))}):[new Xt("This").set({size:"S3"}),new Xt("is").set({size:"S3",text:"Hello"}),new Xt("row.").set({size:"S3",text:"Hello"})]))}},{key:"mapCode",value:function(t){var e,n=t.el;return(new Nn).set(ol(ol({},null!=n.id&&""!==n.id?{id:String(n.id)}:{}),{},{stroke:this.filtero("blast",n.id,t.customOptions),gradient:this.filtero("gradient",n.id,t.customOptions),animation:this.filtero("animation",n.id,t.customOptions),shadow:this.filtero("shadow",n.id,t.customOptions),span:this.filtero("span",n.id,t.customOptions),backgroundOp:this.filtero("background",n.id,t.customOptions),marginOp:this.filtero("margin",n.id,t.customOptions),transform:null!==(e=this.filtero("transform",n.id,t.customOptions))&&void 0!==e?e:n.transform,filtera:this.filtero("filter",n.id,t.customOptions),raster:this.filteroRaster(n.id,t.customOptions),pad:[{l:30}],mar:[{a:30}],class:"language-js",code:'new Text("Modality").set({ font: "Arial" })'}))}},{key:"mapCopy",value:function(t){var e,n=t.customOptions,r=n.filter(function(t){return"copy"===t.op})[0],o=null!==(e=null==r?void 0:r.count)&&void 0!==e?e:3,i=(this.filteroRaster(t.el.id,n)||[]).filter(function(t){return t!==r}),a=300,s='new Wrapper()\n.set({\n width: "'.concat(a,'px",\n height: "').concat(a,'px",\n display: "flex",\n justifyContent: "center",\n alignItems: "center",\n position: "absolute",\n id: "').concat(t.el.id?String(t.el.id):"#first",'",\n scale: 0.3,\n ').concat(null!=r&&r.animation?'\nanimation: {\n op: {\n name: "animation",\n color: "green",\n width: "1px",\n fireAt: "inview",\n keyframesOpen: [\n {\n transform: "rotate(360deg)",\n opacity: 0\n },\n {\n transform: "rotate(0deg)",\n opacity: 1\n }\n ],\n keyframesClose: [\n {\n transform: "rotate(0deg)",\n opacity: 1\n },\n {\n transform: "rotate(0deg)",\n opacity: 0\n }\n ],\n openOptions: {\n duration: 300,\n fill: "forwards",\n delay: 1000\n },\n closeOptions: {\n duration: 1,\n fill: "forwards",\n delay: 1000\n }\n },\n target: [\n "#first"\n ]\n },\n ':"").concat(i.length?",\n raster: ".concat(JSON.stringify(i)):"","\n})\n.add(\n Array.from({ length: ").concat(o,' }).map((_, i) => {\n\n const bbox = {width: "').concat(a,'px", height: "').concat(a,'px"};\n\n const elHeight = bbox.height;\n\n const cx = ').concat(150,";\n const cy = ").concat(150,";\n\n const R = ").concat(150,";\n\n const n = ").concat(o,';\n\n // Evenly spaced angles, starting at top (-90°)\n const angle = (i / n) * Math.PI * 2 - Math.PI/2;\n const dist = R + parseFloat(elHeight)/2;\n\n const x = cx + dist * Math.cos(angle);\n const y = cy + dist * Math.sin(angle);\n\n let rot = angle * 180 / Math.PI + 90;\n rot = (rot % 360 + 360) % 360;\n rot = (rot % 360 + 360) % 360;\n\n return new Text("Hello").set({\n size: "S1",\n color: "green",\n font: "Arial",\n left: `${x}px`,\n top: `${y}px`,\n transform: {\n op: {\n name: "transform",\n transform: {\n static: true,\n keep: true,\n values: [\n "tx:-50%",\n "ty:-50%",\n `rotate(${rot}deg)`\n ]\n }\n }\n }\n })\n\n \n })\n)'),l=(new rr).set(ol(ol({width:a+"px",height:a+"px",display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",id:t.el.id?String(t.el.id):"#first",scale:.3},null!=r&&r.animation?{animation:{op:{name:"animation",color:"green",width:"1px",fireAt:"inview",keyframesOpen:[{transform:"rotate(360deg)",opacity:0},{transform:"rotate(0deg)",opacity:1}],keyframesClose:[{transform:"rotate(0deg)",opacity:1},{transform:"rotate(0deg)",opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}},target:["#first"]}}:{}),i.length?{raster:JSON.parse(JSON.stringify(i))}:{})),c=Array.from({length:o}).map(function(t,e){var n=e/o*Math.PI*2-Math.PI/2,r=150+300*Math.cos(n),i=150+300*Math.sin(n),a=180*n/Math.PI+90;return a=((a=(a%360+360)%360)%360+360)%360,new Xt("Hello").set({size:"S1",color:"green",font:"Arial",left:r+"px",top:i+"px",transform:{op:{name:"transform",transform:{static:!0,keep:!0,values:["tx:-50%","ty:-50%","rotate("+a+"deg)"]}}}})});return l.add(c),this.withSource(l,s)}},{key:"button",value:function(t){var e,n=t.el;return new Ji(null!==(e=n.text)&&void 0!==e?e:"Button").set(ol(ol({fluidc:"S6"},this.elOpts(n)),{},{raster:this.filteroRaster(n.id,t.customOptions)}))}},{key:"multiswitcher",value:function(t){var e=this,n=Array.isArray(t.el.breakpoints)?t.el.breakpoints:null;if(!n||!n.length)throw new Error('[nodality] a "multiswitcher" element needs a non-empty `breakpoints` array of { at, view }.');return(new ni).set({id:t.el.id,area:t.el.area,breakpoints:n.map(function(n){return{at:n.at,view:n.view&&"function"==typeof n.view.render?n.view:e.mapType(ol(ol({},t),{},{el:n.view}))}})})}},{key:"video",value:function(t){var e=t.el;if(!e.url)throw new Error('[nodality] a "video" element needs a `url`.');return this.attachRaster(new Pi(e.url).set(this.elOpts(e)),e,t.customOptions)}},{key:"audio",value:function(t){var e=t.el;if(!e.url)throw new Error('[nodality] an "audio" element needs a `url`.');return this.attachRaster(new vn(e.url),e,t.customOptions)}},{key:"radio",value:function(t){var e,n=t.el;return(new ha).set(ol({items:Array.isArray(n.items)?n.items:[],multiple:null!==(e=n.multiple)&&void 0!==e&&e},this.elOpts(n)))}},{key:"input",value:function(t){var e,n=t.el;return(new qr).set(ol(ol({type:null!==(e=n.inputType)&&void 0!==e?e:"text"},this.elOpts(n)),{},{raster:this.filteroRaster(n.id,t.customOptions)}))}},{key:"floatInput",value:function(t){var e,n=t.el;return this.attachRaster((new ia).set(ol(ol({type:null!==(e=n.inputType)&&void 0!==e?e:"input"},void 0!==n.title||void 0===n.label&&void 0===n.text?{}:{title:void 0!==n.label?n.label:n.text}),this.elOpts(n))),n,t.customOptions)}},{key:"filePicker",value:function(t){var e,n=t.el;return this.attachRaster((new Ta).set(ol({title:null!==(e=n.title)&&void 0!==e?e:"Choose a file"},this.elOpts(n))),n,t.customOptions)}},{key:"picker",value:function(t){var e=t.el;return(new wa).set(ol(ol({items:Array.isArray(e.items)?e.items:[],pad:[{a:"0.5rem"}],rounded:!0},this.elOpts(e)),{},{raster:this.filteroRaster(e.id,t.customOptions)}))}},{key:"mapGridOverlay",value:function(t){for(var e=t.el,n={id:e.id,columns:e.columns,rows:e.rows,inset:e.inset,color:e.color,lineWidth:e.lineWidth,lineOpacity:e.lineOpacity,marks:e.marks,markSize:e.markSize,position:e.position,zIndex:e.zIndex,font:e.font,fontSize:e.fontSize,letterSpacing:e.letterSpacing,uppercase:e.uppercase,breakpoint:e.breakpoint,mobile:e.mobile,readouts:e.readouts,raster:this.filteroRaster(e.id,t.customOptions)},r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];null==n[i]&&delete n[i]}return(new Ls).set(n)}},{key:"shop",value:function(t,e,n,r){var o=ol({kind:t,id:e.id,font:e.font,color:e.color,keySet:e.keySet},n);r.shopFallback&&(o.fallback=!0);for(var i=0,a=Object.keys(o);i<a.length;i++){var s=a[i];null==o[s]&&delete o[s]}return(new $s).set(o)}},{key:"mapStore",value:function(t){var e=t.el;return this.shop("store",e,{domain:e.domain,token:e.token,country:e.country,language:e.language},t)}},{key:"mapProduct",value:function(t){var e=this,n=t.el,r=this.shop("product",n,ol(ol({},this.elOpts(n)),{},{handle:n.handle}),t),o=Array.isArray(n.children)?n.children:[];r.add(o.map(function(n){return e.mapType(ol(ol({},t),{},{el:n,shopFallback:!1}))}));var i=function(t){if(!t||"object"!==el(t))return t;var e=ol({},t);return e.id&&(e.id="".concat(String(e.id).replace(/^#/,""),"-static")),Array.isArray(e.children)&&(e.children=e.children.map(i)),e};return r.fallback(o.map(function(n){return e.mapType(ol(ol({},t),{},{el:i(n),shopFallback:!0}))})),r}},{key:"shopStyle",value:function(t){return ol(ol({},Tt(t)),{},{pad:t.pad,mar:t.mar})}},{key:"mapPrice",value:function(t){var e=t.el;return this.shop("price",e,ol(ol({},this.shopStyle(e)),{},{text:e.text,query:e.query}),t)}},{key:"mapProductData",value:function(t){var e=t.el;return this.shop("productData",e,ol(ol({},this.shopStyle(e)),{},{query:e.query,text:e.text}),t)}},{key:"mapProductMedia",value:function(t){var e=t.el;return this.shop("productMedia",e,ol(ol({},this.shopStyle(e)),{},{query:e.query,url:e.url,alt:e.alt,width:e.width,height:e.height}),t)}},{key:"mapVariantPicker",value:function(t){var e=t.el;return this.shop("variantPicker",e,ol(ol({},this.shopStyle(e)),{},{text:e.text}),t)}},{key:"mapBuy",value:function(t){var e=t.el;return this.shop("buy",e,ol(ol({},this.shopStyle(e)),{},{text:e.text,mode:e.mode,cart:e.cart,store:e.store,url:e.url}),t)}},{key:"mapCart",value:function(t){var e=t.el;return this.shop("cart",e,{theme:e.theme,target:e.target,discountCodes:e.discountCodes},t)}},{key:"dropdown",value:function(t){var e,n=null!==(e=t.el.label)&&void 0!==e?e:t.el.title;t.el.items||(t.el.items=["Flower","Car","Maseratti"]);var r=t.el.items.map(function(t){return(new he).set({pad:[{a:10}],font:"Arial",bold:!0,link:"https://www.apple.com",text:t,icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"},hover:{color:"wheat",animation:.3}})}),o=(new Cr).set(ol(ol({},void 0===n?{}:{title:n}),{},{behaviour:"click",pad:[{a:"1rem"}],mar:[{a:"1rem"}],border:"1px solid black",width:"180px",radius:"1rem"})).add([].concat(Ks(void 0!==n?[]:[new Xt(t.el.items[0]).set({font:"Arial",fluidc:"S6",weight:"bold",align:"center",cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},pad:[{l:10,r:10}]})]),[(new rr).set({border:"1px solid green",background:"#1abc9c",radius:"0.7rem",socenter:!0}).add(void 0===n?r.slice(1):r)])),i=this.filteroRaster(t.el.id,t.customOptions);return i&&o.rasterize(i),o}},{key:"pageNav",value:function(t,e){var n,r,o,i,a,s=this,l=t.el||{},c=function(){var e,n;return l.brand&&"object"===el(l.brand)?s.mapType(ol(ol({},t),{},{el:l.brand})):new Xt(null!==(e=l.brand)&&void 0!==e?e:"Company").set(ol({size:"S6",font:null!==(n=l.font)&&void 0!==n?n:"Helvetica"},l.color?{color:l.color}:{}))},u=function(){return e.map(function(t){return(new he).set(ol(ol(ol({text:t.title,url:t.link,pad:[{tb:8,lr:4}]},l.font?{font:l.font}:{}),l.color?{color:l.color}:{}),l.hover?{hover:l.hover}:{}))})},f=Tt(l),d=(f.font,f.color,f.background,f.radius,ol(ol(ol(ol(ol({},function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(f,Qs)),{},{background:null!==(n=l.background)&&void 0!==n?n:"#ecf0f1",mar:null!==(r=l.mar)&&void 0!==r?r:[{a:21}],radius:null!==(o=l.radius)&&void 0!==o?o:"1rem"},void 0!==l.pad?{pad:l.pad}:{}),void 0!==l.color?{color:l.color}:{}),void 0!==l.keySet?{keySet:l.keySet}:{}),l.brandLink?{brandLink:l.brandLink}:{})),h=void 0===l.breakpoint?"1200px":"number"==typeof l.breakpoint?"".concat(l.breakpoint,"px"):String(l.breakpoint),p=(new Go).set(ol(ol(ol({},d),{},{brand:c(),hamburgerColour:null!==(i=null!==(a=l.hamburgerColour)&&void 0!==a?a:l.color)&&void 0!==i?i:"#3498db"},l.menuLabel?{menuLabel:l.menuLabel}:{}),l.id?{menuId:"".concat(String(l.id).replace(/^#/,""),"-menu")}:{})).add(u()),y=(new Do).set(ol(ol({},d),{},{maxHeight:"100px"})).add([c(),new ui(!0)].concat(Ks(u())));return(new ni).set({id:l.id,breakpoints:[{at:"0px",view:p},{at:h,view:y}]})}},{key:"protoNav",value:function(t){var e,n,r=t.customOptions,o=Array.isArray(null===(e=t.el)||void 0===e?void 0:e.items)&&t.el.items.length?t.el.items.map(cl):[{title:"Fire",link:"@e"},{title:"and",link:"@e"},{title:"smoke",link:"@e"}],i=Array.isArray(null===(n=t.el)||void 0===n?void 0:n.items)&&t.el.items.length?t.el.items.map(cl):null,a=function(){return i.map(function(t){return(new he).set({text:t.title,url:t.link,pad:[{tb:8,lr:4}]})})};if(i)return this.pageNav(t,i);var s=o.map(function(t,e){return new he('"'.concat(t.title,'"')).set({fluidc:"S6",text:t.title,link:t.link,font:"Arial",pad:[{a:40}],bold:!0,hover:{color:"wheat",animation:.3}})}),l=o.map(function(t,e){return new he('"'.concat(t.title,'"')).set({fluidc:"S6",text:t.title,link:t.link,font:"Arial",pad:[{a:40}],bold:!0,hover:{color:"wheat",animation:.3},animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px",keyframesOpen:[{transform:"translate(100%, ".concat(10*e,"%)"),opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, ".concat(10*e,"%)"),opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}}})});if(t.el.dropdown){var c=(new Cr).set({behaviour:"mouseover",pad:[{a:40}],padding:"10px",border:"1px solid black"}).add([new Xt("First").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:20,r:10}],font:"Arial",align:"center",weight:"bold"}),(new rr).set({centerColumn:!0,radius:"0.7rem",background:"#1abc9c",makeResponsiveBehaviour:"undefined"}).add([(new he).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Second",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}}),(new he).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Third",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}})])]);l.push(c),s.push(c)}t.el.animation;var u=(new ni).set({id:t.el&&t.el.id,breakpoints:[{at:"0px",view:(new Go).set({background:"#ecf0f1",mar:[{a:21}],brand:new Xt("Company").set({size:"S6",font:"Helvetica"}),hamburgerColour:"#3498db",radius:"1rem"}).add([].concat(Ks(i?a():[(new he).set({text:"About",url:"#a"})]),[(new Cr).set({behaviour:"mouseover",pad:[{a:40}],mar:[{lr:"auto"}],breakpoint:"1200px",padding:"10px",border:"1px solid black",height:"auto"}).add([new Xt("More").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new Xt("Our story").set({cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new Xt("Team").set({cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"})])],Ks(i?[]:[new he("B").set({text:"About",url:"#b"}),new he("C").set({text:"Contact",url:"https://www.abcnews.com"})])))},{at:"1200px",view:(new Do).set({background:"#ecf0f1",mar:[{a:21}],maxHeight:"100px",radius:"1rem"}).add([new Xt("Company").set({size:"S6",font:"Helvetica"}),new ui(!0),(new Cr).set({behaviour:"mouseover",pad:[{a:40}],padding:"10px",border:"1px solid black",radius:"30px",width:"130px"}).add([new Xt("More").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),(new rr).set({flexDir:"column",mar:[{t:"10px"}],radius:".3rem"}).add([new he("").set({text:"Who we are",url:"jk",cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new he("").set({text:"Info",url:"#u",cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),new he("").set({text:"About",url:"#u",cursor:"pointer",fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"})])])].concat(Ks(i?a():[(new he).set({text:"About",url:"#a"}),(new he).set({text:"Services",url:"#a"}),(new he).set({text:"Contact",url:"#a"})])))}]});return this.attachRaster(u,t.el,r)}},{key:"sideNav",value:function(t){t.customOptions;var e,n,r=Array.isArray(null===(e=t.el)||void 0===e?void 0:e.items)&&t.el.items.length>0,o=Array.isArray(null===(n=t.el)||void 0===n?void 0:n.items)&&t.el.items.length?t.el.items.map(cl):[{title:"Home",link:"@e"},{title:"Projects",link:"@e"},{title:"Services",link:"@e"}],i=o.map(function(t,e){return new he('"'.concat(t.title,'"')).set({fluidc:"S4",text:t.title,link:t.link,isNavA:!0,url:r&&t.link||"#e",id:"#"+t.title.toLowerCase(),font:"Arial",pad:[{a:20}],bold:!0,tags:{open:"sidebar:open",close:"sidebar:closed"},align:"left",hover:{color:"wheat",animation:.3}})}),a=(new Cr).set({behaviour:"mouseover",pad:[{a:40}],padding:"10px",animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px",keyframesOpen:[{transform:"translate(100%, ".concat(10,"%)"),opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, ".concat(10,"%)"),opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}}}).add([new Xt("More").set({cursor:"pointer",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/60/60995.png"},fluidc:"S6",pad:[{l:10,r:10}],font:"Arial",align:"center",weight:"bold"}),(new rr).set({centerColumn:!0,radius:"0.7rem",background:"#1abc9c",makeResponsiveBehaviour:"undefined"}).add([(new he).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Second",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}}),(new he).set({pad:[{a:10}],font:"Arial",hover:{color:"wheat",animation:.3},bold:!0,link:"https://www.apple.com",text:"Third",icon:{padding:30,url:"https://cdn-icons-png.flaticon.com/512/32/32339.png"}})])]),s=o.map(function(t,e){return new he('"'.concat(t.title,'"')).set({fluidc:"S4",text:t.title,link:t.link,isNavA:!0,url:r&&t.link||"#myURL",id:"#"+t.title.toLowerCase(),font:"Arial",pad:[{a:20}],bold:!0,tags:{open:"sidebar:open",close:"sidebar:closed"},align:"left",hover:{color:"wheat",animation:.3},animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px",keyframesOpen:[{transform:"translate(100%, ".concat(10*e,"%)"),opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, ".concat(10*e,"%)"),opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}}})});t.el.dropdown&&(s.push(a),i.push(a));var l=(new rr).set({column:!0}).add([new Xt("Sidebar").set({size:"S6",font:"Arial",id:"#olod",italic:!0,animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px"}},pad:[{l:20},{t:20}]})].concat(Ks((t.el.animation?s:i).slice(0,o.length).filter(Boolean)),Ks(t.el.animation&&t.el.dropdown?[s[o.length]]:[]),[new Xt("Company, 2025").set({pad:[{a:20}],animation:{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px"}}})])),c=(new rr).set({column:!0}).add([new Xt("Off canvas").set({fluidc:"S6",font:"Arial",id:"#olod",italic:!0,animation:t.el.animation?{range:["0px","1900px"],op:{name:"animation",color:"green",width:"1px"}}:null,pad:[{l:40},{t:20}]})]),u=(new tn).setup({animate:!0,radius:"1rem",isSide:!0,background:"#ecf0f1",hamColour:{opened:"#0f766e",closed:"#c2410c"},mobileSize:"1.2em",fixed:!0,tags:{open:"sidebar:open",close:"sidebar:closed"}}).items(t.el.offcanvas?c:l),f=this.filteroRaster(t.el.id,t.customOptions);return f&&u.rasterize(f),u}},{key:"mapFree",value:function(t){var e=t.customOptions.filter(function(t){return"slayout"===t.op.name||"layout"===t.op.name})[0],n=null,r={cols:6,rows:6};"text-above-image"!==e.op.value&&"image-above-text"!==e.op.value||(n=null,r=null),"img-overlay-text"===e.op.value&&(n={text:{row:"1 / span 2",col:"3 / span 2"},image:{row:"2 / span 3",col:"3 / 3"}}),"img-leftof-text"===e.op.value&&(n={text:{row:"1",col:"1 / 3"},image:{row:"1",col:"3 / 4"}});var o=(new cn).set({id:null!=t.el.id&&""!==t.el.id?String(t.el.id):"#3",templateCols:r,height:"600px"}).add([new Xt("I am free").set({border:"3px solid green",font:"Arial",size:"S1",color:"#1abc9c",gpos:null!=n?n.text:null,zIndex:1}),(new re).set({url:"https://upload.wikimedia.org/wikipedia/commons/a/ac/MSC_World_Europa_-_Saint-Nazaire_-_June_2022.jpg",width:"400px",height:"auto",gpos:null!=n?n.image:null})]),i=this.filteroRaster(t.el.id,t.customOptions);return i&&o.rasterize(i),o}},{key:"mapCircle",value:function(t){var e,n=t.el;return(new vs).set(ol(ol({},null!=n.id&&""!==n.id?{id:String(n.id)}:{}),{},{diameter:108,background:"#1abc9c",stroke:this.filtero("blast",n.id,t.customOptions),gradient:this.filtero("gradient",n.id,t.customOptions),animation:this.filtero("animation",n.id,t.customOptions),shadow:this.filtero("shadow",n.id,t.customOptions),span:this.filtero("span",n.id,t.customOptions),backgroundOp:this.filtero("background",n.id,t.customOptions),marginOp:this.filtero("margin",n.id,t.customOptions),transform:null!==(e=this.filtero("transform",n.id,t.customOptions))&&void 0!==e?e:n.transform,filtera:this.filtero("filter",n.id,t.customOptions),raster:this.filteroRaster(n.id,t.customOptions)}))}},{key:"mapPolygon",value:function(t){var e,n,r=t.el,o=null!==(e=t.el.sides)&&void 0!==e?e:7;return new ls({id:r.id?String(r.id):"hex"}).set(ol(ol({},null!=r.id&&""!==r.id?{id:String(r.id)}:{}),{},{sides:o,size:300,background:"#1abc9c",gradient:this.filtero("gradient",r.id,t.customOptions),animation:this.filtero("animation",r.id,t.customOptions),shadow:this.filtero("shadow",r.id,t.customOptions),span:this.filtero("span",r.id,t.customOptions),backgroundOp:this.filtero("background",r.id,t.customOptions),marginOp:this.filtero("margin",r.id,t.customOptions),transform:null!==(n=this.filtero("transform",r.id,t.customOptions))&&void 0!==n?n:r.transform,filtera:this.filtero("filter",r.id,t.customOptions),raster:this.filteroRaster(r.id,t.customOptions)}))}},{key:"mapText",value:function(t){var e,n,r,o=t.el;return new Xt(o.text||o.value).set(ol(ol({},this.elOpts(o,["value","stroke","gradient","animation","shadow","span","backgroundOp","marginOp","transform","filtera","raster"])),{},{id:o.id,class:o.class,color:o.color,size:this.getElType(o.type),tag:o.tag,font:null!==(e=o.font)&&void 0!==e?e:"Arial",stroke:this.filtero("blast",o.id,t.customOptions),gradient:this.filtero("gradient",o.id,t.customOptions),animation:this.filtero("animation",o.id,t.customOptions),shadow:this.filtero("shadow",o.id,t.customOptions),span:this.filtero("span",o.id,t.customOptions),backgroundOp:this.filtero("background",o.id,t.customOptions),marginOp:this.filtero("margin",o.id,t.customOptions),transform:null!==(n=this.filtero("transform",o.id,t.customOptions))&&void 0!==n?n:o.transform,filtera:this.filtero("filter",o.id,t.customOptions),raster:this.filteroRaster(o.id,t.customOptions),resprop:null!==(r=o.resprop)&&void 0!==r?r:null}))}},{key:"mapImage",value:function(t){var e=t.el;return new re(e.url).set(ol(ol({},this.elOpts(e)),{},{url:e.url,isFull:e.isFull,animation:this.filtero("animation",e.id,t.customOptions),shadow:this.filtero("shadow",e.id,t.customOptions),marginOp:this.filtero("margin",e.id,t.customOptions),filtera:this.filtero("filter",e.id,t.customOptions),raster:this.filteroRaster(e.id,t.customOptions)}))}},{key:"mapLink",value:function(t){var e,n,r,o=t.customOptions.filter(function(t){return"link-style"===t.op.name}),i=t.el;return t.el.id&&(i.id=t.el.id),t.el.link&&t.el.text&&(i.url=t.el.link,i.text=t.el.text),i.animation=this.filtero("animation",t.el.id,t.customOptions),i.class=t.el.class,i.width=t.el.width,i.font=null!==(e=t.el.font)&&void 0!==e?e:"Arial",i.fluidc=t.el.fluidc,i.transform=null!==(n=this.filtero("transform",t.el.id,t.customOptions))&&void 0!==n?n:t.el.transform,i.shadow=this.filtero("shadow",t.el.id,t.customOptions),i.gradient=this.filtero("gradient",t.el.id,t.customOptions),i.blast=this.filtero("blast",t.el.id,t.customOptions),i.backgroundOp=this.filtero("background",t.el.id,t.customOptions),i.raster=this.filteroRaster(t.el.id,t.customOptions),i.pad=null!==(r=t.el.pad)&&void 0!==r?r:[{a:10}],o.length>0?Ha.style({el:t.el,re:i,bst:o,options:t.customOptions})[o.length-1]:(new he).set(i)}},{key:"mapGrid",value:function(t){var e=t.el,n=(t.customOptions.find(function(t){return"card-style"===t.op.name}),this.filtero("gradient",e.id,t.customOptions)),r=this.filtero("animation",e.id,t.customOptions),o=this.filtero("shadow",e.id,t.customOptions),i=this.filtero("margin",e.id,t.customOptions),a=this.filtero("filter",e.id,t.customOptions),s=this.filteroRaster(e.id,t.customOptions),l=this.filtero("blast",e.id,t.customOptions),c='\n new Card()\n .set({\n width: "300px", \n height: "700px",\n radius: "0.7rem", \n mar: { sides: ["all"], value: "0.8rem" }\n '.concat(void 0!==n?",\n gradient: ".concat(JSON.stringify(n)):"").concat(void 0!==r?",\n animation: ".concat(JSON.stringify(r)):"").concat(void 0!==o?",\n shadow: ".concat(JSON.stringify(o)):"").concat(void 0!==i?",\n marginOp: ".concat(JSON.stringify(i)):"").concat(void 0!==a?",\n filtera: ".concat(JSON.stringify(a)):"").concat(void 0!==l?",\n blast: ".concat(JSON.stringify(l)):"",'\n })\n .items([\n new Image(item.img).set({isFull: true, url: item.img}),\n // #c2410c is 5.18:1 on white; h2 keeps the outline intact.\n new Text(item.title).set({ size: "S5", tag: "h2", color: "#c2410c" }),\n new Link("Link").set({\n text: item.title, \n url: item.link, \n background: "#1d6fe0", \n pad: [{ lr: "0.5rem", tb: "1rem" }], \n radius: "0.4rem", \n color: "white",\n mar: [{"a": 21}]\n })\n ])'),u=t.el.backgroundCard?'\n new ZoomCard()\n .set({\n url: item.img, \n font: "Arial", \n mar: { sides: ["all"], value: "0.8rem" }, \n inpad: "1rem", \n useBrightness: true\n })\n .items([\n new Text(item.title).set({ fluidc: "S6", tag: "h2", color: "#c2410c" }),\n new Link("Link").set({\n text: item.title, \n url: item.link, \n background: "#1d6fe0", \n pad: [{ lr: "0.5rem", tb: "1rem" }], \n radius: "0.4rem", \n color: "white"\n })\n ])':c,f=Object.entries(this.elOpts(t.el,["backgroundCard","gradient","animation","shadow","marginOp","filtera","blast","raster"])).map(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Zs(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1];return",\n ".concat(JSON.stringify(n),": ").concat(JSON.stringify(r))}).join(""),d=this.gridItemsBuild(t,u),h=' new FlexGrid()\n .set({\n colat: "700px",\n wrap: true,\n align: "center",\n gap: "1rem"'.concat(f,"\n ").concat(void 0!==n?",\n gradient: ".concat(JSON.stringify(n)):"").concat(void 0!==r?",\n animation: ".concat(JSON.stringify(r)):"").concat(void 0!==o?",\n shadow: ".concat(JSON.stringify(o)):"").concat(void 0!==i?",\n marginOp: ".concat(JSON.stringify(i)):"").concat(void 0!==a?",\n filtera: ".concat(JSON.stringify(a)):"").concat(void 0!==l?",\n blast: ".concat(JSON.stringify(l)):"").concat(void 0!==s?",\n raster: ".concat(JSON.stringify(s)):"","\n })\n .items(\n ").concat(d.src,"\n )\n "),p=function(t){return JSON.parse(JSON.stringify(t))},y=p(this.elOpts(t.el,["backgroundCard","gradient","animation","shadow","marginOp","filtera","blast","raster"])),m=(new ho).set(ol(ol(ol({colat:"700px",wrap:!0,align:"center",gap:"1rem"},y),this.gridOps({gradient:n,animation:r,shadow:o,marginOp:i,filtera:a,blast:l})),void 0!==s?{raster:p(s)}:{}));return m.items(d.cards()),this.withSource(m,h)}},{key:"gridOps",value:function(t){for(var e={},n=0,r=["gradient","animation","shadow","marginOp","filtera","blast"];n<r.length;n++){var o=r[n];void 0!==t[o]&&(e[o]=JSON.parse(JSON.stringify(t[o])))}return e}},{key:"withSource",value:function(t,e){return t.toCode=function(){return[e]},t}},{key:"gridItemsBuild",value:function(t,e){var n=this,r=t.el.items,o=!!t.el.backgroundCard,i=t.el,a={gradient:this.filtero("gradient",i.id,t.customOptions),animation:this.filtero("animation",i.id,t.customOptions),shadow:this.filtero("shadow",i.id,t.customOptions),marginOp:this.filtero("margin",i.id,t.customOptions),filtera:this.filtero("filter",i.id,t.customOptions),blast:this.filtero("blast",i.id,t.customOptions)},s={width:"300px",height:"700px",radius:"0.7rem",mar:{sides:["all"],value:"0.8rem"}},l={background:"#1d6fe0",pad:[{lr:"0.5rem",tb:"1rem"}],radius:"0.4rem",color:"white"},c=function(t,e){return o?(new wo).set({url:t.img,font:"Arial",mar:{sides:["all"],value:"0.8rem"},inpad:"1rem",useBrightness:!0}).items([new Xt(t.title).set({fluidc:"S6",tag:"h2",color:"#c2410c"}),new he("Link").set(ol({text:t.title,url:t.link},l))]):(new Qr).set(ol(ol({},s),n.gridOps(a))).items([new re(t.img).set(e?{isFull:!0,url:t.img,alt:t.alt}:{isFull:!0,url:t.img}),new Xt(t.title).set({size:"S5",tag:"h2",color:"#c2410c"}),new he("Link").set(ol(ol({text:t.title,url:t.link},l),{},{mar:[{a:21}]}))])};if(!Array.isArray(r)||0===r.length){var u=[{img:"https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg",title:"Starship",link:"#ship"},{img:"https://upload.wikimedia.org/wikipedia/commons/1/16/Apollo_11_Launch_-_GPN-2000-000630.jpg",title:"Saturn V",link:"#saturn"},{img:"https://upload.wikimedia.org/wikipedia/commons/d/d6/STS120LaunchHiRes-edit1.jpg",title:"Shuttle",link:"#shuttle"}];return{src:this.gridItemsSource(t,e),cards:function(){return u.map(function(t){return c(t,!1)})}}}var f=function(t){return Array.isArray(t)},d=r.filter(function(t){return!f(t)});if(!r.some(f)){var h=d.some(function(t){return t&&void 0!==t.alt}),p=JSON.parse(JSON.stringify(d));return{src:this.gridItemsSource(t,e),cards:function(){return p.map(function(t){return c(t,h)})}}}var y=r.map(function(e){return f(e)?e.map(function(e){return n.mapType(ol(ol({},t),{},{el:e}))}):null}),m=function(t){return("string"==typeof t?t:[].concat(t&&t.toCode?t.toCode():[]).join("")).trim()},v=r.map(function(t,e){return f(t)?'new Card()\n .set({ width: "300px", height: "700px", radius: "0.7rem", mar: { sides: ["all"], value: "0.8rem" } })\n .items([\n '.concat(y[e].map(m).filter(Boolean).join(",\n "),"\n ])"):n.cardFromShorthand(t)}),b=function(t){return JSON.parse(JSON.stringify(null!=t?t:""))};return{src:"[\n ".concat(v.join(",\n "),"\n ]"),cards:function(){return r.map(function(t,e){return f(t)?(new Qr).set(ol({},s)).items(y[e].filter(function(t){return t&&"object"===el(t)})):(new Qr).set(ol({},s)).items([new re(b(t.img)).set(void 0===t.alt?{isFull:!0,url:b(t.img)}:{isFull:!0,url:b(t.img),alt:b(t.alt)}),new Xt(b(t.title)).set({size:"S5",tag:"h2",color:"#c2410c"}),new he("Link").set(ol({text:b(t.title),url:b(t.link)},l))])})}}}},{key:"gridItemsSource",value:function(t,e){var n=this,r=t.el.items;if(!Array.isArray(r)||0===r.length)return'[\n { img: "https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg", title: "Starship", link: "#ship" },\n { img: "https://upload.wikimedia.org/wikipedia/commons/1/16/Apollo_11_Launch_-_GPN-2000-000630.jpg", title: "Saturn V", link: "#saturn" },\n { img: "https://upload.wikimedia.org/wikipedia/commons/d/d6/STS120LaunchHiRes-edit1.jpg", title: "Shuttle", link: "#shuttle" }\n ].map(item => \n '.concat(e,"\n )");var o,i=function(t){return Array.isArray(t)},a=r.filter(function(t){return!i(t)});if(0===r.filter(i).length)return"".concat(JSON.stringify(a,null,2).split("\n").map(function(t,e){return 0===e?t:" "+t}).join("\n"),".map(item => \n ").concat((o=e,a.some(function(t){return t&&void 0!==t.alt})?o.replace("url: item.img}","url: item.img, alt: item.alt}"):o),"\n )");var s=r.map(function(e){return i(e)?n.cardFromSpecs(t,e):n.cardFromShorthand(e)});return"[\n ".concat(s.join(",\n "),"\n ]")}},{key:"cardFromSpecs",value:function(t,e){var n=this,r=e.map(function(e){var r=n.mapType(ol(ol({},t),{},{el:e}));return"string"==typeof r?r.trim():(r&&"function"==typeof r.toCode?[].concat(r.toCode()).join(""):"").trim()}).filter(Boolean);return'new Card()\n .set({ width: "300px", height: "700px", radius: "0.7rem", mar: { sides: ["all"], value: "0.8rem" } })\n .items([\n '.concat(r.join(",\n "),"\n ])")}},{key:"cardFromShorthand",value:function(t){var e=function(t){return JSON.stringify(null!=t?t:"")};return'new Card()\n .set({ width: "300px", height: "700px", radius: "0.7rem", mar: { sides: ["all"], value: "0.8rem" } })\n .items([\n new Image('.concat(e(t.img),").set({isFull: true, url: ").concat(e(t.img)).concat(void 0===t.alt?"":", alt: ".concat(e(t.alt)),"}),\n new Text(").concat(e(t.title),').set({ size: "S5", tag: "h2", color: "#c2410c" }),\n new Link("Link").set({ text: ').concat(e(t.title),", url: ").concat(e(t.link),', background: "#1d6fe0", pad: [{ lr: "0.5rem", tb: "1rem" }], radius: "0.4rem", color: "white" })\n ])')}},{key:"checkbox",value:function(t){var e=t.el,n="string"==typeof e.label?new Xt(e.label).set({size:"S6"}):e.label;return this.attachRaster((new bi).set(ol(ol({},this.elOpts(e,["label"])),void 0!==n?{label:n}:{})),e,t.customOptions)}},{key:"stack",value:function(t){var e=this,n=t.el,r=(new Xn).set(this.elOpts(n)),o=Array.isArray(n.children)?n.children:null;return o&&r.add(o.map(function(n){return e.mapType(ol(ol({},t),{},{el:n}))})),this.attachRaster(r,n,t.customOptions)}},{key:"form",value:function(t){var e,n=this,r=t.el,o=(new Ba).set(ol(ol(ol({action:null!==(e=r.action)&&void 0!==e?e:""},void 0!==r.method?{method:r.method}:{}),void 0!==r.id?{id:r.id}:{}),void 0!==r.title?{title:r.title}:{})),i=Array.isArray(r.children)?r.children:null;return i&&o.add(i.map(function(e){return n.mapType(ol(ol({},t),{},{el:e}))})),o}},{key:"simple",value:function(t){var e,n,r,o,i=this,a=t.el,s=Array.isArray(a.react)?a.react:[];if(!s.length)throw new Error('[nodality] a "simple" element needs a non-empty `react` array of { at, template }.');var l=(Array.isArray(a.children)?a.children:[]).map(function(e){return i.mapType(ol(ol({},t),{},{el:e}))}),c=l.map(function(t){var e=t.toCode();return Array.isArray(e)?e.join(""):String(e)}).join(",\n "),u="new AreaSwitcher()\n .set(".concat(JSON.stringify(ol({gap:null!==(e=a.gap)&&void 0!==e?e:"10px",height:null!==(n=a.height)&&void 0!==n?n:"700px"},void 0!==a.id?{id:a.id}:{})),")\n .react(").concat(JSON.stringify(s,null,2),")\n .add([\n ").concat(c,"\n ])"),f=(new Qa).set(ol({gap:null!==(r=a.gap)&&void 0!==r?r:"10px",height:null!==(o=a.height)&&void 0!==o?o:"700px"},void 0!==a.id?{id:a.id}:{})).react(JSON.parse(JSON.stringify(s)));return f.add(l),this.withSource(f,u)}},{key:"mapWrap",value:function(t){var e,n,r,o=this,i=t.el,a=null!==(e=t.el.kind)&&void 0!==e?e:"",s=new rr(a).set(ol(ol({},this.elOpts(i)),{},{font:null!==(n=i.font)&&void 0!==n?n:"Arial",stroke:this.filtero("blast",i.id,t.customOptions),gradient:this.filtero("gradient",i.id,t.customOptions),animation:this.filtero("animation",i.id,t.customOptions),shadow:this.filtero("shadow",i.id,t.customOptions),transform:null!==(r=this.filtero("transform",i.id,t.customOptions))&&void 0!==r?r:i.transform,filtera:this.filtero("filter",i.id,t.customOptions),raster:this.filteroRaster(i.id,t.customOptions)})),l=Array.isArray(i.children)?i.children:null;return l&&s.add(l.map(function(e){return o.mapType(ol(ol({},t),{},{el:e}))})),s}},{key:"mapUList",value:function(t){var e,n,r,o=this,i=t.el,a=null!==(e=t.el.kind)&&void 0!==e?e:"",s=new Wi(a).set(ol(ol({},this.elOpts(i)),{},{font:null!==(n=i.font)&&void 0!==n?n:"Arial",stroke:this.filtero("blast",i.id,t.customOptions),gradient:this.filtero("gradient",i.id,t.customOptions),animation:this.filtero("animation",i.id,t.customOptions),shadow:this.filtero("shadow",i.id,t.customOptions),transform:null!==(r=this.filtero("transform",i.id,t.customOptions))&&void 0!==r?r:i.transform,filtera:this.filtero("filter",i.id,t.customOptions),raster:this.filteroRaster(i.id,t.customOptions)})),l=Array.isArray(i.items)?i.items:null;return l&&s.setItems(l.map(function(e){return"string"==typeof e?new Xt(e).set({}):o.mapType(ol(ol({},t),{},{el:e}))})),s}},{key:"getElType",value:function(t){return"p"===t?"S6":"S".concat(t.substr(1))}},{key:"filtero",value:function(t,e,n){return n.filter(function(e){return e.op.name===t}).filter(function(t){return!t.target||t.target.some(function(t){return ll(t,e)})})[0]}},{key:"elOpts",value:function(t){for(var e=new Set(["type","children","items","breakpoints","inputType","text","url"].concat(Ks(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]))),n={},r=0,o=Object.keys(t);r<o.length;r++){var i=o[r];e.has(i)||(n[i]=t[i])}return n}},{key:"attachRaster",value:function(t,e,n){var r=this.filteroRaster(e.id,n);return r&&t&&"function"==typeof t.rasterize&&t.rasterize(r),t}},{key:"filteroRaster",value:function(t,e){var n=(e||[]).filter(function(e){return e&&"string"==typeof e.op&&g.includes(e.op)&&(!e.target||t&&e.target.some(function(e){return ll(e,t)}))});return n.length>0?n:void 0}}],null&&nl(t.prototype,null),e&&nl(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function dl(t){return dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(t)}function hl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pl(r.key),r)}}function pl(t){var e=function(t){if("object"!=dl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=dl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dl(e)?e:e+""}function yl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yl=function(){return!!t})()}function ml(t){return ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ml(t)}function vl(t,e){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vl(t,e)}var bl=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=ml(e),function(t,e){if(e&&("object"==dl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yl()?Reflect.construct(e,n||[],ml(t).constructor):e.apply(t,n))}(this,t)).url=e,n.res=null,n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)}(t,_t),e=t,(n=[{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"set",value:function(t){return this.options=t,t.background&&this.background(t.background),this}},{key:"background",value:function(t){var e=document.createElement("style");return e.type="text/css",e.textContent="\n\taudio::-webkit-media-controls-panel {\n\t\tbackground-color: ".concat(t,";\n\t}\n"),document.head.appendChild(e),this}},{key:"toCode",value:function(){return JSON.stringify(this.options,null,4),['new NAudio("'.concat(this.url,'")')]}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&hl(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function gl(t){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(t)}function wl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,kl(r.key),r)}}function kl(t){var e=function(t){if("object"!=gl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gl(e)?e:e+""}function Sl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Sl=function(){return!!t})()}function Ol(t){return Ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ol(t)}function jl(t,e){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jl(t,e)}var El=function(){function t(e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,n){return e=Ol(e),function(t,e){if(e&&("object"==gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Sl()?Reflect.construct(e,n||[],Ol(t).constructor):e.apply(t,n))}(this,t)).svgMarkup="string"==typeof e?e:"",n.res.style.display="inline-flex",n.res.style.alignItems="center",n.res.style.justifyContent="center",n.res.style.flexShrink="0",n.res.style.lineHeight="0",n.res.innerHTML=n.svgMarkup,n._sizeInner(),n.code=[],n.code.push("\n new Svg() \n"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)}(t,rr),e=t,n=[{key:"_sizeInner",value:function(){var t=this.res.querySelector("svg");t&&(t.getAttribute("width")||t.setAttribute("width","100%"),t.getAttribute("height")||t.setAttribute("height","100%"),t.style.display="block")}},{key:"setSvg",value:function(t){return this.svgMarkup="string"==typeof t?t:"",this.res.innerHTML=this.svgMarkup,this._sizeInner(),this}},{key:"size",value:function(t){var e="number"==typeof t?"".concat(t,"px"):t;return this.res.style.width=e,this.res.style.height=e,this}},{key:"toCode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.excludeFromCodeTrue)return[""];var e=" ".repeat(t),n=(this.svgMarkup||"").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),r="".concat(e,"new Svg(`").concat(n,"`)");if(this.obj&&Object.keys(this.obj).length){var o=pt(Object.fromEntries(Object.entries(this.obj).filter(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return wl(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wl(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2);return e[0],null!==e[1]})),2);r+="\n".concat(e," .set(").concat(o,")")}return[r+="\n".concat(e)]}}],n&&xl(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function Tl(t){return Tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(t)}function _l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Cl(r.key),r)}}function Cl(t){var e=function(t){if("object"!=Tl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tl(e)?e:e+""}var Al=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.setupa()},e=[{key:"seto",value:function(t){return this.e=t.a,t.speed&&(this.divisor=t.speed),t.height&&(this.setH=t.height),this}},{key:"setupa",value:function(){return this.parallaxIDs(["#rta"]),this.divisor(1),this}},{key:"add",value:function(t){return this.items=t,this.setup(),this}},{key:"parallaxIDs",value:function(t){return this.parallaxIDs=t,this}},{key:"divisor",value:function(t){return this.divisor=t,this}},{key:"setup",value:function(){var t,e=this;this.pts=0;var n=document.createElement("div");n.style.width="100%",n.style.height=null!==(t=this.setH)&&void 0!==t?t:"100%";var r=document.createElement("div");r.style.display="flex",r.style.width="100%";for(var o=0;o<this.items.length;o++){var i=this.items[o].render();r.appendChild(i)}n.appendChild(r);var a=window.localStorage.getItem("pts");null!==a&&(this.pts=a),n.addEventListener("wheel",function(t){t.deltaY<0?e.pts--:t.deltaY>0&&e.pts++,window.localStorage.setItem("pts",e.pts),t.preventDefault();for(var n=0;n<r.childNodes.length;n++){var o=r.childNodes[n];e.parallaxIDs.includes(o.id)&&(o.style.transform="translateX(".concat(e.pts/e.divisor,"%)"))}r.style.transform="translateX(".concat(e.pts/e.divisor,"%)"),window.localStorage.setItem("translation",e.pts/e.divisor)});var s=window.localStorage.getItem("translation");null!==s&&(r.style.transform="translateX(".concat(s,"%)")),this.div=n}},{key:"render",value:function(t){if(!t)return this.div;document.querySelector(t).appendChild(this.div)}}],e&&_l(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),Pl={"t-vhs":{summary:"Tape-glitch morph: chroma splits and the image tears, strongest at the midpoint, gone at both ends.",nodes:[{op:"aberration",amount:[0,18,0]},{op:"flow",strength:[0,34,0],scale:60,speed:0,window:[.15,.95],ease:"in-out"}]},"t-dissolve":{summary:"Ordered-dither dissolve — the old state breaks into pixels before the new one resolves.",nodes:[{op:"dither",levels:[8,2,8],size:[1,7,1],amount:[0,1,0],ease:"in-out"}]},"t-split":{summary:"Per-side morph: the old state posterises to duotone while the new one resolves through a halftone screen.",nodes:[{op:"duotone",side:"old",amount:[0,1,1],dark:"#0B1B2B",light:"#1abc9c"},{op:"halftone",side:"new",size:[10,6,2],amount:[1,1,0],softness:.35,angle:15}]},"t-bloom":{summary:"A soft halftone bloom through the middle of the morph.",nodes:[{op:"halftone",size:[2,9,2],amount:[0,1,0],softness:.4,angle:15,window:[.1,.9]}]},"t-fluid":{summary:"Liquid morph: the old state is carried on a current and pours into the new one, calm at both ends.",nodes:[{op:"flow",strength:[0,46,0],scale:130,speed:.8,ease:"in-out"},{op:"aberration",amount:[0,4,0],window:[.2,.8]}]},"t-particles":{summary:"Particle morph: the old state breaks into dots that scatter and re-form as the new one, with see-through gaps in between.",nodes:[{op:"particles",size:9,amount:[0,1,1,0],reach:5,ease:"in-out"}]},"liquid-hero":{summary:"A ripple that trails the pointer, then relaxes back in ~1.5s.",live:"enhanced",nodes:[{op:"stir",by:"mouse",radius:.055,force:2.2,strength:16,curl:.8,resolution:256,decay:.988}]},linger:{summary:"The same current, held for four or five seconds. Only `decay` differs.",live:"enhanced",nodes:[{op:"stir",by:"mouse",radius:.055,force:2.2,strength:7,curl:.8,resolution:256,decay:.9985,dye:0,sheen:0}]},"flow-field":{summary:"A standing current across the whole element. No solver, runs anywhere.",nodes:[{op:"flow",strength:18,scale:120,speed:.25}]},"flow-pointer":{summary:"The same current, but only around the pointer.",nodes:[{op:"flow",by:"mouse",strength:26,scale:100,radius:320}]},"print-shop":{summary:"Offset-litho dot screen with white seams under the glyphs.",nodes:[{op:"halftone",size:6,angle:15},{op:"edges",color:"#FFFFFF"}]},newsprint:{summary:"One-bit ordered dither — ink on paper, no greys.",nodes:[{op:"dither",mono:!0,ink:"#0B1B2B"}]},crt:{summary:"Posterised to a few levels, with a lens-like colour split.",nodes:[{op:"dither",levels:3},{op:"aberration",amount:6}]},glass:{summary:"Refractive metaball lens over untouched content.",nodes:[{op:"blobs",refract:70,dispersion:1,frost:.25}]},"hex-lens":{summary:"Hex cells rise toward the pointer; flush and invisible at rest.",nodes:[{op:"hexalize",size:26,lift:.3,by:"hover",radius:220}]},ripple:{summary:"The coordinate space pushes away from the pointer.",nodes:[{op:"offset",by:"mouse",strength:22,radius:280}]},spotlight:{summary:"A duotone disc that travels with the pointer; the rest is untouched.",nodes:[{op:"mask",from:"radial",as:"spot",by:"mouse",radius:200},{op:"duotone",masked:"spot",colors:["#104B87","#E8FF00"]}]},turbulent:{summary:"Animated noise drives the displacement, so the warp breathes.",nodes:[{op:"noise",as:"turbulence",scale:3,speed:.4},{op:"offset",masked:"turbulence",by:"static",strength:30}]},echoes:{summary:"Changing content leaves a fading trail behind it.",live:"required",nodes:[{op:"echo",decay:.92,strength:.85}]},comet:{summary:"A long, tinted comet tail. Needs live capture — on snapshot you see nothing move.",live:"required",nodes:[{op:"echo",decay:.975,strength:.95,tint:"#7FD4FF",tintAmount:.65}]}};function Rl(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Pl[t];if(!r)throw new Error("[nodality] "+Ct(t,Object.keys(Pl),"raster preset"));return(e=r.nodes,JSON.parse(JSON.stringify(e))).map(function(t){return Object.assign(t,n)})}var Il={linear:function(t){return t},in:function(t){return t*t*t},out:function(t){return 1-Math.pow(1-t,3)},"in-out":function(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}};function Ml(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"function"!=typeof t.setProgress){var n=0;t={setProgress:function(t){return n=Math.min(1,Math.max(0,Number(t)||0))},get progress(){return n}}}var r=null!=e.duration?e.duration:600,o=Il[e.easing]||Il["in-out"],i=!1!==e.respectReducedMotion,a=0,s=t.progress||0,l=s,c=0,u=0,f=0,d=0,h=!1,p=null,y=null,m=!1,v=function(){if(!m){var e="undefined"!=typeof performance?performance.now():Date.now();c||(c=e,u=e),f+=Math.min(e-u,Math.max(d/6,50)),u=e;var n=d<=0?1:Math.min(1,f/d);if(t.setProgress(s+(l-s)*o(n)),n>=1)return function(){h=!1,a=0;var e=p;p=null,e&&e(t.progress)}();a=requestAnimationFrame(v)}},b={get value(){return t.progress},get running(){return h},set:function(e){return b.stop(),t.setProgress(e),t.progress},to:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(m)return Promise.resolve(t.progress);var o=Math.min(1,Math.max(0,Number(e)||0));if(i&&"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return b.set(o),Promise.resolve(o);if(p){var u=p;p=null,u(t.progress)}a&&cancelAnimationFrame(a),s=t.progress,l=o;var y=Math.abs(l-s);return y<1e-4?(t.setProgress(o),Promise.resolve(o)):(d=(null!=n.duration?n.duration:r)*y,c=0,f=0,h=!0,a=requestAnimationFrame(v),new Promise(function(t){p=t}))},stop:function(){if(a&&cancelAnimationFrame(a),a=0,h=!1,p){var e=p;p=null,e(t.progress)}return t.progress},bindScroll:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="string"==typeof e?document.querySelector(e):e;if(!r)return b;b.unbindScroll(),b.stop();var o=null!=n.start?n.start:0,i=null!=n.end?n.end:1,a=function(){if(!m){var e=r.getBoundingClientRect(),n=window.innerHeight||1,a=(n-e.top)/(n+e.height||1),s=(Math.min(1,Math.max(0,a))-o)/(i-o||1);t.setProgress(Math.min(1,Math.max(0,s)))}};return y={node:r,update:a},window.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a,{passive:!0}),a(),b},unbindScroll:function(){return y?(window.removeEventListener("scroll",y.update),window.removeEventListener("resize",y.update),y=null,b):b},drive:function(t){return b.set(t)},destroy:function(){m=!0,b.stop(),b.unbindScroll()}};return b}function Dl(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return Fl(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,l=t,d.n=n,a}};function h(n,r){for(s=n,l=r,e=0;!f&&c&&!o&&e<u.length;e++){var o,i=u[e],h=d.p,p=i[2];n>3?(o=p===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),s=u,l=p;(e=s<2?t:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(e){i=t,s=1,l=e}finally{c=1}}return{value:e,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(Fl(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Fl(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=c,Fl(f,"constructor",c),Fl(c,"constructor",l),l.displayName="GeneratorFunction",Fl(c,o,"GeneratorFunction"),Fl(f),Fl(f,o,"Generator"),Fl(f,r,function(){return this}),Fl(f,"toString",function(){return"[object Generator]"}),(Dl=function(){return{w:i,m:d}})()}function Fl(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Fl=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){Fl(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},Fl(t,e,n,r)}function Ll(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Bl(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function zl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Bl(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nl(t){return function(t){if(Array.isArray(t))return Wl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Bl(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bl(t,e){if(t){if("string"==typeof t)return Wl(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wl(t,e):void 0}}function Wl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ul(t){return Ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(t)}function ql(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function Hl(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){ql(i,r,o,a,s,"next",t)}function s(t){ql(i,r,o,a,s,"throw",t)}a(void 0)})}}var Gl=function(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:r.x-n.x,y:r.y-n.y,w:r.width,h:r.height}};function Xl(t,e,n){return Vl.apply(this,arguments)}function Vl(){return Vl=Hl(Dl().m(function t(e,n,r){var o,i,a,s,l,c,u,f,d,h,p=arguments;return Dl().w(function(t){for(;;)switch(t.n){case 0:for(o=p.length>3&&void 0!==p[3]?p[3]:1,(i=e.cloneNode(!0)).style.position="static",i.style.left=i.style.top="0",i.style.margin="0",i.style.visibility="visible",a=[e].concat(Nl(e.querySelectorAll("*"))),s=[i].concat(Nl(i.querySelectorAll("*"))),l=0;l<a.length;l++)c=getComputedStyle(a[l]),s[l].style.fontSize=c.fontSize,s[l].style.lineHeight=c.lineHeight,s[l].style.fontWeight=c.fontWeight,s[l].style.fontFamily=c.fontFamily,s[l].style.letterSpacing=c.letterSpacing,s[l].style.width=c.width,s[l].style.height=c.height,s[l].style.padding=c.padding,s[l].style.boxSizing=c.boxSizing,l>0&&(s[l].style.margin=c.margin),s[l].style.color=c.color,s[l].style.backgroundColor=c.backgroundColor,s[l].style.backgroundImage=c.backgroundImage,s[l].style.borderStyle=c.borderStyle,s[l].style.borderWidth=c.borderWidth,s[l].style.borderColor=c.borderColor,s[l].style.borderRadius=c.borderRadius,s[l].style.boxShadow=c.boxShadow;return u=Math.max(1,Math.min("undefined"!=typeof window&&window.devicePixelRatio||1,3)),f=Math.max(1,Math.min(u*Math.max(1,o||1),4096/Math.max(n,r,1))),d='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(n*f,'" ')+'height="'.concat(r*f,'" viewBox="0 0 ').concat(n," ").concat(r,'">')+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+(new XMLSerializer).serializeToString(i)+"</div></foreignObject></svg>",h=document.createElement("img"),t.n=1,new Promise(function(t,e){h.onload=t,h.onerror=e,h.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(d)});case 1:return t.a(2,h)}},t)})),Vl.apply(this,arguments)}var Jl=function(t){if(!t)return[];if(Array.isArray(t))return t;try{return Rl(t)||[]}catch(t){return[]}},Yl=function(t){return String(t||"").replace(/\s+/g," ").trim().toLowerCase()},$l=function(t){return"string"==typeof t&&t.startsWith("#")?t.slice(1):t},Ql=function(t){return(Array.isArray(t.chain)&&t.chain.length?t.chain:[{from:t.from,to:t.to}]).map(function(e){var n=function(n,r){return void 0!==e[n]?e[n]:void 0!==t[n]?t[n]:r},r=e.to&&!Array.isArray(e.to)&&"object"===Ul(e.to)?e.to:null,o=r?Nl(new Set(Object.values(e.to))).map($l):(Array.isArray(e.to)?e.to:[e.to]).map($l),i=new Map;if(r)for(var a=0,s=Object.entries(e.to);a<s.length;a++){var l=zl(s[a],2),c=l[0],u=l[1];i.set(Yl(c),$l(u))}return{from:$l(e.from),byLabel:r,toIds:o,labelToId:i,effect:n("effect"),duration:n("duration",900),back:!1!==n("back",!0),live:!0===n("live"),fade:n("fade","morph")}})};function Kl(t,e,n){if(!t||"undefined"==typeof document)return[];var r=(n||[]).filter(function(t){return t&&"morph"===t.op});if(!r.length)return[];var o=Nl(t.children),i=function(n){var r=$l(n),i=document.getElementById(r);if(i&&t.contains(i))return i;var a=(e||[]).findIndex(function(t){return t&&$l(t.id)===r});return a>=0?o[a]:null};return r.map(function(e){return function(t,e,n){var r=Ql(e),o=r[0],i=o&&o.from,a=null!=i?n(i):null,s=new Map;a&&s.set(i,a);var l,c=Ll(r);try{for(c.s();!(l=c.n()).done;){var u=l.value,f=n(u.from);f&&!s.has(u.from)&&s.set(u.from,f);var d,h=Ll(u.toIds);try{for(h.s();!(d=h.n()).done;){var p=d.value,y=n(p);y&&!s.has(p)&&s.set(p,y)}}catch(t){h.e(t)}finally{h.f()}}}catch(t){c.e(t)}finally{c.f()}if(!a||!o.toIds.some(function(t){return s.has(t)}))return console.warn("[nodality] morph: could not resolve",i,"->",o?o.toIds:[]),null;var m=function(t){return r.find(function(e){return e.from===t})||null},v=document.createElement("div");v.className="nod-morph",v.style.cssText="position:relative;",t.insertBefore(v,a);var b=document.createElement("div");b.className="nod-morph-host",b.style.cssText="position:absolute;inset:0;";var g=document.createElement("div");g.className="nod-morph-live",g.style.cssText="position:absolute;inset:0;",v.appendChild(b),v.appendChild(g),g.appendChild(a),a.style.position="absolute",a.style.left=a.style.top="0";var w,x=Ll(s);try{for(x.s();!(w=x.n()).done;){var k=zl(w.value,2),S=k[0],O=k[1];S!==i&&O.remove()}}catch(t){x.e(t)}finally{x.f()}var j=i,E=[],T=function(){return s.get(j)||a},_=function(t){v.style.minHeight=Math.max(T().getBoundingClientRect().height,t||0)+24+"px"};_(0);var C=null,A=null,P=-1,R=null,I=null,M=null,D=!1,F=null,L=null,z=r.length>1,N=function(){var t=Hl(Dl().m(function t(e,n,r){var o,i,a,s,l,c,u;return Dl().w(function(t){for(;;)switch(t.n){case 0:if(!(o=Nl(n.querySelectorAll("img"))).length){t.n=2;break}return t.n=1,Promise.all(o.map(function(t){return t.complete&&t.naturalWidth?null:"function"==typeof t.decode?t.decode().catch(function(){}):new Promise(function(e){t.addEventListener("load",e,{once:!0}),t.addEventListener("error",e,{once:!0})})}));case 1:return t.n=2,new Promise(function(t){return requestAnimationFrame(t)});case 2:return i=Gl(b,e),a=Gl(b,n),_(Math.max(i.y+i.h,a.y+a.h)),t.n=3,Promise.all([Xl(e,i.w,i.h),Xl(n,a.w,a.h)]);case 3:s=t.v,l=zl(s,2),c=l[0],u=l[1],C=dt(b,Jl(r.effect),{transition:{oldImage:c,newImage:u,oldRect:i,oldTo:a,newRect:a,newFrom:i,standDownAtStart:!0,live:!0===r.live,fade:r.fade||"morph"}}),A&&A.destroy(),A=Ml(C,{duration:null!=r.duration?r.duration:900});case 4:return t.a(2)}},t)}));return function(e,n,r){return t.apply(this,arguments)}}(),B=function(){var t=Hl(Dl().m(function t(e){var n,r,o,i,a,l,c,u,f,d;return Dl().w(function(t){for(;;)switch(t.n){case 0:if((n=m(j))&&n.toIds.includes(e)){t.n=1;break}return t.a(2);case 1:if(r=s.get(e)){t.n=2;break}return t.a(2);case 2:o=T(),P=n.toIds.indexOf(e),M=j,i=Ll(ct());try{for(i.s();!(a=i.n()).done;)l=a.value,v.contains(l.canvas)&&l.destroy()}catch(t){i.e(t)}finally{i.f()}for(c=0,u=Nl(b.children);c<u.length;c++)(f=u[c])!==o&&f.remove();return b.appendChild(r),I=o,R=r,r.style.visibility="hidden",d=Gl(b,o),Object.assign(r.style,{position:"absolute",left:"0",top:Math.round(z?d.y:d.h+20)+"px"}),t.n=3,N(o,r,n);case 3:if(A){t.n=4;break}return t.a(2);case 4:return F=M,L=e,A.set(0),$(e),n.back&&J(r),t.n=5,A.to(1);case 5:1===t.v&&R===r&&V(e,o,n);case 6:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),W=!1,U=0,q=function(){var t=Hl(Dl().m(function t(){var e,n,r;return Dl().w(function(t){for(;;)switch(t.n){case 0:if(E.length){t.n=1;break}return t.a(2);case 1:if(e=E[E.length-1],n=s.get(e)){t.n=2;break}return t.a(2);case 2:if(r=T(),!C||!A||F!==e||L!==j){t.n=4;break}return t.n=3,A.to(0);case 3:return 0===t.v&&X(e),t.a(2);case 4:return t.n=5,G(e,n,r);case 5:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),H=function(){var t=Hl(Dl().m(function t(){return Dl().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!W){t.n=1;break}return U++,t.a(2);case 1:return W=!0,t.p=2,t.n=3,q();case 3:if(!(U>0&&E.length)){t.n=5;break}return U--,t.n=4,q();case 4:t.n=3;break;case 5:return t.p=5,W=!1,U=0,t.f(5);case 6:return t.a(2)}},t,null,[[2,,5,6]])}));return function(){return t.apply(this,arguments)}}(),G=function(){var t=Hl(Dl().m(function t(e,n,r){var o,i,s,l,c;return Dl().w(function(t){for(;;)switch(t.n){case 0:return o=Nl(ct()).filter(function(t){return v.contains(t.canvas)}),i=m(e)||{},n===a?(D=!0,g.style.display=""):n.parentNode!==b&&(n.style.visibility="hidden",b.appendChild(n),s=Gl(b,r),Object.assign(n.style,{position:"absolute",left:"0",top:Math.round(z?s.y:0)+"px"})),t.n=1,N(n,r,i);case 1:l=Ll(o);try{for(l.s();!(c=l.n()).done;)c.value.destroy()}catch(t){l.e(t)}finally{l.f()}if(D=!1,A){t.n=2;break}return t.a(2);case 2:return F=e,L=j,I=n,R=r,A.set(1),t.n=3,A.to(0);case 3:0===t.v&&X(e);case 4:return t.a(2)}},t)}));return function(e,n,r){return t.apply(this,arguments)}}(),X=function(t){E[E.length-1]===t&&E.pop(),j=t;var e,n=Ll(ct());try{for(n.s();!(e=n.n()).done;){var r=e.value;v.contains(r.canvas)&&r.destroy()}}catch(t){n.e(t)}finally{n.f()}C=null,A=null,F=null,L=null,M=E.length?E[E.length-1]:null,$(t)},V=function(t,e,n){null!=M&&M!==t&&E.push(M),j=t,I=e&&e!==a?e:null,$(t),n&&n.back&&J(s.get(t))},J=function(t){if(t){var e=Nl(t.querySelectorAll("button")).find(function(t){return!t.dataset.nodMorphWired&&!t.dataset.nodMorphBack&&!t.closest("form")});e&&(e.dataset.nodMorphBack="1",e.addEventListener("click",function(){H()}))}},Y=new Set,$=function(t){var e=m(t),n=s.get(t);if(e&&n){var r=function(t){var e=Nl(t.querySelectorAll("a"));if(e.length)return e;var n=Nl(t.querySelectorAll("button, [role=button]"));return n.length?n:[t]}(n),o=!!e.byLabel&&r.some(function(t){return e.labelToId.has(Yl(t.textContent))});r.forEach(function(t){return function(t,e,n,r){if(!t.dataset.nodMorphWired&&!t.dataset.nodMorphBack){var o=r?e.labelToId.get(Yl(t.textContent)):1===e.toIds.length?e.toIds[0]:e.byLabel?e.labelToId.get(Yl(t.textContent)):e.toIds[n.indexOf(t)];o&&s.has(o)&&(t.dataset.nodMorphWired="1",t.dataset.nodMorphTo=o,t.addEventListener("click",function(t){s.has(o)&&(t.preventDefault(),B(o))}))}}(t,e,r,o)}),"undefined"==typeof MutationObserver||Y.has(t)||(Y.add(t),new MutationObserver(function(){return $(t)}).observe(n,{childList:!0,subtree:!0}))}};$(i);var Q=function(){if(v.isConnected){var t=C?C.progress:0,e=b.querySelector("canvas"),n=!!e&&"visible"===(e.style.visibility||"visible"),r=!C||!n,o=D||r&&t<=0&&(j===i||I===a)?"":"none";g.style.display!==o&&(g.style.display=o);var s=R||b.firstElementChild;if(s&&s.style){var l=C&&r&&t>=1?"":"hidden";s.style.visibility!==l&&(s.style.visibility=l)}if(I&&I!==a&&I.style){var c=r&&t<=0?"":"hidden";I.style.visibility!==c&&(I.style.visibility=c)}requestAnimationFrame(Q)}};return requestAnimationFrame(Q),{stage:v,from:a,get destinations(){return o.toIds.map(function(t){return s.get(t)||null})},get states(){return s},get current(){return j},get history(){return[].concat(E)},get progress(){return C?C.progress:0},get active(){return P},goTo:function(t){var e=m(j);return e?B(e.toIds[t]):void 0},goToState:B,back:function(){A&&A.to(0)},goBack:H,destroy:function(){A&&A.destroy();var t,e=Ll(ct());try{for(e.s();!(t=e.n()).done;){var n=t.value;v.contains(n.canvas)&&n.destroy()}}catch(t){e.e(t)}finally{e.f()}v.remove()}}}(t,e,i)}).filter(Boolean)}var Zl=["kind","formId","productId"];function tc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||cc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ec(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ec(Object(n),!0).forEach(function(e){rc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function rc(t,e,n){return(e=function(t){var e=function(t){if("object"!=fc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fc(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oc(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(fc(t)+" is not iterable")}function ic(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return ac(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,l=t,d.n=n,a}};function h(n,r){for(s=n,l=r,e=0;!f&&c&&!o&&e<u.length;e++){var o,i=u[e],h=d.p,p=i[2];n>3?(o=p===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),s=u,l=p;(e=s<2?t:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(e){i=t,s=1,l=e}finally{c=1}}return{value:e,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(ac(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,ac(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=c,ac(f,"constructor",c),ac(c,"constructor",l),l.displayName="GeneratorFunction",ac(c,o,"GeneratorFunction"),ac(f),ac(f,o,"Generator"),ac(f,r,function(){return this}),ac(f,"toString",function(){return"[object Generator]"}),(ic=function(){return{w:i,m:d}})()}function ac(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}ac=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){ac(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},ac(t,e,n,r)}var sc=ic().m(yc);function lc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=cc(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function cc(t,e){if(t){if("string"==typeof t)return uc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uc(t,e):void 0}}function uc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function fc(t){return fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(t)}var dc=new Set(["input","labelInput","checkbox","radio","picker"]),hc={text:{type:"string"},email:{type:"string",format:"email"},tel:{type:"string"},url:{type:"string",format:"uri"},number:{type:"number"},password:{type:"string"},date:{type:"string",format:"date"},time:{type:"string",format:"time"},search:{type:"string"}},pc=function(t){return!!t&&"object"===fc(t)};function yc(t){var e,n,r,o,i;return ic().w(function(a){for(;;)switch(a.p=a.n){case 0:if(pc(t)){a.n=1;break}return a.a(2);case 1:return a.n=2,t;case 2:e=Array.isArray(t.children)?t.children:[],n=lc(e),a.p=3,n.s();case 4:if((r=n.n()).done){a.n=6;break}return o=r.value,a.d(oc(yc(o)),5);case 5:a.n=4;break;case 6:a.n=8;break;case 7:a.p=7,i=a.v,n.e(i);case 8:return a.p=8,n.f(),a.f(8);case 9:return a.a(2)}},sc,null,[[3,7,8,9]])}function mc(t){var e,n="string"==typeof t.name?t.name:t.id;if("string"!=typeof n||!n)return null;if("checkbox"===t.type)e={type:"boolean"};else if("radio"===t.type||"picker"===t.type){var r=Array.isArray(t.items)?t.items.filter(function(t){return"string"==typeof t}):[];e=r.length?{type:"string",enum:r}:{type:"string"},"radio"===t.type&&!0===t.multiple&&(e={type:"array",items:e})}else e=nc({},hc[t.inputType]||hc.text);var o=[t.label,t.placeholder,t.title].find(function(t){return"string"==typeof t&&t.trim()});return o&&(e.description=o.trim()),{key:n,schema:e,required:!0===t.required}}function vc(t){return t.routes.map(function(t){var e=t.to.map(function(t){return t.label?"".concat(t.label," → ").concat(t.to):t.to}).join(", ");return"from ".concat(t.from,": ").concat(e)}).join("; ")}function bc(t){return bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bc(t)}function gc(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(bc(t)+" is not iterable")}function wc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Ac(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xc(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return kc(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,l=t,d.n=n,a}};function h(n,r){for(s=n,l=r,e=0;!f&&c&&!o&&e<u.length;e++){var o,i=u[e],h=d.p,p=i[2];n>3?(o=p===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),s=u,l=p;(e=s<2?t:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(e){i=t,s=1,l=e}finally{c=1}}return{value:e,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(kc(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,kc(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=c,kc(f,"constructor",c),kc(c,"constructor",l),l.displayName="GeneratorFunction",kc(c,o,"GeneratorFunction"),kc(f),kc(f,o,"Generator"),kc(f,r,function(){return this}),kc(f,"toString",function(){return"[object Generator]"}),(xc=function(){return{w:i,m:d}})()}function kc(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}kc=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){kc(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},kc(t,e,n,r)}function Sc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Oc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sc(Object(n),!0).forEach(function(e){jc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jc(t,e,n){return(e=function(t){var e=function(t){if("object"!=bc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bc(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ec(t){return function(t){if(Array.isArray(t))return Pc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ac(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tc(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function _c(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Tc(i,r,o,a,s,"next",t)}function s(t){Tc(i,r,o,a,s,"throw",t)}a(void 0)})}}function Cc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ac(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ac(t,e){if(t){if("string"==typeof t)return Pc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pc(t,e):void 0}}function Pc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Rc="nodality-agent-manifest";function Ic(t){if(!t)return{text:"",actions:[]};var e,n=function(t){var e=getComputedStyle(t);if("none"===e.display||"0"===e.opacity)return!1;var n=t.getBoundingClientRect();return n.width>0&&n.height>0},r=[],o=Cc(t.querySelectorAll("h1,h2,h3,h4,h5,h6,p,li"));try{for(o.s();!(e=o.n()).done;){var i=e.value;if(n(i)){var a=(i.textContent||"").replace(/\s+/g," ").trim();if(a){var s=i.tagName.toLowerCase();r.push(/^h[1-6]$/.test(s)?"".concat("#".repeat(+s[1])," ").concat(a):a)}}}}catch(t){o.e(t)}finally{o.f()}var l,c=[],u=Cc(t.querySelectorAll("a,button,[role=button]"));try{for(u.s();!(l=u.n()).done;){var f=l.value;if(n(f)){var d=(f.textContent||"").replace(/\s+/g," ").trim();d&&!c.includes(d)&&c.push(d)}}}catch(t){u.e(t)}finally{u.f()}return{text:r.join("\n"),actions:c}}var Mc=function(t,e,n){return{ok:!1,code:t,got:e,valid:n}};function Dc(t){var e=t.mount,n=t.elements,r=t.nodes,o=t.morphs,i=function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).specDraft,r=void 0===n?null:n,o=(Array.isArray(e)?e:[]).find(function(t){return pc(t)&&"agent-surface"===t.op});if(!o)return null;var i,a=function(t){var e,n=[],r=lc(Array.isArray(t)?t:[]);try{for(r.s();!(e=r.n()).done;){var o,i=lc(yc(e.value));try{for(i.s();!(o=i.n()).done;){var a=o.value;n.push(a)}}catch(t){i.e(t)}finally{i.f()}}}catch(t){r.e(t)}finally{r.f()}return n}(t),s=new Map,l=lc(a);try{for(l.s();!(i=l.n()).done;){var c=i.value;"string"==typeof c.id&&s.set(c.id,c)}}catch(t){l.e(t)}finally{l.f()}var u=new Set((Array.isArray(o.exclude)?o.exclude:[]).filter(function(t){return"string"==typeof t})),f="string"==typeof o.name&&o.name.trim()?o.name.trim().replace(/[^a-zA-Z0-9_-]/g,"_"):null,d=function(t){return f?"".concat(f,"_").concat(t):t},h=[],p=function(t,e){var n=(Array.isArray(t)?t:[]).filter(function(t){return pc(t)&&"morph"===t.op});if(!n.length)return null;var r,o,i=[],a=lc(n);try{for(a.s();!(r=a.n()).done;){var s,l=r.value,c=lc(Ql(l));try{for(c.s();!(s=c.n()).done;){var u=s.value;"string"==typeof u.from&&i.push(u)}}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}if(!i.length)return null;for(var f=i[0].from,d=function(t){return i.filter(function(e){return e.from===t})},h=new Set([f]),p=[f];p.length;){var y,m=lc(d(p.shift()));try{for(m.s();!(y=m.n()).done;){var v,b=lc(y.value.toIds);try{for(b.s();!(v=b.n()).done;){var g=v.value;"string"!=typeof g||h.has(g)||(h.add(g),p.push(g))}}catch(t){b.e(t)}finally{b.f()}}}catch(t){m.e(t)}finally{m.f()}}for(var w=[],x=0,k=i;x<k.length;x++){var S=k[x];if(h.has(S.from)&&!e.has(S.from)){var O=[];if(S.byLabel)for(var j=0,E=Object.entries(S.byLabel);j<E.length;j++){var T=tc(E[j],2),_=T[0],C=T[1],A="string"==typeof C&&C.startsWith("#")?C.slice(1):C;e.has(A)||O.push({label:_,to:A})}else{var P,R=lc(S.toIds);try{for(R.s();!(P=R.n()).done;){var I=P.value;e.has(I)||O.push({label:null,to:I})}}catch(t){R.e(t)}finally{R.f()}}O.length&&w.push({from:S.from,to:O,back:!0===S.back})}}for(var M=[],D=0,F=w;D<F.length;D++){var L,z=lc(F[D].to);try{for(z.s();!(L=z.n()).done;){var N=L.value;M.includes(N.to)||M.push(N.to)}}catch(t){z.e(t)}finally{z.f()}}return{root:f,states:[f].concat((o=M.filter(function(t){return t!==f}),function(t){if(Array.isArray(t))return uc(t)}(o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||cc(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),destinations:M,routes:w,canGoBack:w.some(function(t){return t.back})}}(e,u);if(p){var y=p.destinations.filter(function(t){return!u.has(t)});y.length&&h.push({name:d("navigate"),kind:"navigate",description:"Move to another view of this page. These are in-page views reached by a transition, not separate URLs. Routes: "+vc(p)+".",inputSchema:{type:"object",properties:{destination:{type:"string",enum:y,description:"The view to move to."}},required:["destination"]}}),p.canGoBack&&h.push({name:d("go_back"),kind:"back",description:"Return to the previous view, unwinding the path actually taken rather than following an edge.",inputSchema:{type:"object",properties:{}}})}var m,v=lc((Array.isArray(o.forms)?o.forms:[]).filter(function(t){return"string"==typeof t}));try{for(v.s();!(m=v.n()).done;){var b=m.value,g=s.get(b);if(g&&"form"===g.type){var w,x={},k=[],S=lc(yc(g));try{for(S.s();!(w=S.n()).done;){var O=w.value;if(dc.has(O.type)){var j=mc(O);j&&!x[j.key]&&(x[j.key]=j.schema,j.required&&k.push(j.key))}}}catch(t){S.e(t)}finally{S.f()}Object.keys(x).length&&h.push({name:d("submit_".concat(b.replace(/[^a-zA-Z0-9_-]/g,"_"))),kind:"submit",formId:b,description:"string"==typeof g.title&&g.title.trim()?g.title.trim():'Fill and submit the "'.concat(b,'" form on this page.'),inputSchema:nc({type:"object",properties:x},k.length?{required:k}:{})})}}}catch(t){v.e(t)}finally{v.f()}var E,T=lc((Array.isArray(o.products)?o.products:[]).filter(function(t){return"string"==typeof t}).map(function(t){return t.replace(/^#/,"")}));try{for(T.s();!(E=T.n()).done;){var _=E.value,C=s.get(_)||s.get("#".concat(_));C&&"product"===C.type&&h.push({name:d("get_product_".concat(_.replace(/[^a-zA-Z0-9_-]/g,"_"))),kind:"product",productId:_,description:'Read the product "'.concat(C.handle,'" as it is shown on this page: ')+"name, price for the visitor's market, options and availability. Read-only; buying happens on the shop's checkout.",inputSchema:{type:"object",properties:{}}})}}catch(t){T.e(t)}finally{T.f()}h.push({name:d("read_view"),kind:"read",description:"Read the content currently on screen as structured text: headings, body text and the labels of anything actionable.",inputSchema:{type:"object",properties:{}}});var A=nc({spec:r,tools:h.map(function(t){return t.kind,t.formId,t.productId,function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,Zl)})},p?{views:{root:p.root,states:p.states.filter(function(t){return!u.has(t)}),routes:p.routes}}:{});return{tools:h,manifest:A}}(n,r,{specDraft:"2026-07-21"});if(!i)return null;var a=i.tools,s=i.manifest,l=Array.isArray(o)?o.filter(Boolean):[],c=function(t){return l.find(function(e){return e.states&&e.states.has(t)})||null},u=function(){var t,n=Cc(l);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=r.states&&null!=r.current?r.states.get(r.current):null;if(o)return o}}catch(t){n.e(t)}finally{n.f()}return e},f=function(t){var n=function(e){if(!e||"function"!=typeof e.querySelector)return null;if(e.id===t)return"FORM"===e.tagName?e:e.querySelector("form");var n,r=e.querySelector("#".concat((n=String(t),"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(n):n.replace(/([^a-zA-Z0-9_-])/g,"\\$1"))));return r?"FORM"===r.tagName?r:r.querySelector("form"):null},r=n(e);if(r)return r;var o,i=Cc(l);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.states){var s,c=Cc(a.states.values());try{for(c.s();!(s=c.n()).done;){var u=n(s.value);if(u)return u}}catch(t){c.e(t)}finally{c.f()}}}}catch(t){i.e(t)}finally{i.f()}return null};if("undefined"!=typeof document){var d=document.getElementById(Rc);d&&d.remove();var h=document.createElement("script");h.type="application/json",h.id=Rc,h.textContent=JSON.stringify(s,null,2),(document.body||document.documentElement).appendChild(h)}var p,y=Cc(a);try{for(y.s();!(p=y.n()).done;){var m=p.value;if("submit"===m.kind&&e){var v=f(m.formId);v&&(v.setAttribute("toolname",m.name),v.setAttribute("tooldescription",m.description))}}}catch(t){y.e(t)}finally{y.f()}var b,g,w,x=Promise.resolve(),k=function(t){var e=x.then(t,t);return x=e.then(function(){},function(){}),e},S=function(){var t,e=Cc(l);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(null!=n.current)return n.current}}catch(t){e.e(t)}finally{e.f()}return null},O={navigate:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).destination;return k(_c(xc().m(function n(){var r,o,i;return xc().w(function(n){for(;;)switch(n.n){case 0:if(r=c(t)){n.n=1;break}return n.a(2,Mc("UNKNOWN_VIEW",t,l.flatMap(function(t){return Ec(t.states.keys())})));case 1:return o=r.current,n.n=2,r.goToState(t);case 2:if(r.current===t){n.n=3;break}return i=Ec(r.states.keys()),n.a(2,Mc("UNREACHABLE_FROM_HERE",t,i.filter(function(t){return t!==o})));case 3:return n.a(2,Oc({ok:!0,view:r.current},Ic(r.states.get(r.current)||e)))}},n)})))},back:function(){return k(_c(xc().m(function t(){var n;return xc().w(function(t){for(;;)switch(t.n){case 0:if(n=l.find(function(t){return t.history&&t.history.length})){t.n=1;break}return t.a(2,Mc("NO_HISTORY",null,[]));case 1:return t.n=2,n.goBack();case 2:return t.a(2,Oc({ok:!0,view:n.current},Ic(n.states.get(n.current)||e)))}},t)})))},read:(w=_c(xc().m(function t(){return xc().w(function(t){for(;;)if(0===t.n)return t.a(2,Oc({ok:!0,view:S()},Ic(u())))},t)})),function(){return w.apply(this,arguments)}),product:(g=_c(xc().m(function t(n,r){var o,i,a,s,l,c;return xc().w(function(t){for(;;)switch(t.n){case 0:if(o=e&&e.querySelector('[id="'.concat(r.productId,'"]'))){t.n=1;break}return t.a(2,Mc("NO_PRODUCT",r.productId,[]));case 1:return i=o.querySelector("[shopify-loading-placeholder]"),a=i&&"undefined"!=typeof window&&"none"===window.getComputedStyle(i).display,s=[],l=[],c=function(t){var e,n=Cc(t.childNodes);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(3===r.nodeType){var o=r.textContent.replace(/\s+/g," ").trim();o&&s.push(o)}else if(1===r.nodeType){if(/^(TEMPLATE|SCRIPT|STYLE)$/.test(r.tagName))continue;if("none"===window.getComputedStyle(r).display)continue;if(/^(A|BUTTON)$/.test(r.tagName)){var i=r.textContent.replace(/\s+/g," ").trim();i&&!l.includes(i)&&l.push(i)}r.shadowRoot&&c(r.shadowRoot),c(r)}}}catch(t){n.e(t)}finally{n.f()}},c(o),t.a(2,{ok:!0,product:r.productId,handle:o.getAttribute("handle"),live:!!a,text:s.join("\n"),actions:l})}},t)})),function(t,e){return g.apply(this,arguments)}),submit:(b=_c(xc().m(function t(){var e,n,r,o,i,a,s,c,u,d,h,p,y,m,v,b,g,w,x,k,S=arguments;return xc().w(function(t){for(;;)switch(t.n){case 0:if(e=S.length>0&&void 0!==S[0]?S[0]:{},r=f((n=S.length>1?S[1]:void 0).formId)){t.n=1;break}return t.a(2,Mc("NO_FORM",n.formId,[]));case 1:if(r.isConnected){t.n=2;break}return o=l.flatMap(function(t){return t.states?Ec(t.states):[]}).filter(function(t){return wc(t,2)[1].contains(r)}).map(function(t){return wc(t,1)[0]}),t.a(2,Mc("FORM_NOT_IN_VIEW",n.formId,o));case 2:if(i=n.inputSchema&&n.inputSchema.properties||{},a=n.inputSchema&&n.inputSchema.required||[],!(s=a.filter(function(t){return void 0===e[t]||""===e[t]||null===e[t]})).length){t.n=3;break}return t.a(2,Mc("MISSING_REQUIRED",s,Object.keys(i)));case 3:c=[],u=[],d=[],h=function(t){return"SELECT"===t.tagName?Ec(t.options).map(function(t){return t.value}):[]},p="input, select, textarea",y=function(t){var e=r.querySelector('[name="'.concat(t,'"], #').concat(CSS.escape(t)));return!e||e.matches(p)?e:e.querySelector(p)},m=xc().m(function t(){var n,o,i,a,s,l;return xc().w(function(t){for(;;)switch(t.n){case 0:if(n=b[v],void 0!==e[n]){t.n=1;break}return t.a(2,0);case 1:if(o=e[n],i=y(n)){t.n=2;break}return d.push(n),t.a(2,0);case 2:if("checkbox"!==i.type){t.n=3;break}i.checked=!!o,t.n=7;break;case 3:if("radio"!==i.type){t.n=6;break}if(a=Ec(r.querySelectorAll('[name="'.concat(n,'"]'))),!(s=a.find(function(t){return t.value===String(o)}))){t.n=4;break}s.checked=!0,t.n=5;break;case 4:return u.push({field:n,got:null,valid:a.map(function(t){return t.value})}),t.a(2,0);case 5:t.n=7;break;case 6:i.value=String(o);case 7:i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),l="checkbox"===i.type?i.checked:"radio"===i.type?String(o):i.value,("checkbox"===i.type?!!o===l:String(o)===l)?c.push(n):u.push({field:n,got:l,valid:h(i)});case 8:return t.a(2)}},t)}),v=0,b=Object.keys(i);case 4:if(!(v<b.length)){t.n=7;break}return t.d(gc(m()),5);case 5:if(0!==t.v){t.n=6;break}return t.a(3,6);case 6:v++,t.n=4;break;case 7:if(!u.length&&!d.length){t.n=8;break}return t.a(2,Oc(Oc({},Mc("FIELD_NOT_SET",[].concat(Ec(u.map(function(t){return t.field})),d),[].concat(Ec(u.map(function(t){return t.valid.length?'"'.concat(t.field,'" accepts ').concat(t.valid.map(function(t){return JSON.stringify(t)}).join(", ")):'"'.concat(t.field,'" did not take the value given')})),Ec(d.map(function(t){return'"'.concat(t,'" is named by the schema but no control in the form carries it')}))))),{},{filled:c,submitted:null}));case 8:if("function"==typeof r.requestSubmit){t.n=9;break}return r.submit(),t.a(2,{ok:!0,submitted:n.formId,filled:c});case 9:if(g=r.ownerDocument.defaultView,w=!1,x=function(t){t.target===r&&(w=!0)},g.addEventListener("submit",x,!0),r.requestSubmit(),g.removeEventListener("submit",x,!0),w){t.n=10;break}return k=Object.keys(i).map(function(t){return[t,y(t)]}).filter(function(t){var e=wc(t,2)[1];return e&&e.willValidate&&!e.validity.valid}).map(function(t){var e=wc(t,2);return{field:e[0],message:e[1].validationMessage}}),t.a(2,Oc(Oc({},Mc("NOT_SUBMITTED",n.formId,k)),{},{filled:c,submitted:null}));case 10:return t.a(2,{ok:!0,submitted:n.formId,filled:c})}},t)})),function(){return b.apply(this,arguments)})},j="undefined"!=typeof document&&document.modelContext?document.modelContext:"undefined"!=typeof navigator&&navigator.modelContext?navigator.modelContext:null,E=!1;if(j&&"function"==typeof j.registerTool){var T,_=Cc(a);try{var C=function(){var t=T.value;try{j.registerTool({name:t.name,description:t.description,inputSchema:t.inputSchema,execute:function(e){return O[t.kind](e,t)}}),E=!0}catch(e){console.warn("[nodality] agent surface: tool rejected",t.name,e)}};for(_.s();!(T=_.n()).done;)C()}catch(t){_.e(t)}finally{_.f()}}return{manifest:s,tools:a,registered:E,destroy:function(){if(j&&"function"==typeof j.unregisterTool){var t,e=Cc(a);try{for(e.s();!(t=e.n()).done;){var n=t.value;try{j.unregisterTool(n.name)}catch(t){}}}catch(t){e.e(t)}finally{e.f()}}if("undefined"!=typeof document){var r=document.getElementById(Rc);r&&r.remove()}}}}function Fc(t,e){return Bc(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||zc(t,e)||Lc()}function Lc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function zc(t,e){if(t){if("string"==typeof t)return Nc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nc(t,e):void 0}}function Nc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Bc(t){if(Array.isArray(t))return t}function Wc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Uc(t,e,n){return(e=function(t){var e=function(t){if("object"!=qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qc(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qc(t){return qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qc(t)}var Hc=Object.freeze({src:"url",href:"url",options:"items"}),Gc=(new Set(Object.values(Hc)),function(t,e){if(Array.isArray(t))return t.map(function(t){return Gc(t,e)});if(!t||"object"!==qc(t))return t;for(var n=e(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wc(Object(n),!0).forEach(function(e){Uc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t)),r=0,o=["children","items"];r<o.length;r++){var i=o[r];void 0!==n[i]&&(n[i]=Gc(n[i],e))}return n});function Xc(t){return function(t){return Gc(t,function(t){if("table"!==t.type||!Array.isArray(t.items)||t.items.length<2)return t;if(!t.items.every(function(t){return Array.isArray(t)}))return t;var e,n=Bc(e=t.items)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||zc(e)||Lc(),r=n[0],o=n.slice(1);return r.every(function(t){return"string"==typeof t||"number"==typeof t})?(t.items=o.map(function(t){return Object.fromEntries(r.map(function(e,n){return[String(e),t[n]]}))}),t):t})}(function(t){return Gc(t,function(t){for(var e=0,n=Object.entries(Hc);e<n.length;e++){var r=Fc(n[e],2),o=r[0],i=r[1];Object.prototype.hasOwnProperty.call(t,o)&&(Object.prototype.hasOwnProperty.call(t,i)||(t[i]=t[o]),delete t[o])}return t})}(t))}Object.freeze(Object.keys(Hc)),new Set(["h1.size","h2.size","h3.size","h4.size","h5.size","h6.size","p.size","a.transform","checkbox.exact","checkbox.area","checkbox.background","checkbox.color","checkbox.cursor","checkbox.height","checkbox.keySet","checkbox.mar","checkbox.maxWidth","checkbox.pad","checkbox.transform","checkbox.width","circle.transform","code.transform","filePicker.radius","labelInput.color","labelInput.exact","nav.size","nav.transform","polygon.transform","radio.color","radio.exact","sideNav.exact","sideNav.area","sideNav.background","sideNav.color","sideNav.cursor","sideNav.height","sideNav.keySet","sideNav.mar","sideNav.maxHeight","sideNav.maxWidth","sideNav.opacity","sideNav.pad","sideNav.radius","sideNav.size","sideNav.transform","sideNav.width","sideNav.zIndex","table.transform"]);[].concat(["op","target","range","style","duration"],["filter","gradient","color","width"]),new Set(["ulist"]),new Set(["h1","h2","h3","h4","h5","h6"]);function Vc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Jc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vc(Object(n),!0).forEach(function(e){Yc(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vc(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Yc(t,e,n){return(e=$c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $c(t){var e=function(t){if("object"!=Qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qc(e)?e:e+""}function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}var Kc="$ref",Zc=function(t){return!!t&&"object"===Qc(t)&&!Array.isArray(t)&&"string"==typeof t[Kc]};function tu(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if(!e||"object"!==Qc(e))return t;var r=function(t){if(Array.isArray(t))return t.map(r);if(!t||"object"!==Qc(t))return t;if(Zc(t)){var o=t[Kc];if(!Object.prototype.hasOwnProperty.call(e,o))return t;if(n.has(o))return t;var i=new Set(n).add(o),a=tu([e[o]],e,i)[0],s=(t[Kc],function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,[Kc].map($c)));return Object.keys(s).length?Jc(Jc({},a&&"object"===Qc(a)?a:{}),s):a}for(var l=Jc({},t),c=0,u=["children","items"];c<u.length;c++){var f=u[c];void 0!==l[f]&&(l[f]=r(l[f]))}return l};return Array.isArray(t)?t.map(r):t}function eu(t){return function(t){if(Array.isArray(t))return au(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||iu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ru(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(e){ou(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ou(t,e,n){return(e=function(t){var e=function(t){if("object"!=su(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=su(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==su(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iu(t,e){if(t){if("string"==typeof t)return au(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?au(t,e):void 0}}function au(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function su(t){return su="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(t)}var lu=function(t){return"string"==typeof t&&"#"===t.charAt(0)?t.slice(1):null==t?t:String(t)};var cu=function(t){return"number"==typeof t?Math.round(t):parseInt(t,10)};function uu(t,e){var n=[],r=[],o=new Map;if((Array.isArray(e)?e:[]).forEach(function(t,e){if(t&&t.op&&"object"===su(t.op)&&"arrange"===t.op.name){var n=function(t){if(!Array.isArray(t)||2!==t.length)return null;var e=cu(t[0]),n=cu(t[1]);return!Number.isFinite(e)||!Number.isFinite(n)||e<0||n<e?null:[e,n]}(t.range),i=Array.isArray(t.target)?t.target:[];if(n&&i.length){var a,s=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=iu(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(i);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=lu(String(l)),u=o.get(c)||[],f=u.find(function(t){return e=t.range,r=n,e[0]<=r[1]&&r[0]<=e[1];var e,r});f?r.push({node:e,target:c,reason:"overlaps node ".concat(f.node)}):(u.push({node:e,mode:t.op.mode||"column",range:n}),o.set(c,u))}}catch(t){s.e(t)}finally{s.f()}}else r.push({node:e,reason:"needs target and range [lo, hi]"})}}),!o.size)return{elements:t,applied:n,skipped:r};var i=function(t){if(!Array.isArray(t))return t;var e=!1,a=t.map(function(t){if(!t||"object"!==su(t))return t;var a=function(t){var e=null==t.id?null:lu(String(t.id)),i=e&&o.get(e);if(!i)return t;var a=function(t){return"row"===t.type?"row":"cards"===t.type?"cards":"nav"===t.type?"nav":null}(t),s=i.slice().sort(function(t,e){return t.range[0]-e.range[0]});if(("row"===a||"cards"===a)&&i.every(function(t){return"column"===t.mode||"row"===t.mode})){var l=s.map(function(t){var e={breakpoint:[t.range[0],t.range[1]],flexDirection:t.mode};return"cards"===a&&"column"===t.mode&&(e.alignItems="center"),e});i.forEach(function(t){return n.push({node:t.node,target:e,via:"resprop"})});var c=ru(ru({},t),{},{resprop:[].concat(eu(Array.isArray(t.resprop)?t.resprop.map(function(t){return ru({},t)}):[]),eu(l))});return"cards"===a&&(c.colat=!1),c}if("nav"===a&&i.every(function(t){return"collapse"===t.mode||"expand"===t.mode})){var u=s.filter(function(t){return"collapse"===t.mode}),f=s.filter(function(t){return"expand"===t.mode}),d=null;if(u.length||1!==f.length||0!==f[0].range[0]){if(1===u.length&&0===u[0].range[0]){var h=u[0].range[1];f.length?1===f.length&&f[0].range[0]===h+1&&(d=h+1):d=h>=99999?99999:h+1}}else d=0;return null!==d?(i.forEach(function(t){return n.push({node:t.node,target:e,via:"breakpoint"})}),ru(ru({},t),{},{breakpoint:"".concat(d,"px")})):(i.forEach(function(t){return r.push({node:t.node,target:e,reason:"a nav collapses below one width and expands above it; these ranges say otherwise"})}),t)}return i.forEach(function(n){return r.push({node:n.node,target:e,reason:'mode "'.concat(n.mode,'" does not apply to ').concat(t.type)})}),t}(t),s=i(t.children);return s!==t.children&&(a=ru(ru({},a===t?t:a),{},{children:s})),a!==t&&(e=!0),a});return e?a:t};return{elements:i(t),applied:n,skipped:r}}function fu(t){return fu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(t)}function du(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hu(r.key),r)}}function hu(t){var e=function(t){if("object"!=fu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fu(e)?e:e+""}var pu=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"cards",value:function(t,e,n){for(var r=[],o=0;o<t.children.length;o++){var i=t.children[o];"text"===i&&this.insertTextToCard(r,e,t,n),"image"!==i||t.backgroundCard||r.push('\n new Image("https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg").set({})'),"link"===i&&(e.op?r.push("\n ".concat(n.tabSpace(6)," ").concat(n.link[e.op.theme.toLowerCase()].code)):r.push("\n ".concat(n.tabSpace(6)," ").concat(n.link.base.code)))}return r}},{key:"insertTextToCard",value:function(t,e,n,r){if(e.op)if(e.op.ops&&e.op.ops.includes("text-blast")){var o="\n ".concat(r.tabSpace(6)," ").concat(r.text[e.op.theme.toLowerCase()].code),i=r.ops[e.op.theme.toLowerCase()].blast.code;n.backgroundCard||(i=r.ops[e.op.theme.toLowerCase()].blastFun(1));var a=this.insertTextBetween(o,i);t.push(a)}else t.push("\n ".concat(r.tabSpace(6)," ").concat(r.text[e.op.theme.toLowerCase()].code));else t.push("\n ".concat(r.tabSpace(6)," ").concat(r.text.base.code))}},{key:"insertTextBetween",value:function(t,e){var n=t.match(/(color: ".+?",)(.+?)(id: ".+?")/);if(n){var r=n.index+n[0].length;return t.slice(0,r)+", "+e+", "+t.slice(r)}return t}}],null&&du(t.prototype,null),e&&du(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function yu(t,e){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yu(t,e)}function mu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mu=function(){return!!t})()}function vu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function bu(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vu(Object(n),!0).forEach(function(e){gu(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function gu(t,e,n){return(e=Eu(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wu(t){return function(t){if(Array.isArray(t))return Su(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ku(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ku(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function ku(t,e){if(t){if("string"==typeof t)return Su(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Su(t,e):void 0}}function Su(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ou(t){return Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(t)}function ju(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Eu(r.key),r)}}function Eu(t){var e=function(t){if("object"!=Ou(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ou(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ou(e)?e:e+""}var Tu=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),kt.clear(),this.items=[],this.options=[],this.code=[],this.ready2Render=[],this._built=[],this._owned=[],this.stor={text:{miami:{code:'new Text("Hello").set({fluidc: "S3", color: "orange"})'},base:{code:'new Text("Hello").set({fluidc: "S3", color: "orange"})'},nepal:{code:'new Text("Hello").set({fluidc: "S3", color: "#2ECC71", font: "Helvetica Neue"})'},patagonia:{code:'new Text("Hello").set({fluidc: "S3", color: "#3498DB", font: "DIN Alternate"})'}},complexa:{code:"new Wrapper()\n .set({...}) // Rest of the code omitted for brevity"},complex:{code:'new Wrapper() \n\t.set({\n\t\t\n\t\tresponsive: {\n\t\t\tranges: ["700px", "1200px", "1400px"],\n\t\t\tsequence: "col-row-col"\n\t\t}\n\t})\n\t.add([\n\t\tnew Image("img/wix.jpeg").set({\n\t\t\twidth: "100%",\n\t\t\theight: "200px",\n objectFit: "cover"\n\t\t}),\n\n new Wrapper().set({\n responsive: {\n\t\t\tranges: ["700px", "1200px", "1400px"],\n\t\t\tsequence: "col-col-row"\n\t\t}\n }).add([\n new Text("Running in the desert").set({\n size: "S3",\n font: "Arial",\n color: "orange"\n }),\n\n new Text("This is example content").set({\n exact: "1rem",\n font: "Arial"\n }),\n\n\n new Image("img/wix.jpeg").set({\n width: "100%",\n height: "300px",\n objectFit: "cover"\n })\n ])\n\t])'},ops:{miami:{blast:{code:'stroke: {range:["0px","3000px"], op:{name:"blast",color:"orange",width:"3px"}}'},blastFun:function(t){return'stroke: {range:["0px","3000px"], op:{name:"blast",color:"orange",width:"'.concat(t,'px"}}')}},nepal:{blast:{code:'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#2ECC71",width:"3px"}}'},blastFun:function(t){return'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#2ECC71",width:"'.concat(t,'px"}}')}},patagonia:{blast:{code:'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#1abc9c",width:"3px"}}'},blastFun:function(t){return'stroke: {range:["0px","3000px"], op:{name:"blast",color:"#1abc9c",width:"'.concat(t,'px"}}')}}},link:{miami:{code:'new Link("Link").set({text: "Hello", url: "#a", background: "", color: "orange", hover: {color: "white", background: "orange", animation: 0.6}, borderObj: {color: "orange", width: "3px", radius: "0.7rem"}, pad: { sides: ["all"], value: "0.6rem" }, mar: { "t": 0.8rem }, radius: "0.4rem"})'},base:{code:'new Link("Link").set({text: "Hello", url: "#ai", background: "#3498db", pad: [{lr: "0.5rem", tb: "1rem"}], radius: "0.4rem", color: "white"})'},nepal:{code:'new Link("Link").set({text: "Hello", url: "#a", background: "#2ECC71", pad: { sides: ["all"], value: "0.6rem" }, mar: { sides: ["top", "bottom"], value: "0.8rem" }, hover: {color: "#2ECC71", background: "white", border: true, animation: 0.3}, color: "white"})'},patagonia:{code:'new Link("Link", "#a").set({text: "Hello", url: "#a", background: "#1ABC9C", pad: { sides: ["all"], value: "0.6rem" }, mar: { sides: ["top", "bottom"], value: "0.8rem" }, hover: {color: "#2ECC71", background: "white", border: true, animation: 0.3}, color: "white"})'}},grid:{code:' new AreaSwitcher()\n .set({\n gap: "1rem"\n })\n .react([{\n at: "0px",\n template: [\n "eeeeee",\n "eeeeee",\n "abbbbb",\n "abbbbb",\n "abbbbb",\n "cccccc",\n "cccccc",\n "dddddd"\n ]\n },\n\n {\n at: "900px",\n color: "orange",\n template: [\n "aaaccc",\n "aaaccc",\n "bbbbbb",\n "dddddd",\n "eeeeee"\n ]\n },\n\n {\n at: "1200px",\n color: "purple",\n template: [\n "cccaaa",\n "cccaaa",\n "bbbbbb",\n "dddddd",\n "eeeeee"\n ]\n },\n ])\n .add([\n new Wrapper().set({\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem"\n }).add([\n new Text("NEW PRODUCT").set({\n exact: "1rem",\n font: "Oswald",\n width: "100%"\n }),\n new Text("Feel").set({\n fluidc: "S2",\n font: "Oswald",\n width: "100%",\n color: "black"\n }),\n new Text("Speed").set({\n exact: "7rem",\n font: "Oswald",\n width: "100%",\n color: "#3498db"\n }),\n ]),\n\n new Wrapper().set({\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem"\n }).add([\n new Text("TOP QUALITY").set({\n exact: "1rem",\n font: "Oswald",\n width: "100%"\n }),\n new Text("Amazing animals").set({\n fluidc: "S2",\n font: "Oswald",\n width: "100%",\n color: "black"\n }),\n\n new Text("Seals are intelligent, agile marine mammals found in oceans around the world, known for their streamlined bodies, flippers, and ability to thrive both in water and on land. Belonging to the pinniped family, they are divided into true seals, which lack external ears, and eared seals like sea lions, which are more mobile on land. Seals feed primarily on fish and squid, using their sensitive whiskers to detect prey underwater, and can dive to great depths while holding their breath for extended periods. Adapted to cold environments with thick blubber for insulation, seals play a crucial role in marine ecosystems but face threats from climate change, pollution, and human activity, making conservation efforts increasingly important.")\n .set({\n font: "Arial",\n exact: "1.3rem"\n })\n\n ]),\n\n new Wrapper().set({\n radius: "1.7rem",\n overflow: "hidden"\n\n }).add([\n\n new Image("https://cdn.pixabay.com/photo/2017/02/09/18/40/seal-2053165_640.jpg", "exact").set({\n width: "100%",\n height: "420px",\n minHeight: "100px",\n objectFit: "cover"\n\n })\n ]),\n\n new Wrapper().set({\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem",\n }).add([\n new Text("Welcome seals").set({\n fluidc: "S3",\n font: "Oswald",\n color: "black"\n }),\n \n ]),\n new Wrapper().set({\n mc: true,\n pad: [{\n a: 20\n }],\n background: "#ecf0f1",\n radius: "1.7rem",\n\n }).add([new Text("Top line").set({\n font: "Arial",\n exact: "1.3rem"\n }), ]),\n ])'},flexRow:function(t){return{image:{code:'new FlexRow().set({border: ["all", "3px"], colat: "600px"}).items([new Image(...), new Image(...), new Image(...)])'},text:{code:'new FlexRow().set({}).items([\n\nnew Text("This").set({\n size: "S3"\n}), \n\nnew Text("is").set({\n size: "S3",\n text: "Hello"\n}), \n\nnew Text("row.").set({\n size: "S3",\n text: "Hello"\n})\n \n])'}}},tabSpace:function(t){return" ".repeat(t)}}}return e=t,n=[{key:"at",value:function(e){Array.isArray(this.options)||(this.options=[]),Array.isArray(this.protoOptions)||(this.protoOptions=[]);var n=t.cloneNodes([e])[0];return this.options.push(n),this.protoOptions.push(n),this}},{key:"nodes",value:function(e){return this.options=t.cloneNodes(e),this.protoOptions=t.cloneNodes(e),this}},{key:"getElType",value:function(t){return"p"===t?"S6":"S".concat(t.substr(1))}},{key:"filtero",value:function(t,e,n){return n.filter(function(e){return e.op.name===t}).filter(function(t){return!t.target||t.target.includes(e)})[0]}},{key:"add",value:function(t){var e="undefined"!=typeof globalThis&&globalThis.__NODALITY_DEV__&&"object"===Ou(globalThis.__NODALITY_DEV__)?globalThis.__NODALITY_DEV__:null;e&&(e.inDes=!0);var n=_t._owner;_t._owner=this._owned;try{return this._add(t)}finally{_t._owner=n,e&&(e.inDes=!1)}}},{key:"destroy",value:function(){var t,e=this,n=xu(this._owned.splice(0).reverse());try{for(n.s();!(t=n.n()).done;){var r=t.value;try{r&&"function"==typeof r.destroy&&r.destroy()}catch(t){}}}catch(t){n.e(t)}finally{n.f()}var o,i=xu([].concat(this._morphs||[]));try{for(i.s();!(o=i.n()).done;){var a=o.value;try{a&&"function"==typeof a.destroy&&a.destroy()}catch(t){}}}catch(t){i.e(t)}finally{i.f()}this._morphs=null;try{this._agentSurface&&"function"==typeof this._agentSurface.destroy&&this._agentSurface.destroy()}catch(t){}this._agentSurface=null;for(var s=0,l=[this._codeEl,this._preEl];s<l.length;s++){var c=l[s];c&&c.parentNode&&c.parentNode.removeChild(c)}var u="undefined"!=typeof globalThis&&globalThis.__NODALITY_DEV__;return u&&Array.isArray(u.pages)&&(u.pages=u.pages.filter(function(t){return!e._devEntry||t!==e._devEntry})),this._built=[],this.ready2Render=[],this}},{key:"_add",value:function(e){var n=this,r=function(t){var e=[],n=function(t,r){if(Array.isArray(t))return t.forEach(function(t,e){return n(t,"".concat(r,"[").concat(e,"]"))});if(t&&"object"===Qc(t))if(Zc(t))e.push({name:t[Kc],path:r});else for(var o=0,i=["children","items"];o<i.length;o++){var a=i[o];void 0!==t[a]&&n(t[a],"".concat(r,".").concat(a))}};return n(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"elements"),e}(e=Xc(e=tu(Array.isArray(e)?e:[],this._defs))).filter(function(t){return!n._defs||!Object.prototype.hasOwnProperty.call(n._defs,t.name)});if(r.length){var o=Object.keys(this._defs||{});throw new Error('[nodality] no definition for $ref "'.concat(r[0].name,'" at ')+"".concat(r[0].path,". Defined: ").concat(o.length?o.join(", "):"(none)"))}if(Array.isArray(this.options)&&this.options.some(function(t){return t&&t.op&&"arrange"===t.op.name})){var i=uu(e,this.options);e=i.elements;var a,s=xu(i.skipped);try{for(s.s();!(a=s.n()).done;){var l=a.value;"undefined"!=typeof console&&console.warn("[nodality] arrange node ".concat(l.node).concat(l.target?' on "'.concat(l.target,'"'):""," ignored: ").concat(l.reason,"."))}}catch(t){s.e(t)}finally{s.f()}}this.css=[],this.elCSS=[],this.elHTML=[];var c=this.options;c.forEach(function(t){"radial"===t.direction&&(t.gradient="radial-gradient(orange, green)")}),e=[].concat(wu(e.filter(function(t){return t&&("nav"===t.type||"sideNav"===t.type)})),wu(e.filter(function(t){return!t||"nav"!==t.type&&"sideNav"!==t.type}))),this._elements=e;for(var u,f,d=function(){var r=e[h],o=null,i=n.ready2Render.length,a=n.code.length,s=["blast","gradient","shadow","filter","animation","transform","span"],l=[{op:{name:"blast",color:"green",width:"1px"}},{op:{name:"gradient",gradient:"linear-gradient(orange, green)"}},{op:{name:"shadow",color:"#1abc9c",steps:3,colors:["orange","green","yellow"]}},{op:{name:"filter",filter:"grayscale(0.7)"}},{op:{name:"animation",color:"green",width:"1px",fireAt:"inview",keyframesOpen:[{transform:"translate(100%, 0%)",opacity:0},{transform:"translate(0%)",opacity:1}],keyframesClose:[{transform:"translate(0%)",opacity:1},{transform:"translate(100%, 0%)",opacity:0}],openOptions:{duration:300,fill:"forwards",delay:1e3},closeOptions:{duration:1,fill:"forwards",delay:1e3}}},{op:{name:"transform",values:["ty:-20px","scale(3)","rotate(3deg)","skew(3deg, 0deg)","perspective(100px)","matrix(1, 0, 0, 1, 50, 50)"]}},{op:{name:"span",parts:[{text:"The first time",style:{italic:!0,arrpad:{sides:["left"],value:"3rem"},stroke:{range:["950px","1000px"],op:{name:"blast",background:["header","button"],color:"yellow",width:"1px"}}}},{text:"We went to the Moon",style:{}}]}}];for(f=0;f<s.length;f++){var d=c.map(function(t){return t.op}).map(function(t,e){return t===s[f]?e:""}).filter(String);if(d.length>0)for(u=0;u<d.length;u++){var p=d[u],y=c[p].target,m=c[p].range,v=c[p].filter,b=c[p].gradient,g=c[p].color,w=c[p].width,x=t.cloneNodes([l[f]])[0];x.target=y,null!=m&&(x.range=m),null!=v&&(x.op.filter=v),null!=b&&(x.op.gradient=b),"blast"===s[f]&&(null!=g&&(x.op.color=g),null!=w&&(x.op.width=w)),c[p]=x}}for(f=0;f<c.length;f++){var k=c[f].op.name,S=n.protoOptions[f].style||"default",O=n.protoOptions[f].duration||"default";if("transform"===k){var j,E,T,_;_="SOLARIUM"===S?["scale(3)"]:"WAVE"===S?["skew(15deg, 0deg)","tx:50px","rotate(10deg)","scale(1.1)"]:"CUBE-SPIN"===S?["perspective(700px)","scale(0.9)"]:"TORNADO-SWITCH"===S?["rotate(720deg)","scale(0.8)","tx:30px","ty:-50px","tz:-80px"]:"LASER-SWEEP"===S?["tx:100px","opacity:0.2","scale(1.2, 1.0)"]:"TORNADO-TWIST"===S?["rotate(720deg)","scale(0.8)","tx:30px","ty:-50px","skew(10deg, 0deg)"]:"JELLY-WOBBLE"===S?["scale(1.2, 0.8)","rotate(5deg)","ty:-10px","skew(5deg, 0deg)"]:"DRUNKEN-SWAY"===S?["rotate(15deg)","tx:20px","ty:-10px","skew(10deg, 5deg)"]:"FLAME-FLICKER"===S?["scale(1.1, 0.9)","rotate(-5deg)","ty:5px","opacity:0.7"]:"PHANTOM-SHIFT"===S?["tx:15px","ty:-5px","opacity:0.5","skew(5deg, 5deg)"]:"RUBBER-BOUNCE"===S?["scale(1.3, 0.8)","skew(10deg, 0deg)","ty:-20px"]:"ASTEROID-CRASH"===S?["tx:-80px","ty:100px","rotate(45deg)","scale(0.7)","opacity:0.5"]:"CYBER-GLITCH"===S?["tx:5px","ty:-5px","rotate(3deg)","opacity:0.6","scale(1.05)"]:"BUBBLE-POP"===S?["scale(1.5)","opacity:0.3","ty:-20px"]:"SUPERNOVA-BURST"===S?["scale(2)","opacity:0","tx:50px","ty:-50px"]:"GRAVITY-DROP"===S?["ty:100px","scale(0.8)","rotate(10deg)","skew(0deg, 10deg)"]:"LASER-SWEEP"===S?["tx:100px","opacity:0.2","scale(1.2, 1.0)"]:"VORTEX-SINK"===S?["rotate(-360deg)","scale(0.5)","ty:50px"]:"SHOCKWAVE"===S?["scale(1.7)","opacity:0.4","skew(5deg, 5deg)"]:["ty:20px","tx:30px","rotate(3deg)","skew(40deg, 0deg)"],c[f].op={name:"transform",values:_,duration:O};var C,A="style",P="duration";null!==(j=c[f])&&void 0!==j&&j.op&&A in c[f].op&&delete c[f].op[A],null!==(E=c[f])&&void 0!==E&&E.op&&P in c[f].op&&delete c[f].op[P],null!==(T=c[f])&&void 0!==T&&T.op.values&&null!==(C=c[f])&&void 0!==C&&C.op.values}}!function t(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if("object"===Ou(e[o])&&null!==e[o])t(e[o]);else if("string"==typeof e[o])switch(e[o].toLowerCase()){case"medium":e[o]="6s-ease-in-out";break;case"fast":e[o]="3s-ease-in-out";break;case"slow":e[o]="9s-ease-in-out";break;case"default":delete e[o]}}}(c),["h1","h2","h3","h4","h5","h6","p"].includes(r.type)||"img"===r.type||"a"===r.type?((o=fl.mapType({el:r,customOptions:c,i:h})).toCode?n.code.push(o.toCode().join("")):n.code.push(o),n.ready2Render.push(o),o=o.render()):"table"===r.type?(o=fl.mapType({el:r,customOptions:c,i:h,storage:n.stor}),n.code.push(o.toCode())):"slider"===r.type?n.code.push(' \nlet texts = [\n\nnew Text("One").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n /*new Image().set({\n url: "https://image.datart.cz/foto/500/7/0/8/product_7766807.jpg",\n width: "400px",\n height: "auto"\n }),*/\n\n new Text("Two").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n \n new Text("Three").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n\n new Text("Four").set({size: "S1", color: "#1abc9c", font: "Arial"}),\n];\n\nnew Slider(texts, null, { tintColor: "#e74c3c", inactiveColor: "#ccc" })\n \n'):"hslider"===r.type?n.code.push('\n new HScroller()\n .seto({\n height: "300px",\n speed: 1.0 // the bigger the slower\n })\n .add([\n new Text("First").set({size: "S1", pad: [{"a": 40}] }),\n new Text("Second").set({size: "S1", pad: [{"a": 40}] }),\n new Text("Third").set({size: "S1", pad: [{"a": 40}] })\n ])\n '):"grid"===r.type?n.code.push(n.stor.grid.code):"modal"===r.type?n.code.push('new Code()\n .set({\n pad: [\n { l: 30 },\n ], \n mar: [\n { a: 30 },\n ], \n class: "language-js",\n code: `\n // You need to copy and paste this example\n\n\n import {Animator} from "../layout/animator.js";\n import {Text} from "../layout/text.js";\n import {Modal} from "../layout/modal-2025.js";\n import {Stack} from "../layout/stack.js";\n import {Image} from "../layout/image.js";\n import {FlexRow} from "../layout/flex-row.js";\n import {Button} from "../layout/button.js";\n import {Spacer} from "../layout/spacer.js";\n import {Wrapper} from "../layout/container.js";\n \n \n let firstLong = "Apple today announced that the company has surpassed a 60 percent reduction in its global greenhouse gas emissions compared to 2015 levels, as part of its Apple 2030 goal to become carbon neutral across its entire footprint in the next five years. The company achieved several other major environmental milestones, including the use of 99 percent recycled rare earth elements in all magnets and 99 percent recycled cobalt in all Apple-designed batteries.1 Apple shared this and other progress in its annual Environmental Progress Report, published today.\n “We’re incredibly proud of the progress we’re making toward Apple 2030, which touches every part of our business,” said Lisa Jackson, Apple’s vice president of Environment, Policy, and Social Initiatives. “Today, we’re using more clean energy and recycled materials to make our products than ever before, we’re preserving water and preventing waste around the world, and we’re investing big in nature. As we get closer to 2030, the work gets even harder — and we’re meeting the challenge with innovation, collaboration, and urgency.\n Apple’s 2030 strategy prioritizes cutting greenhouse gas emissions by 75 percent compared with its 2015 baseline year, before applying high-quality carbon credits to balance the remaining emissions. Last year, Apple’s comprehensive efforts to reduce its carbon footprint — including the continued transition of its supply chain to renewable electricity and designing products with more recycled materials — avoided an estimated 41 million metric tons of greenhouse gas emissions.";\n \n let elements = [\n new Stack()\n .setup({})\n .add([\n new Image("https://pbs.twimg.com/media/DwYvbCBVAAEKY_R.jpg").set({}),\n \n new FlexRow().set({aligns: "start"}).items([\n \n new Button("×")\n \n .set({\n fluidc: "S3",\n onTap: () => modal.close(),\n frame: { width: 80, height: 80 },\n color: "white",\n background: "none"\n }),\n \n new Spacer(true),\n ])\n ]),\n \n \n new Text("Samuel Suresh")\n .set({\n color: "#00ae56",\n font: "SF Pro Display",\n fluidc: "S2",\n pad: [{"tl": 20}]\n }),\n \n \n new Text("Studying Science and Business, Western Sydney University, class of 2022")\n .set({\n font: "Arial",\n fluidc: "S6",\n pad: [{"l": 20}]\n }),\n \n \n new Text(firstLong)\n .set({\n font: "Arial",\n fluidc: "S6",\n pad: [{"l": 20}]\n }), \n ];\n \n \n let wrapper = new Wrapper()\n .set({})\n .add(elements);\n \n \n let modal = new Modal();\n modal\n .set({\n width: "600px", \n background: "#469d73cc",\n close: true\n })\n .add([wrapper])\n .render("#res"); \n \n \n new Button("Wow")\n .set({\n fluidc: "S3",\n onTap: () => modal.show()\n })\n .render("#res");\n \n `\n })'):"row"===r.type?(o=fl.mapType({el:r,customOptions:c,i:h,storage:n.stor}),n.code.push(o.toCode())):"cards"===r.type?(o=fl.mapType({el:r,customOptions:c,i:h,storage:n.stor}))&&"object"===Ou(o)&&"function"==typeof o.toCode?(n.code.push([].concat(o.toCode()).join("")),n.ready2Render.push(o)):n.code.push(o):"wrap"===r.type?(o=fl.mapType({el:r,customOptions:c,i:h,storage:n.stor}),n.code.push(o.toCode()),n.ready2Render.push(o)):"responsive"===r.type?n.code.push(n.stor.complex.code):"free"===r.type||"nav"===r.type||"sideNav"===r.type||"dropdown"===r.type?(o=fl.mapType({el:r,customOptions:c,i:h,storage:n.stor}),n.code.push(o.toCode()),n.ready2Render.push(o),o=o.render()):((o=fl.mapType({el:r,customOptions:c,i:h,storage:n.stor})).toCode?n.code.push(o.toCode()):n.code.push(o),n.ready2Render.push(o),o=o.render());var R=n.ready2Render.length>i?n.ready2Render[n.ready2Render.length-1]:null,I=!R&&o&&"object"===Ou(o)&&"function"==typeof o.render&&"function"==typeof o.toCode&&["table","row"].includes(r.type)?o:null,M=R&&"object"===Ou(R)&&"function"==typeof R.render?R:I;n._built.push({instance:M,codeCount:n.code.length-a})},h=0;h<e.length;h++)d();return this}},{key:"toTextArea",value:function(t){var e=t||"#mount",n=document.createElement("textarea");n.style.width=300,n.style.height=300,n.setAttribute("id","elements"),n.value=this.code.join(";\n\n"),this.target="#elements";var r=document.createElement("pre"),o=document.createElement("code"),i=this.code.map(function(t){return"".concat(t,'.render("').concat(e,'"); \n \n')});return this.code=i,o.textContent=this.code,r.appendChild(o),r.setAttribute("class","nonLayout"),document.body.appendChild(r),document.body.appendChild(n),this._codeEl=n,this._preEl=r,this}},{key:"defs",value:function(t){if(void 0!==this._elements)throw new Error("[nodality] .defs() must come before .add(): add() renders as it goes, so definitions given afterwards cannot be used. Chain it as new Des().defs({ ... }).nodes(N).add(E)");return this._defs=t&&"object"===Ou(t)&&!Array.isArray(t)?t:{},this}},{key:"set",value:function(t){if("undefined"!=typeof globalThis&&!0===globalThis.NODALITY_EMIT){var e=this.code.map(function(e){return"".concat(e,'.render("').concat(t&&t.mount||"#mount",'")')});return globalThis.__NODALITY_EMITTED__=e,this}this.toTextArea(t&&t.mount),this._codeEl.style.display="none",this._preEl.style.display="block",!1===t.elements&&(this._preEl.style.display="none"),!1===t.layout&&null!=document.querySelector("#layoutPre")&&(document.querySelector("#layoutPre").style.display="none"),!1===t.code&&(this._preEl.style.display="none");var n={FloatingInput:ia,Range:ca,RadioGroup:ha,Picker:wa,FilePickera:Ta,DataList:Ma,Base:Ft,Form:Ba,Button:Ji,Slider:Ki,Video:Pi,Checkbox:bi},r={ElementMapper:fl,Animator:_t,LinkStyler:Ha,CardGen:pu,AreaSwitcher:Qa},o=bu(bu(bu({},{Text:Xt,Image:re,Link:he,FlexRow:Se,UINavBar:Le,Free:cn,Audio:vn,Progress:On,Center:Pn,Code:Nn,Stack:Xn,Wrapper:rr,MetaAdder:ur,Table:wr,Dropdown:Cr,Modal:Fr,TextField:qr,Card:Qr,Wrap:oo,FlexGrid:ho,ZoomCard:wo,Switcher:ni,MobileBar:Go,DesktopBar:Do,SideNav:tn,Spacer:ui,HScroller:Al,Polygon:ls,Circle:vs,UList:Wi,GridOverlay:Ls,Shop:$s}),n),r),i="undefined"!=typeof globalThis&&globalThis.__NODALITY_DEV__&&"object"===Ou(globalThis.__NODALITY_DEV__)?globalThis.__NODALITY_DEV__:null;i&&(i.inDes=!0);var a=function(t){return function(t,e,n){if(mu())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&yu(o,n.prototype),o}(Function,wu(Object.keys(o)).concat([t])).apply(void 0,wu(Object.values(o)))},s=_t._owner;_t._owner=this._owned;try{var l,c=t&&t.mount||"#mount",u=0,f=xu(this._built);try{for(f.s();!(l=f.n()).done;){var d=l.value;if(d.instance)d.instance.render(c),u+=d.codeCount;else for(var h=0;h<d.codeCount;h++,u++)a(this.code[u])}}catch(t){f.e(t)}finally{f.f()}}finally{_t._owner=s,i&&(i.inDes=!1)}try{var p=document.querySelector(t&&t.mount||"#mount");this._morphs=Kl(p,this._elements,this.protoOptions)}catch(t){console.warn("[nodality] morph node skipped:",t)}try{this._agentSurface=Dc({mount:document.querySelector(t&&t.mount||"#mount"),elements:this._elements,nodes:this.protoOptions,morphs:this._morphs})}catch(t){console.warn("[nodality] agent surface skipped:",t)}var y="undefined"!=typeof globalThis&&globalThis.__NODALITY_DEV__&&Array.isArray(globalThis.__NODALITY_DEV__.pages)?globalThis.__NODALITY_DEV__:null;try{(t&&t.annotate||y&&y.annotate)&&function(t,e){if(!t||!Array.isArray(e))return 0;for(var n=Array.from(t.children||[]),r=0;r<n.length&&r<e.length;r++)try{n[r].setAttribute("data-nod",JSON.stringify(e[r]))}catch(t){}}(document.querySelector(t&&t.mount||"#mount"),this._elements)}catch(t){console.warn("[nodality] round-trip annotation skipped:",t)}if(y)try{var m={mount:t&&t.mount||"#mount",elements:this._elements,nodes:this.protoOptions};this._devEntry=m,y.pages.push(m),"undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("nodality:rendered",{detail:m}))}catch(t){console.warn("[nodality] dev registration skipped:",t)}}}],r=[{key:"cloneNodes",value:function(t){if(!Array.isArray(t))return[];try{if("function"==typeof structuredClone)return structuredClone(t)}catch(t){}var e=function(t){if(Array.isArray(t))return t.map(e);if(t&&"object"===Ou(t)){var n={};for(var r in t)n[r]=e(t[r]);return n}return t};return t.map(e)}}],n&&ju(e.prototype,n),r&&ju(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function _u(t){return _u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_u(t)}function Cu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pu(r.key),r)}}function Au(t,e,n){return(e=Pu(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pu(t){var e=function(t){if("object"!=_u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_u(e)?e:e+""}var Ru=function(){return t=function t(e){var n=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Au(this,"scrollFunction",function(){void 0===n.flagValue&&(n.flagValue=0);var t=(n.html.scrollTop-n.flagValue)/(n.html.scrollHeight-window.innerHeight)*16,e=Math.min(n.frameCount-1,Math.ceil(t*n.frameCount));isNaN(e)&&(e=1),e<0&&(e=0),n.data.limit?e<n.data.limit&&requestAnimationFrame(function(){return n.updateImage(e+1)}):requestAnimationFrame(function(){return n.updateImage(e+1)}),window.matchMedia("(max-device-width: 415px)")}),Au(this,"currentFrame",function(t){return"".concat(n.data.path).concat(t.toString().padStart(4,"0"),".").concat(n.data.extension)}),Au(this,"preloadImages",function(){for(var t=1;t<n.frameCount;t++)document.createElement("img"),n.img.src=n.currentFrame(t)}),Au(this,"updateImage",function(t){n.img.src=n.currentFrame(t)}),this.fromFirstImageFlag=!1,this.flag=0,this.flagValue=e.flagValue,this.data=e,this.mask=e.mask,this.maskData=e.maskData,this.id=e.id,this.halfHeight=e.halfHeight,void 0===this.data.type?this.type="default":this.type=this.data.type,this.stickData=e.stickData,this.targetHeight=this.data.targetHeight,this.html=document.body,this.res=document.createElement("div"),void 0!==this.data.id&&null!==this.data.id&&this.res.setAttribute("id",this.data.id),this.res.style.border="1px solid green",this.res.style.width="100%",this.res.style.display="grid",this.res.style.position="sticky",this.res.style.top=0,this.res.style.alignSelf="flex-start",this.res.style.justifyContent="center",this.res.style.alignItems="center",this.data.added||(this.res.style.marginTop=this.data.noAddedDistance),this.frameCount=100,this.lastScrollTop=window.scrollY,this.setupTopElement(),this.scrollFunction(),window.addEventListener("scroll",function(){n.scrollFunction()}),this.preloadImages(),this},e=[{key:"marginTop",value:function(t){return this.res.style.marginTop=t,this}},{key:"toCode",value:function(){return[""]}},{key:"drawImageProp",value:function(t,e,n,r,o,i,a,s){2===arguments.length&&(n=r=0,o=t.canvas.width,i=t.canvas.height),(a="number"==typeof a?a:.5)<0&&(a=0),(s="number"==typeof s?s:.5)<0&&(s=0),a>1&&(a=1),s>1&&(s=1);var l,c,u,f,d=e.width,h=e.height,p=Math.min(o/d,i/h),y=d*p,m=h*p,v=1;y<o&&(v=o/y),Math.abs(v-1)<1e-14&&m<i&&(v=i/m),(l=(d-(u=d/((y*=v)/o)))*a)<0&&(l=0),(c=(h-(f=h/((m*=v)/i)))*s)<0&&(c=0),u>d&&(u=d),f>h&&(f=h),t.drawImage(e,l,c,u,f,n,r,o,i)}},{key:"maska",value:function(t){var e=this;return window.addEventListener("scroll",function(){e.innerMask(t)}),this}},{key:"innerMask",value:function(t){if(t){var e=smartRange(window.scrollY,{min:t.start,max:t.end},{min:0,max:7}),n=smartRange(window.scrollY,{min:t.start,max:t.end},{min:37,max:37});this.res.style.clipPath="inset(".concat(e,"% ").concat(e,"% round 0 0 ").concat(n,"px ").concat(n,"px)")}}},{key:"setupTopElement",value:function(){var t=this,e=document.createElement("canvas");if(e.style.gridArea="1/1",e.zIndex=1,e.style.display="grid",e.style.gridTemplate="1fr/1fr",e.style.justifyContent="center",e.style.alignItems="center",e.style.marginLeft="auto",e.style.marginRight="auto",this.context=e.getContext("2d"),this.context.canvas.width=window.innerWidth,this.context.canvas.height=1.2*window.innerHeight,this.img=document.createElement("img"),this.img.onload=function(){t.data.halfHeight?t.drawImageProp(t.context,t.img,0,0,window.innerWidth,window.innerHeight/2):t.drawImageProp(t.context,t.img,0,0,window.innerWidth,1.2*window.innerHeight)},window.addEventListener("resize",function(){t.context.canvas.width=window.innerWidth,t.context.canvas.height=1.2*window.innerHeight,t.drawImageProp(t.context,t.img,0,0,window.innerWidth,1.2*window.innerHeight)}),this.res.appendChild(e),this.data.text){var n=document.createElement("div");n.style.gridArea="1/1";var r=this.data.text.render();if(this.h2a=r,n.appendChild(r),n.setAttribute("id","rem"),this.data.hasRect){var o=document.createElement("div");o.style.width="30px",o.style.height="30px",o.style.backgroundColor="orange"}else for(var i=0;i<this.res.children.length;i++)"rem"===this.res.children[i].id&&this.res.removeChild(this.res.children[i]);this.res.appendChild(n)}this.lastScrollTop=0,this.count=1,this.isUp=!1,this.done=!1,this.fireOnce=!0,this.dec=1,this.tdec=1,this.atdec=0,this.textOpacity=1,this.res.children[this.res.children.length-1].children[0].style.opacity=0,this.data.text&&window.addEventListener("scroll",function(){t.h2a.style.backgroundColor="rgba(0, 0, 0, 0.8)",t.h2a.style.opacity=1}),window.addEventListener("scroll",function(e){if(t.data.stickyData&&t.data.stickyData.top){var n=t.data.stickyData.top;t.data.uncomment&&(window.scrollY>n?(wrapDiv.style.background="pink",wrapDiv.style.position="relative",wrapDiv.style.top=n):(wrapDiv.style.background="orange",wrapDiv.style.top=0,wrapDiv.style.position="fixed"))}var r=window.scrollY||document.documentElement.scrollTop;if(r>t.lastScrollTop?t.isUp=!1:t.isUp=!0,t.lastScrollTop=r<=0?0:r,t.isUp&&t.textOpacity<.98&&(t.textOpacity+=.01),!1===t.isUp&&t.textOpacity>.02&&(t.textOpacity-=.01),t.data.mask){var o=t.res,i=smartRange(window.scrollY,{min:t.data.maskData.start,max:t.data.maskData.end},{min:0,max:7});if(o.style.clipPath="inset(".concat(i,"% ").concat(i,"% round 20px)"),!t.hasH2){var a=document.createElement("div");a.style.background="#ecf0f1",a.style.width="86%",a.style.marginLeft="7%",a.style.borderRadius="1rem",t.hasH2=!0,a.appendChild(t.data.newSection.render()),o.parentElement.appendChild(a)}}t.data.targetHeight})}},{key:"setLazyText",value:function(t){var e=this;return this.lazyText=t,window.addEventListener("scroll",function(){for(var t=smartRange(window.scrollY,{min:e.lazyText.start,max:e.lazyText.end},{min:0,max:200}),n=smartRange(window.scrollY,{min:e.lazyText.start,max:e.lazyText.end},{min:0,max:1}),r=0;r<e.h2a.children[0].children.length;r++)e.h2a.children[0].children[r].style.transform="matrix(1, 0, 0, 1, 0, -".concat(t,")"),e.h2a.children[0].children[r].style.opacity="".concat(n-.2*r)}),this}},{key:"setProps",value:function(t){return t.targetHeight&&(this.data.targetHeight=t.targetHeight),t.flagValue&&(this.flagValue=t.flagValue),this}},{key:"fixedToRelative",value:function(t){this.data.uncomment=t}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"setOpacityRange",value:function(t){var e=this;return this.data.opacityRange=t.opacityRange,this.data.scaleRange=t.scaleRange,window.addEventListener("scroll",function(){var t=smartRange(window.scrollY,{min:e.data.opacityRange.start,max:e.data.opacityRange.end},{min:0,max:1});e.h2a.style.opacity=t;var n=smartRange(window.scrollY,{min:e.data.scaleRange.start,max:e.data.scaleRange.end},{min:3,max:1});window.matchMedia("(max-device-width: 415px)").matches||(e.h2a.children[0].style.transform="scale(".concat(n,")"))}),this}},{key:"stick",value:function(t){return t?(t.offset&&(null!=this.data.stickyData?this.data.stickyData.top=t.offset:this.data.stickyData={top:t.offset}),t.value?this.makeSticky():this.noSticky(),this):(this.makeSticky(),this)}},{key:"to100vh",value:function(){this.res.style.height="100vh"}},{key:"makeSticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"noSticky",value:function(){return this.res.style.position="",this}},{key:"toOpacity",value:function(t){this.res.style.opacity="".concat(t)}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],e&&Cu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Iu(t){return Iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(t)}function Mu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Du(r.key),r)}}function Du(t){var e=function(t){if("object"!=Iu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Iu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Iu(e)?e:e+""}var Fu=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.targetHeight=this.data.targetHeight,void 0===this.data.type?this.type="default":this.type=this.data.type,this.layout="flex",this.setup()},e=[{key:"toCode",value:function(){return[""]}},{key:"set",value:function(t){return t.arrayPadding&&(this.wrdiv.style.marginTop=t.arrayPadding.value),t.height&&(this.wrdiv.style.height=t.height),t.position&&(this.wrdiv.style.position=t.position),this}},{key:"setup",value:function(){var t=this,e=document.createElement("div");this.wrdiv=e,e.style.display="flex",e.style.flexDirection="column",this.data.overflow&&(e.style.overflow="hidden"),e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.height="900px",this.data.position?e.style.position=this.data.position:this.data.sticky||(e.style.position="fixed"),e.style.marginTop="0px";var n=document.createElement("img");n.style.gridArea="1/1",n.style.display="none",n.style.width="50%",n.setAttribute("class","m2"),e.appendChild(n),this.data.view&&(this.m2img=this.data.view.render(),e.appendChild(this.m2img)),this.data.paragraph&&(this.paragraph=this.data.paragraph.render(),e.appendChild(this.paragraph)),this.data.view&&(n.style.display="none");var r=document.createElement("h2");r.style.fontFamily="Arial",r.style.fontSize="2.4rem",r.style.background="linear-gradient(#3498db, #1abc9c)",r.style.webkitBackgroundClip="text",r.style.webkitTextFillColor="transparent";var o=document.createTextNode("Supercharged");r.appendChild(o),!0!==this.data.showTitle&&void 0!==this.data.showTitle||(this.data.content&&this.data.content.render?e.appendChild(this.data.content.render()):e.appendChild(r));var i=document.createElement("p");document.createTextNode("Hello"),e.appendChild(i),this.res=e,window.addEventListener("scroll",function(o){return t.resize(e,n,r)}),this.resize(e,n,r)}},{key:"setStickyData",value:function(t){return this.data.stickyData=t,this}},{key:"toAuto",value:function(){return this.res.style.height="auto",this}},{key:"stick",value:function(t){return t?(t.offset&&(null!=this.data.stickyData?this.data.stickyData.top=t.offset:(this.data.stickyData={top:t.offset},this.fixedToRelative(!0))),t.value?this.makeSticky():this.noSticky(),this):(this.makeSticky(),this)}},{key:"makeSticky",value:function(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top=0,this}},{key:"setProps",value:function(t){return t.targetHeight&&(this.data.targetHeight=t.targetHeight),t.flagValue&&(this.data.flagValue=t.flagValue),this}},{key:"noSticky",value:function(){return this.wrdiv.style.position="",this}},{key:"toSticky",value:function(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top="0",this}},{key:"toOpacity",value:function(t){this.res.style.opacity="".concat(t)}},{key:"setUncomment",value:function(t){this.data.uncomment=t}},{key:"fixedToRelative",value:function(t){return this.data.uncomment=t,this}},{key:"mask",value:function(t){var e=this;return window.addEventListener("scroll",function(){e.innerMask(t)}),this}},{key:"innerMask",value:function(t){return t&&(Lu(window.scrollY,{min:t.start,max:t.end},{min:7,max:0}),Lu(window.scrollY,{min:t.start,max:t.end},{min:37,max:37})),this}},{key:"setScale",value:function(t){var e=this;return this.data.range=t,this.m2img.style.transform="scale(".concat(this.data.range.scaleMax,")"),window.addEventListener("scroll",function(){var t=Lu(window.scrollY,{min:e.data.range.min,max:e.data.range.max},{min:e.data.range.scaleMax,max:e.data.range.scaleMin});null!=e.m2img&&(e.m2img.style.transform="scale(".concat(t,")"))}),this}},{key:"resize",value:function(t,e,n){var r=window.scrollY||document.documentElement.scrollTop;if(r>this.lastScrollTop?this.isUp=!1:this.isUp=!0,this.data.sticky)t.style.background="#fafafa";else if(this.data.stickyData){var o=this.data.stickyData.top;this.data.uncomment&&(window.scrollY>o?(t.style.position="relative",t.style.top=o):(t.style.top=0,t.style.position="fixed"))}this.lastScrollTop=r<=0?0:r;var i=e;this.m2img=e,this.data.view&&(i=this.m2img);var a=Lu(window.scrollY,{min:3150,max:3300},{min:0,max:100}),s=Lu(window.scrollY,{min:3150,max:3300},{min:60,max:80}),l=Lu(window.scrollY,{min:3150,max:3300},{min:0,max:40});this.data.operation&&"translate"===this.data.operation.type&&(i.style.transform="translate3d(".concat(a,"%, ").concat(a/2,"%, 0px) scale(").concat(s/100,") rotate(").concat(l,"deg)"))}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],e&&Mu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Lu(t,e,n){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var r=(t-e.min)/(e.max-e.min);e.min>e.max&&(r=(t-e.max)/(e.min-e.max));var o=(n.min-n.max)*r-n.min;if(o=Math.abs(o),n.min<n.max){var i=(n.max+Math.abs(n.min))*r;o=n.min+i}return o}function zu(t){return zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(t)}function Nu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bu(r.key),r)}}function Bu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}var Wu=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.res=document.createElement("div"),this.res.style.display="flex",this.res.style.flexDirection="column"},(e=[{key:"add",value:function(t){for(var e=0;e<t.length;e++){var n=t[e].render();0===e&&(n.style.zIndex=1),this.res.appendChild(n)}return this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&Nu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Uu(t){return Uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(t)}function qu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hu(r.key),r)}}function Hu(t){var e=function(t){if("object"!=Uu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uu(e)?e:e+""}var Gu=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.frameNumber=0,this.res=document.createElement("div"),this.vid=null,this.minScrollHeight=0,this.maxScrollHeight=1e3,this.videoUrl=""},e=[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.minScrollHeight,n=void 0===e?0:e,r=t.maxScrollHeight,o=void 0===r?1e3:r,i=t.videoUrl,a=void 0===i?"":i;return this.minScrollHeight=n,this.maxScrollHeight=o,this.videoUrl=a,this.createElements("V0"),this.vid=this.res.children[0],this.init(),this}},{key:"createElements",value:function(t){var e=document.createElement("video");e.id=t,e.setAttribute("tabindex","0"),e.setAttribute("autobuffer","autobuffer"),e.setAttribute("preload","preload"),e.style.position="sticky",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100vh",e.style.border="1px solid orange";var n=document.createElement("source");n.type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"',n.src=this.videoUrl,e.appendChild(n),this.res.appendChild(e);var r=document.createElement("p");r.id="time",r.style.fontFamily="Helvetica, Arial, sans-serif",r.style.fontSize="24px",this.res.appendChild(r);var o=document.createElement("div");o.id="set-height",o.style.display="block",this.setop=o,this.res.appendChild(o)}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"init",value:function(){var t=this;this.vid.addEventListener("loadedmetadata",function(){var e=t.setop;if(e){var n=t.maxScrollHeight-t.minScrollHeight;e.style.height="".concat(n,"px")}else console.error("Error: 'set-height' element not found.")}),this.scrollPlay()}},{key:"scrollPlay",value:function(){var t=this;if(this.vid&&!isNaN(this.vid.duration)){var e=Math.max(this.minScrollHeight,Math.min(window.pageYOffset,this.maxScrollHeight)),n=this.maxScrollHeight-this.minScrollHeight,r=(e-this.minScrollHeight)/n;this.vid.currentTime=r*this.vid.duration,window.requestAnimationFrame(function(){return t.scrollPlay()})}else window.requestAnimationFrame(function(){return t.scrollPlay()})}},{key:"toCode",value:function(){return[""]}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],e&&qu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Xu(t){return Xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(t)}function Vu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ju(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vu(Object(n),!0).forEach(function(e){Yu(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Yu(t,e,n){return(e=function(t){var e=function(t){if("object"!=Xu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xu(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $u,Qu="";function Ku(t){Qu=String(null!=t?t:"").replace(/\/+$/,"")}function Zu(t,e){if("undefined"!=typeof document){document.head.querySelectorAll(t).forEach(function(t){return t.remove()});var n=e();n&&document.head.appendChild(n)}}function tf(t,e,n){if(null==n||""===n)return null;var r=document.createElement("meta");return r.setAttribute(t,e),r.setAttribute("content",String(n)),r.setAttribute("data-seo","1"),r}function ef(t){if("undefined"!=typeof document){var e,n=Qu||("undefined"!=typeof window&&null!==(e=window.location)&&void 0!==e&&e.origin?window.location.origin:""),r=t.path?n?new URL(t.path,n).toString():t.path:n||"",o=null;t.image&&(o=/^https?:/i.test(t.image)?t.image:n?new URL(t.image,n).toString():t.image),Zu('meta[name="description"][data-seo]',function(){return tf("name","description",t.description)}),Zu('link[rel="canonical"][data-seo]',function(){if(!r)return null;var t=document.createElement("link");return t.setAttribute("rel","canonical"),t.setAttribute("href",r),t.setAttribute("data-seo","1"),t}),Zu('meta[property="og:type"][data-seo]',function(){var e;return tf("property","og:type",null!==(e=t.ogType)&&void 0!==e?e:"website")}),Zu('meta[property="og:title"][data-seo]',function(){return tf("property","og:title",t.title)}),Zu('meta[property="og:description"][data-seo]',function(){return tf("property","og:description",t.description)}),Zu('meta[property="og:url"][data-seo]',function(){return tf("property","og:url",r)}),Zu('meta[property="og:image"][data-seo]',function(){return tf("property","og:image",o)}),Zu('meta[property="og:site_name"][data-seo]',function(){return tf("property","og:site_name",t.siteName)}),Zu('meta[name="twitter:card"][data-seo]',function(){return tf("name","twitter:card",o?"summary_large_image":"summary")}),Zu('meta[name="twitter:title"][data-seo]',function(){return tf("name","twitter:title",t.title)}),Zu('meta[name="twitter:description"][data-seo]',function(){return tf("name","twitter:description",t.description)}),Zu('meta[name="twitter:image"][data-seo]',function(){return tf("name","twitter:image",o)}),Zu('script[type="application/ld+json"][data-seo]',function(){if(!t.jsonLd)return null;var e=document.createElement("script");return e.setAttribute("type","application/ld+json"),e.setAttribute("data-seo","1"),e.textContent=JSON.stringify(t.jsonLd),e})}}function nf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.name,n=t.url,r=t.inLanguage;return Ju({"@context":"https://schema.org","@type":"WebSite",name:e,url:n},r?{inLanguage:r}:{})}function rf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.name,n=t.url,r=t.logo,o=t.sameAs;return Ju(Ju({"@context":"https://schema.org","@type":"Organization",name:e,url:n},r?{logo:r}:{}),o?{sameAs:o}:{})}function of(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.name,n=t.description,r=t.image,o=t.brand,i=t.category,a=t.sku,s=t.url,l=t.price,c=t.priceCurrency,u=void 0===c?"USD":c,f=t.availability,d=void 0===f?"https://schema.org/InStock":f,h=Ju(Ju(Ju(Ju(Ju({"@context":"https://schema.org","@type":"Product",name:e},n?{description:n}:{}),r?{image:Array.isArray(r)?r:[r]}:{}),o?{brand:"string"==typeof o?{"@type":"Brand",name:o}:o}:{}),i?{category:i}:{}),a?{sku:a}:{});return null!=l&&(h.offers=Ju(Ju({"@type":"Offer"},s?{url:s}:{}),{},{priceCurrency:u,price:String(l),availability:d})),h}function af(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.headline,n=t.description,r=t.image,o=t.author,i=t.datePublished,a=t.dateModified,s=t.publisher,l=t.url;return Ju(Ju(Ju(Ju(Ju(Ju(Ju({"@context":"https://schema.org","@type":"Article",headline:e},n?{description:n}:{}),r?{image:Array.isArray(r)?r:[r]}:{}),o?{author:"string"==typeof o?{"@type":"Person",name:o}:o}:{}),i?{datePublished:i}:{}),a?{dateModified:a}:{}),s?{publisher:"string"==typeof s?{"@type":"Organization",name:s}:s}:{}),l?{mainEntityOfPage:l}:{})}function sf(){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t,e){return{"@type":"ListItem",position:e+1,name:t.name,item:t.url}})}}function lf(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return cf(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,s=0,l=t,d.n=n,a}};function h(n,r){for(s=n,l=r,e=0;!f&&c&&!o&&e<u.length;e++){var o,i=u[e],h=d.p,p=i[2];n>3?(o=p===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,d.n=p,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,p),s=u,l=p;(e=s<2?t:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(e){i=t,s=1,l=e}finally{c=1}}return{value:e,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(cf(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,cf(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=c,cf(f,"constructor",c),cf(c,"constructor",l),l.displayName="GeneratorFunction",cf(c,o,"GeneratorFunction"),cf(f),cf(f,o,"Generator"),cf(f,r,function(){return this}),cf(f,"toString",function(){return"[object Generator]"}),(lf=function(){return{w:i,m:d}})()}function cf(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}cf=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){cf(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},cf(t,e,n,r)}function uf(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}var ff="undefined"!=typeof process&&!(null===($u=process.versions)||void 0===$u||!$u.node),df="undefined"!=typeof Function?new Function("s","return import(s)"):null;function hf(t){return pf.apply(this,arguments)}function pf(){var t;return t=lf().m(function t(e){var n,r,o,i,a,s,l,c,u,f,d,h,p,y,m,v=arguments;return lf().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=(n=v.length>1&&void 0!==v[1]?v[1]:{}).fallback,o=void 0===r?void 0:r,i=n.quiet,a=void 0!==i&&i,t.p=1,!ff||!df){t.n=7;break}return t.n=2,df("node:fs");case 2:return s=t.v,t.n=3,df("node:path");case 3:l=t.v,c=process.cwd(),u=0,f=[l.join("upload",e),e];case 4:if(!(u<f.length)){t.n=6;break}if(d=f[u],h=l.resolve(c,d),!s.existsSync(h)){t.n=5;break}return t.a(2,JSON.parse(s.readFileSync(h,"utf8")));case 5:u++,t.n=4;break;case 6:throw new Error("loadJson: ".concat(e," not found (tried ./upload/").concat(e," and ./").concat(e,")"));case 7:return t.n=8,fetch("./".concat(e));case 8:if((p=t.v).ok){t.n=9;break}throw new Error("HTTP ".concat(p.status));case 9:return t.n=10,p.json();case 10:return t.a(2,t.v);case 11:if(t.p=11,m=t.v,void 0===o){t.n=12;break}return a||"undefined"==typeof console||console.warn("[loadJson] ".concat(e," failed (").concat(null!==(y=null==m?void 0:m.message)&&void 0!==y?y:m,") — using fallback")),t.a(2,o);case 12:throw m;case 13:return t.a(2)}},t,null,[[1,11]])}),pf=function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){uf(i,r,o,a,s,"next",t)}function s(t){uf(i,r,o,a,s,"throw",t)}a(void 0)})},pf.apply(this,arguments)}"undefined"!=typeof window&&(window.ElementMapper=fl,window.Animator=_t,window.Text=Xt,window.Image=re,window.Link=he,window.FlexRow=Se,window.UINavBar=Le,window.Free=cn,window.NAudio=bl,window.Progress=On,window.Center=Pn,window.Code=Nn,window.Stack=Xn,window.Wrapper=rr,window.Svg=El,window.MetaAdder=ur,window.Table=wr,window.Dropdown=Cr,window.Modal=Fr,window.TextField=qr,window.Card=Qr,window.Wrap=oo,window.FlexGrid=ho,window.ZoomCard=wo,window.CustomDivRenderer=Te,window.SideBar=Ge,window.SideNav=tn,window.SimpleBar=To,window.DesktopBar=Do,window.MobileBar=Go,window.Switcher=ni,window.Spacer=ui,window.HScroller=Al,window.Checkbox=bi,window.Base=Ft,window.FilePickera=Ta,window.Picker=wa,window.Range=ca,window.RadioGroup=ha,window.DataList=Ma,window.Button=Ji,window.Des=Tu,window.LinkStyler=Ha,window.CardGen=pu,window.KeyframeAnim=Ru,window.TransformAnim=Fu,window.Stacker=Wu,window.ScrollVideo=Gu,window.Theme=o,window.AreaSwitcher=Qa,window.Video=Pi,window.UList=Wi,window.Slider=Ki,window.Polygon=ls,window.Circle=vs,window.GridOverlay=Ls,window.Shop=$s,window.FloatingInput=ia,window.Form=Ba),void 0!==t.g&&(t.g.ElementMapper=fl,t.g.Animator=_t,t.g.Text=Xt,t.g.Image=re,t.g.Link=he,t.g.FlexRow=Se,t.g.UINavBar=Le,t.g.Free=cn,t.g.NAudio=bl,t.g.Progress=On,t.g.Center=Pn,t.g.Code=Nn,t.g.Stack=Xn,t.g.Wrapper=rr,t.g.Svg=El,t.g.MetaAdder=ur,t.g.Table=wr,t.g.Dropdown=Cr,t.g.Modal=Fr,t.g.TextField=qr,t.g.Card=Qr,t.g.Wrap=oo,t.g.FlexGrid=ho,t.g.ZoomCard=wo,t.g.CustomDivRenderer=Te,t.g.SideBar=Ge,t.g.SideNav=tn,t.g.SimpleBar=To,t.g.DesktopBar=Do,t.g.MobileBar=Go,t.g.Switcher=ni,t.g.Spacer=ui,t.g.HScroller=Al,t.g.Checkbox=bi,t.g.Base=Ft,t.g.FilePickera=Ta,t.g.Picker=wa,t.g.Range=ca,t.g.RadioGroup=ha,t.g.DataList=Ma,t.g.Button=Ji,t.g.Des=Tu,t.g.LinkStyler=Ha,t.g.CardGen=pu,t.g.KeyframeAnim=Ru,t.g.TransformAnim=Fu,t.g.Stacker=Wu,t.g.ScrollVideo=Gu,t.g.Theme=o,t.g.AreaSwitcher=Qa,t.g.Video=Pi,t.g.UList=Wi,t.g.Slider=Ki,t.g.Polygon=ls,t.g.Circle=vs,t.g.GridOverlay=Ls,t.g.Shop=$s,t.g.FloatingInput=ia,t.g.Form=Ba);export{_t as Animator,Qa as AreaSwitcher,Ft as Base,Ji as Button,Qr as Card,pu as CardGen,Pn as Center,bi as Checkbox,vs as Circle,Nn as Code,Te as CustomDivRenderer,Ma as DataList,Tu as Des,Do as DesktopBar,Cr as Dropdown,fl as ElementMapper,Ta as FilePickera,ho as FlexGrid,Se as FlexRow,ia as FloatingInput,Ba as Form,cn as Free,Ls as GridOverlay,Al as HScroller,re as Image,Ru as KeyframeAnim,he as Link,Ha as LinkStyler,ur as MetaAdder,Go as MobileBar,Fr as Modal,bl as NAudio,wa as Picker,ls as Polygon,On as Progress,ha as RadioGroup,ca as Range,Gu as ScrollVideo,$s as Shop,Ge as SideBar,tn as SideNav,To as SimpleBar,Ki as Slider,ui as Spacer,Xn as Stack,Wu as Stacker,El as Svg,ni as Switcher,wr as Table,Xt as Text,qr as TextField,o as Theme,Fu as TransformAnim,Le as UINavBar,Wi as UList,Pi as Video,oo as Wrap,rr as Wrapper,wo as ZoomCard,ef as applySeoMeta,af as articleJsonLd,sf as breadcrumbJsonLd,hf as loadJson,rf as organizationJsonLd,of as productJsonLd,Ku as setSeoOrigin,nf as websiteJsonLd};